New to the but not linux

Uncle Jim jim at jimani.com
Fri Sep 17 23:35:35 CDT 2004


Hi,

On Fri, Sep 17, 2004 at 11:32:19AM -0500, docv wrote:

> I've got a problem with a data drive (ext2 formatted as /home) that I 
> need some direction on where to go to find help with. Specifically if 
> there's any way to recover from a "bad super block" when attempting to 
> mount the drive? I've Goggled for an answer, but without success.

Try to mount the filesystem using one of the backup superblocks.  From
the mount man page under the section "Mount options for ext2":


       sb=n   Instead  of  block  1,  use block n as superblock. This could be
              useful when the filesystem has been damaged.   (Earlier,  copies
              of  the  superblock would be made every 8192 blocks: in block 1,
              8193, 16385, ... (and one got  hundreds  or  even  thousands  of
              copies on a big filesystem). Since version 1.08, mke2fs has a -s
              (sparse superblock)  option  to  reduce  the  number  of  backup
              superblocks,  and  since  version 1.15 this is the default. Note
              that this may mean that ext2 filesystems  created  by  a  recent
              mke2fs cannot be mounted r/w under Linux 2.0.*.)  The block num-
              ber here uses 1k units. Thus, if you want to use  logical  block
              32768 on a filesystem with 4k blocks, use "sb=131072".


I've not had much luck with this but that is because when I hose the superblock
I REALLY hose the rest of the filesystem.  I know it works because I have
mounted good filesystems with this option when trying to locate backup superblocks
(because I forgot to write down the numbers when I did the mke2fs).  Good luck.
-- 
Jim



More information about the Kclug mailing list