Repair broken ext4 partition with wrong superblock checksum
Posted: 28 Nov 2022, 03:07
Hello!
A few weeks ago I gave my laptop to the service to replace the keyboard.
There were two operating systems on the computer: windows 10 and linux (ubuntu 20.04).
The folder /home of my Ubuntu system was moved to a separate partition on the disk.
After the computer returned from the service, the partition /home stopped mounting due to problems with the superblock.
Testdisk, when trying to determine the backup superblocks, outputs the following:
Linux file systems. data 570617856 975675391 405057536
superblock 0, block size=4096 []
To restore the file system using an alternative superblock, run
fsck.ext4 -p -b superblock is a B block size device.
When i try use fsck it returns:
fsck.ext4: superblock checksum does not match superblock when trying to open /dev/sda8
/dev/sda8:
The super block could not be read or does not describe a valid ext2/ext3/ext4
FS. If the device is valid and it does contain ext2/ext3/ext4
FZ (and do not exchange, or us, or something else), then the super block
is damaged, and you can try to run e2fsck with an alternative superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
I found other backup superblocks with "mke2fs -n /dev/xxx":
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
But unfortunately i got the same result with each of them.
However, when I try to display the contents of the partition using testdisk, it displays all the files and folders and I even could copy them.
drwxr-xr-x 0 0 4096 6-Nov-2022 22:57 .
drwxr-xr-x 0 0 4096 6-Nov-2022 22:57 ..
drwx------ 0 0 16384 11-Feb-2022 23:55 lost+found
drwxr-xr-x 1000 1000 4096 29-Sep-2022 07:59 kirill
drwxr-xr-x 0 0 4096 6-Nov-2022 22:57 www-data
So I can't understand if testdisk lists the contents of the partition, why does fsck say that the superblock is corrupted?
Is there a way to repair the partition or i need to format it and paste copied by testdisk files?
Thank you!
A few weeks ago I gave my laptop to the service to replace the keyboard.
There were two operating systems on the computer: windows 10 and linux (ubuntu 20.04).
The folder /home of my Ubuntu system was moved to a separate partition on the disk.
After the computer returned from the service, the partition /home stopped mounting due to problems with the superblock.
Testdisk, when trying to determine the backup superblocks, outputs the following:
Linux file systems. data 570617856 975675391 405057536
superblock 0, block size=4096 []
To restore the file system using an alternative superblock, run
fsck.ext4 -p -b superblock is a B block size device.
When i try use fsck it returns:
fsck.ext4: superblock checksum does not match superblock when trying to open /dev/sda8
/dev/sda8:
The super block could not be read or does not describe a valid ext2/ext3/ext4
FS. If the device is valid and it does contain ext2/ext3/ext4
FZ (and do not exchange, or us, or something else), then the super block
is damaged, and you can try to run e2fsck with an alternative superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
I found other backup superblocks with "mke2fs -n /dev/xxx":
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
But unfortunately i got the same result with each of them.
However, when I try to display the contents of the partition using testdisk, it displays all the files and folders and I even could copy them.
drwxr-xr-x 0 0 4096 6-Nov-2022 22:57 .
drwxr-xr-x 0 0 4096 6-Nov-2022 22:57 ..
drwx------ 0 0 16384 11-Feb-2022 23:55 lost+found
drwxr-xr-x 1000 1000 4096 29-Sep-2022 07:59 kirill
drwxr-xr-x 0 0 4096 6-Nov-2022 22:57 www-data
So I can't understand if testdisk lists the contents of the partition, why does fsck say that the superblock is corrupted?
Is there a way to repair the partition or i need to format it and paste copied by testdisk files?
Thank you!