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.
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.
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:
Metadata / GPT Misalignment: Critical filesystem metadata, partition table backup headers, or initial bootloader blocks can get improperly skipped or misinterpreted during sparse reconstruction.
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.