I have a general scoping question on setting SELinux context on files/directories during early boot.
I'm working on a feature in dracut to implement general stacking of filesystem hierarchies via OverlayFS for the root filesystem within the dmsquash-live-root module.
How should I address the setting of context for new files, directories, or links needed to assemble the components for the OverlayFS mount?
For example, when I
mkdir -m 0755 -p --context=system_u:object_r:root_t:s0 /run/somemountpoint
I get this warning in the journal:
mkdir: warning: ignoring --context; it requires an SELinux/SMACK-enabled kernel
If the SELinux code is not active at this early stage, what is to be done?