I am trying to find the superblock with dumpe2fs
command, but with this output there is no information about superblocks.
Asked
Active
Viewed 9,688 times
3

SabreWolfy
- 775

Ani
- 31
1 Answers
2
You can also find the superblock with
mkfs.ext4 -n /dev/sda
mkfs.ext2 -n /dev/sda
(pick ext4/ext2 if your system is ext4/ext2; REPLACE sda with your disk). From the manual:
-n
Causes mke2fs to not actually create a filesystem, but display what it would do if it were to create a filesystem. This can be used to determine the location of the backup superblocks for a particular filesystem, so long as the mke2fs parameters that were passed when the filesystem was originally created are used again.
Repairing
fsck -b 11111 /dev/sda
where 11111
is the superblock, and sda the partition (REPLACE both with what you need).

Rinzwind
- 299,756
-
-
-
You did not include the
-n
: "Causes mke2fs to not actually create a filesystem" ? man page for ext2 is the same: https://linux.die.net/man/8/mkfs.ext2 – Rinzwind May 09 '18 at 09:01 -
root@aniket-VirtualBox:/home/aniket# mkfs.ext2 -n /dev/sda1 mke2fs 1.42.13 (17-May-2015) /dev/sda1 contains a ext2 file system last mounted on /boot on Wed May 9 14:14:10 2018 Proceed anyway? (y,n) – Ani May 09 '18 at 09:10
-
-
i think mkfs is only use for apply fs on block not for checking super-block information – Ani May 09 '18 at 12:06
-
Then explain the "-n" option to me ;-) That options shows the location of the superblock based on the --backup-- it created when making the filesystem. In case tools error out you can use that one since it is saved elsewhere it is likely to be corrupted if your superblock is. – Rinzwind May 09 '18 at 13:18
-
man dumpe2fs
says -h "only display the superblock information and not any of the block group..." – guiverc May 09 '18 at 08:25