Ubuntu dual-boot tip - retain Windows as your default OS

  • January 18, 2007
  • Avatar for peter
    Peter
    Upfold

If you've just installed a dual-boot Windows XP and Ubuntu system (as per this tutorial perhaps), you might notice that the new boot menu that comes up when you start your computer has Windows last and all the Ubuntu options first.

If you're not ready to jump in at the deep end just yet, or you've got some Windows apps you still need, or you're just playing with Ubuntu and Windows is still your OS, you might want Windows to be the default option when you boot, so you don't have to use the keyboard to select it every time you boot up.

Well, that process is actually pretty easy.

At your desktop, press Alt-F2 and type in the following and press Enter:

gksu gedit /boot/grub/menu.lst

Run Application dialogue

(Kubuntu users, please type kdesu kwrite /boot/grub/menu.lst)

Enter your user password in, and a text editor will open up. In this text editor, find the line with the following on it:

# examples

Under that, will be a section of text looking like this:

# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1

Remove the hash signs (#) from all of these lines (not the # example line, only the bits I've shown above), so that this section of the file looks like this:

title Windows 95/98/NT/2000
root (hd0,0)
makeactive
chainloader +1

If you want, you can also rename the title to something more descriptive. The file should now look a bit like this:

/boot/grub/menu.lst

Once that's done, save and close the file and reboot.

Windows should now be your default OS, and you simply press the down arrow and enter to load Ubuntu.

In the unlikely event that things get screwed up and you can't boot anything, 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.

Avatar for peter Peter Upfold

Home » Articles »