Chapter 33. System Recovery
single-user mode, and
emergency modethat can be used to repair malfunctioning systems. This chapter describes how to boot into each system recovery mode and gives guidance to resolve certain problems that can only be solved with help of system recovery modes.
- You are unable to boot normally into Red Hat Enterprise Linux (runlevel 3 or 5).
- You need to resolve hardware or software problems that cannot be resolved while the system is running normally, or you want to access some important files off of your hard drive.
- You forgot the root password.
33.1. Rescue Mode
Rescue modeprovides the ability to boot a small Red Hat Enterprise Linux environment entirely from external media, such as CD-ROM or USB drive, instead of the system's hard drive. It contains command-line utilities for repairing a wide variety of issues. In this mode, you can mount file systems as read-only or even to not mount them at all, blacklist or add drivers provided on a driver disc, install or upgrade system packages, or manage partitions.
rescue modefollow this procedure:
Procedure 33.1. Booting into Rescue Mode
- Boot the system from either minimal boot media, or a full installation DVD or USB drive, and wait for the boot menu to appear. For details about booting the system from the chosen media, see the respective chapters in the Installation Guide.
- From the boot menu, append the
rescuekeyword as a kernel parameter to the boot command line.
- If your system requires a third-party driver provided on a driver disc to boot, append the additional option
ddto the boot command line to load that driver:
rescue ddFor more information about using a disc driver at boot time, see the respective chapters in the Installation Guide.
- If a driver that is a part of the Red Hat Enterprise Linux 6 distribution prevents the system from booting, blacklist that driver by appending the
rdblacklistoption to the boot command line:
- Answer a few basic questions and select the location of a valid rescue image as you are prompted to. Select the relevant type from Local CD-ROM, Hard Drive, NFS image, FTP, or HTTP. The selected location must contain a valid installation tree, and the installation tree must be for the same version of Red Hat Enterprise Linux as is the disk from which you booted. For more information about how to setup an installation tree on a hard drive, NFS server, FTP server, or HTTP server, see the respective chapters in the Installation Guide.If you select a rescue image that does not require a network connection, you are asked whether or not you want to establish a network connection. A network connection is useful if you need to backup files to a different computer or install some RPM packages from a shared network location.
- The following message is displayed:
The rescue environment will now attempt to find your Linux installation and mount it under the directory /mnt/sysimage. You can then make any changes required to your system. If you want to proceed with this step choose 'Continue'. You can also choose to mount your file systems read-only instead of read-write by choosing 'Read-only'. If for some reason this process fails you can choose 'Skip' and this step will be skipped and you will go directly to a command shell.If you select, the system attempts to mount your root partition under the
/mnt/sysimage/directory. The root partition typically contains several file systems, such as
/var/, which are automatically mounted to the correct locations. If mounting the partition fails, you will be notified. If you select , the system attempts to mount your file systems under the directory
/mnt/sysimage/, but in read-only mode. If you select , your file systems will not be mounted. Choose if you think your file system is corrupted.
- Once you have your system in rescue mode, the following prompt appears on the virtual console (VC) 1 and VC 2. Use the Ctrl-Alt-F1 key combination to access VC 1 and Ctrl-Alt-F2 to access VC 2:
rescue modeis a temporary root partition, not the root partition of the file system used during normal user mode (runlevel 3 or 5). If you selected to mount your file system and it mounted successfully, you can change the root partition of the rescue mode environment to the root partition of your file system by executing the following command:
rpm, that require your root partition to be mounted as
/. To exit the
exitto return to the prompt.
rescue modeby creating a directory and typing the following command:
mount -t ext4 /dev/mapper/VolGroup00-LogVol02 /directory
/directoryis a directory that you have created and
/dev/mapper/VolGroup00-LogVol02is the LVM2 logical volume you want to mount. If the partition is of
pingif the network is started
restorefor users with tape drives
fdiskfor managing partitions
rpmfor installing or upgrading software
vifor editing text files