LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 04: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-09-2005, 12:27 AM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,032

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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/Novell 17 02-07-2014 01:18 PM
Root partition damaged, system will not boot- How to repair? applewax Linux - General 1 05-27-2005 12:53 PM
Repair a filesystem ...fsck is it??????? hrg Linux - General 3 07-24-2004 08:41 AM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 08:51 AM
kernel can not boot / fsck can not repair rabby Linux - Hardware 7 04-11-2004 11:10 AM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration