Mounting with an alternative superblock

Posted on in Categories Linux last updated November 15, 2005

How do I mount file system with an alternative superblock under Linux operating systems?

Mount command by default use block 1. However, you can force the mount to use specific superblock. Use the following syntax:

mount -o sb=alternative-superblock /dev/sdaX /mnt
OR
mount sb=alternative-superblock /dev/hdaX /mnt
From the man page:

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 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 number here uses 1k
units. Thus, if you want to use logical block 32768 on a
filesystem with 4k blocks, use “sb=131072”.

Thus, if you want to use logical block 32768 on a filesystem with 4k blocks, use “sb=131072”, type command as follows:
# mount -o sb=131072 /dev/hda2 /mnt

For more information see Surviving a Linux Filesystem Failures tip to determine alternative superblock.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

4 comment

  1. Use following syntax:
    mount sb=alternative superblock. /dev/sdaX /mnt
    OR
    mount sb=alternative superblock. /dev/hdaX /mnt

    Minor corrections in your examples, the “sb=alternative superblock” is an option in mount and thus it should be prefixed with the “-o” switch.

    e.g. mount -o sb=alternative superblock. /dev/hdaX /mnt

Comments are closed.