Im new to rasbery pi.. i would like to get my PI back to normal without having to reinstall everything!(next time ill back up or use puppet.)

I ran:

sudo fsck -n -f

i got the below:

Journal superblock has an unknown incompatible feature flag set.
Abort? no

Journal superblock is corrupt.
Fix? no

**fsck.ext4: The ext2 superblock is corrupt while checking ext3 journal for /dev/mmcblk0p2
/dev/mmcblk0p2: ********** WARNING: Filesystem still has errors ************

RasberyPi. can anyone explain how i can fix this?

  • If you want fsck to fix errors why did you specify "-n"? – Milliways Oct 9 '18 at 3:26
  • dang..i get this now: /dev/mmcblk0p2 has unsupported feature(s): metadata_csum e2fsck: Get a newer version of e2fsck! – Jeryl Cook Oct 9 '18 at 3:29
  • because its read-only..i cannot update the library...anyway around that? – Jeryl Cook Oct 9 '18 at 3:29
  • 1
    Try on another Linux system (which could be the Pi itself with a good OS. – Milliways Oct 9 '18 at 3:31

You must have access to the corrupted SD Card without mounting it. This can only be done with a second clean operating system you boot from an independent storage. For example you can use a laptop with a linux operating system, best a debian like such as Debian itself or Ubuntu. You can also use a second SD Card and flash Raspbian Stretch Lite onto it and boot the RasPi with it. Now attach the corrupted SD Card to the computer with a (USB-)card-reader. Before fiddling with fsck it is a good idea to make an image from the SD Card (e.g. attached as /dev/sdb) with:

pc-or-rpi ~$ sudo dd if=/dev/sdb bs=4M | gzip -c >sdcard.img.gz

You can restore it for a new try with:

pc-or-rpi ~$ gzip -c -d sdcard.img.gz | sudo dd of=/dev/sdb bs=4M conv=fsync

But this is only save for the same SD Card. Restoring to another SD Card, even it is declared with same capacity, may fail because of a difference of only some sectors. Restoring to another SD Card with more capacity always work but may be waste of storage space.

Now you can try to repair the corrupted SD Card with fsck on root partition /dev/sdb2. Because the error message shows that the superblock is corrupt you may use an alternative superblock with for example:

pc-or-rpi ~$ sudo fsck.ext4 -f -b 32768 /dev/sdb2

Look at man fsck.ext4 how to find an alternative superblock with option -b.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.