U盘安装redhat 必须插入u盘才启动解决方法

2014-10-2711:24:49 评论

最近还有很多网友反映使用u盘安装Red Hat Enterprise 5.4之后,把u盘拔下,不能引导linux. 其实就像  "使用u盘安装Red Hat Enterprise 5.4(需要u盘引导问题)" 所说:grub安装在sdb(u盘)而不是sda(硬盘)
我研究了很久,想想能不通用从u盘启动red hat ,然后使用grub-install 重新安装grub。
过程如下:
1.把u盘插入,引导red hat
2.执行修复:
[root@localhost ~]# grub-install  /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
# this device map was generated by anaconda
(hd1)     /dev/sdb
(hd0)     /dev/sda
3.修改grub.conf, 把(hd1,0)改为hd(0,0)
[root@localhost ~]# cat /boot/grub/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,0)
#          kernel /vmlinuz-version ro root=/dev/hda3
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-194.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-194.el5.img
title Other
rootnoverify (hd0,3)
chainloader +1
注意:kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb quiet,如果采用逻辑卷,显示类似这样:
kernel /vmlinuz-2.6.18-238.el5 ro root=/dev/VolGroup00/LogVol00
上面kernel 参数由系统安装时候设置,无需更改。
4.修改之后,关机,拔掉u盘,启动计算机。

U盘安装redhat 必须插入u盘才启动解决方法

匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: