Workflow with Persistent Partition
The persistent partition workflow consists of the flashing phase and the filesystem phase.
Flashing
- If the bootburn utility is executed, the filesystem image is always flashed to the filesystem partition.
- 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/skip-oem-config.stamp
.- 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/skip-oem-config.stamp
is added, and this is written to persistent metadata partition.
- Check if
/opt/drive-linux-first-boot.stamp
exists.- If yes, applies fix-up for persistent partition.
- If no, proceeds to the next step.
After the fix-up is complete,
/opt/drive-linux-first-boot.stamp
is deleted.
- Filesystem proceeds to reach the command-line login prompt.
Default Behaviors in NVIDIA DRIVE OS Linux
- When the bootburn utility is run with the
--init-persistent-partitions
option:- The
/etc/nvidia/skip-oem-config.stamp
should not exist.- The OEM-config is executed to set up user accounts.
- After oem-config is executed, the stamp
/etc/nvidia/skip-oem-config.stamp
is added, and this is written to persistent metadata partition.
- The fix-up is executed (as the filesystem image contains the stamp
/opt/drive-linux-first-boot.stamp
) but is equivalent to a no-op.
- The
- When the bootburn utility is run without the
--init-persistent-partitions
option:/etc/nvidia/skip-oem-config.stamp
should already exist and oem-config is skipped.- 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-stamps>
.- 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.
- Cleanup is required because all files added
Note: These are the default behaviors in NVIDIA DRIVE? OS Linux. However, filesystem users can always change the
behavior by removing or adding stamps again
(/
etc/nvidia/skip-oem-config.stamp
or
/opt/drive-linux-first-boot.stamp
).