会计考友 发表于 2012-8-4 12:07:07

Linux辅导:看看修复UbuntuGrubRescue有几种方法

重启电脑直接进入grub rescue模式重启后的显示是
GRUB loading
error: no such partition
grub rescue>
连XP都进不了了,知道怎么办吗!
下面一起来看看grub2几种修复方法

1.Ubuntu Grub Rescue 双系统重装windows造成grub2被改写的修复
方法一 grub4dos0.4.4
在Windows启动项上加上grub4dos启动(不多说了,看置顶贴),重启选择进入grub,在命令行下输入(/boot单独分区的去掉 /boot)



代码:grub>find --set-root /boot/grub/core.imggrub>kernel /boot/grub/core.imggrub>boot进入grub2菜单,进入系统后再执行代码:sudo grub-install /dev/sd?Ubuntu Grub Rescue方法二 进入Livecd 后修复引用:sudo -imount 你的根分区 /mntmount 你的/boot 分区 /mnt/boot #如果有的话#挂载你其他的分区,如果有的话# 重建grub到sda的mbrgrub-install --root-directory=/mnt /dev/sda
2. Ubuntu Grub Rescue由于root分区uuid改变造成的不能正常启动,只能进入grub rescue模式的修复
代码:


grub rescue>setgrub rescue>prefix=(hd?,?)/grubgrub rescue>root=hd?,?grub rescue>set root=hd?,?grub rescue>set prefix=(hd?,?)/boot/grubgrub rescue>setgrub rescue>root=hd?,?grub rescue>prefix=(hd?,?)/boot/grubgrub rescue>insmod /boot/grub/normal.modgrub rescue>normal这时就可以调出 /boot/grub/grub.cfg,修改相应uuid,改到命令行下grub>insmod /boot/grub/linux.modgrub>set root=hd?,?grub>linux /boot/vmlinuz-*** root=/dev/sd??grub>initrd /boot/initrg.img-****进入系统hd?,? 是grub文件所在分区 sda? 是/分区。
3. grub模块和配置文件grub.cfg受损无法启动时修复

Livcd启动进入试用引用:sudo -imount 你的根分区 /mntmount 你的/boot 分区 /mnt/boot #如果有的话# 挂载你其他的分区,如果有的话# 重建grub到sda的mbrgrub-install --root-directory=/mnt /dev/sda# 重建grub.cfgmount --bind /proc /mnt/procmount --bind /dev /mnt/devmount --bind /sys /mnt/syschroot /mnt update-grubumount /mnt/sysumount /mnt/devumount /mnt/proc
页: [1]
查看完整版本: Linux辅导:看看修复UbuntuGrubRescue有几种方法