How to autorelabel SELinux for an entire file system

Solution Verified - Updated -

Issue

  • An autorelabel for SELinux fails: /.autorelabel is detected correctly but fixfiles fails silently.
  • How to relabel a file system that has a large amount of SELinux errors

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • SELinux is disabled
  • /etc/selinux/config is updated to set SELINUX=enforcing on the next boot
  • /.autorelabel exists to force a relabel on the next boot

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In