Can't Re-enable SELinux
Can't Re-enable SELinux
I created a T2.small instance in Amazon Web Services and selected Centos 7 for its operating system. Once the server was running, I opened /etc/selinux/config and changed SELINUX=enforcing to SELINUX=disabled and rebooted. SELinux was disabled and everything worked fine. Later I changed the config file to enforcing again and tried to reboot. The server went down, but it never came back up. The AWS console showed that the instance was running, but it failed a status check and was unresponsive to SSH or HTTP. It stayed like that for an hour and a half before I gave up and turned it off. Is there a way to get my server back?
Re: Can't Re-enable SELinux
If you can either
access the console during the boot and get to the grub menu and edit the default choice and append enforcing=0 to the end of it and boot with that
OR
you can mount the filesystem somehow from a rescue media and edit /etc/sysconfig/selinxu and change SELINUX=enforcing to SELINUX=permissive then you should be able to boot up.
The correct way to go from disabled to enforcing is this
edit /etc/sysconfig/selinux and change SELINUX=disabled to SELINUX=permissive
touch /.autorelabel
reboot
wait
wait a bit more
when it comes back up, now you can change from permissive to enforcing.
access the console during the boot and get to the grub menu and edit the default choice and append enforcing=0 to the end of it and boot with that
OR
you can mount the filesystem somehow from a rescue media and edit /etc/sysconfig/selinxu and change SELINUX=enforcing to SELINUX=permissive then you should be able to boot up.
The correct way to go from disabled to enforcing is this
edit /etc/sysconfig/selinux and change SELINUX=disabled to SELINUX=permissive
touch /.autorelabel
reboot
wait
wait a bit more
when it comes back up, now you can change from permissive to enforcing.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke