用 SuSE Linux Rescue Mode 恢复超级用户口令
2009-09-11 17:51
176 查看
http://cn.opensuse.org/%E5%A6%82%E4%BD%95%E6%B8%85%E7%A9%BA_root_%E5%AF%86%E7%A0%81
用 SuSE Linux Rescue Mode 恢复超级用户口令
the outside in the event of an emergency. The rescue system can be loaded
from CD, the network, or the SUSE FTP server. The rescue system includes
several help programs with which you can remedy large problems with
inaccessible hard disks, misconfigured configuration files, or other similar
problems.
Another component of the rescue system is Parted,
which is used for resizing partitions. This program can be launched
from within the rescue system, if you do not want to use
the resizer integrated in YaST. Information about
Parted can be found at http://www.gnu.org/software/parted/
.
Boot your system as you would for installation. Select ‘Rescue
System
’
from the boot menu. The rescue system is then
decompressed, loaded onto a RAM disk as a new root file system, mounted, and
started.
Under Alt
-F1
to
Alt
-F3
, the rescue
system provides three virtual consoles.
You can log in as
without a password. Press Alt
-F10
to enter the system console displaying the kernel and
syslog messages.
A shell and many other useful utilities, such as the
mount program, can be found in the
directory. The
directory contains important file and network utilities for
reviewing and repairing the file system, including
reiserfsck and
e2fsck.
This directory also contains the most important binaries for system
maintenance, such as fdisk, mkfs, mkswap, mount, mount,
init, and shutdown, and ifconfig,
route, and netstat for
maintaining the network.
The directory
contains the
vi editor, grep,
find, less,
and telnet.
To mount your SUSE LINUX system using the rescue system, use the mount
point
. You can also use or create another
directory.
The following example demonstrates the procedure for
a system with the
details
shown in Example 5.1, “Example /etc/fstab”
.
Example 5.1. Example /etc/fstab
To access your entire system, mount it step by step in the
directory using the following commands:
Now, access your entire system and, for example, correct mistakes
in configuration files, such as
,
, and
. The configuration files are now located
in the
directory instead of in
.
Before recovering lost partitions with the
fdisk program by simply
setting them up again,
make a printout of
and the output of fdisk -l
.
Damaged file systems are tricky problems for the rescue system.
Generally, file systems cannot be repaired on a running
system. If you encounter serious problems, you may not even be able
to mount your root file system and the system boot may end with
. In this case, the
only way is to repair the system from the outside
using a rescue system.
The SUSE LINUX rescue system contains the utilities
reiserfsck,
e2fsck, and dumpe2fs
(for diagnosis). These should remedy most problems.
In an emergency, man pages often are not available. For this
reason, they are
included in this manual in Section B.1, “Manual Page of reiserfsck”
and Section B.2, “Manual Page of e2fsck”
.
If mounting an
file system fails due to an
invalid
superblock, the e2fsck program would probably
fail, too. If this were the case, your superblock may be corrupted, too.
There are copies of the superblock located every 8192 blocks (8193, 16385,
etc.). If your superblock is corrupted, try one of the copies instead. This
is accomplished by entering the command e2fsck -f -b 8193
/dev/damaged_partition
. The -f
option forces
the file system check and overrides e2fsck's
error so that, because the superblock copy is intact, everything is fine.
用 SuSE Linux Rescue Mode 恢复超级用户口令
5.4. The SUSE Rescue System
SUSE LINUX contains a rescue system for accessing your Linux partitions fromthe outside in the event of an emergency. The rescue system can be loaded
from CD, the network, or the SUSE FTP server. The rescue system includes
several help programs with which you can remedy large problems with
inaccessible hard disks, misconfigured configuration files, or other similar
problems.
Another component of the rescue system is Parted,
which is used for resizing partitions. This program can be launched
from within the rescue system, if you do not want to use
the resizer integrated in YaST. Information about
Parted can be found at http://www.gnu.org/software/parted/
.
5.4.1. Starting the Rescue System
Boot your system as you would for installation. Select ‘RescueSystem
’
from the boot menu. The rescue system is then
decompressed, loaded onto a RAM disk as a new root file system, mounted, and
started.
5.4.2. Working with the Rescue System
Under Alt-F1
to
Alt
-F3
, the rescue
system provides three virtual consoles.
You can log in as
root
without a password. Press Alt
-F10
to enter the system console displaying the kernel and
syslog messages.
A shell and many other useful utilities, such as the
mount program, can be found in the
/bin
directory. The
sbin
directory contains important file and network utilities for
reviewing and repairing the file system, including
reiserfsck and
e2fsck.
This directory also contains the most important binaries for system
maintenance, such as fdisk, mkfs, mkswap, mount, mount,
init, and shutdown, and ifconfig,
route, and netstat for
maintaining the network.
The directory
/usr/bin
contains the
vi editor, grep,
find, less,
and telnet.
5.4.2.1. Accessing Your Normal System
To mount your SUSE LINUX system using the rescue system, use the mountpoint
/mnt
. You can also use or create another
directory.
The following example demonstrates the procedure for
a system with the
/etc/fstab
details
shown in Example 5.1, “Example /etc/fstab”
.
Example 5.1. Example /etc/fstab
/dev/sdb5 swap swap defaults 0 0 /dev/sdb3 / ext2 defaults 1 1 /dev/sdb6 /usr ext2 defaults 1 2
Warning | |
---|---|
Pay attention to the order of steps outlined in the following section for mounting the various devices. |
/mnt
directory using the following commands:
mount /dev/sdb3 /mnt mount /dev/sdb6 /mnt/usr
Now, access your entire system and, for example, correct mistakes
in configuration files, such as
/etc/fstab
,
/etc/passwd
, and
/etc/inittab
. The configuration files are now located
in the
/mnt/etc
directory instead of in
/etc
.
Before recovering lost partitions with the
fdisk program by simply
setting them up again,
make a printout of
/etc/fstab
and the output of fdisk -l
.
5.4.2.2. Repairing File Systems
Damaged file systems are tricky problems for the rescue system.Generally, file systems cannot be repaired on a running
system. If you encounter serious problems, you may not even be able
to mount your root file system and the system boot may end with
kernel panic
. In this case, the
only way is to repair the system from the outside
using a rescue system.
The SUSE LINUX rescue system contains the utilities
reiserfsck,
e2fsck, and dumpe2fs
(for diagnosis). These should remedy most problems.
In an emergency, man pages often are not available. For this
reason, they are
included in this manual in Section B.1, “Manual Page of reiserfsck”
and Section B.2, “Manual Page of e2fsck”
.
If mounting an
ext2
file system fails due to an
invalid
superblock, the e2fsck program would probably
fail, too. If this were the case, your superblock may be corrupted, too.
There are copies of the superblock located every 8192 blocks (8193, 16385,
etc.). If your superblock is corrupted, try one of the copies instead. This
is accomplished by entering the command e2fsck -f -b 8193
/dev/damaged_partition
. The -f
option forces
the file system check and overrides e2fsck's
error so that, because the superblock copy is intact, everything is fine.
相关文章推荐
- Linux操作系统用户口令安全恢复方法
- SUSE Linux操作系统的超级用户密码修改
- Linux超级用户root口令忘记怎么办?
- linux超级用户口令怎设置以及用户
- linux超级用户口令怎设置
- Linux 内核--任务0的运行(切换到用户模式)move_to_user_mode
- Linux root用户不小心删除了,怎么恢复
- 在Linux系统上找没有设置口令的用户
- Linux 超级用户的权利
- Linux切换到su超级用户
- 如何恢复linux的环境变量ubuntu中root用户没有办法使用命令
- Linux 添加用户 并且给用户超级管理员权限
- Linux Entering rescue mode
- Linux系统root用户密码忘记恢复策略
- Linux etc/soduers 用户添加到超级用户列表
- 用户管理 之 Linux 系统中的超级权限的控制
- 为linux普通用户添加超级用户权限sudo
- linux用户口令的管理
- 恢复Linux root用户密码