Changing Default OS On Dual-Boot System (Ubuntu)

Posted Oct 22, 2008 | by Rich Menga  

For those of you out there that run a dual-boot system with Windows XP and Ubuntu, you’ve noticed that Ubuntu is the default OS that loads on each system startup. There is a way to change this so that XP is the default OS instead.

Full documentation:

https://help.ubuntu.com/community/GrubHowto/ChangeDefaultOS

What that documentation instructs you to do:

The boot order list is in a text file called menu.lst. You can edit this using a terminal text editor or by using gedit (a GUI-based text editor).

The OS choice in menu.lst is defined by the default line and title.

If for example the default num is set to 0 and you have the following in your grub.lst:

title      Ubuntu, kernel 2.6.15-27-amd64-generic
...
title      Ubuntu, memtest86+
...
title      Other operating systems:
...
title      Microsoft Windows XP Home

“0″ is representative of the first title (it starts from 0, not 1), so you would want the default num to be 4 to start Windows XP first.

For those asking “Um.. okay, so Other operating systems: is technically treated as an OS choice?” Yes it is. That’s the way it’s done in order to display it in the menu on boot.

On my personal system, Windows XP Professional is listed as title 6.

This may sound confusing but it isn’t. All you have to do is when counting the title entries, find the first one (which is 0) then count down until you find the Windows XP entry. Change default num to that number, save the file and reboot. If successful, XP will start first on boot.

Which Of These Traits Applies To YOUR Computing Life?...

7 Responses to “Changing Default OS On Dual-Boot System (Ubuntu)”

  1. Floyd Bufkin says:

    The file to edit is menu.lst, not grub.lst. It must be edited with root privileges, so to edit the file just type:
    gksu gedit /boot/grub/menu.lst
    at the command prompt.

  2. marc says:

    Gedit-ing your /boot/grub/menu.lst is one way to do it. You can edit the timeout before the default OS boots, too.

    However, there’s more than one way to skin those cats.

    Ubuntu 8.04 comes with Startup Manager built in (System>Administration>Startup Manager). You can use it to edit your boot menu in a GUI.

    QGRUBEditor has been available since 7.10. It has a graphical front end and lots of features. You can backup and restore your boot/grub/menu.lst, add and remove entries, edit entries, set the default and create a splash image. I don’t remember if you can edit the timeout and my Ubuntu box isn’t handy at the moment. If memory serves, it can be installed through the Synaptic Package Manager.

    Another option, KGRUBEditor, does pretty much everything QGRUBEditor does, plus you can edit the timeout and choose from additional colors for your boot screen.

  3. [...] Changing Default OS On Dual-Boot System (Ubuntu) [...]

  4. SAP says:

    The Windows title is the 4th entry, so surely the default should be set to 3 – not 4 – if the numbering starts from 0?

  5. Floyd Bufkin says:

    Well, I was the first one to spot the “grub.lst” error. I see you changed that!!

Leave a Reply