How to flash NX board from backup img

Hi,
I am trying to clone the entire NVMe ssd on one Jetson Nx to another Jetson Nx (same)

I found this and actually trying to do the same to NVMe:How to Flash clone image to external device in the XavierNX environment

I want to clone the App partition in NVMeSSD, so I executed the following on the xaviernx board to create a clone image file.

img2simg /dev/nvme0n1p1 system.img.ext

Relying on the above URL description, we replaced system.img by system.img.ext on my pc

cp system.img.ext tools/kernel_flash/images/external/system.img

and adding

sha1sum system.img > system.img.sha1sum

and l4t_initrd_flash.sh with --flash-only option.

sudo NO_ROOTFS=0 ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml --showlogs jetson-xavier-nx-devkit-qspi internal

As a result, the following error occurred.

error: file_write: write: No space left on device
Cannot write output file
[ 467]: l4t_flash_from_kernel: Error flashing external device
[ 467]: l4t_flash_from_kernel: nvsimg2img …Linux_for_Tegra/tools/kernel_flash/images/external/system.img /dev/sde failed
[ 467]: l4t_flash_from_kernel: The device size indicated in the partition layout xml is smaller than the actual size. This utility will try to fix the GPT.

We have M.2 250GB NVMeSSD.

sudo blockdev --getsize64 /dev/nvme0n1p1

The above size is 249542213632

Backup img is root on nvme

flash_l4t_external.xml (8.5 KB)

flash_l4t_external.xml is here

Hi songtianlong,

Please modify flash_l4t_external.xml value to 0x808 and try again.
<allocation_attribute> 0x808 </allocation_attribute>

hey , i’m already set APP allocation attribute to 0x808 as the flash_l4t_external.xml i uploaded . And could you tell which partition needs to be set as 0x808,thx

I’m closing this topic due to there is no update from you for a period, assuming this issue was resolved.
If still need the support, please open a new topic. Thanks

Can you run

file system.img.ext