再论:使用u盘安装Red Hat Enterprise 5.4(需要u盘引导问题)

转一篇解决我问题的日志!这孩子很有才,这都能摸索出来,解决了我安装rethat所遇到的第一个问题,感觉还是很有质量的!
最近还有很多网友反映使用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盘,启动计算机。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值