ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Whoap! SELinux Error at Boot for Linux? We got you!

    Starwind
    3
    3
    766
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • OksanaO
      Oksana
      last edited by

      alt text
      Sometimes, tinkering with configurations and commands can go awry. For example, when you’ve made some modifications to SELinux in a virtual machine (VM) in Azure. Suddenly, “Failed to load SELinux policy, freezing.” pops up. But don’t worry, we’ve got the cure.

      Read the article by Florent Appointaire, Microsoft Engineer, to learn how to quickly solve the SELinux error at boot for Linux in Azure.

      1 Reply Last reply Reply Quote -1
      • stacksofplatesS
        stacksofplates
        last edited by stacksofplates

        That's not really a cure, it just turns it off. The better thing to do is boot into recovery mode by adding rd.break at the end of that same line in the bootloader. Then remount the sysroot directory with mount –o remount,rw /sysroot. Enter /sysroot with chroot /sysroot and completely disable SELinux by setting SELINUX=permissive in /etc/selinux/config. Then creating the autorelabel file in / with touch /.autorelabel. Then exit the chroot. Reboot and let the system and let SELinux relabel everything. Check your logs to make sure there aren't any issues and then finally re-enable SELinux by setting SELINUX=enforcing in /etc/selinux/config. Then reboot again.

        Edit: forgot the chroot.

        Emad RE 1 Reply Last reply Reply Quote 4
        • Emad RE
          Emad R @stacksofplates
          last edited by Emad R

          @stacksofplates said in Whoap! SELinux Error at Boot for Linux? We got you!:

          That's not really a cure, it just turns it off. The better thing to do is boot into recovery mode by adding rd.break at the end of that same line in the bootloader. Then remount the sysroot directory with mount –o remount,rw /sysroot and completely disable SELinux by setting SELINUX=permissive in /etc/selinux/config. Then creating the autorelabel file in / with touch /sysroot/.autorelabel. Reboot and let the system and let SELinux relabel everything. Check your logs to make sure there aren't any issues and then finally re-enable SELinux by setting SELINUX=enforcing in /etc/selinux/config. Then reboot again.

          Nice, seriously what are they expecting from MS engineer

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post