Configuring GRUB for the dual-boot Ubuntu/Windows XP environment

I briefly had a dual boot setup a few years ago. Booting between Linux (I can’t remember which distro) and Windows XP was always clunky. Two problems normally come up:

  • With each subsequent kernel upgrade in Ubuntu, you get an extra two lines of boot options. Eventually, it becomes hard to find the Windows option, which is inevitably at the bottom of this endless list of kernel options.
  • When you’re using Windows XP as the primary OS, you want it to be the default Operating System rather than Ubuntu. Another possible option is having the computer automatically boot into the last used OS.

A bit of history. Back in the day, you had to manually edit the /boot/grub/menu.lst file. This was – as much old-school Linux was – archaic, confusing and dangerous. Who knows what you’d mess up by deleting an option or screwing something up.

These days, configuring your GRUB is infinitely easier. Why? Well, like the rdesktop tool we talked about yesterday, there’s a GUI interface to help you tweak GRUB to perfection.

Startup Manager

The utility is startup-manager. Of course, it’s not installed by default, but with the swoosh of an apt-get, you can install it. Run this command:

sudo apt-get install startupmanager

And in a few moments, you’ll be able to open Startup Manager from the System > Administration menu. Let’s take a look at the Boot Options tab:

Ubuntu Startup Manager

You can use this tab to enable or disable the bootloader timeout. Because I’m dual booting, I don’t want to do this, but I may decrease the amount of time to choose from 10 seconds to 5 seconds.

The next option for Default Operating System is pretty cool. Not only can you choose your Windows partition as default in here, but you can configure GRUB to start the last-used OS, which is convenient. The other options don’t bother me that much.

The Security tab allows you to password protect the bootloader. If you really want to.

Now, let’s flip to the Advanced tab:

Advanced Startup Settings

The number of kernels option keeps your startup list tidy, removing all the outdated kernels and just displaying the most recent one. Tick the box, and set the number of kernels to keep to your desired amount.

The miscellaneous options give you the ability to create a rescue floppy (useful if you manage to wipe your master boot record), or you can restore the original GRUB settings.

Now, that was much easier than messing with the menu.lst file, wasn’t it?

Stumblers! If you’re a StumbleUpon user, and you found this post useful, please give it a thumbs up and some kind words! I’m an active SU user, so please do check out my profile and stumbles! Cheers 🙂

13 comments

  1. hey…im a new user to ubuntu and the whole dual boot world. ur tut seem easy to follow, i’ll give it a try and let you know if it worked for me.keep up the good work, i appreicate the time people like ur self spend to help nubies like me.cheers:-)

  2. i have no idea how to do partitions and i want to dual boot XP with Ubuntu Intrepid Ibix, i just ordered it ( a DL would take AGES on my laptop) and was wondering if you had any advice for me, i am an extreme newbie and won’t be able to understand tech-speak, im sorry for this inconvenience, but im only a layman…

  3. I would strongly urge keeping at least 2 kernels in the list; if you update to a newer kernel and for some reason it won’t boot on your machine, you have the option of booting into the previous kernel to find out what is wrong.

  4. Looks good. Certainly usefull.However, I was looking for something that would help me setup dual-boot with windows. 🙂

  5. Now days there is very little reason to dual boot, your home PC, except maybe for gaming.  Most of the very popular PC games will not run on Linux without bunch of “tweaks” to config files and installation of Wine.Linux has come a long way to replacing all the apps, you used to pay Microsoft for (dearly), with free open-source replacements.  There is nothing (word processing, photo manipulation, web, mail, etc. etc. )on my home Linux PC that I can’t do, that I used to use XP.Linux will run on almost any inexpensive PC so save yourself the hassle of partitioning and dual-booting and either go all Linux, or keep your XP and get an inexpensive (sub $300) PC for you to learn Linux.  Connect your single monitor to both PC’s with an inexpensive 2 port KVM (IOGEAR sells for less than $20.00) Then make the transition to all Linux when you are ready.

  6. Thanks Gerard.It’s wonderfull that every question a ubuntu’s user have would be answered by people like you who are contributing to this community which become bigger every passing day.

  7. dear gerard,i have a dual bbot machine ubuntu 8.04lts and win xp.suddenly i don’t find the win xp any more in the grub menu!!when i list the grub options i get all the ubuntu versions and also win xp.what could be the problem and any solution?thanksvenkat

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s