LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-08-2005, 03:51 AM   #1
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228
Blog Entries: 1

Rep: Reputation: 31
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.
 
Old 12-08-2005, 11:27 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"fsck failed. Please repair manually and reboot" after chaning non-system partition undeaf SUSE / openSUSE 17 02-07-2014 12:18 PM
Root partition damaged, system will not boot- How to repair? applewax Linux - General 1 05-27-2005 11:53 AM
Repair a filesystem ...fsck is it??????? hrg Linux - General 3 07-24-2004 07:41 AM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 07:51 AM
kernel can not boot / fsck can not repair rabby Linux - Hardware 7 04-11-2004 10:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration