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

周俊奇 经验评论153阅读模式

最近还有很多网友反映使用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盘才启动解决方法

 
周俊奇
  • 本文由 周俊奇 发表于 2014年10月24日 22:16:29
  • 转载请务必保留本文链接:https://www.bikaao.com/archives/77.html
CentOS 7.4 安装SSH 步骤 经验

CentOS 7.4 安装SSH 步骤

网上教程太多,导致坑也特多,自己基本踩完了,这里记录。 1、查看是否安装了相关软件: rpm -qa|grep -E "openssh" 显示结果含有以下三个软件,则表示已经安装,否则需要安装缺失的软...
redhatlinux 6.5如何加载U盘 经验

redhatlinux 6.5如何加载U盘

第一步:查看redhatlinux 上面是否加载U盘 输入指令:fdisk -l 可以看到,记住U盘的目录名称/dev/sdb1 第二步:查看U盘具体信息并确认系统识别u盘输入指令:fdisk -l ...
匿名

发表评论

匿名网友

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