Changing Default OS

Use this guide if you have multiple partitions and operating systems on your computer and want to change the default operating system that will boot up when you turn on your computer.

Back Up Grub Settings

Copy this line into the terminal and press enter, it will back up your menu.lst and you can use the backup to restore your default settings.

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup

Open in a Text Editor

Edit the menu.lst file with one of the following commands (depending on what version of Ubuntu you’re using):

Ubuntu

gksudo gedit /boot/grub/menu.lst 

Kubuntu

kdesu kate /boot/grub/menu.lst

Xubuntu

gksudo mousepad /boot/grub/menu.lst

Finding the Line

  • Find this line in the document that was just opened, it will read like this:
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
...
default     0
...
  • Replace the 0 with the number on the startup list corresponding to the option you want, counting from 0. For example, if you have a list like this one and want to change to Windows XP Home:
title      Ubuntu, kernel 2.6.15-27-amd64-generic
...
title      Ubuntu, memtest86+
...
title      Other operating systems:
...
title      Microsoft Windows XP Home

you would change the number to 3. It is important to note that each lines such as “Other Operating Systems” should be counted as well.

  • Alternatively you can replace the number with the word ‘saved’ which will make the default whichever entry was last used. Each entry that should be remembered must have the ‘savedefault’ keyword, this is the case for the normal Ubuntu entries, but not the recovery alternatives. WARNING: If you are using dmraid do not change this entry to ‘saved’ or your array will desync and will not let you boot your system.
  • Save the edited file