I finally resolved this issue, and as usual it's something I should have discovered much sooner. When a CentOS install is done, even if you specify that selinux is disabled in the kickstart file, the .autorelabel file is created when the system is first booted. This is done in /etc/rc.sysinit. This makes the system attempt a relabel process the next time it is booted, again even if selinux is disabled (the boot logic only checks for the presence of the directory /etc/selinux instead of checking if selinux is enabled in /etc/selinux/config).
So, to resolve my issue of unwanted relabels/reboots, I created a custom /etc/rc.local that does a
rm -f /.autorelabel
This gets run after rc.sysinit, ensuring that the .autorelabel file that gets created is removed shortly afterwards.
A simple solution to the problem. In my opinion this is a bug in the CentOS startup logic...
|