Sunday, July 8, 2007

HOWTO set Windows as default boot menu choice after installing Ubuntu

You heard about Ubuntu Linux and wanted to give it a try. So you installed it but since you are still not used to it you use Windows much more than Linux. The problem is that grub set the Ubuntu as first boot selection so if you wish to boot to Windows when powering on your computer you need to wait for a boot menu to show up and then select Windows from it. Very annoying, I know. So what to do?

When boot menu opens remember in which row the Windows menu was. Count every row including the one which says "Other operating systems:" and count it in a way that first row is
zero, second one, third two and so on. Remember in which row was Windows. (Keep in mind that if it was the 5th row remember 4.)

Now boot to Ubuntu, open terminal and type:

sudo nano /boot/grub/menu.lst

In roughly tenth row there will be written:

default 0

replace the number 0 with the number of row in which windows were. (Again keep in mind that if it was in 5th row type 4.)

Save by pressing ctrl+o and enter and exit by pressing ctrl+x.
Reboot the computer and after the timeout finishes your computer will boot to Windows os.

Also if you wish you can change the timeout time by replacing
timeout 10 in "/etc/grub/menu.lst" with timeout x where x is custom timeout in seconds.

If there is no default 0 or timeout 10 row in your /boot/grub/menu.lst you can simply add it yourself.

No comments: