您的位置:首页 > 运维架构 > Linux

U盘安装Linux启动失败问题(grub)

2014-11-12 19:55 387 查看
使用U盘安装Linux系统时,当安装所有的包后,点击reboot重启(重启后还需要对系统进行时间,其他用户等等的设定),发现启动时进入了grub> 界面。原来是使用U盘进行Linux安装时,默认启动位置设在了U盘中。

因此重启系统,和安装系统时使用快捷键(一般为F11)选择USB方式启动。然后进行Linux系统的进一步设定(系统时间,其他用户名密码等)。设定好后,Linux系统安装完毕。

但是现在存在一个问题,那就是系统每次重启都需要从U盘进行启动,造成很大的不便。那我们该怎么进行修改呢。

拔掉U盘,再次启动系统,当出现grub>界面时,进行以下操作:

1、grub >root(hd0,0) 回车

2、grub>setup(hd0) 回车

3、grub>reboot 回车重启系统

4、重启后,会出现”Press anykey to continue…”.按任意键进入GRUB界面

5、进入GRUB界面后,按”e”进入编辑界面,然后再按”e”进入

grub edit> root (hd1,0)界面

6、修改grub edit> root(hd1,0) 为grub edit> root (hd0,0) 按回车键进入GRUB界面

7、在GRUB界面中按”b”就可以进行系统的启动。

8、系统启动成功后,修改/boot/grub/grub.conf文件中(hd1,0) 改为(hd0,0)

# cat /boot/grub/grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grubafter making changes to this file
# NOTICE: You have a /boot partition.  Thismeans that
#         all kernel and initrd paths are relative to /boot/, eg.
#         root (hd1,0)
#         kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#         initrd /initrd-version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=<strong style="background-color: rgb(255, 255, 255);"><span style="color:#ff0000;">(hd0,0)</span></strong>/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server(2.6.18-194.el5PAE)
<strong><span style="color:#ff0000;"> root (hd0,0)</span></strong>
kernel/vmlinuz-2.6.18-194.el5PAE ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd/initrd-2.6.18-194.el5PAE.img
title Other
rootnoverify(hd0,3)
chainloader+1


重启系统进行验证,查看是否可以启动成功。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: