Wednesday, November 11, 2009

How to change default Operating System on Ubuntu 9.10 Karmic Koala

Some people use Ubuntu in dual boot with Windows and they prefer to make Windows as default Operating System. Prior to Ubuntu 9.10 this was achieved by changing the default line in /boot/grub/menu.lst file.

Ubuntu 9.10 Karmic Koala has Grub2 which does not have menu.lst file. The configuration file is /boot/grub/grub.cfg which is not supposed to be edited even by root. The primary configuration file for changing menu display settings is /etc/default/grub. The procedure to change the default OS is as follows:

Count the line number in the Grub menu taking first line as 0.
$ gksudo gedit /etc/default/grub

Change 0 in this line to the desired number:

Save and close the file

$ sudo update-grub

After running update-grub the default will change in grub.cfg
Post a Comment