I use “sudo ./tools/backup_restore/l4t_backup_restore.sh -e mmcblk0 -b jetson-agx-orin-devkit” clone one orin, and then use “sudo ./tools/backup_restore/l4t_backup_restore.sh -e mmcblk0 -r jetson-agx-orin-devkit” restore it on another orin, but an error occurred during the recovery process:
“nvrestore_partitions.sh: You are trying to flash images from a board model that does not match the current board you’re flashing onto.”
I found the shell code in file tools/backup_restore/nvrestore_partitions.sh:
for value in $(grep -v -e '(^ *$|^#)' < "${FILE_NAME}"); do
declare -a FIELDS
for part in {1..6}; do
FIELDS[part]=$(echo "$value" | awk -F, -v part=${part} '{print $part}')
done
if [ "${FIELDS[1]}" = 'board_spec' ]; then
set_board_spec
if [[ "${FIELDS[2]}" == "${BOARD_SPEC}" ]]; then
BOARD_MATCH=true
fi
fi
done
if [ ${BOARD_MATCH} = false ]; then
echo "${SCRIPT_NAME}: You are trying to flash images from a board model that does not"
echo "match the current board you're flashing onto."
exit 1
fi
I print “${FIELDS[2]}” and “${BOARD_SPEC}”, they do not match:
1、So can I modify this code to make it force a match? Will there be any issues if I do so?
2、Sometimes, when cloning or restoring, there is no log prompt like “nvrestore_partitions.sh Restoring mmcblk0 with image mmcblk0pxx_bak.img”. And the orin device restored cannot be started normally. I’m not sure what the problem is in this situation, because there is no error prompt. Here is part of the log:
***************************************
* *
* Step 3: Start the flashing process *
* *
***************************************
Waiting for target to boot-up...
Waiting for device to expose ssh ......Waiting for device to expose ssh ...Device has booted into initrd. You can ssh to the target by the command:
$ ssh root@fc00:1:1:0::2
Cleaning up...
Log is saved to Linux_for_Tegra/initrdlog/flash_3-1_0_20260820-150936.log
Run command:
ln -s /proc/self/fd /dev/fd && mount -o nolock [fc00:1:1::1]:/home/cyborg/jc/clone_tool/Ghost-Clone-only-Jetpack6/09_sweepcar_orinflashingghost_release-V02.00.00/bin/tools/36.4.3.r900/tools/backup_restore /mnt && /mnt/nvrestore_partitions.sh -e mmcblk0 -n
on root@fc00:1:1::2
/mnt/images ~
nvrestore_partitions.sh: Use the default nvpartitionmap.txt as the index file.
40+0 records in
40+0 records out
20480 bytes (20 kB, 20 KiB) copied, 0.00233139 s, 8.8 MB/s
nvrestore_partitions.sh Restoring gpt_2 with image mmcblk0_gptbackup.img...
33+0 records in
33+0 records out
16896 bytes (17 kB, 16 KiB) copied, 0.00208141 s, 8.1 MB/s
~
nvrestore_partitions.sh Successful restore of partitions on target board.
Operation finishes. You can manually reset the device
we used jetson36.4.3,but it’s always failed when we restore on another orin:
Waiting for target to boot-up…
Waiting for device to expose ssh …Waiting for device to expose ssh …Device has booted into initrd. You can ssh to the target by the command:
$ ssh root@fc00:1:1:0::2
Cleaning up…
Log is saved to Linux_for_Tegra/initrdlog/flash_3-2_0_20260825-112654.log
Run command:
ln -s /proc/self/fd /dev/fd && mount -o nolock [fc00:1:1::1]:/home/jhou/orinGhost_release/tools/36.4.3.r900/tools/backup_restore /mnt && /mnt/nvrestore_partitions.sh -e mmcblk0 -n
on root@fc00:1:1::2
/mnt/images ~
nvrestore_partitions.sh: Use the default nvpartitionmap.txt as the index file.
FIELDS[2]:3701-500-0005-R.0-1-1-jetson-agx-orin-devkit-, BOARD_SPEC:3701-501-0005-G.0-1-1-jetson-agx-orin-devkit-
40+0 records in
40+0 records out
20480 bytes (20 kB, 20 KiB) copied, 0.00245728 s, 8.3 MB/s
Error: Unable to partprobe /dev/mmcblk0
We encountered another issue on one of our computers, which is not a virtual machine and runs Ubuntu 22.04. The cloning process consistently fails, and the running log ends with “tar: Write checkpoint 2990000”. Could you please advise on the possible causes of this problem and how we can avoid it ?
Waiting for target to boot-up…
Waiting for device to expose ssh …Waiting for device to expose ssh …Device has booted into initrd. You can ssh to the target by the command:
$ ssh root@fc00:1:1:0::2
Cleaning up…
Log is saved to Linux_for_Tegra/initrdlog/flash_3-3_0_20260901-170240.log
Run command:
ln -s /proc/self/fd /dev/fd && mount -o nolock [fc00:1:1::1]:/home/cyborg/jc/clone_tool/Ghost_NEW/09_sweepcar_orinflashingghost_release-V02.00.02/bin/tools/36.4.3.r900/tools/backup_restore /mnt && /mnt/nvbackup_partitions.sh -e mmcblk0 -n && echo Backup image is stored in /home/cyborg/jc/clone_tool/Ghost_NEW/09_sweepcar_orinflashingghost_release-V02.00.02/bin/tools/36.4.3.r900/tools/backup_restore/images
on root@fc00:1:1::2
nvbackup_partitions.sh: The detected partitions in mmcblk0 are:
/dev/mmcblk0p1
/dev/mmcblk0p2
/dev/mmcblk0p3
/dev/mmcblk0p4
/dev/mmcblk0p5
/dev/mmcblk0p6
/dev/mmcblk0p7
/dev/mmcblk0p8
/dev/mmcblk0p9
/dev/mmcblk0p10
/dev/mmcblk0p11
/dev/mmcblk0p12
/dev/mmcblk0p13
/dev/mmcblk0p14
/dev/mmcblk0p15
nvbackup_partitions.sh: Backing up GPT…
40+0 records in
40+0 records out
20480 bytes (20 kB, 20 KiB) copied, 0.00153917 s, 13.3 MB/s
nvbackup_partitions.sh: Success backing up GPT to mmcblk0_gptmbr.img
nvbackup_partitions.sh: Backing up backup GPT…
33+0 records in
33+0 records out
16896 bytes (17 kB, 16 KiB) copied, 0.00125146 s, 13.5 MB/s
nvbackup_partitions.sh: Success backing up backup GPT to mmcblk0_gptbackup.img
Some questions to confirm:
Is your host a virtual machine or a physical machine?
If using the VM, there might be some issue lead to the timeout problem.
Thanks