Ask Your Question

Revision history [back]

Make an entry in /etc/fstab for the filesystem. I suggest using options including 'users,comment=systemd.automount'

Make an entry in /etc/fstab for the filesystem. I suggest I'm using a random USB flash drive off my desk, but this works for any persistent storage that you want a predictable mountpoint for.

  • Identify your filesystem's UUID - a unique identifier - in the output of blkid. Using a UUID instead of eg. /dev/sdb1 makes sure that other filesystems don't get incorrectly mounted.

    $ su -c 'blkid' (snip) /dev/sdd1: LABEL="New Volume" UUID="9723-D67F" TYPE="vfat"

  • Make a directory to use as your mount point, and apply the permissions you feel appropriate:

    $ su -c 'mkdir /mnt/portable'

    $ su -c 'chmod 0777 /mnt/portable'

  • Open /etc/fstab in your editor of choice:

    $ su -c 'nano /etc/fstab'

  • Add an entry in /etc/fstab for this filesystem. The first line in my example below is generic replaceables, the second is my specific example:

UUID=anyuuid /mount/point/ fstype options including 'users,comment=systemd.automount'

0 0

UUID=9723-D67F /mnt/portable vfat noauto,comment='systemd.automount' 0 0

  • Mount all to test:

    $ su -c 'mount -a'

Make an entry in /etc/fstab for the filesystem. I'm using a random USB flash drive off my desk, but this works for any persistent storage that you want a predictable mountpoint for.

  • Identify your filesystem's UUID - a unique identifier - in the output of blkid. Using a UUID instead of eg. /dev/sdb1 makes sure that other filesystems don't get incorrectly mounted.

    $ su -c 'blkid' (snip) 'blkid'

    (snip)

    /dev/sdd1: LABEL="New Volume" UUID="9723-D67F" TYPE="vfat"

  • Make a directory to use as your mount point, and apply the permissions you feel appropriate:

    $ su -c 'mkdir /mnt/portable'

    $ su -c 'chmod 0777 /mnt/portable'

  • Open /etc/fstab in your editor of choice:

    $ su -c 'nano /etc/fstab'

  • Add an entry in /etc/fstab for this filesystem. The first line in my example below is generic replaceables, the second is my specific example:

UUID=anyuuid /mount/point/ fstype options 0 0

UUID=9723-D67F /mnt/portable vfat noauto,comment='systemd.automount' 0 0

  • Mount all to test:

    $ su -c 'mount -a'

Make an entry in /etc/fstab for the filesystem. I'm using a random USB flash drive off my desk, but this works for any persistent storage that you want a predictable mountpoint for.

  • Identify your filesystem's UUID - a unique identifier - in the output of blkid. Using a UUID instead of eg. /dev/sdb1 makes sure that other filesystems don't get incorrectly mounted.

    $ su -c 'blkid'

    (snip)

    /dev/sdd1: LABEL="New Volume" UUID="9723-D67F" TYPE="vfat"

  • Make a directory to use as your mount point, and apply the permissions you feel appropriate:

    $ su -c 'mkdir /mnt/portable'

    $ su -c 'chmod 0777 /mnt/portable'

  • Open /etc/fstab in your editor of choice:

    $ su -c 'nano /etc/fstab'

  • Add an entry in /etc/fstab for this filesystem. The first line in my example below is generic replaceables, the second is my specific example:example. The mount options given will not attempt to mount the filesystem on boot, but when any user attempts to access /mnt/portable, it will be mounted immediately.

UUID=anyuuid /mount/point/ fstype options 0 0

UUID=9723-D67F /mnt/portable vfat noauto,comment='systemd.automount' user,noauto,comment='systemd.automount' 0 0

  • Mount all to test:

    $ su -c 'mount -a'

Make an entry in /etc/fstab for the filesystem. I'm using a random USB flash drive off my desk, but this works for any persistent storage that you want a predictable mountpoint for.

  • Identify your filesystem's UUID - a unique identifier - in the output of blkid. Using a UUID instead of eg. /dev/sdb1 makes sure that other filesystems don't get incorrectly mounted.

    $ su -c 'blkid'

    (snip)

    /dev/sdd1: LABEL="New Volume" UUID="9723-D67F" TYPE="vfat"

  • Make a directory to use as your mount point, and apply the permissions you feel appropriate:appropriate. The example will allow the user 'bucic' to read, write, and execute on the filesystem; other users can only read and execute.

    $ su -c 'mkdir /mnt/portable'

    /mnt/portable' $ su -c 'chown bucic /mnt/portable ' $ su -c 'chmod 0777 0755 /mnt/portable'

  • Open /etc/fstab in your editor of choice:

    $ su -c 'nano /etc/fstab'

  • Add an entry in /etc/fstab for this filesystem. The first line in my example below is generic replaceables, the second is my specific example. The mount options given will not attempt to mount the filesystem on boot, but when any user attempts to access /mnt/portable, it will be mounted immediately.

UUID=anyuuid /mount/point/ fstype options 0 0

UUID=9723-D67F /mnt/portable vfat user,noauto,comment='systemd.automount' 0 0

  • Mount all to test:

    $ su -c 'mount -a'

Make an entry in /etc/fstab for the filesystem. I'm using a random USB flash drive off my desk, but this works for any persistent storage that you want a predictable mountpoint for.

  • Identify your filesystem's UUID - a unique identifier - in the output of blkid. Using a UUID instead of eg. /dev/sdb1 makes sure that other filesystems don't get incorrectly mounted.

    $ su -c 'blkid'

    (snip)

    /dev/sdd1: LABEL="New Volume" UUID="9723-D67F" TYPE="vfat"

  • Make a directory to use as your mount point, and apply the permissions you feel appropriate. The example will allow the user 'bucic' to read, write, and execute on the filesystem; other users can only read and execute.

    $ su -c 'mkdir /mnt/portable' /mnt/portable'

    $ su -c 'chown bucic /mnt/portable ' '

    $ su -c 'chmod 0755 /mnt/portable'

  • Open /etc/fstab in your editor of choice:

    $ su -c 'nano /etc/fstab'

  • Add an entry in /etc/fstab for this filesystem. The first line in my example below is generic replaceables, the second is my specific example. The mount options given will not attempt to mount the filesystem on boot, but when any user attempts to access /mnt/portable, it will be mounted immediately.

UUID=anyuuid /mount/point/ fstype options 0 0

UUID=9723-D67F /mnt/portable vfat user,noauto,comment='systemd.automount' 0 0

  • Mount all to test:

    $ su -c 'mount -a'