12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Recovery and Repair 237Once in single-user mode, your filesystems are mounted, so any installed applicationsshould be available. Use the exit command to exit single-user mode and reboot the system.Emergency ModeEmergency mode is similar to single-user mode except the root filesystem is mountedread-only and runlevel 1 is not used. Boot into emergency mode using the same methodas single-user mode except replace the word single with emergency in the boot method.Because the filesystem is mounted read-only, files can not be changed or repaired, butfiles can be retrieved off the system.Filesystem RepairIf one or more filesystems are corrupt, boot into rescue mode and do not mount thefilesystem. Even if you can boot into single-user mode, do not use it because the filesystemcan not be repaired if it is mounted.The e2fsck utility can be used to check and repair an ext2 or ext3 (default for <strong>Red</strong> <strong>Hat</strong><strong>Enterprise</strong> <strong>Linux</strong>) filesystem. It must be run as root, and the filesystem being checkedshould not be mounted. The basic syntax is as follows:e2fsck where is the device filename for the filesystem such as /dev/hda1 for the firstpartition on the first IDE drive or /dev/sda2 for the second partition on the first SCSIdrive. As the utility finds errors such as bad inodes, it prompts the administrator toconfirm the fix. To automatically answer yes to all questions and cause the utility to benon-interactive (for example, you want to call it from a non-interactive script), use the -ycommand-line argument. To print verbose information while the filesystem check andrepair is occurring, use the -v command-line argument. Additional arguments can befound in the e2fsck man page called from the man e2fsck command.Boot Loader RepairIf your system does not display the GRUB interface when booting, if GRUB won’t bootinto <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong> properly, or if you have another problem with the GRUBboot loader on an x86 or x86_64 system, try booting into rescue mode and reinstallingGRUB with the following command:grub-install --root-directory=/boot ‘’The --root-directory=/boot option specifies that the GRUB images should be installedin the /boot directory. Replace with the device name on which to installthe GRUB images. The device name can be either the GRUB device name such as hd0 orsd0 or the system device name such as /dev/hda or /dev/sda. For example, for the GRUBdevice named sd0, the command would be10grub-install --root-directory=/boot ‘(sd0)’

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!