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:
GRUB_DEFAULT=0

Save and close the file

$ sudo update-grub

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

2 comments:

Ladi onetime said...

thanks! great and easy tutorial.

ladi.

Shashia said...

Hi

I changed my default OS to Windows using the steps you mentioned. But then, WINXP would not start because the grub corrupted my "device.map" file in /boot/grub :(

I found help on how to reset my device.map and also re-installed my GRUB version using "sudo apt-get install grub2" and added the drive info of WIndows XP in the device.map.

Now, the default Os is changed to WInXP. Thanks for this post :)

Zero income tax on Capital Gain on sale of house property

We signed agreement to sale our flat in Delhi on 31st March 2025 and started house hunting in Bhopal online immediately on sites like 99acre...