SolutionsPrivate Clouds: Cloudforms PaaS: OpenShift Public Clouds Cloud Portfolio Building Clouds Cloud Partner Program ResourcesMedium & Large Enterprise Enterprise Solutions Business Intelligence Collaboration & Content Management Enterprise Applications Security Web Applications
Tips & Tricks
Featured Article: Using Rescue Mode
The official Red Hat CD-ROM (disk 1) can serve as a bootable emergency disk for most modern PCs with BIOS that can boot from CD-ROMs. It includes file system tools for emergency system administration. Using this disc you can attempt to recover from file system-related crashes.
When your system crashes due to a power failure or any other dire reasons, you may find your file system to be corrupt, and Red Hat Linux might refuse to boot as normal. In such a case do the following:
- Insert the official Red Hat CD-ROM (disc 1) in your CD-ROM and boot your computer.
- After the system starts booting from the CD-ROM you will see a screen that displays a boot prompt. Enter
linux rescueat the boot prompt to boot the system in rescue mode.
- You will be asked to select the language, which defaults to English. Select the appropriate language and press OK to continue.
- You will be asked to select the keyboard type, which defaults to
us(USA). Select the appropriate keyboard type and press OK to continue.
- Linux notes that the rescue mode will attempt to mount your existing partitions under
/mnt/sysimagedirectory. You should select the Skip button because if you are trying to fix a file system problem (most file system tools do not work on mounted file systems for security reasons).
- Once you are at the shell prompt, run the
fsck partition_namecommand to perform a file system check for your hard drive. For example, to check the first partition of your first IDE/EIDE disk, run the
fsck /dev/hda1command. Similarly, to check the first partition of your first SCSI disk run the
fsck /dev/sda1command. This will display errors that the
fsckprogram finds in the named partition and ask you to take an action. If you are not interested in getting prompted for one or more file system errors and want the
fsckprogram to fix whatever it can, you can run this same command with a
-poption. For example, the
fsck -p /dev/hda1command runs the
fsckprogram on the first IDE/EIDE hard drive partition and tries to fix everything it can.
- If your disk has bad blocks, you can locate bad blocks in a disk by running the
badblocks device_namecommand. For example, to find bad blocks on the second partition of the first IDE/EIDE disk run the
- Repeat the previous steps as many times necessary to check all your file system partitions.
If you have a problem accessing the partition, try the
rescuept device_namecommand to restore the partition.
- Press Ctrl+Alt+Del to reboot the system and make sure to remove the CD-ROM so that your system can boot from your hard drive.
Check out Red Hat Linux Survival Guide for more tips like this.