Workflow with Persistent Partition#
The persistent partition workflow consists of the flashing phase and the filesystem phase.
Flashing#
If the bootburn utility is executed with the
--init-persistent-partitions
option, the prebuilt user metadata and data images are flashed to persistent partitions (as specified in PCT configuration inglobal_storage.cfg
).If the bootburn utility is executed without the
--init-persistent-partitions
option, there are no changes to persistent partitions.
Filesystem Boot#
Filesystem mounts the existing user metadata and data persistent partitions.
Filesystem checks for the stamp
/etc/nvidia/oem-config/oem_config_completed
. - If yes, proceeds to the next step. - If no, OEM-config is executed to set up user accounts.
After oem-config is executed, the stamp /etc/nvidia/oem-config/oem_config_completed
is added, and this is written to persistent metadata partition.
Check if
/var/rootfs_first_boot_completed
exists. - If yes, applies fix-up for persistent partition. - If no, proceeds to the next step.
After the fix-up is complete, /var/rootfs_first_boot_completed
is deleted.
Filesystem proceeds to reach the command-line login prompt.
Default Behaviors in NVIDIA DriveOS Linux#
When the bootburn utility is run with the
--init-persistent-partitions
option: a. The/etc/nvidia/oem-config/oem_config_completed
should not exist. b. The OEM-config shall be executed to set up user accounts. c. After oem-config is executed, the stamp/etc/nvidia/oem-config/oem_config_completed
is added, and this is written to persistent metadata partition. d. The fix-up is executed (as the filesystem image contains the stamp/var/rootfs_first_boot_completed
) but is equivalent to a no-op.When the bootburn utility is run without the
--init-persistent-partitions
option: a./etc/nvidia/oem-config/oem_config_completed
should already exist and oem-config is skipped. b. The fix-up is executed, and this cleans up persistent metadata partition by removing everything other than the necessary files, such as/etc/passwd|group|shadow|gshadow|subuid|subgid
,/etc/ssh/ssh_host_key*
, and/etc/nvidia/oem-config/oem_config_completed
.Cleanup is required because all files added
/etc
go to the persistent partition (even if they apply to the rootfs partition) due to overlayfs limitation.
Note
These are the default behaviors in NVIDIA DriveOS™ Linux. However, filesystem users can always change the behavior by removing or adding stamps again (/etc/nvidia/oem-config/oem_config_completed
or /var/rootfs_first_boot_completed
).