Make Windows your default OS on a dual-boot system.

Art's picture

Maybe you're like me and have a dual-boot system, booting both Ubuntu and Windows. Trouble is, when you do this, Windows gets pushed down to the bottom of the grub boot menu, and Ubuntu (or whatever other distro you use) is at the top and set as the default choice.

Don't you wish you can move Windows to the top to become the default choice? Well, it's easy to do, and I'm going to show how to get it done.

The file we need is /boot/grub/menu.lst and we need to edit it with root permissions. So, assuming you are using Gnome, hit Alt-F2 to open the run box, then type:

gksu gedit /boot/grub/menu.lst

Screenshot-Run Application

Then click the run button. You will be asked for the root password, so supply that.

Once the file is open in the editor, scroll all the way to the bottom and find the section similar to the code below:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title        Microsoft Windows XP Professional
root        (hd0,0)
savedefault
makeactive
chainloader    +1

Select all of that and hit Ctrl-x on the keyboard. This will cut out that section.

Now Scroll back up toward the top of the file and find the lines:

# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST

Put the cursor right between those lines and hit Ctrl-v on your keyboard. The code we cut a few seconds ago should now be between those two lines, like this:

# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title        Microsoft Windows XP Professional
root        (hd0,0)
savedefault
makeactive
chainloader    +1

### BEGIN AUTOMAGIC KERNELS LIST

You may want to insert a blank line before and after the lines you just pasted to make things look a little neater like I did here.

Now just save the file, exit the editor, and restart your computer. Go ahead, I'll wait.

You're back? Great! Did you notice that Windows is now at the top of your boot list? If you did everything correctly, it should have been.