Flash.sh with -S56 GiB doesn't work

What will be the proper flash.sh command to flash AGX using the entire 64GB sdcard?

I tried with

flash.sh -S 56GiB jetson-xavier mmcblk0p1

for flashing the devkit AGX Xavier but it would throw the error as follows

/installation_agx_devkit/JetPack_4.5.1_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/temp_user_dir/kernel_tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt
done.
Making system.img... 
Error: ext4 file system size has to be 512 bytes allign.

However without the -S argument it somehow flashes

When you say AGX, do you mean the full Xavier? If so, then eMMC would not be able to use more than about 28GiB, but an SD card boot would require changing “mmcblk0” to “mmcblk1” (or fully, “mmcblk1p1”. If I first ignore whether this is eMMC or SD card, the next paragraph applies.

The “-S” size parameter, when specified with “GiB”, is automatically a multiple of “1024x1024x1024”, which in turn is always divisible by 512 bytes. The error would tend to mean the starting offset on mmcblk0p1 is itself either not a multiple of 512 bytes (which is hard to believe it wouldn’t be), or else something about the larger size is causing an error. One possible cause of such an error is if other partitions were larger than expected and causing a truncation of one of the partitions which follow it.

Now if I consider that this is eMMC, which is what mmcblk0p1 says, then it makes sense that byte alignment fails (but is an inadequate error message) since 56GiB is beyond the limit of the eMMC.

If this is SD card, then try again naming “mmcblk1p1” instead of “mmcblk0p1” (then again, perhaps it was just a typo for the thread). Was the the “mmcblk0p1” correct, or should it have been “mmcblk1p”? Previously I think you had mentioned an SD card, so I am guessing this is what you are using with a full Xavier.

yes tried on AGX Devkit Xavier
it has emmc, 32 GiB that should be the cause, right?
I tried without the -S argument in order to get flashed at all anyhow so it worked without it so I should have used -S 26

/dev/mmcblk0p1   28G   14G   13G

Yes, sounds right. It is kind of a bad message about “alignment error” when you are really running into what is essentially an index out of bounds.