修改grub选项
2008-10-20 22:25
197 查看
修改 /boot/grub/menu.lst 文件,使其中default值变动一下即可。
过程如下:
1、 打开命令行终端;
2、输入:
cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
vi /boot/grub/menu.lst
注: 要使用root。
3、假设文件内容如下:
-------------------------------------------------------------
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## 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.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# 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.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
.
.
.
## ## End Default Options ##
title Ubuntu, kernel 2.6.15-23-386
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro quiet splash
initrd /boot/initrd.img-2.6.15-23-386
savedefault
boot
title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro single
initrd /boot/initrd.img-2.6.15-23-386
boot
title Ubuntu, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
boot
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
-------------------------------------------------------------
现在default值为0,意即启动排行第一的操作系统,这里代表的就是Ubuntu。
现在把它修改成“default 4”,那么XP就成为默认的操作系统了。
因为从零数起,以title打头的Microsoft Windows XP Professional这一行排序为4。
另外通过修改timeout的值来变更默认等待时间
过程如下:
1、 打开命令行终端;
2、输入:
cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
vi /boot/grub/menu.lst
注: 要使用root。
3、假设文件内容如下:
-------------------------------------------------------------
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## 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.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# 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.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
.
.
.
## ## End Default Options ##
title Ubuntu, kernel 2.6.15-23-386
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro quiet splash
initrd /boot/initrd.img-2.6.15-23-386
savedefault
boot
title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro single
initrd /boot/initrd.img-2.6.15-23-386
boot
title Ubuntu, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
boot
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
-------------------------------------------------------------
现在default值为0,意即启动排行第一的操作系统,这里代表的就是Ubuntu。
现在把它修改成“default 4”,那么XP就成为默认的操作系统了。
因为从零数起,以title打头的Microsoft Windows XP Professional这一行排序为4。
另外通过修改timeout的值来变更默认等待时间
相关文章推荐
- 安装Linux后修改grub默认启动选项
- 修改Ubuntu12.04 grub启动选项
- Ubuntu的grub启动界面,默认高亮选项的修改方法
- 安装Linux后修改grub默认启动选项
- 修改Ubuntu 12.04和Windows 7共存的GRUB启动顺序
- 先后安装salaris,linux后如何修改grub引导进入solaris
- linux 修改grub引导图片
- wind7 修改启动菜单选项
- Ubuntu的grub背景图象的修改[00原创]
- grub修改fstab设置(解决系统卡在ubuntu loading initial ramdisk)
- 6个Linux chkconfig命令实例 - 增加,删除,查看和修改services的自动启动选项
- 如何修改ubuntu 的Grub来修改启动项
- centos单用户模式:修改ROOT密码和grub加密
- 修改 QEMU 源代码,实现 -title 选项
- js修改select列表选项中的值
- C#listview选项的修改
- [转]修改编译器选项实现DLL项目与WINDOWS项目转换
- [ubuntu]修改GRUB的默认启动系统
- 修改可选项文件实现自动连接数据库服务器
- 【Centos7 GRUB】修改开机等待时间