Results 1 to 5 of 5

Thread: Friendly mount point for encrypted disk?

  1. #1
    Join Date
    Oct 2010
    Location
    Dublin, Ireland
    Beans
    288
    Distro
    Ubuntu 20.04 Focal Fossa

    Question Friendly mount point for encrypted disk?

    I have an crypto_LUKS volume on sdb1, and I can mount it fine, but it mounts to /media/username/longUUIDcode which is messy.

    Can I edit /etc/fstab in such a way, that when I manually access and unencrypt this disk from Nautilus (which works fine), that it will neatly mount to either /media/mountname /mnt/mountname?

    I got the UUID with sudo blkid, mkdir /media/.net, and then added the following line to fstab, but I could not boot after this so I commented it out so I could log back in:

    Code:
    UUID=longUUIDcode /media/.net    ext4    defaults    0     1
    Just to be clear, I would not like this volume automounted on boot - only when I manually mount it via nautilus, I would like it to mount to somewhere like /media/mountname.

    Also, when it is mounted, I am unable to create any files, is there a command to correct ownership please?
    Last edited by Dáire Fagan; December 15th, 2018 at 08:30 PM.

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Friendly mount point for encrypted disk?

    I don't use GUIs for mounting. Too many issues - and often terrible performance.
    The fstab is the easiest, but you can use autofs which would only mount the file system when requested. I don't know if autofs handles LUKS in a nice way or not.

    File and directory permissions are core to all Unix-like OSes. It is a basic skill to learn and you should learn it sooner than later to avoid hours, days, weeks, months of frustration. Any Unix permissions tutorial will teach what you need to know. chown/chmod are the normal commands.

  3. #3
    Join Date
    Oct 2010
    Location
    Dublin, Ireland
    Beans
    288
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Friendly mount point for encrypted disk?

    Thanks for the reply.

    I resolved this with the following steps:

    Code:
    sudo apt install cryptsetup-bin
    sudo cryptsetup luksFormat /dev/sdb1
    Then after mounting the partition in Nautilus, in the Disks utility I selected the 'unknown' partition on the drive, selected the cog icon for settings, and formatted it to ext4 inputting a friendly volume name.

    Now whenever I mount the partition, it automatically mounts to /media/username/friendlyname.

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Friendly mount point for encrypted disk?

    And the permissions issues? I don't see anything in the last post which would handle them.

  5. #5
    Join Date
    Oct 2010
    Location
    Dublin, Ireland
    Beans
    288
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Friendly mount point for encrypted disk?

    Quote Originally Posted by TheFu View Post
    And the permissions issues? I don't see anything in the last post which would handle them.
    I can see in my terminal history at one point I input:

    Code:
    sudo chown dusf:dusf /media/dusf/friendlymountname -R
    Though this may have been before I entered the commands in my last post, and may not be necessary after they are input.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •