How do I disable mounting of uncommon file systems such as hfs, udf, cramfs etc under Fedora or CentOS / RHEL / Redhat Enterprise Linux?
You need to edit /etc/modprobe.conf file to disable uncommon file system which can be loaded using Linux kernel driver. The syntax is:
install driverName /bin/true
In this example, disable loading hfs driver
install hfs /bin/true
Type the following command to list all file system drivers:
ls -l /lib/modules/$(uname -r)/kernel/fs
Sample outputs:
total 120 drwxr-xr-x 2 root root 4096 Sep 30 18:28 autofs4 drwxr-xr-x 2 root root 4096 Sep 30 18:28 cachefiles drwxr-xr-x 2 root root 4096 Sep 30 18:28 cifs drwxr-xr-x 2 root root 4096 Sep 30 18:28 configfs drwxr-xr-x 2 root root 4096 Sep 30 18:28 cramfs drwxr-xr-x 2 root root 4096 Sep 30 18:28 dlm drwxr-xr-x 2 root root 4096 Sep 30 18:28 ecryptfs drwxr-xr-x 2 root root 4096 Sep 30 18:28 exportfs drwxr-xr-x 2 root root 4096 Sep 30 18:28 ext3 drwxr-xr-x 2 root root 4096 Sep 30 18:28 ext4 drwxr-xr-x 2 root root 4096 Sep 30 18:28 fat drwxr-xr-x 2 root root 4096 Sep 30 18:28 freevxfs drwxr-xr-x 2 root root 4096 Sep 30 18:28 fscache drwxr-xr-x 2 root root 4096 Sep 30 18:28 fuse drwxr-xr-x 3 root root 4096 Sep 30 18:28 gfs2 drwxr-xr-x 2 root root 4096 Sep 30 18:28 hfs drwxr-xr-x 2 root root 4096 Sep 30 18:28 hfsplus drwxr-xr-x 2 root root 4096 Sep 30 18:28 jbd drwxr-xr-x 2 root root 4096 Sep 30 18:28 jbd2 drwxr-xr-x 2 root root 4096 Sep 30 18:28 jffs2 drwxr-xr-x 2 root root 4096 Sep 30 18:28 lockd drwxr-xr-x 2 root root 4096 Sep 30 18:28 msdos drwxr-xr-x 2 root root 4096 Sep 30 18:28 nfs drwxr-xr-x 2 root root 4096 Sep 30 18:28 nfs_common drwxr-xr-x 2 root root 4096 Sep 30 18:28 nfsd drwxr-xr-x 2 root root 4096 Sep 30 18:28 nls drwxr-xr-x 2 root root 4096 Sep 30 18:28 squashfs drwxr-xr-x 2 root root 4096 Sep 30 18:28 udf drwxr-xr-x 2 root root 4096 Sep 30 18:28 vfat drwxr-xr-x 2 root root 4096 Sep 30 18:28 xfs
Uncommon file systems can be blocked as follows:
install cramfs /bin/true install hfs /bin/true install hfsplus /bin/true install squashfs /bin/true install udf /bin/true
/etc/modprobe.d/blacklist File
You can also add them to /etc/modprobe.d/blacklist. Listing a module here prevents the hotplug scripts from loading it. The syntax is as follows:
blacklist driverName
I recommend using /etc/modprobe.conf to block unwanted drivers.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop














{ 2 comments… read them below or add one }
I am using FC10 at my home. I have dual boot setup. Every time I login to the GUI… all my ntfs partitions mount and cramp my desktop. I can stop ntfs mounting through that way but I wont be able to mount them either. ( Without first loading ntfs drivers.)
Any way to stop that ? Any way to manage hald? (I suppose it’s hald that’s mounting them)
@Abhishek,
Check /etc/fstab and Disable GNOME Automounting