Tuesday, December 21, 2010

Changing Default BOOT ORDER in Ubuntu 9.10 or 10.04 (GRUB 2)

PROBLEM : To change the Default BOOT ORDER in Ubuntu 9.10 or 10.04

INFORMATION: After the development of GRUB 2(used in Ubuntu 10.04,9.10) many things have changed for the booting options. So if your Linux installation is using grub 2.0 then this trick should work for you.

With Grub 2 you can no longer edit grub.conf or menu.lst files located in /boot/grub folder. In Grub 2, file is located in /etc/default with name as grub


1) Boot your Ubuntu

2) Open your terminal using (Alt+Ctrl + T or by browsing through Applications->Accessories-> Terminal)

3) Type the following command in the terminal(red color)

sudo gedit /etc/default/grub

: sudo allows users to run programs with the security privileges of another user (normally root)
: gedit is a text editor in Ubuntu

4) The contents would look like this:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

5) To change the Boot Order, change the GRUB_DEFAULT parameter.
The first option in the default boot has the GRUB_DEFAULT parameter value as 0.
So if u want that the 4th row in boot display shoud be selected by default.Then change the value of the GRUB_DEFAULT to 3.
In the above example, my GRUB_DEFAULT is set as 3, which boots WINDOWS 7.

6)Save and close the file.Switch to terminal again.

7)To make the changes applicable type the following command(red color).
sudo update-grub

8) Now your BOOT ORDER has been changed and Boot the computer to see the changes.

No comments:

Post a Comment