Chapter 5.61Basic System RecoveryWhen things go wrong, there are ways to fix problems. However, these methods require that youunderstand the system well. This chapter describes how to boot into rescue mode, single-user mode,and emergency mode, where you can use your own knowledge to repair the system.5.1. Common ProblemsYou might need to boot into one of these recovery modes for any of the following reasons:• You are unable to boot normally into Red Hat Enterprise Linux (runlevel 3 or 5).• You are having hardware or software problems, and you want to get a few important files off of yoursystem's hard drive.• You forgot the root password.5.1.1. Unable to Boot into Red Hat Enterprise LinuxThis problem is often caused by the installation of another operating system after you have installedRed Hat Enterprise Linux. Some other operating systems assume that you have no other operatingsystem(s) on your computer. They overwrite the Master Boot Record (MBR) that originally containedthe GRUB boot loader. If the boot loader is overwritten in this manner, you cannot boot Red HatEnterprise Linux unless you can get into rescue mode and reconfigure the boot loader.Another common problem occurs when using a partitioning tool to resize a partition or create a newpartition from free space after installation, and it changes the order of your partitions. If the partitionnumber of your / partition changes, the boot loader might not be able to find it to mount the partition.To fix this problem, boot in rescue mode and modify the /boot/grub/grub.conf file.For instructions on how to reinstall the GRUB boot loader from a rescue environment, refer toSection 5.2.1, “Reinstalling the Boot Loader”.5.1.2. Hardware/Software ProblemsThis category includes a wide variety of different situations. Two examples include failing hard drivesand specifying an invalid root device or kernel in the boot loader configuration file. If either of theseoccur, you might not be able to reboot into Red Hat Enterprise Linux. However, if you boot into one ofthe system recovery modes, you might be able to resolve the problem or at least get copies of yourmost important files.5.1.3. Root PasswordWhat can you do if you forget your root password? To reset it to a different password, boot into rescuemode or single-user mode, and use the passwd command to reset the root password.5.2. Booting into Rescue ModeRescue mode provides the ability to boot a small Red Hat Enterprise Linux environment entirely fromCD-ROM, or some other boot method, instead of the system's hard drive.