The system fails to boot due to mount failure. I've traced it back to selinux since I can hold shift and edit the grub cmd to read selinux=0, but interestingly enough if I try permissive mode, enforcing=0 I still get boot failure and the error hints at what is happening:
/sbin/setfiles: conflicting specifications for /usr/sbin/e2fsck and usr/sbin/fsck.ext4, using system_u:object_r:samba_share_t:s0
/sbin/setfiles: conflicting specifications for /usr/sbin/m2fs and usr/sbin/mkfs.ext4, using system_u:object_r:samba_share_t:s0
That does not look good...
When I boot with selinux disabled (as that is the only regime that boots at all) a lot of familiar commands don't seem to work. Chcon does work but the changes don't persist on boot so it doesn't seem to help me in this situation, if I restart and selinux kicks back on everything fails. I have been unable to get semanage or restorecon output any text. I eventried using sefattr -x security.selinux [file]
to remove the bad config from /* but that change also does not seem to persist on reboot. So I'm completely lost on how I might restore selinux to stock.
If I run sudo ls -alZ I can see that the "system_u:object_r:samba_share_t:s0" context is all over the place and running "sudo cat /etc/selinux/targeted/contexts/files/file_contexts.local"
produces:
# This file is auto-generated by libsemanage
# Do not edit directly.
(/.*)? system_u:object_r:samba_share_t:s0
That looks like the core of the problem. How do I get rid of it? What even is libsemanage, how can I clear this config with selinux disabled? I already tried uninstalling selinux and deleting all of the selinux config files but this config returns on reinstall. How is selinux remembering this bad configuration? where is it reading this bad info on a fresh install? Is there just a secret text file hiding somewhere that remembers this terrible samba context?