Corrupted SD cards on AGX orin (jetpack 5.1.2)

I took the advice from this topic and ran the command

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk1p1
-c tools/kernel_flash/flash_l4t_external.xml
–showlogs --network usb0 jetson-agx-orin-devkit internal

I put a standard 64G sd-card.
changed the boot order , and everything works as expected (which is great)…

in /boot/extlinux/extlinux.conf added some entries (different device trees which supports different sensors FWIW).

when the device runs for a day or so , I get at the errors in the sd-card.
when booting from internal memory (eMMC) and running

umount /dev/mmcblk1p1
sudo fsck.ext4 -f /dev/mmcblk1p1

I get

e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Inode 1180289 seems to contain garbage.  Clear<y>? yes
Inode 1180290 seems to contain garbage.  Clear<y>? yes
Inode 1180291 seems to contain garbage.  Clear<y>? yes
Inode 1180292 seems to contain garbage.  Clear<y>? yes
Inode 1180293 seems to contain garbage.  Clear<y>? yes
Inode 1180294 seems to contain garbage.  Clear<y>? yes
Inode 1180295 seems to contain garbage.  Clear<y>? yes

etc... sometimes it's a very long list .

I tried it more than once in different computers and different sd-cards , downloaded the version from the sdkmanager (jp5.1.2) and always same behaviour.

sometimes it gets into a sttage that the sd-card is corupted , booted from internal memory , I run sudo fsck.ext4 -f /dev/mmcblk1p1 and it works again , sometimes it gets into a stage that the sdcard is corrupter and mandatory files have been damaged (and removed).

and Idea how to overcome that ? even taking a different approach generating the sd-card or programming the orin , maybe upgrading to jp5.1.3 will help ?

BTW there is a topic with the same name here but it’s on nano and the solution does not seems to fit the AGX.

any approach is welcome

There are some bug in kernel drivers so it should also affect SD cards on AGX Orin.
Please upgrade to 5.1.3 and try again.

I have upgraded to 5.1.3 and same behavior.

When I switch from different boot options (in the device tree) it happens again. (not sure related , maybe several restarts do this as well

[Jul18 18:12] EXT4-fs (mmcblk1p1): error count since last fsck: 3
[  +0.000190] EXT4-fs (mmcblk1p1): initial error at time 1721314611: ext4_lookup:1706: inode 5374993
[  +0.000257] EXT4-fs (mmcblk1p1): last error at time 1721315453: ext4_lookup:1706: inode 5374993
[Jul18 18:13] imx324 1-001a: imx324_set_gain: db: 16

I have the same image (kernel) and each boot option the device tree is different.

LABEL IMX623_DMM10
         MENU LABEL IMX623_DMM10 kernel
         LINUX /boot/Image
         INITRD /boot/initrd
         FDT /boot/dtb/tegra234-p3701-0000-p3737-0000-imx623-isxevb-des-dmm10.dtb
         APPEND ${cbootargs} quiet root=/dev/mmcblk1p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4

LABEL IMX728_DMM10
         MENU LABEL IMX728_DMM10 kernel
         LINUX /boot/Image
         INITRD /boot/initrd
         FDT /boot/dtb/tegra234-p3701-0000-p3737-0000-imx728-isxevb-des-dmm10.dtb
         APPEND ${cbootargs} quiet root=/dev/mmcblk1p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4

LABEL ISX022_DMM10
         MENU LABEL ISX022_DMM10 kernel
         LINUX /boot/Image
         INITRD /boot/initrd
         FDT /boot/dtb/tegra234-p3701-0000-p3737-0000-isx022-isxevb-des-dmm10.dtb
         APPEND ${cbootargs} quiet root=/dev/mmcblk1p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4


when switching , it happens again…

maybe there is a different approach generating an sd-card + booting from it ?

Can you please make sure if your case is the same as reported in this post?

The behavior is the same , though I am on AGX orin (and did not see how he generated the sd-card , and what the solution was).
Maybe there is a better way to generate the sd ? for example maybe use the sdkmanager and flash the image to emmc , then try to boot from sd-card (chnaging in boot menu) and run from sd.
Would mention that almosst each reboot , if I reboot from eMMC and then run

umount /dev/mmcblk1p1
sudo fsck.ext4 -f /dev/mmcblk1p1

it fixeds several issues , sometimes it gets into a point that files/directories are damaged and in that case device won’t boot. (there are cases when device boots from eMMC then I fix the sd-card and t hen it comes back to life , but not for long).

any sequece I can have to use an sd-card that this issue won’t happend ?

Oh sorry, the fix does not catch up with 5.1.3.
Only JetPack 6.0 contains the fix.

It’s bug in kernel drivers and not about how you flash the device at all.

so to be clear.
I should upgrade to JP6.0 and migrate my changes , and this issue will be solved ? (using same approach ?)
no patch or change in the kernel to solve it ?
if this is the issue , will upgrade to JP6.0 adn will let you know if issue is solved.

Please directly upgrade the JetPack version to avoid any possible issues.

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