Clone Jetson Orin Nx NVMe using backup partitions and restore to another Orin Nx

I have two Jetson Orin Nx computers, both with /dev/nvme0n1p1 as the main rootfs and storage system. Both computers are currently running on Jetpack 6.0 (L4T 36.3.0) with 128GB NVMe disks. I successfully flashed both computers using this intrd flash command:

sudo ./tools/kernel_flash/ --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 nvme0n1p1

Next I went into the backup_restore and replaced all instances of mmcblk0 with nvme0n1 and
mmcblk0p1 with nvme0n1p1, then backed up partitions using this command:

sudo ./tools/backup_restore/ -b jetson-orin-nano-devkit

followed by this command on the second computer to restore:

sudo ./tools/backup_restore/ -r jetson-orin-nano-devkit

This runs successfully and the images folder is populated with all the corresponding img files for each partition, but when I try to restore these partitions to the second Orin Nx, it fails to mount /dev/nvme0n1p1 during the boot process. I have tried changing the PARTUUID in the flash l4t xml files to match the correct value and also tried changing the extlinux.conf to boot from /dev/nvme0n1p1 directly, but these all lead to similar failures.

Is there a better way to pull the system as a system.img and restore to the other device?


This is never required on 36.3…
It’s only a workaround in older BSP versions when we don’t support selecting the device to backup.

What you should be doing is, after deleting all your custom changes:

sudo ./tools/backup_restore/ -e nvme0n1 -b jetson-orin-nano-devkit
sudo ./tools/backup_restore/ -e nvme0n1 -r jetson-orin-nano-devkit

Please also add this patch in Linux_for_Tegra/tools/backup_restore/

isext4() {
	if [ "$#" -ne 1 ]; then
		print_message "isext4 function need 1 parameter that is the name of the storage device"
		return 1;
	local result
	- result="$( blkid "/dev/${1}" | awk '{ print $3 }' | sed -n 's|TYPE="\(.*\)"|\1|p' )"
	+ result="$( blkid -o value -s TYPE "/dev/${1}" )"
	if [ "${result}" = "ext4" ]; then
		echo "true"
		echo "false"

Hi, this patch fixed the issue. Thanks for the help.