Flashing doesn't fully restore original image


I have Jetson AGX Xavier 16GB dev kit on Jetpack 4.6.1 (booting from SSD), and I wanted to create it’s backup. I used Flash script with following commands for backup and restore:

sudo ./flash.sh -r -k APP -G my_backup.img jetson-xavier nvme0n1
sudo ./flash.sh -r jetson-xavier nvme0n1

After the backup I intentionally delete files, libraries and change settings to test it. Rename my_backup.img to system.img and coppy it to propper place.

The issue is that it doesn’t backup everything. My documents are restored, but display setting (rotation) is not, docker and cuda are also not working anymore and L4T scripts are not changed.

Can anyone please tell me what I’m doing wrong?

I checked configs and “jetson-agx-xavier-devkit.conf” is the same with “jetson-xavier.conf”. BTW all operations are without error.

Interesting thing is that when I try different approach with “backup_restore” script it state that the board name is invalid for both variants.

sudo ./l4t_backup_restore.sh -b jetson-agx-xavier-devkit
[sudo] password for vojta: 
/home/vojta/nvidia/nvidia_sdk/JetPack_4.6.1_Linux_JETSON_AGX_XAVIER_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --no-flash --initrd --showlogs jetson-agx-xavier-devkit mmcblk0p1
*                                        *
*  Step 1: Generate rcm boot commandline *
*                                        *
/home/vojta/nvidia/nvidia_sdk/JetPack_4.6.1_Linux_JETSON_AGX_XAVIER_TARGETS/Linux_for_Tegra/flash.sh  --no-flash --rcm-boot jetson-agx-xavier-devkit mmcblk0p1
Error: Invalid target board - jetson-agx-xavier-devkit.

But I’m afraid that even if I didn’t get this error it wouldn’t work since it assumes mmcblk0p1 and I have system on SSD.


Are you saying that you used flash.sh to backup files on your nvme ssd but failed?

I used flash.sh to backup AGX Xavier and after that delete multiple things on it. Next I restore it with the backup image and it only restore data in documents, Cuda and Docker were gone same with modified script in /opt/nvidia/l4t-usb-device-mode/ and screen rotation was different.


The point I want to ask here what is the exact storage you want to backup?

Flash.sh is not able to flash or access any storage that is not the internal storage. The definition of “internal storage” is “mmcblk0p1”. Any other device that is not mmcblk0p1 is the external storage.

For example, you can test to plug in an empty NVMe ssd to your jetson, run flash.sh to flash it. And it won’t have content on it after flash. Only the emmc will got flashed.

Originally I used SDK Manager to flash Jetson. In point “6. Storage device: _____” I choosed NVMe since I need more storage that is on eMMC (I have NVMe SSD installed). This configuration works great for me since I’m not limited with free space and I’m able to save multiple large models and Microk8s and Docker are also happy.

But I want this device to backup an be able to restore it.


We don’t have special tool to clone NVMe storage.

Actually, this is just partition copy. For example, below command can copy it out.

img2simg /dev/nvme0n1p1 system.img.ext → this is create the backup image

And just let you know that when you choose this in sdkm, it is using initrd_flash instead of flash.sh.

OK, is there any way to completely backup and restore device with my configuration and posibillity to mass flash that image to other devices?

I would suggest you can try initrd_flash to external drive first and then we can come back to tell how to deploy backup image to it.

It will be hard to directly tell if you didn’t run initrf_flash before.

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