How to repair filesystem or ignore checksum on eMMC

Hello !!!

We are using jetson nano and storage is only eMMC.
I know we can use fsck on the host system, if filesystem is broken on SSD or SD Card.
And I think eMMC case is difficult to repair, because we can’t access eMMC from external system.

Anyway, I wonder we could repair filesystem or ignore checksum when filesystem is broken on mmcblk0p1 ?

Hello,

What error did you hit? Any log to share? Not sure what checksum issue we are talking about.

How badly is it broken? Does it boot to the full system, or does it drop into a bash prompt? FYI, a repair won’t recover missing content, but it will prevent further corruption. You are better off cloning, repairing the clone on the host PC, and then flashing. However, you can make the file system read-only (needed for fixing) while you repair by using magic sysrq key combination:

# First sync it:
ALT-SYSRQ-s
# Now set read-only:
ALT-SYSRQ-u
# Now do whatever you wanted for repair, e.g.:
sudo fsck.ext4 /dev/mmcblk0p1

Think of clone also as a backup since if you have something valuable you want to save, then you will have access to whatever is left of the file system.

1 Like

This is the error point.

[    4.153634] tegradc tegradc.0: hdmi: plugged
[    4.184750] Root device found: mmcblk0p1
[    4.189817] Found dev node: /dev/mmcblk0p1
[    4.208622] EXT4-fs (mmcblk0p1): VFS: Found ext4 filesystem with invalid superblock checksum.  Run e2fsck?
mount: mount /dev/mmcblk0p1 on /mnt fai[    4.219057] ERROR: mmcblk0p1 mount fail...
led: Bad message

Did you mean the clone is “flash.sh -r -k APP -G”, right?

Yes, but with a backup file name (probably what you meant…here’s an example with a few things filled in, assuming it is an eMMC model):
flash.sh -r -k APP -G my_backup.img jetson-nano mmcblk0p1

A missing or invalid superblock is a “no go”. The file system must be repaired, and the damage exceeded what the journal was able to recover. Repair could make it “work”, but it is likely there will be something wrong with it which is more serious than just a couple of files missing. A repaired system in a clone would be useful, but only for recovery of what was on it, not for flashing. One could keep custom content from that, propagate it into the new flash (in pieces) to not lose everything, but you have lost something at this point.

The point of the sysrq content is that if you choose to clone from a running system using dd, then the file system must be read-only for it to be valid. The file system must also be read-only to repair a superblock.

1 Like

Thanks for your response.
It looks helpful.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.