apape1
From old Howto book by Abe Loveless
Recovery from power interruption with file check errors on reboot.
Occasionally every system will lose power. You want to be sure to have your E-Smith / SME Server running through a UPS. Linux, like all Operating Systems, frowns on in-correct shutdown procedures. A power interruption, or just killing the power, may cause a file check error to occur during the boot process.
If this occurs, there are a few utilities that you can use to repair your disk and get the system booted correctly. You will need to login as root, and execute the following commands. In all cases, do not actually type the quotes, the last character is a number, and there is a space between “fsck” and “/dev/..”.
The following instructions vary depending on the harddrives inside your individual computer and their configuration. Choose the configuration that matches your system. “Test All Drives” should work if your system isn’t listed here.
1 Drive (IDE):
Type: "fsck /dev/hda1" and ENTER
Type: "fsck /dev/hda6" and ENTER
Reboot: “shutdown –r now”
1 Drive (SCSI):
Incomplete.
2 Drives RAID1 Mirror (IDE):
Incomplete.
2 Drives RAID1 Mirror (SCSI):
Type: "fsck /dev/md0" and ENTER
Type: "fsck /dev/md1" and ENTER
Reboot: “shutdown –r now”
Test All Drives:
(If you are un-sure what you have, this may be best. However, documentation suggests that you should be careful doing this. See the following article:
http://e-smith.org/bboard/read.php?v=t&f=1&i=13728&t=13720)
Type: “fsck –A” and ENTER
Reboot: “shutdown –r now”
The 2 options above are incomplete because, as of this writing, I do not have a test machine available that fits those configurations. If someone with this configuration would want to report their results to me, I would appreciate it. Just send me an e-mail with your disk configuration, and I’ll update the information.
1. Login as root
2. Type: “mail loveless@tech-geeks.org < /etc/fstab”
3. Logout.
4. Send me an e-mail through your normal client to let me know you sent the above file and let me know your drive type and configuration. The file above displays which “/dev/*” value your system uses, but it doesn’t display the drive type.