Changing Default OS On Dual-Boot System (Ubuntu)

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.

Free eBook!

Like what you read?

If so, please join over 28,000 people who receive our exclusive weekly newsletter and computer tips, and get FREE COPIES of 5 eBooks we created, as our gift to you for subscribing. Just enter your name and email below:

Post A Comment Using Facebook

  • http://www.geezergeek.net Floyd Bufkin

    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.

  • marc

    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.

  • Pingback: Linux HowTo - Stiri ITC | news that bubbles

  • SAP

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

    • agree

      I was going to say the same thing. I’m glad I’m not the only person who noticed.

      • http://www.menga.net Rich Menga

        I’m leaving the error there just to see how many people point it out.

  • http://www.geezergeek.net Floyd Bufkin

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

What’s Your Preference?

Daily Alerts

Each day we send out a quick email to thousands of PCMECH readers to notify them of new posts. This email is just a short, plain email with titles and links to our latest posts. You can unsubscribe from this service at any time.

You can subscribe to it by leaving your email address in the following field and confirming your subscription when you get an email asking you to do so.

Enter your email address for
Daily Updates:

Weekly Newsletter

Running for over 6 years, the PCMECH weekly newsletter helps you keep tabs on the world of tech. Each issue includes news bits, an article, an exclusive rant as well as a download of the week. This newsletter is subscribed to by over 28,000 readers (many who also subscribe to the other option) - come join the community!

To subscribe to this weekly newsletter simply add your email address to the following field and then follow the confirmation prompts. You will be able to unsubscribe at any time.

Enter your email address for
Free Weekly Newsletter: