Please note that this is for the “legacy” version of GRUB still widely in use, not the next-generation GRUB 2. If unsure, check out this guide on how to find out which version of GRUB you are using.
You can make GRUB boot to an operating system other than Ubuntu, like Windows, by simply editing a bit of text. Open menu.lst for editing as superuser by pasting the following into a terminal:
sudo gedit /boot/grub/menu.lst
and near the top you should see:
You will need to change the “default” value from “0” (zero) to the number of the Windows entry, which should be near the bottom of the file and look like:
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows XP Professional x64 Edition
Noting that the default entry (Ubuntu) is “0” not “1”, simply count the entries at the bottom of menu.lst, and deduct 1 from the value of the Windows drive/partition.
In other words, if your GRUB menu has the four basic options (Ubuntu, Ubuntu Recovery Mode, Memtest+, and Windows), then your Windows drive is the fourth option, so the “default” value should be “3”. Obviously, if your boot menu has some earlier kernels still listed, and altogether there are 8 entries with Windows as the last, then the value would be “7“. As I said, simply count the entries at the bottom of menu.lst (they should all look similar to the Windows one) and deduct one from it (assuming Windows is the last entry, of course).
Close and save menu.lst and GRUB will automatically boot Windows from then onwards. You can of course still choose another OS like Ubuntu at the boot menu before the countdown finishes.
Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!