Failed to sparse the raw to img due to the size of system.img.raw is not mulple of 4096

My device is jetson agx orin devkit with nv_tegra_release version # R34.1.1, and I want to clone a system.img.
My host machine system is Ubuntu20.04 LTS which is installed with Jetson_Linux_R34.1.1_aarch64.tbz2 and Tegra_Linux_Sample-Root-Filesystem_R34.1.1_aarch64.tbz2.
Clone command is “sudo ./flash.sh -r -k APP -G system.img jetson-agx-orin-devkit mmcblk0p1”, and I get the system.img.raw, but at the end of the flashing process , it prompt “size of system.img.raw is not mulple of 4096.”, the system.img is 0kb. The size of system.img.raw is 62225330688(is not mulple of 4096). And in the attachment you can see the log info.
log.txt (52.0 KB)

what’s the issue here?
In addition, I want to ask if only use the system.img.raw file can restore the jetson system?

Hi 1792659158,

R34.1.1 is a quite old release for AGX Orin.
Could you verify with the latest JP5.1.2(R35.4.1)?

But I have already developed the application for this version and I want to backup the system.
How can I verify with the latest JP5.1.2(R35.4.1)?

This is fixed on L4T 35.1 and later versions.
Please apply the patch and try again.

1 Like

I actually didn’t quite understand the specific steps involved. Could you elaborate more?

Find Linux_for_Tegra/rootfs/usr/lib/nvidia/resizefs/nvresizefs.sh, apply the patch and try again.

You mean the operation in this link?
https://forums.developer.nvidia.com/t/failed-to-sparse-the-raw-to-img-due-to-the-size-of-system-img-raw-is-not-mulple-of-4096/215526/24
I have tried to modified this file “Linux_for_Tegra/rootfs/usr/lib/nvidia/resizefs/nvresizefs.sh” and cloned again, but still the system.img is 0kb.

Sorry, I think you have to re-flash the device with this patch so the partition size is correct.

If I re-flash the device with this new patch, the application I have developped with nv_tegra_release version # R34.1.1 can still work in jetson agx orin?

I think YES.

I need to confirm with you again that you mean I have to re-flash the jetson agx orin new jetpack version “JP5.1.2(R35.4.1)” and my application based on pytorch framework can still work?
Then I can clone the new installed system?

NO.
I mean if you want to stay at 34.1, then please apply the patch before re-flashing.
Or just use 35.4.1.

How to apply the patch before re-flashing? I actually didn’t quite understand the specific steps involved. Could you elaborate more?

Use whatever way (git patch/manual copy) to replace the content of Linux_for_Tegra/rootfs/usr/lib/nvidia/resizefs/nvresizefs.sh with the one in the link I posted earlier.

OK, I will try, thanks a lot.

I replaced the file “Linux_for_Tegra/rootfs/usr/lib/nvidia/resizefs/nvresizefs.sh” with version 35.4.1 but the system.img is still 0kb.
Can you give a more reasonable solution?

Did you re-flash the device?

re-flash which part?

How? Can you give me a detailed explanation?

https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/IN/QuickStart.html