Ubuntu – BIOS boot partition : how to fix “Superblock invalid”

bootpartitioning

My machine is a desktop Ubuntu (no dual boot). The PC is unable to pass the Ubuntu screen at bootup. After a few mins, it falls back on a screen asking for the following: maintenance or reboot. I have 1Tb SSD drive. I removed all other secondary drives. When I run sudo fdisk -l, I get the following:

Device      Start        End          Sectors      Size   Type
/dev/sda1   2048         1050623      1048576      512M   EFI System
/dev/sda2   1050624      1052671      2048         1M     Bios boot
/dev/sda3   1984313344   2051198975   66885632    31.9G   Linux Swap
/dev/sda4   1052672      1984313343   1983260672  945.7G  Linux filesystem

Then I run fsck /dev/sdaX with X=1,2,3 or 4. All partitions X=1,3,4 I get no error. But for fsck /dev/sda2, the output is:

ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks ...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda2

The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem….you might try running e2fsck with an alternate superblock:

e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

I am not sure what I should try: e2fsck -b 8193 /dev/sda? or e2fsck -b 8193 /dev/sda2

Thank you for any suggestions!

Best Answer

You have a serious error, so the best thing to do before you start is to make an identical copy of your SSD to another SSD or HDD larger or equal to your current size. CloneZilla Live is the easiest way to do that. If you make a mistake or something else goes wrong you'll have an up-to-date image to fall back to.

No? You want to live dangerously and totally mess up your system and lose all data??? OK, your choice! Just execute:

e2fsck -b 8193 /dev/sda

and if that fails:

e2fsck -b 32768 /dev/sda

because the hint is in the <device>:

  • /dev/sda is your SSD (device)
  • /dev/sda1 is the first partition on your first device.

Oh, did I mention that if the second command fails, you have to restore your image and come back and ask a new question?