It is possible for something to go wrong, which could cause your system to be unable to boot from the Linux partition on your hard disk. Your master boot record may have become corrupted or your /boot partition may have, for some reason, become inaccessible.
The following procedure describes how to go into rescue mode, using the Fedora boot CD (CD #1 of the installation set). The procedure should work the same for any recent Red Hat Linux system.
Insert the Fedora installation CD #1 into the disk drive.
Reboot your computer. Your computer should begin booting the installation process for the CD and you should see the boot: prompt.
At the boot prompt, type the following.
boot: linux rescue
Note |
If you need other boot options (such as nodma or vga=) to get Linux working properly, you can add these after Linux rescue. |
You are asked to choose a language.
Scroll down to select your language and press Enter. You are asked to choose your keyboard type.
Scroll down to choose your keyboard type and press Enter. You are asked if you want to start the network interfaces on your computer.
Choose Yes to start the network interfaces on your computer. If you choose Yes, be ready with configuration information (IP address, netmask, or choose DHCP if that service is available).
Note |
The network may not be necessary if you are simply fixing your master boot record. However, if the Linux operating system on your hard disk turns out to be unbootable, the network connection can provide a convenient way to copy critical files off of your computer. |
At this point, rescue mode looks for your Fedora or other Red Hat Linux system and tries to mount it on the /mnt/sysimage directory.
If rescue mode finds your Linux system on hard disk, you can:
Continue, to have it mount your Linux partition from hard disk on /mnt/sysimage
Read-only, to have the file system mounted read-only (to let you copy and use, but not change files)
Skip, to not try to mount your Linux partition
I recommend you select Continue in most cases, so you can get to and possibly change your Linux partition.
If your Linux partition was mounted successfully, you will be told so. Press OK. You will see a shell prompt.
Type ls /mnt/sysimage. You should see the same directories you would normally see from your system's root directory (/).
To change it so that /mnt/sysimage becomes your root directory, type the following:
# chroot /mnt/sysimage
Now, your system should appear just as it does for a normal reboot. What you do next depends on what went wrong. Here are some possibilities:
You want to reinstall your master boot record. If you are using GRUB as your boot loader and you want the MBR to go on the first IDE hard disk on your computer, type the following:
# grub-install /dev/hda
Copy files off. If the system seems to be unbootable, use any commands you are used to for backing up or copying files from the system.
If you have corrected the problem, you should be able to remove the boot CD from the drive and reboot your computer from hard disk.