Home » ubuntu » How to change boot order (default operating system) from Ubuntu to Windows XP

How to change boot order (default operating system) from Ubuntu to Windows XP



Want to change your boot order from Ubuntu to Windows XP and make it your default operating system? If you were using Windows XP and you recently downloaded Ubuntu 10.04 or some previous version, then you must already be logging into your newer operating system rather than the familiar one.

This is a bit of a nuisance, especially when you just want to try out Ubuntu and keep working in Windows XP. Although you can still log into Windows XP by using the arrow keys as the Grub operating system menu displays the list of available operating system for 9 seconds, sometime you do forget to choose. There’s no need to worry. You can easily change the boot order and select Windows XP as your default operating system instead of Ubuntu.

There’s a longer way of doing it, and a shorter way of doing it. The next time you start your computer or laptop, quickly note down the list of all operating system options visible in the menu, even the recovery things. No, you don’t have to write within 9 seconds. Press the down arrow key once and the countdown stops. The indexing of the menu items begins with 0 (zero) so right now probably your default operating system — Ubuntu 10.04 — is at the first place, so its value is 0. Your Windows XP should be anywhere from 4-5. You can boot into Ubuntu after this.

Once your operating system has fully loaded launch your Terminal window (Applications->Accessories->Terminal) and execute the following command:

sudo gedit /etc/default/grub

The latest version of Ubuntu, that is, 10.04, uses Grub2 to manage your menus. In the previous versions you’ll need to change the menu.lst file. We’ll assume (how convenient) you’re using the latest version. Remember to use sudo because then you can execute the commands as “root”. Still, suspicious as Linux and UNIX systems are, it’ll ask for your password and only then proceed.

The above-mentioned command will open a file that contains your menu listing. The only variable, right now, of interest is GRUB_DEFAULT as this decides what’s going to be your default operating system. If your Windows XP entry in the menu has 5 as index value, edit the GRUB_DEFAULT entry as

GRUB_DEFAULT=4

instead of

GRUB_DEFAULT=0

After this, you need to issue the following command on the Terminal prompt:

sudo update-grub

That’s it. Reboot and you’re done. From now onwards you’re default operating system will be Windows XP, although you can still scroll down and work on Ubuntu.

Oh yes, now the shorter way. It’s only shorter (compared to the above one) if you already have the Startup Manager installed. If it is installed you’ll probably find it at System->Administration->Startup-Manager. It’s GUI easily let’s you decide what all you can do to the initial operating system boot order. In case it’s not installed, you can install it via Synaptic Package Manager that you’ll find at System->Administration->Synaptic Package Manager. Search for Startup Manager and install it.