How to prevent Ubuntu from mounting a partition it finds?

Ivan

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.

Takkat

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]

編集
0

コメントを追加

0

関連記事

分類Dev

Prevent encrypted partition from running on other PC

分類Dev

can't create folder after mounting partition

分類Dev

How to mount partition from disk

分類Dev

How to create NTFS partition in ubuntu 13.04

分類Dev

How to mount a HFS partition in Ubuntu as Read/Write?

分類Dev

How to resize a Windows partition after Ubuntu installed?

分類Dev

How to recover after deleting Ubuntu partition?

分類Dev

How to prevent nvidia kernel module from loading Ubuntu 12.04 64 bit

分類Dev

How to prevent flexboxes from shrinking?

分類Dev

how to prevent TouchEvent from scrolling

分類Dev

How to prevent sleep on Ubuntu 20.04 Live

分類Dev

Unable to satisfy all constraints on the partition when installing Ubuntu from USB

分類Dev

How to remove linux swap partition from a disk?

分類Dev

Disable auto-mounting in Ubuntu 16.04

分類Dev

How to open NTFS partition on Ubuntu without Windows' hidden files?

分類Dev

How to Partition Your internal harddrive in Ubuntu 12.04 LTS

分類Dev

How do I partition an empty SSD in Ubuntu during installation?

分類Dev

installing ubuntu in a predefined partition

分類Dev

How to prevent REPL from truncating output?

分類Dev

How to prevent DateComponents from updating for time zone

分類Dev

How to prevent css transform animation from jumping?

分類Dev

How to prevent Freemarker from outputting a file

分類Dev

How to prevent nav elements from wrapping in Bootstrap

分類Dev

How to prevent ScintillaNET control from auto scrolling?

分類Dev

How to prevent ReactSelect from clearing the input?

分類Dev

How to prevent screen from locking in WP 8.1?

分類Dev

How to prevent FreeBSD from disconnecting a drive device?

分類Dev

How to prevent commands being removed from history?

分類Dev

How to prevent from CronJob run process twice?

Related 関連記事

  1. 1

    Prevent encrypted partition from running on other PC

  2. 2

    can't create folder after mounting partition

  3. 3

    How to mount partition from disk

  4. 4

    How to create NTFS partition in ubuntu 13.04

  5. 5

    How to mount a HFS partition in Ubuntu as Read/Write?

  6. 6

    How to resize a Windows partition after Ubuntu installed?

  7. 7

    How to recover after deleting Ubuntu partition?

  8. 8

    How to prevent nvidia kernel module from loading Ubuntu 12.04 64 bit

  9. 9

    How to prevent flexboxes from shrinking?

  10. 10

    how to prevent TouchEvent from scrolling

  11. 11

    How to prevent sleep on Ubuntu 20.04 Live

  12. 12

    Unable to satisfy all constraints on the partition when installing Ubuntu from USB

  13. 13

    How to remove linux swap partition from a disk?

  14. 14

    Disable auto-mounting in Ubuntu 16.04

  15. 15

    How to open NTFS partition on Ubuntu without Windows' hidden files?

  16. 16

    How to Partition Your internal harddrive in Ubuntu 12.04 LTS

  17. 17

    How do I partition an empty SSD in Ubuntu during installation?

  18. 18

    installing ubuntu in a predefined partition

  19. 19

    How to prevent REPL from truncating output?

  20. 20

    How to prevent DateComponents from updating for time zone

  21. 21

    How to prevent css transform animation from jumping?

  22. 22

    How to prevent Freemarker from outputting a file

  23. 23

    How to prevent nav elements from wrapping in Bootstrap

  24. 24

    How to prevent ScintillaNET control from auto scrolling?

  25. 25

    How to prevent ReactSelect from clearing the input?

  26. 26

    How to prevent screen from locking in WP 8.1?

  27. 27

    How to prevent FreeBSD from disconnecting a drive device?

  28. 28

    How to prevent commands being removed from history?

  29. 29

    How to prevent from CronJob run process twice?

ホットタグ

アーカイブ