Clone the initrd in the NVMe

The version is 36.4.4 JetPack 6.2.1 [[L4T 36.4.4]

we want to clone the initrd in the NVMe, re-create the MFI package, and perform flashing to board.

We refer to the link Flashing Support — NVIDIA Jetson Linux Developer Guide

Experiment with solution 1:

Step 1) Enter recovery mode.
Step 2) sudo ./tools/kernel_flash/l4t_initrd_flash.sh --initrd jetson-agx-orin-64g nvme0n1p1
Step 3)
mount/dev/sda1/mnt
dd if=/dev/nvme0n1p1 of=/mnt/system.img.raw
syncumount /mnt

Step 4) /Linux_for_Tegra/bootloader$ ./mksparse --fillpattern=0 system.img.raw system.img
The error reported is: “size of system.img.raw is not multiple of 4096.”

How should this be handled?

Experiment with solution 2:
Step 1) sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b -c jetson-agx-orin-64g
Step 2) Package it into an MFI: sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 5 jetson-agx-orin-64g nvme0n1
Step 3) Extract and flash: sudo tar xpf mfi_jetson-agx-orin-64g.tar.gz
cd mfi_jetson-agx-orin-64g
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 1 --network usb0

The flashing succeeded, but after power-on it did not boot from the NVMe. Setting it to boot from the NVMe in the BIOS also did not work.

This post and *.patch might help.

Thanks. It looks like it has been improved a lot, but it does not match the Orin 36.4.4 version. Have you found one suitable for Orin?

This might work.

r36.4.4_Testing-massflash-backup.patch.txt (17.3 KB)

cc @ DavidDDD

Thanks. The experiment record using this patch is as follows: We used workflow 4.

  1. sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -agx-orin-64g

  2. sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -c jetson-agx-orin-64g

  3. sudo BOARDID=3701 BOARDSKU=0005 FAB=TS4 ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 5 jetson-agx-orin-64g nvme0n1

 or
  sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 5 jetson-agx-orin-64g   nvme0n1


4. cd mfi_jetson-agx-orin-64g
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 1 --network usb0.

All the above commands succeeded.

but the result is still the same: it cannot boot from the NVMe drive.

In our experiments we used workflow 1 and workflow 2, and modified nvrestore_partitions.sh by deleting options+=(“conv=sparse”), after which it can be restored normally. Using workflow 1 and workflow 2, it can also be restored normally without this patch.

Thanks

Note: Synthesized with AI assistance.

Hi clinteast,

Great catch and excellent troubleshooting! That explains precisely why the default backup/restore workflow was failing to boot.

Why Removing conv=sparse Fixes the NVMe Boot Issue:

When conv=sparse is active during partition restoration, the script attempts to optimize block writes by omitting zero-filled blocks or parsing sparse extents. However, on an NVMe boot drive, this can lead to:

  1. Metadata / GPT Misalignment: Critical filesystem metadata, partition table backup headers, or initial bootloader blocks can get improperly skipped or misinterpreted during sparse reconstruction.

  2. Incomplete 1:1 Block Fidelity: Even though the flash tool reports success, the resulting filesystem on nvme0n1p1 ends up with subtle corruption or unaligned blocks, causing UEFI/CBoot to fail when attempting to read the kernel or rootfs during handoff.

By removing conv=sparse, you force a full, uncompressed 1:1 raw block write across the entire partition structure. This ensures absolute bitstream integrity for the bootloader and rootfs.

Thanks for sharing this valuable workaround for L4T 36.4.4! It will definitely save others running into the same sparse-conversion trap.

Hi,

Could you access the system and run below commands?

efibootmgr

Thanks