Last week, I covered how to use KGRUBEditor to re-order the boot menu you see at startup, so that dual boot users could move Windows to the top of the list if they would like.
It is also relatively simple, however, to manually reorder this menu by editing the configuration file of GRUB (that's the boot loader).
This tutorial will focus on Debian/Ubuntu, however these instructions should be able to be followed on any distribution (just ignore things about the automagic kernel list).
First of all, a word of warning. Editing configuration files can be a potentially risky business. Make sure you know what you're doing. You should also make a copy of the file /boot/grub/menu.lst and store it somewhere safe (you can restore it with a Live CD later if the worst does happen). If anything does go wrong, see the end of this post.
Right, let's get started. First of all, we need to open up the configuration file in an editor.
Assuming you're running GNOME, press Alt-F2 to bring up the Run Application window. Type gksu gedit /boot/grub/menu.lst and click Run. Enter your password when prompted.
This will open up a text editor, with the GRUB configuration file ready to edit. So let's assume once again that you want Windows to be the default entry.
Scroll towards the bottom of the file, you should see a section similar to this:
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
Select this whole section and choose Edit > Cut.
Scroll back up to find a line like this:
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
Just after that line, but before BEGIN AUTOMAGIC KERNEL LIST, use Edit > Paste to put the Windows entry above all the Ubuntu entries.
Save the file and quit the editor. Assuming you did the process correctly, when you reboot, Windows should be at the top of the list and the default boot option. To start Linux, simply press down once and then Enter!
If you did run into problems, you can restore the functionality of Windows by booting the computer with the Windows XP CD in, choosing to go into the Recovery Console and typing fixmbr at the prompt. Linux can then be fixed by re-running the GRUB install from a Live CD.