当前位置:首页 > 操作系统 > Linux

linux的单用户模式与救援模式

[root@wangchao ~]#reboot      // 重启

按任意键进入

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="410" height="216" />

e 进入编辑

a 更改内核的一些参数

c 进入命令行

 

此时需按 e, 选择第二项

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="426" height="296" />

e 进入如图:

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="426" height="86" />

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="465" height="79" />

在最后加上: 1 (或 s S single    回车

B 键重启

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="453" height="187" />

runlevel 查看当前运行级别 S 为单用户模式

输入 passwd 即可更改 root 的密码,输入新密码后 reboot 重启后生效了

 

 

救援模式

reboot 重启, F2 进入 bios 设置。用 + - CD-ROM Drive 移到最上面一项。按 F10 保存,并将关盘载入,回车。

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="434" height="264" />

选择 Rescue installed system 回车

语言默认

键盘类型默认

启用网络(随意可以选择不启用)

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="415" height="216" />

进入如上界面,选择 Continue 继续

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="295" height="204" />

提示我们原先的系统挂载在了 /mnt/sysimage 下,如需想进入原先的系统,可使用 chroot /mnt/sysimage 命令。回车

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="355" height="248" />

选择进入 shell 模式

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="375" height="219" />

bash-4.1# chroot /mnt/sysimage

由原先的关盘系统,进入原先的系统。进入即可进行相应操作

技术分享650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" width="252" height="69" />

输入 passwd 即可更改新密码。输 exit 回到光盘系统, reboot 重启生效了

 

本文出自 “Linux学习笔记” 博客,请务必保留此出处http://9656134.blog.51cto.com/9646134/1676157

原文:http://9656134.blog.51cto.com/9646134/1676157


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐