Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2415343
  • 博文数量: 384
  • 博客积分: 10193
  • 博客等级: 上将
  • 技术积分: 3785
  • 用 户 组: 普通用户
  • 注册时间: 2005-06-09 18:02
文章分类

全部博文(384)

文章存档

2011年(10)

2010年(29)

2009年(39)

2008年(36)

2007年(43)

2006年(198)

2005年(29)

分类: LINUX

2009-10-08 20:45:39

Debian sid默认的引导程序已经从grub 升级到grub2. 目前grub2的版本号为1.97~beta4-1.

我之前曾经测试过grub2, 当时遇到了一个问题, grub2每次引导Windows后, 总是无法引导Linux, 需要使用引导光盘引导系统并重新安装grub2才能解决. 十一长假期间, 我再次测试了grub2, 发现配置起来相当简单, 使用

wajig update grub
wajig install os-prober

升级grub, 并安装os-prober后. 运行update-grub, 所有的内核都会被添加到启动菜单中, 连Windows也增加到了启动菜单中,省去了手工配置windows的麻烦. 并且还带来了图形化的grub界面. 

自动生成的grub.cfg配置如下: 

#                                                               
# DO NOT EDIT THIS FILE                                         
#                                                               
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub                   
#                                                                        

### BEGIN /etc/grub.d/00_header ###
set default=0                     
insmod lvm                        
insmod ext2                       
set root=(vg00-root)              
search --no-floppy --fs-uuid --set d48e2c91-e7b8-40fe-b79f-bc3fb82edf20
if loadfont /usr/share/grub/unicode.pf2 ; then                        
  set gfxmode=640x480                                                 
  insmod gfxterm                                                      
  insmod vbe                                                          
  if terminal_output gfxterm ; then true ; else                       
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output                                        
    terminal gfxterm                                                    
  fi                                                                    
fi                                                                      
set timeout=5                                                           
### END /etc/grub.d/00_header ###                                       

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2                             
set root=(hd0,2)                        
search --no-floppy --fs-uuid --set 8b725ae3-b750-4dfa-a4b5-c06efff0b1ff
insmod png                                                            
if background_image /grub/moreblue-orbit-grub.png ; then              
  set color_normal=black/black                                        
  set color_highlight=magenta/black                                   
else                                                                  
  set menu_color_normal=cyan/blue                                     
  set menu_color_highlight=white/blue                                 
fi                                                                    
### END /etc/grub.d/05_debian_theme ###                               

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, Linux 2.6.31-trunk-amd64" {
        insmod ext2                                    
        set root=(hd0,2)                               
        search --no-floppy --fs-uuid --set 8b725ae3-b750-4dfa-a4b5-c06efff0b1ff
        linux   /vmlinuz-2.6.31-trunk-amd64 root=/dev/mapper/vg00-root ro  quiet
        initrd  /initrd.img-2.6.31-trunk-amd64                                 
}                                                                              
menuentry "Debian GNU/Linux, Linux 2.6.31-trunk-amd64 (recovery mode)" {       
        insmod ext2                                                            
        set root=(hd0,2)                                                       
        search --no-floppy --fs-uuid --set 8b725ae3-b750-4dfa-a4b5-c06efff0b1ff
        linux   /vmlinuz-2.6.31-trunk-amd64 root=/dev/mapper/vg00-root ro single
        initrd  /initrd.img-2.6.31-trunk-amd64
}
menuentry "Debian GNU/Linux, Linux 2.6.30-2-amd64" {
        insmod ext2
        set root=(hd0,2)
        search --no-floppy --fs-uuid --set 8b725ae3-b750-4dfa-a4b5-c06efff0b1ff
        linux   /vmlinuz-2.6.30-2-amd64 root=/dev/mapper/vg00-root ro  quiet
        initrd  /initrd.img-2.6.30-2-amd64
}
menuentry "Debian GNU/Linux, Linux 2.6.30-2-amd64 (recovery mode)" {
        insmod ext2
        set root=(hd0,2)
        search --no-floppy --fs-uuid --set 8b725ae3-b750-4dfa-a4b5-c06efff0b1ff
        linux   /vmlinuz-2.6.30-2-amd64 root=/dev/mapper/vg00-root ro single
        initrd  /initrd.img-2.6.30-2-amd64
}
menuentry "Debian GNU/Linux, Linux 2.6.30-1-amd64" {
        insmod ext2
        set root=(hd0,2)
        search --no-floppy --fs-uuid --set 8b725ae3-b750-4dfa-a4b5-c06efff0b1ff
        linux   /vmlinuz-2.6.30-1-amd64 root=/dev/mapper/vg00-root ro  quiet
        initrd  /initrd.img-2.6.30-1-amd64
}
menuentry "Debian GNU/Linux, Linux 2.6.30-1-amd64 (recovery mode)" {
        insmod ext2
        set root=(hd0,2)
        search --no-floppy --fs-uuid --set 8b725ae3-b750-4dfa-a4b5-c06efff0b1ff
        linux   /vmlinuz-2.6.30-1-amd64 root=/dev/mapper/vg00-root ro single
        initrd  /initrd.img-2.6.30-1-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
        insmod ntfs
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set 8ca8b599a8b5826e
        drivemap -s (hd0) ${root}
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

阅读(3085) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~