NVIDIA provides a helpful tool for cloning systems such that the entire system image is identical. The following method is compatible and tested with AGX Orin and Orin NX/Nano modules on JetPack 5 and JetPack 6+.
For L4T 35.4.1 and earlier, you may need to port the Linux_for_Tegra/tools/backup_restore scripts from a later L4T to add support for the -e flag, which allows cloning systems that are flashed to an external storage device.
For JetPack 6.0, you may need to update the nvbackup_partitions.sh file within Linux_for_Tegra/tools/backup_restore. The update involves replacing line 121:
(remove) - result="$( blkid "/dev/${1}" | awk '{ print $3 }' | sed -n 's|TYPE="\(.*\)"|\1|p' )"
(add) + result="$( blkid -o value -s TYPE "/dev/${1}" )"
Procedure
Connect the Jetson to be cloned to a Linux host in force recovery mode, with the same Linux_for_Tegra directory that you flashed from.
$ cd <path>/Linux_for_Tegra/Run the l4t_backup_restore.sh script with -b to create the backup image. The board config should match what the board was originally flashed with (ex. cti/orin-agx/forge/base):
# Image is on the eMMC $ sudo ./tools/backup_restore/l4t_backup_restore.sh -b cti/<module>/<board>/<profile> # Image is on an NVMe $ sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b cti/<module>/<board>/<profile>The backup image will be stored in Linux_for_Tegra/tools/backup_restore/images:
$ ls tools/backup_restore/images gptbackup.img nvme0n1p10_bak.img nvme0n1p12_bak.img nvme0n1p14_bak.img nvme0n1p2_bak.img nvme0n1p4_bak.img nvme0n1p6_bak.img nvme0n1p8_bak.img nvpartitionmap.txt tmp gptmbr.img nvme0n1p11_bak.img nvme0n1p13_bak.img nvme0n1p1.tar.gz nvme0n1p3_bak.img nvme0n1p5_bak.img nvme0n1p7_bak.img nvme0n1p9_bak.img QSPI0.imgConnect the target unit to be flashed with the cloned image in force recovery mode and run l4t_backup_restore.sh with -r to restore the backup image stored in Linux_for_Tegra/tools/backup_restore/images:
# Flash cloned image to the eMMC $ sudo ./tools/backup_restore/l4t_backup_restore.sh -r cti/<module>/<board>/<profile> # Flash cloned image to an NVMe $ sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -r cti/<module>/<board>/<profile