当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > Linux系统GRUB引导单用户模式三种方式

Unix/Linux
linux 操作技巧收集_
linux下如何读取使用iso 镜像文件的方法
Linux平台下文件的压缩与解压参数说明
Linux下常用压缩格式的压缩与解压方法
Linux JDK,TOMCAT安装及环境设置
Linux sleep命令使用参数
Linux cat命令参数
nfs 配置的简单例子
linux kill 关闭进程命令
linux ultrasphinx Anonymous modules have no name to be referenced by
Linux oracle 9i图文安装方法一
Linux oracle 9i图文安装教程二
Linux oracle 9i图文安装教程三
Linux oracle 9i图文安装教程四
Linux oracle 9i图文安装教程五
Linux oracle 9i图文安装教程六 完结篇
linux AS3 oracle9i 安装指南
Linux 下 (RedHat 9.0) JDK,Tomcat,MySQL的安装
RedHat 9.0下Apache+PHP+MySQL服务器安装配置
Linux 下用 Python 连接 MSSql Server 2008

Unix/Linux 中的 Linux系统GRUB引导单用户模式三种方式


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 73 ::
收藏到网摘: n/a

  作为一个Linux系统管理员,你可能会把Linux 超级用户密码遗忘了,把/etc/inittab或/etc/rc.d/rc.sysinit之类文件误编辑,导致系统不能正常启动的恼人错误?而为了解决以上问题,你就需要进到linux根文件系统处于可读写状态的单用户模式下。

下面介绍在GRUB引导下进入Linux单用户模式的三种方式:

硬件环境: intel P4 / 1G RAM / sata 80G 软件环境: 1)Fedora Core 3(以下简称为FC3)和Windows2000 advance server双系统。 2)LVM管理Linux分区。 3)/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,2)# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00 # initrd /initrd-version.img #boot=/dev/sda default=1 timeout=1000 splashimage=(hd0,2)/grub/splash.xpm.gz hiddenmenu title Fedora Core (2.6.9-1.667)root (hd0,2)kernel /vmlinuz-2.6.9-1.667 ro root=/dev/VolGroup00/LogVol00 rhgb quiet initrd /initrd-2.6.9-1.667.img title windows 2000 adv rootnoverify (hd0,0)chainloader +1

首先,启动电脑,屏幕出现如下提示:

Press any key to enter the menu Booting windows 2000 adv in 999 seconds…

按任一键跳过计时,进入下一步:

  GNU GRUB version 0.95 (639K lower/103924K upper memory)  Fedora Core (2.6.9-1.667)  Windows 2000 adv

下面是GRUB的提示:

‘e’ 在booting前编辑启动命令行。 ‘a’ 在booting前编辑kernel的参数。 ‘c’进入grub命令行。

由此按‘e’、a‘、’c‘三个不同的键,进入三种不同的操作:

一、快速法

选择Fedora Core (2.6.9-1.667)菜单,按a键:

grub append>ro root=/dev/VolGroup00/LogVol00 rhgb quiet 

修改成:

grub append>ro root=/dev/VolGroup00/LogVol00 single quiet