L4T Backup and restore doesn't work since Jetpack 5.1.2

Hi all,
Since Jetpack 5.1.2 (clean install) backup using l4t_backup_restore.sh doesn’t work anymore.
With Orin in recovery mode, l4t_backup_restore.sh on the host starts correctly but it stucks after reboot.
Attached full log, here below an extract.

cd ~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra
sudo ./tools/backup_restore/l4t_backup_restore.sh -b jetson-agx-orin-devkit

then it starts and here’s the error:

***************************************
*                                     *
*  Step 3: Start the flashing process *
*                                     *
***************************************
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for device to expose ssh ......RTNETLINK answers: File exists
RTNETLINK answers: File exists
Device has booted into initrd. You can ssh to the target by the command:
$ ssh root@fe80::1%usb0
Cleaning up...
Log is saved to Linux_for_Tegra/initrdlog/flash_1-4_0_20231006-162545.log 
Run command: 
ln -s /proc/self/fd /dev/fd && mount -o nolock [fc00:1:1::1]:/home/ae/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/tools/backup_restore /mnt && /mnt/nvbackup_partitions.sh -e mmcblk0p1 -n  && echo Backup image is stored in /home/ae/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/tools/backup_restore/images
 on root@fc00:1:1::2
cat: /sys/block/mmcblk0p1/size: No such file or directory

flash_1-4_0_20231006-162545.log (6.5 KB)

Hi,

It’s a known issue in the current release of L4T, and should be fixed in later releases.
For backing up eMMC, please modify the script (Linux_for_Tegra/tools/backup_restore/l4t_backup_restore.sh) and change the following line:

- device_to_backup=mmcblk0p1
+ device_to_backup=mmcblk0

It should back up the entire storage device instead of a single partition.
Or add the -e option like this: -e mmcblk0 to overwrite the default setting.

1 Like

It worked using -e mmcblk0.
Thank you!

/home/NewPartion/3521orin1002/Linux_for_Tegra


  •                                 *
    
  • Step 3: Start the flashing process *
  •                                 *
    

Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Timeout
Cleaning up…
我也遇到了类似问题

This worked for backup but it doesn’t for restore.
It crashes when rebooting and waiting for SSH.
It says partition doesn’t match, but I’m trying on same Jetpack (5.1.2).

Hi,

Are you doing backup/restore on the same Jetson device?
For example, you cannot restore an Orin NX with images backed up from an AGX Orin.

I’m trying to “clone” an AGX 64GB on a new AGX 64GB, both with Jetpack 5.1.2.
I’ve always did this on previous Jetpack.

Obliviously I’ve verified the EMMC partitions on both AGX and they match.

This works if I backup an AGX and then restore it over the same hw.

Hi,

Can you let both device boot into initrd, and show me contents of /etc/board_spec.txt?

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --initrd jetson-agx-orin-devkit mmcblk0p1

1 Like

Hi

Sure, tomorrow I’ll be in the office and I’ll try this.
Also, if I boot on initrd, I should be able to mount /dev/mmcblk0 on host and then I could backup/restore AGX using dd commands as I’ve always done on Jetson’s SD card.
Isn’t it?

Hi,

If you are sure they are both AGX Orin 64GB, you can try taking out the following snippet in nvrestore_partitions.sh to avoid the check.

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
2 Likes

It sounds good, I’ll give it a shot.
So, I’ve couple of things to try, that’s what I’m going to do tomorrow first in the morning.
I’ll let you know asap.

Thanks!

Summary

With sudo ./tools/kernel_flash/l4t_initrd_flash.sh --initrd jetson-agx-orin-devkit mmcblk0 I can then use dd commands to save all-in-one image of entire AGX. That’s fine for my work.

Later I’ll try to skip board check as you suggested and I’ll let you know.

Thanks!

Edit: This in the summary doesn’t work. Something strange happens when dd on new AGX.
Instead, everything works well with sudo ./tools/backup_restore/l4t_backup_restore.sh -e mmcblk0 -r jetson-agx-orin-devkit skipping the board check as DaveYYY suggested here above.

Thank you DaveYYY!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.