shrewdgamer
Posts: 52
Joined: Fri Dec 07, 2018 3:32 pm
Location: India

Irreparable data corruption.

Mon Mar 11, 2019 9:06 am

I'm facing this irreparable data corruption problem. This I got after I repaired the SD card and haven't used it for at least 2 weeks, yesterday I inserted it into the Pi and turned it on, there was no green light flickering so I unplugged it and re-plugged it, this time there was a flickering green light but it was showing an error about "init" to be moved to kernel or something, I unplugged it and inserted it into a card reader and tried to run fsck and I'm getting this error.

Running fsck on individual partitions on the device, like sdx1 and sdx2, is giving me clean results, but running fsck on the device like "/dev/sdx" is giving me the below error:
fsck from util-linux 2.32.1
e2fsck 1.44.2 (14-May-2018)
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/sdx

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
I noticed that there is a 4MB unallocated space before the boot partition. Is this caused by it.
I have:
Raspberry Pi 3B+ with official power supply
Sandisk Class 10 SD card with Raspbian Stretch full

shrewdgamer
Posts: 52
Joined: Fri Dec 07, 2018 3:32 pm
Location: India

Re: Irreparable data corruption.

Mon Mar 11, 2019 5:07 pm

Now I'm again not getting any green flickering light.
I have:
Raspberry Pi 3B+ with official power supply
Sandisk Class 10 SD card with Raspbian Stretch full

User avatar
Paeryn
Posts: 3023
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Irreparable data corruption.

Mon Mar 11, 2019 5:18 pm

shrewdgamer wrote:
Mon Mar 11, 2019 9:06 am
Running fsck on individual partitions on the device, like sdx1 and sdx2, is giving me clean results, but running fsck on the device like "/dev/sdx" is giving me the below error:
fsck from util-linux 2.32.1
e2fsck 1.44.2 (14-May-2018)
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/sdx
I noticed that there is a 4MB unallocated space before the boot partition. Is this caused by it.
It is giving you that error because /dev/sdx doesn't have a filesystem so asking fsck to check it makes no sense. The partitions /dev/sdx1 and /dev/sdx2 on it do which you said checked fine.

You said you repaired the SD card previously, did it boot alright after that? What is the contents of the boot partition?
She who travels light — forgot something.

shrewdgamer
Posts: 52
Joined: Fri Dec 07, 2018 3:32 pm
Location: India

Re: Irreparable data corruption.

Mon Mar 11, 2019 5:50 pm

Paeryn wrote:
Mon Mar 11, 2019 5:18 pm
shrewdgamer wrote:
Mon Mar 11, 2019 9:06 am
Running fsck on individual partitions on the device, like sdx1 and sdx2, is giving me clean results, but running fsck on the device like "/dev/sdx" is giving me the below error:
fsck from util-linux 2.32.1
e2fsck 1.44.2 (14-May-2018)
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/sdx
I noticed that there is a 4MB unallocated space before the boot partition. Is this caused by it.
It is giving you that error because /dev/sdx doesn't have a filesystem so asking fsck to check it makes no sense. The partitions /dev/sdx1 and /dev/sdx2 on it do which you said checked fine.

You said you repaired the SD card previously, did it boot alright after that? What is the contents of the boot partition?
No, yesterday was the first time I inserted it into Raspberry Pi after repairing it, and since then I'm facing the problem.

Below is the content of boot. Everything is accessible from other Systems.

Image
Attachments
Screenshot_20190311_231816.png
Screenshot_20190311_231816.png (33.72 KiB) Viewed 375 times
I have:
Raspberry Pi 3B+ with official power supply
Sandisk Class 10 SD card with Raspbian Stretch full

User avatar
Paeryn
Posts: 3023
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Irreparable data corruption.

Mon Mar 11, 2019 11:47 pm

If the green led never comes on when you apply power then the RPi hasn't been able to read the files in the boot partition.

I would assume that whatever problem you had originally that resulted in you "repairing" the SD card did more damage than what fsck can repair (it will try to fix an inconsistent filesystem but that doesn't mean it can restore any files whose contents were affected).

You said that it did start booting at one point but your description of the error was too vague to guess at whereabouts in the process it stopped or why, but it must have been able to read both the firmware and kernel for you to have seen any text. If it now can't do that then you may be better off copying any files that you need and start afresh (might need a new SD card if that one has given up the ghost).
She who travels light — forgot something.

shrewdgamer
Posts: 52
Joined: Fri Dec 07, 2018 3:32 pm
Location: India

Re: Irreparable data corruption.

Tue Mar 12, 2019 2:35 am

Paeryn wrote:
Mon Mar 11, 2019 11:47 pm
If the green led never comes on when you apply power then the RPi hasn't been able to read the files in the boot partition.

I would assume that whatever problem you had originally that resulted in you "repairing" the SD card did more damage than what fsck can repair (it will try to fix an inconsistent filesystem but that doesn't mean it can restore any files whose contents were affected).

You said that it did start booting at one point but your description of the error was too vague to guess at whereabouts in the process it stopped or why, but it must have been able to read both the firmware and kernel for you to have seen any text. If it now can't do that then you may be better off copying any files that you need and start afresh (might need a new SD card if that one has given up the ghost).
Thanks for your helpful reply.

After running fsck, it booted into the desktop, as this SD card was developing these corruption problems, I decided to make the boot partition read-only, following the instructions here: http://geraldnaveen.blogspot.com/2013/1 ... ystem.html

I modified the /etc/fstab file using sudo nano command, and typed 'ro' for boot partition, saved it and exited, from the same command prompt I tried to restart using the 'reboot' command, when it restarted it is showing blank screen.
I have:
Raspberry Pi 3B+ with official power supply
Sandisk Class 10 SD card with Raspbian Stretch full

Return to “Troubleshooting”