[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Recover original superblock on corrupted filesystem?



Hi,

On Fri, 2005-10-21 at 15:51 +0100, bloch verdurin com wrote:

> It appears the original superblock is corrupted too, as it has an inode
> count of 0.  When I start fsck with -b 32760, it uses the alternate
> superblock and proceeds.  However, it restarts from the beginning a
> couple of times and after the second restart it doesn't use the
> alternate superblock, stopping instead as it can't find the original
> one.

Do you have a log of the fsck output, and which e2fsprogs version is
this?  Sounds like it may be an e2fsck bug if we don't honour the backup
superblock flag on subsequent passes.

> Is there a way around this, such as using one of the alternate
> superblocks to replace the broken one

Yes, "dd" of the appropriate block should work... but do this with
extreme care, as getting it slightly wrong will cause major havoc.

"debugfs" may be a better bet.  

	# debugfs -w -b$BLOCKSIZE -s$SUPERBLOCK /dev/$DEV

will tell debugfs to read the specified superblock.  If you dirty the
superblock (eg. with the "dirty" command) then quit, it will write back
the backup superblock to the home location too.

--Steph


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]