레이블이 grub인 게시물을 표시합니다. 모든 게시물 표시
레이블이 grub인 게시물을 표시합니다. 모든 게시물 표시

2016년 7월 6일 수요일

Apache Issues of upgrading Ubuntu Server 12.04 LTS to 14.04 LTS

After '# do-release-upgrade' from Ubuntu Server 12.04 LTS to 14.04 LTS

On the dialog of grub setting, I just typed Enter with the default selection of hdd choice.

And, it failed to boot after the dist upgrade and went into its rescue mode.


I googled but couldn't find an exact same case, but it's... grub. Yes, GRUB. ... 2 actually.

I have RAID0 (mirroring) arrayed by mdadm with two of 500GB WD hard drives. So I did it with sdb too.

$ sudo grub-install /dev/sda
$ sudo grub-install /dev/sdb
$ sudo update-grub 

Reboot, and problem solved.


Apache2 couldn't run itself after the upgrade.

    $ sudo service apache2 status

So it was not running.

    $ sudo service apache2 start


It showed me some error msg about the reason, but definitely it's caused by the upgrade. Yes, I chose 'Keep current settings' when the new apache2 installation process asked me what to do.

    $ cd /etc/apache2
    $ mv apache2.conf apache2.conf.old

apache2.conf is my old setting and wasn't compatible perfectly to run new apache2. Of course there was a kind skeleton file for that, 'apache2.conf.dpkg-dist'.

    $ mv apache2.conf.dpkg-dist apache2.conf
    $ sudo vi apache2.conf

I added a line for phpmyadmin, one more for the ServerName at the end of the conf file.

    Include /etc/phpmyadmin/apache.conf
    ServerName www.mywebsite.com

When I started apache2 service again, it worked the same as before.




2015년 4월 30일 목요일

Essential Linux Commands (still updating)

gdm: How to stop & restart gdm

Go out from X by Ctrl+Alt+F1 and login to a console first and

$sudo service gdm stop
or
$sudo /etc/init.d/gdm stop

This works for most services in /etc/init.d/ with start/stop/restart.

blkid: How to get UUIDs of hard disks to tweak /etc/fstab

$sudo blkid
$sudo blkid -s UUID


hdparm: Find out Hard disk Spec (brand, model, size, etc.)

$sudo hdparm -I /dev/sda


Changing a target of symlink

instead of

$ rm -f symlink
$ ln -s target symlink

when a target is a file

$ ln -sf new_target symlink

not to mind the target is a directory or a file then

$ ln -sfn new_target_dir symlink


mdadm: Multiple Device Admin (Linux Software RAID)
$ cat /proc/mdstat
$ sudo mdadm /dev/md0 -r /dev/sda1
$ sudo mdadm /dev/md0 -a /dev/sda1


grub: Change the installed hard disk (MBR change, for example, into sda)

$ sudo grub-install /dev/sda
$ sudo update-grub

grub: Change the default boot kernel/OS

$ fgrep menuentry /boot/grub/grub.cfg
copy menuentry text that you want to boot by default,
$ sudo vi /etc/default/grub
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.2.0-16-generic"

(when your new kernel doesn't work properly && grub is already updated with the new kernel's entry, the text of GRUB_DEFAULT above works well)
$ sudo update-grub



Xubuntu: Installing a Printer (Canon G3060 PIXMA)

$ sudo apt install system-config-printer Download the proper driver for linux from Canon website. Turn on the printer and set up its WiFi. C...