Chinaunix首页 | 论坛 | 博客
  • 博客访问: 629150
  • 博文数量: 135
  • 博客积分: 5217
  • 博客等级: 大校
  • 技术积分: 1289
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-05 17:36
文章分类

全部博文(135)

文章存档

2016年(1)

2012年(5)

2011年(15)

2010年(63)

2009年(51)

分类: LINUX

2009-11-15 10:10:20

由于Ubuntu 9.10开始使用grub2来引导系统,新版grub2的引导配置文件就不再是menu.lst了,而是
/boot/grub/grub.cfg文件,这与旧版本不同了,而且为了安全起见,该文件默认为“只读”属性,因此在修改启动菜单之前你必须先将其文件属性改为“可读写”后方可修改文件内容。

sudo chmod +w /boot/grub/grub.cfg

添加后内容如下:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from  and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
set default=0 //默认启动顺序
set timeout=5 //等待时长
set root=(hd0,7) //引导文件所在分区目录
search --fs-uuid --set 98c1c189-b321-440d-89b5-7ff0723c83e2 //根分区的UUID

set menu_color_normal=cyan/blue //设置背景色
set menu_color_highlight=white/blue //设置高亮色

# menuentry后面双引号内的文字即是显示在启动菜单上的启动项目名称
menuentry "Ubuntu,9.10 (linux 2.6.30-8-generic)" {
# 定位启动分区
set root=(hd0,7)
# 检查UUID后启动系统
search --fs-uuid --set 98c1c189-b321-440d-89b5-7ff0723c83e2
linux    /boot/vmlinuz-2.6.30-8-generic root=UUID=98c1c189-b321-440d-89b5-7ff0723c83e2 ro  quiet splash
initrd    /boot/initrd.img-2.6.30-8-generic
}

# XP系统的引导部分与旧版本相同
menuentry "Windows XP Pro" {
set root=(hd0,1)
chainloader +1
}
阅读(661) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~