# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,3)
# kernel /vmlinuz-version ro root=/dev/sda8
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,3)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-220.el6.i686)
root (hd0,3)
kernel /vmlinuz-2.6.32-220.el6.i686 ro root=UUID=26dcce44-86db-435f-9601-5384e379f341 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD quiet rhgb crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM
initrd /initramfs-2.6.32-220.el6.i686.img
title win7
rootnoverify (hd0,0)
chainloader +1
发现:
1 CentOS(2.6.32-220.e16.i686 : 【root (hd0,3)】:启动分区是第一个硬盘(hd0)的第四个分区(序号从0开始),默认启动项,延时5秒 。
2 Win7 : 【rootnoverify (hd0,0)】:启动分区时第一个硬盘的第一个分区。问题的所在!!!!!!
对照查看linux描述下的硬盘分区序列号(root 权限下,敲入命令 fdisk -l ),如下
Device Boot Start End Blocks Id System
/dev/sda1 1 13 102400 17 Hidden HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 13 6540 52429126 7 HPFS/NTFS
/dev/sda3 6541 59496 425369070 5 Extended
/dev/sda4 59497 59627 1051648 83 Linux
/dev/sda5 6541 19595 104864256 7 HPFS/NTFS
/dev/sda6 19596 32650 104864256 7 HPFS/NTFS
/dev/sda7 32651 47792 121628083+ 7 HPFS/NTFS
/dev/sda8 47793 50403 20972826 83 Linux
/dev/sda9 50404 54320 31463271 83 Linux
/dev/sda10 54452 59496 40523931 82 Linux swap / Solaris
/dev/sda11 54321 54451 1049600 83 Linux
可以看到:
硬盘的第四个分区(设备名称: /dev/sda4) 对应的是linux 的启动分区(/boot),正常;
对应关系:(hd0,3) -> (/dev/sda4)
而第一个分区(设备名称:/dev/sda1) 对应的却是预留的100M隐藏分区,而不是Win7的系统启动分区(/dev/sda2),所以启动不了Win7啦。
对应关系:(hd0,0) -> (/dev/sda1) 【错误】
应该是:(hd0,1) -> (/dev/sda2)