- 论坛徽章:
- 0
|
本帖最后由 chenyx 于 2014-09-07 20:11 编辑
安装了win7和centos 6.4系统,启动后进入grub命令行模式,
用root/kernel/initrd/boot系列命令行进入linux系统,然后用setup命令修复mbr,对应的命令和执行结果如下:
[root@yang-centos ~]# grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root (hd0,8)
root (hd0,8)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 27 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+27 p (hd0,8)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
grub> find /grub/grub.conf
find /grub/grub.conf
(hd0,8)
grub>
本人的/boot目录放在单独的分区/dev/sda9,上面的命令显示setup (hd0)成功了,我在网上搜了很多帖子,都说是用这种方式修复的,但是我实际操作时,系统重启后仍然进入了grub命令行模式,而不是根据
/boot/grub/grub.conf文件的配置显示选项菜单,请问是什么原因啊?本人已经弄了好几天,查了好多资料了,万分感谢了。
grub.conf文件内容:
#boot=/dev/sdb
default=0
timeout=10
splashimage=(hd0,8)/grub/splash.xpm.gz
hiddenmenu
title Windows 7
rootnoverify (hd0,0)
chainloader +1
title CentOS (2.6.32-431.11.2.el6.i686)
root (hd0,8)
kernel /vmlinuz-2.6.32-431.11.2.el6.i686 ro root=/dev/mapper/vg_yangcentos-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_yangcentos/lv_swap rd_NO_MD rd_LVM_LV=vg_yangcentos/lv_root SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-431.11.2.el6.i686.img
title CentOS (3.12.14)
root (hd0,8)
kernel /vmlinuz-3.12.14 ro root=/dev/mapper/vg_yangcentos-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_yangcentos/lv_swap rd_NO_MD rd_LVM_LV=vg_yangcentos/lv_root SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-3.12.14.img
title CentOS (2.6.32-431.5.1.el6.i686)
root (hd0,8)
kernel /vmlinuz-2.6.32-431.5.1.el6.i686 ro root=/dev/mapper/vg_yangcentos-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_yangcentos/lv_swap rd_NO_MD rd_LVM_LV=vg_yangcentos/lv_root SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-431.5.1.el6.i686.img
|
|