2

After restarting a RedHat server, it fails to boot into the operating system. It says "an error occurred during the file system check". After doing a fsck, it says

The superblock could not be read or does not describe a correct ext2 filesystem

Screenshot

What should I do?

1 Answers1

2

Find a backup of superblock with appropriate utility (like TestDisk). Then execute the following:

fsck.ext2 -b $SUPERBLOCK_POSITION -B $BLOCK_SIZE /dev/sdg2

where $SUPERBLOCK_POSITION and $BLOCK_SIZE are taken from TestDisk. /dev/sdg2 - partition with corrutped superblock

batistuta09
  • 8,723
  • 9
  • 21
  • 1
    i read somewhere that testDisk can erase all your files. never used it. How true is that please? – Olumide Alabi Sep 09 '19 at 14:12
  • 2
    I've not got such info regarding TestDisk. You can als try "dumpe2fs /dev/sdg2 | grep -i superblock" – batistuta09 Sep 09 '19 at 14:18
  • the "dumpe2fs /dev/sdg2 | grep -i superblock" has shown some BLOCK_SIZE but it retuns that device or resource busy while trying to open. i have a question to ask, What is the correct partition to run the command on? May be I have been doing it wrongly. – Olumide Alabi Sep 09 '19 at 15:06
  • @OlumideAlabi you could do anything you want to your disk data, but the suggested answer has the appropriate command found quite easily. – LTPCGO Sep 09 '19 at 22:09