Adding a static fstab
record for a particular partition effectively prevents automatic mounting logic from handling it and this works great when I want the partition to actually be mounted (in a place I choose). But what if I want it to be ignored as if it just were not there? But I don't seek to hide it entirely. I don't mind if gparted
can see it and a manual mount command is able to access it.
Partitions will effectively be prevented from mounting by using the noauto option in their /etc/fstab
entry.
Example:
The following line will hide my ntfs
partition /dev/sdb2
from appearing in Nautilus, from mounting with sudo mount -a
, or on system boot:
UUID=87654321FFFFFFFF /mnt ntfs rw,suid,dev,exec,noauto,users,async 0 0
Now if we need to mount this partition then the following command will mount it to /mnt
(or any other mount point we had defined in our fstab):
mount /dev/sdb2
In case we only want root to be able to mount this partition just leave out the option users
and replace it by nouser
.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加