专注于Jsp开发,为Jsp开发提供源动力 VM主机| 海外空间| 郑州网站建设| 郑州网络公司| 洛阳网站建设
jsp空间

linux系统出现grub loading stage2 解决实例

添加时间:[2009-2-20 17:11:28] 

linux系统出现grub loading stage2 解决办法

放入第一张光盘,重新启动机器,在boot: linux rescue
进去后执行出现Shell执行

#chroot    /mnt/sysimage

#/sbin/ grub-install /dev/hda(或者sda) 

#exit

自己就重启了。OK.



如果执行grub-install的,你会得到如下报错:’/dev/hdx does not have any corresponding BIOS drive’. 
解决方法: 
请注意在执行下述命令之前,确保你的关键数据有一个有效的当前备份,不管什么原因导致你的第一快硬盘无法引导,你就需要使用Red Hat Enterprise Linux 的第一张安装光盘引导系统进入RESCUE模式。 
要想在RESCUE模式下运行grub-install命令, 首先需要手动的mount相关的分区。可以通过fdisk -l 查看当前系统的分区: 
# fdisk -l
     
你需要手动的mount所有类型是Linux和Linux RAID autodetect的分区,在如下的例子中,/boot分区是/dev/hda1, /分区是/dev/hda2。 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1        13    104391   fd  Linux raid autodetect
/dev/hda2            14      1288  10241437+  fd  Linux raid autodetect
/dev/hda3          1289      1352    514080   82  Linux swap
     
在如下的样例中,你可以通过如下命令挂载分区: 
# mkdir /mnt/sysimage
# mount /dev/hda2 /mnt/sysimage
# mount /dev/hda1 /mnt/sysimage/boot
# chroot /mnt/sysimage
     
下一个步骤是编辑文件/etc/grub.conf(或者是/boot/grub/grub.conf),按照下述描述取消文件中的一些注释。 
修改 
#boot=/dev/hda
成为 
boot=/dev/hda
     
重新运行命令grub去安装GRUB到第二个硬盘的MBR上,从而使第二个硬盘可以引导。 
# grub --batch --device-map=/boot/grub/device.map 
   --config-file=/boot/grub/grub.conf --no-floppy
     
在grub命令的提示下,执行如下命令 
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
     
setup命令会把Grub写入到MBR。使得第二块硬盘可以引导。 
----------------------
请大家注意以下信息。(troubleshooting了一晚上,就学到了这点体会)
附:
cat /boot/grub/device.map 
(fd0)   /dev/fd0
(hd0)   /dev/cciss/c0d0
    栏目导航:
    最近更新:
    点击排行:
linux系统出现grub loading stage2 解决实例
作者无:   加入时间:2009-2-20 17:11:28   点击次数:2061

linux系统出现grub loading stage2 解决办法

放入第一张光盘,重新启动机器,在boot: linux rescue
进去后执行出现Shell执行

#chroot    /mnt/sysimage

#/sbin/ grub-install /dev/hda(或者sda) 

#exit

自己就重启了。OK.



如果执行grub-install的,你会得到如下报错:’/dev/hdx does not have any corresponding BIOS drive’. 
解决方法: 
请注意在执行下述命令之前,确保你的关键数据有一个有效的当前备份,不管什么原因导致你的第一快硬盘无法引导,你就需要使用Red Hat Enterprise Linux 的第一张安装光盘引导系统进入RESCUE模式。 
要想在RESCUE模式下运行grub-install命令, 首先需要手动的mount相关的分区。可以通过fdisk -l 查看当前系统的分区: 
# fdisk -l
     
你需要手动的mount所有类型是Linux和Linux RAID autodetect的分区,在如下的例子中,/boot分区是/dev/hda1, /分区是/dev/hda2。 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1        13    104391   fd  Linux raid autodetect
/dev/hda2            14      1288  10241437+  fd  Linux raid autodetect
/dev/hda3          1289      1352    514080   82  Linux swap
     
在如下的样例中,你可以通过如下命令挂载分区: 
# mkdir /mnt/sysimage
# mount /dev/hda2 /mnt/sysimage
# mount /dev/hda1 /mnt/sysimage/boot
# chroot /mnt/sysimage
     
下一个步骤是编辑文件/etc/grub.conf(或者是/boot/grub/grub.conf),按照下述描述取消文件中的一些注释。 
修改 
#boot=/dev/hda
成为 
boot=/dev/hda
     
重新运行命令grub去安装GRUB到第二个硬盘的MBR上,从而使第二个硬盘可以引导。 
# grub --batch --device-map=/boot/grub/device.map 
   --config-file=/boot/grub/grub.conf --no-floppy
     
在grub命令的提示下,执行如下命令 
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
     
setup命令会把Grub写入到MBR。使得第二块硬盘可以引导。 
----------------------
请大家注意以下信息。(troubleshooting了一晚上,就学到了这点体会)
附:
cat /boot/grub/device.map 
(fd0)   /dev/fd0
(hd0)   /dev/cciss/c0d0


上一篇:

关于我们 | 付款方式 | 客户管理 | 网站导航 | 友情连接


版权所有 2008 三易网络(洛阳)科技开发有限公司 京ICP备06012028号

服务热线:0371-63653120 63658758(郑州) 0379-63921200   63265368(洛阳)

QQ在线客服: JSP空间咨询   JSP空间咨询    Email:web@suneasy.cn

郑州网络公司 郑州网站建设 洛阳网站建设

总部地址:纱厂南路41号中泰新城泰福苑803室 郑州分公司地址:金水区圣菲城