Redundant SELinux mount options cause error and mounting fails

Solution Verified - Updated -

Issue

When SElinux options are specified both in /etc/fstab and on the commandline of mount, mounting fails:

# /bin/mount -o loop,context=system_u:object_r:public_content_t:s0 /mnt/rhel-server-6.3-x86_64-dvd/
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

And the kernel logs an error on dmesg:

# dmesg | tail -n1
SELinux:  duplicate or incompatible mount options

Environment

  • Red Hat Enterprise Linux <= 6.3
  • util-linux-ng
  • SELinux enabled

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In