grub进入linux 麻烦,关于grub的心得

本机系统情况为双系统,winXP和linux redhat,由grub引导,所以使用一键还原之后覆盖了grub,所在执行完操作之后只能进入XP,不能进入linux..,晕,当时郁闷了十分钟。

因为linux是由grub引导的,只要能找回grub即可,因为不想重装系统,因为那是比较麻烦的事情,而且也是没有技术含量的(嘿嘿,其实还是我太懒了,因为里面的内容实在太多,还有oracle,那就不是一天两天的事情了),所以呢,找方法解决。

因为对grub不是很了解,所以也是一头雾水。

先用linux光盘引导,按F5,进入linux resuce模式,简单配置后,进入sh#状态,然后进入grub,

grub>find /grub/stage1

发现stage1在(hd0,5)里面,

然后退出grub

sh#chroot /mnt/sysimag

#cd /boot

#cd /grub

#vi grub.conf

[root@localhost grub]# cat grub.conf

# 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,6)

#          kernel /vmlinuz-version ro root=/dev/hdc11

#          initrd /initrd-version.img

#boot=/dev/hdc

default=0

timeout=10

splashimage=(hd0,5)/grub/splash.xpm.gz

hiddenmenu

title Red Hat Enterprise Linux AS (2.6.9-5.ELsmp)

root (hd0,5)

kernel /vmlinuz-2.6.9-5.ELsmp ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.9-5.ELsmp.img

title Red Hat Enterprise Linux AS-up (2.6.9-5.EL)

root (hd0,5)

kernel /vmlinuz-2.6.9-5.EL ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.9-5.EL.img

title xinXP

rootnoverify (hd0,0)

chainloader +1

因为我此前用光盘修复过,所以导致root (hd0,5)变成root (hd0,6)

因为stage1在(hd0,5)里,所以这进而要改到root (hd0,5)

保存,reboot

OK!!搞定~~

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7648593/viewspace-545496/,如需转载,请注明出处,否则将追究法律责任。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值