LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   How repair /usr partition using fsck, after finding errors during boot up? (https://www.linuxquestions.org/questions/debian-26/how-repair-usr-partition-using-fsck-after-finding-errors-during-boot-up-390434/)

sarajevo 12-08-2005 03:51 AM

How repair /usr partition using fsck, after finding errors during boot up?
 
Hi,

after 30 times mounting my filesystem without checking it it was checked automaticly while boot up. All disks checked without problems except /usr partition.
I am using Debian Sarge, and it works perfectly. The best one.




I got following messsage when for /usr partition


current sda: Sense key Medium Error
Additional sense: Unrecovered read error-auto reallocate failed
end_request: I/O error, dev sda, sector 26585499
Error reading block 33558536 (Attempt to read block from filesystem resulted in short read) while doing inode scan.

after couple minutes scroling on screen it stoped and wrote next

current sda: Sense key Medium Error
Additional sense: Unrecovered read error-auto reallocate failed
end_request: I/O error, dev sda, sector 26585592
Error reading block 33558629 (Attempt to read block from filesystem resulted in short read) while doing inode scan.

/usr: UNESPECTED INCONSISTENCY: RUN fsck MANUALLY

and ask for root password.
I entered root password and as root enter next command as suggested some of you

#fsck -f /dev -y
tneh I got output

fsck.ext2 is directory while trying to open /usr

the superblock could not be
read or does not describe a correct ext2 filesystem (and not swap or ufs or something else), then the superblock is corupted, you might try running e2fsck with an alternate superblock...

and then I run next command

#e2fsck -b 8193 /dev/sda6

then I got output like this

fsck.ext2 is directory while trying to open /usr

the superblock could not be read or does not describe a correct ext2 filesystem (and not swap or ufs or something else), then the superblock is corupted, you might try running e2fsck with an alternate superblock...


I do not know what to do in this situation, and I am compleatelly confused.


Thanks for your help.

haertig 12-08-2005 11:27 PM

I am no fsck expert (FAR from it). But here are a few suggestions:

(1) You did umount the filesystem before running fsck, right? fsck on a mounted filesystem, while possible, is not adviseable.

(2) Your first invokation of fsck is wrong. You said: "fsck -f /dev -y"

I think you meant: "fsck -y -f /dev/sda6"

Trying to run fsck on just "/dev" surely won't work, and I'd expect "Bad superblock" to be a good candidate for the error you might receive.

Make sure /dev/sda6 is where /usr really is. If you're wrong in that specification and running fsck on your swap or maybe a Windows NTFS partition, you'll surely get a failure.

(3) Running e2fsck with "-b 8193" is a good thing to try if indeed your superblock is corrupted. You may also need to specify the specific blocksize with "-B" (a capitol 'B' for this option). This -B option takes a parameter, the specific blocksize. I've never used -B in practice so I don't know exactly how you specify the blocksize. Assuming you have the standard 1k blocksize, you could try "-B 1k" or "-B 1024". One of those may work. Experiment. The worst thing I can see happening if you specify blocksize incorrectly is another of those "Bad superblock" error messages.

(4) Your original error: "end_request: I/O error, dev sda, sector 26585499" sounds a little ominous. You may have an actual harddisk problem. If you have a low level disk diagnostic tool (like Seagate's "Seatools") then you might try running that to see if your hardware is in good shape. These tools usually boot off a floppy or CDROM. fsck can't fix messed up hardware.

Good luck!


All times are GMT -5. The time now is 04:04 AM.