Jetson xavier agx: stuck on boot :filesystem corrupted on/dev/mmcblk0p1

Hi,
i am running an on/off test ,some kind of on off switch is installed.
after a couple of rebooting , the filesystem is damaged and the jetson couldn t boot.
i am using a jetson xavier agx .
is there any way to repair it without flash.


or is there any way to avoid this kind of thinks, i need to do electrical shutdown , so shutdown in a proper way is not possible.
nb: i can not fsck, command not found
Thanks

A Jetson is a full computer, and not unlike a desktop PC. If you can imagine running your PC and turning it off by yanking the power cord, then this would also be the expected result. Basically, any computer needs to be shut down properly before removing power.

The gist of the issue is that the filesystem on the Jetson (and most PCs) have cache and buffer, and if the cache and/or buffer is not written at the time of cutting power, then the filesystem is only partially written and there are inconsistencies which can’t be dealt with. There is a journal which helps in that if a bad shutdown is detected it can “unchange” some of the scheduled changes such that the filesystem is not corrupt, but some files will be lost each time this occurs. Should the amount of cached/buffered content exceed the size of the journal, then not only are those files lost, corruption makes it impossible to automatically repair. There is no getting around that in normal operation.

Any repair means manually randomly allowing parts of the system to be gutted. It might boot, but you’d probably need to clone, repair the clone (which isn’t a repair so much as it is cutting out random bad parts), and then reflash.

If you must do this, some possibilities are:

  • Run the filesystem in synchronous mode without buffering/caching. The consequences of this are that the system will run extraordinarily low, and any solid state memory (eMMC or SD card) will have hardware failure very quickly.
  • Issue commands to shutdown normally first.
  • Issue commands to flush buffers/cache, and switch to synchronous mode just before shutdown.
  • Use an overlay filesystem (OverlayFS) to run most of the filesystem read-only, and use RAM to “pretend” it is a filesystem to mark any changes. Reboot starts over with the original and no changes are preserved. Typical of a kiosk style application, and it does require more RAM to make more filesystem changes. This does not necessarily work well on a Jetson, I know a lot of people have had issues making this work, and I don’t know what the current state is with this.

If you can issue commands to flush the buffer and go to synchronous mode, then it is just as easy to properly shutdown. However, emergency sync and going read-only takes less time than a full shutdown.

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