usb flashing preloaded image

hello,

i am attempting to flash my application to my jetson-nano-emmc devices via usb. I am flashing an image (2.56.0+rev1), which i have preloaded with an application and a splash image, i get the error below.
the error mentions that not enough space is available, but have plenty of space left when flashing with a non-preloaded image followed by updating it from the cloud
does anyone have some insight in what is going wrong?

[   3.1731 ] Writing partition resin-boot with resin-boot
[   3.1971 ] [................................................] 100%
[   6.5253 ] Writing partition resin-rootA with resin-rootA
[   7.6122 ] [................................................] 100%
[  27.7239 ] Writing partition resin-rootB with resin-rootB
[  28.5631 ] [................................................] 100%
[  48.6180 ] Writing partition resin-state with resin-state
[  49.4839 ] [................................................] 100%
[  50.3212 ] Writing partition resin-data with resin-data
[  50.7840 ] 00000004: Filesize is bigger than partition size
[  50.8121 ] 
Error: Return value 4
Command tegradevflash --pt flash.xml.bin --storageinfo storage_info.bin --create
Failed flashing t210ref.

Hi there, how big is the image file on your disk and what storage is the device reporting out of interest?

the image is 3.8 Gb and the storage device is an integrated 16Gb emmc
the final image is a little bigger though

Hi there,

What do you mean by ‘the final image’? Do you have a Jetson device flashed with a bare balenaOS (not preloaded), we would like to perform some checks on the partitions to inspect everything is working properly before digging deeper into the preloading issue.

Cheers
Felipe

i reduced the application to the most basic files just to get everything up and running.
i preflashed balena(no preload) and downloaded the full application(7.5Gb)
afterwards, i flashed with the preloaded image (meanwhile reduced to only the base docker) and then I get the same error.

Hi @jap937 ,

Flashing preloaded images is currently not supported by jetson-flash but you can try increasing the partition size in the XML to account for the size of your data partition. For this, you can edit assets/jetson-nano-emmc-assets/resinOS-flash.xml at line 241 and increase the current value in bytes 212860928 to the actual size of your partition.

You can check the current size of your data partition with
parted -s <your_image> unit B print

thank you, this works perfectly.
The preloaded (7.5 Gb) image has been flashed and seems to work as it is supposed to.

Hi, just wanted to let you know that starting with version 0.5.7 this should work by default, without needing to modify the size manually anymore.