HOWTO_Change Default Boot Order for Grub in Ubuntu

Ubuntus 9.10, 10.04, 10.10, 11.04 etc. use Grub2 so if your are using any of these versions of Linux then this trick should work for you. This post discusses the standard command line approach as well as GUI approach, discussed at the end of this post.

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 card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# 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 entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

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

To change the default boot option, you just need to change theGRUB_DEFAULTparameter.

0 is the first entry, so if you want windows to be your default boot option which is, say at, 5th position in the grub menu(when you boot your computer, you can see the win is the 5th), then you just need to change the GRUB_DEFAULT value to 4 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

GUI Approach

Just install the startup manager by using synaptic or running the following command:

sudo apt-get install startupmanager

Now launch System > Administration > StartUp-Manager and you can change the boot order using graphical interface.


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值