1 / 3
Caption Text
2 / 3
Caption Two
3 / 3
Caption Three margin testing

Saturday, November 13, 2010

Change Default Boot Order for Grub 2 in Ubuntu 9.10 or 10.04 Lucid

http://www.hackourlives.com/change-default-boot-order-ubuntu-10-04-lucid/

With Grub 2 you can no longer edit grub.conf or menu.lst files located in /boot/grub folder. The file to be edited is now "grub" located in /etc/default/ folder, you can edit it by running the following command from terminal (sudo gedit /etc/default/grub). The contents would look like this:

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

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

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

# The resolution used on graphical terminal
# note that you can use only modes which your graphic cardsupports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640×480

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

# Uncomment to disable generation of recovery mode menu entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"

To change the default boot option, you just need to change the GRUB_DEFAULTparameter. 0 is the first entry, so if you want windows to be your default boot option which is, say at, 6th position in the grub menu, then you just need to change the GRUB_DEFAULT value to 5 and save the file and close it.  If you want to change the Auto Boot preset time then you would need to change the value of GRUB_TIMEOUT parameter, it should be assigned a value in seconds and would determine the delay in seconds before grub boots the default choice, automatically. Now from the terminal run following command and your grub default boot order would be changed when you boot the next time:

 sudo update-grub

Featured Post

Windows和Ubuntu双系统完全独立的安装方法

http://www.ubuntuhome.com/windows-and-ubuntu-install.html  | Ubuntu Home Posted by Snow on 2012/06/25 安装Windows和Ubuntu双系统时,很多人喜欢先安装windows,然...