I’m currently working on flashing a Jetson Orin NX device with ROOTFS_AB enabled using the l4t_initrd_flash.sh script. In addition to the rootfs A/B setup, I’m also including a custom data partition. To achieve this, I’ve made some modifications to the flash_l4t_nvme_rootfs_ab.xml partition layout to accommodate the custom data partition.
The flashing process was successful initially. However, I encountered an issue when the combined size of the data partition and rootfs A exceeded the size of the External APP partition. Specifically, during the “Making system.img” step, I received an error stating “No space left on device.” This occurred because the /dev/loopXX device within L4T/bootloader/mnt became full.
I’m wondering if anyone has encountered a similar issue and knows of a workaround to separate the data and rootfs partitions during the flashing process to avoid this error.
Hi @DaveYYY,
thanks for looking into it.
For partitioning purposes, the rootfs partitions A and B are allocated approximately 25 GB each, while the data partition is allocated around 420 GB. The flash image sizes are roughly 12 GB for both rootfs partitions A and B, and approximately 40 GB for the data partition.
To configure the number of sectors, I utilize the l4t_initrd_flash.sh script and set num_sectors to 976562499:
What’s the full physical size of your NVMe SSD?
For your use case, you should specify 40GiB for -S parameter.
Please also modify the following line in partition layout to configure 420 GB for user data (UDA) partition.
<partition name="UDA" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
- <size> 18432 </size>
+ <size> 450971566080 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x808 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> uda_ext4.img </filename>
<description> **Required.** Automatically takes all remaining space on the device except that
occupied by the `secondary_gpt` partition. Allocation attribute must be set to 0x808.
May be mounted and used to store user data. </description>
</partition>
I would suggest you just adding ROOTFS_AB=1 to enable redundancy rootfs (determined by board config) instead of specifying the partition layout file.
I successfully flashed the device, including the data partition. The only drawback is that now my rootfs size is now 40 GiB instead of 25 GiB. Do i have to specify it in the partition table? Additionally could you please explain in detail what impact the -s parameter has.
-S is used to specify the rootfs size.
I thought you mean 12GB+25GB approximately 40GB so that suggesting you configure it with 40 GiB.
You can also specify -S 25GiB in your flash command to make both APP and APP_b partition size to be 25GB.
Sorry for the confusion, let’s clarify it:
I want to flash the device with a rootfs size of 25GB.
I discovered that i can flash it successfully if (rootfs size+data partition size) <=-S
I just executed the same command with -S 25GiB and i got the same error as before (no space left on device).
It maps to 25GiB, I would suggest you just using the larger size for the space not enough issue since you have enough space in NVMe for both rootfs A/B.