Configuring the Boot Menu in Ubuntu

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

If you install Ubuntu as a traditional dual-boot with Windows, Ubuntu will make itself the default operating system to boot up (you get a few seconds to switch to Windows with the arrow keys). If you would like to change the boot order, you can do so by editing the Grub boot menu.

Before you edit the appropriate file to change the boot order, notice first the current boot order as it appears when you first boot up your computer. It will probably look something like this.

Ubuntu, with Linux 3.2.0-23-generic-pae
Ubuntu, with Linux 3.2.0-23-generic-pae (recovery mode)
Memory test (memtest86+)
Memory test (memtest86+, serial console 115200)
Windows 7 (loader) (on /dev/sda1)
Numbering for Grub starts at 0 instead of 1. So, in this case, Ubuntu is the 0th entry, recovery mode is 1st, the first memtest is 2nd, the second memtest is 3rd, and Windows 7 is 4th.

Press Alt-F2 (or open a terminal) and paste in the command

gksu gedit /etc/default/grub

When prompted, enter your password, as you'll be editing a system file.

You should notice GRUB_DEFAULT=0 (which means Ubuntu is the default boot entry, as it is the 0th entry).

If you want Windows to boot first and if Windows is the 4th entry (assuming numbering starts at 0), change it to GRUB_DEFAULT=4

Save the file and exit out of the text editor.

Open a terminal and paste in the command

sudo update-grub

The next time you reboot, Windows should be the default operating system!

Note: there used to be a graphical program for this called Startup Manager. It no longer appears to exist for Ubuntu 12.04, and it was a bit buggy in 11.10, but if you're using Ubuntu 11.04 or 10.04, you may have some luck with it.

Last updated 04/29/12 08:14

If you have suggestions or corrections for these tutorials, please post in this Ubuntu Forums thread or leave a comment on my blog.

I will not give help to people posting in the above places. If you require technical support, start a support thread on the Ubuntu Forums. That is the appropriate place to ask for help.