Flashing a cloned system.img Jetson Orin Nanon Developer Kit

I created successfully an system.img by following the instructions “cloning rootfs with initrd” as described here Flashing Support — NVIDIA Jetson Linux Developer Guide 1 documentation

I now want to flash this system.img onto the APP partition of my Jetson Orin Nano Developer Kit. Therefore I copied the system.img to ./tools/kernel_flash/images/external/system.img
And tried to flash the APP partition on the NvMe storage with the following command.

sudo ADDITIONAL_DTB_OVERLAY_OPT=“BootOrderNvme.dtbo” ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only -k APP --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p “-c bootloader/generic/cfg/flash_t234_qspi.xml” --showlogs --network usb0 jetson-orin-nano-devkit internal

The command line outputs that the flashing was successful, but the Jetson will not boot up. On bootup the Jetson ends up with a black screen showing a ‘_’.

Did I missed something? Whats the difference between the flag --flash-only and --use-backup-image as described here Flashing Support — NVIDIA Jetson Linux Developer Guide 1 documentation ?

Hi angela.denninger1,

Are you using the devkit or custom board for Orin Nano?
What’s the Jetpack version in use?

Please share the full serial console log at this moment for further check.

--flash-only would not generate any images for initrd flash.
--use-backup-image would not generate flash package if it has been set.

You can refer to l4t_initrd_flash_internal.sh for details.

Hi,
I am using the devkit and the Jetpack version 6.1.
How can I get the serial console log output? I only see a black screen with a _.
I attached the flashing log file
flash_1-6_0_20241022-113124.log (11.9 KB)

Thanks for your help.

follow the below link:

Thanks. Here is the log
serial_debug_console_output_jetson_orin_nano_flashed_app_partition.txt (72.2 KB)

It complains at the end of the log that the root partition cannot be mounted.
Maybe as additional information. The Jetson has only an nvme storage installed, no sd card and was initial flashed (before I flashed the app partition with the system.img) with the following command.
sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" --showlogs --network usb0 jetson-orin-nano-devkit internal

It seems you boot into recovery kernel.

Your flash command looks good to me and it should be fine if you have only connected NVMe SSD on Orin Nano devkit (w/o SD card).

Is your current use case about using the custom system.img to flash the devkit?
If so, you can simply add --no-systemimg in your initrd flash command.

Yes my use case is about using the custom system.img to flash the device.
There is no flag --no-systemimg it seems to be replaced with the flag --with-systemimg. The description of the flag says generate system image even when flashing individual partition, so I assume I want to call the script without this flag.

I could start the device in direct boot mode by changing the “OS change status” in the UEFI Menu to Normal. It still does not boot up, but the serial console log contains different information. After multiple tries it will end up in the recovery mode again.
The relevant part might be that it does not find the rootfs partition on the nvme drive

Looking for OTA work directory on the device(s): /dev/nvme0n1p1
[   16.334450] mount /dev/nvme0n1p1 /mnt
[   16.353653] EXT4-fs (nvme0n1p1): recovery complete
[   16.354510] EXT4-fs (nvme0n1p1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[   16.356344] is_boot_part_for_disk_enc /dev/nvme0n1p1 /mnt
[   16.367624] The mounted /dev/nvme0n1p1 is boot partition, try locating rootfs partition and mount it...
[   16.369015] mount_rootfs_partition /dev/nvme0n1p1 /mnt
[   16.424764] Failed to get the rootfs partition with PARTUUID=f966a855-fcbd-4b86-84a9-a75b1794b02d
[   16.426278] Failed to run "moutn_rootfs_partition /dev/nvme0n1p1 /mnt"
[   16.427638] Failed to run "mount_ota_work_partition /dev/nvme0n1p1 /mnt"
[   16.429055] Finding OTA work dir on internal storage device
mount: /mnt: special device /dev/mmcblk0 does not exist.
[   16.430462] mount /dev/mmcblk0 /mnt
[   16.433849] Failed to mount /dev/mmcblk0 on the /mnt
[   16.435214] Failed to run "mount_ota_work_partition /dev/mmcblk0 /mnt"
[   16.436613] OTA work directory is not found on internal and external storage devices

serial_debug_console_output_jetson_orin_nano_flashed_app_partition_direct_boot.txt (111.9 KB)

Please run the following command to flash the board and share the full flash log for further check.

$ sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml -r" --use-backup-image --showlogs --network usb0 jetson-orin-nano-devkit internal

Sure here is the flash log
flash_1-6_0_20241024-163059.log (47.4 KB)

It seems the flash process has finished w/o errors.
Does it meet your requirement?

No, I still can not boot the jetson, it always hangs on boot up with a black screen showing a ‘_’. The serial debug console output is still the same as the one I send you.

Do you mean this one?

I would like to check the full serial console log after you flash the board.
The current log may be caused from that it can not boot up successfully so that it enters into recovery kernel.
Your log only shows that it is in recovery kernel, but I want to check more logs for the cause of boot failed.

here is the complete minicom log from flashing until it reboots in recovery mode.
2024_10_30_minicom_flash_app_partition.log (718.4 KB)

[   52.163943] No ttyAMA0 is found
[   52.163989] Rebooting system...
[   52.166226] sysrq: Resetting
[   52.166258] ------------[ cut here ]------------
[   52.166259] Voluntary context switch within RCU read-side critical section!

It seems there’s above error and panic causing reset in your case.

[    0.000000] Kernel command line: root=/dev/initrd rw rootwait mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 bl_prof_dataptr=2031616@0x271E10000 bl_prof_ro_ptr=65536@0x271E00000 

Have you customized anything in /boot/extlinux/extlinux.conf for kernel cmdline?

No I didn’t customized anything.

Is the issue specific to cloned image?

i.e. could you run the following command to flash the board and boot up successfully?

$ sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" --showlogs --network usb0 jetson-orin-nano-devkit internal

seems like the issue is the cloned image.
I runned the command and everything worked as expected.

Please use backup restore script to and customize for your use case like updating APP partition only.

How do you customize the backup restore script to only updating the APP partition?