How To Mount Ext4 With Alternative Super Block In Linux?
We have detailed file system, blocks and super blocks int this post. We will try to mount alternative super block. As we know super blocks hold information about file system. If our primary super block is corrupted or unusable we can use alternative super blocks.
List Super Blocks
To mount with an alternative super block we will list super blocks and alternatives.
$ dumpe2fs /dev/vda1 |grep -i superblock
To run dumpe2fs command we need root privileges. We grep only super block related line of the output.
Mount File System
We will mount file system regular mount command by providing different arguments like below
$ mount sb=32768 /dev/vda1 /mnt
Or we can use by providing as an option
$ mount -o sb=32768 /dev/vda1 /mnt
Mount command uses by default block 1. However we have defined different super block number with option parameter