[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to mount a LUKS partiotion with Nautilus with option discard?



Am Montag, 1. September 2014, 05:18:03 schrieb Joerg Desch:
> I'm using a separate LUKS encrypted partition on my SSD, which I only
> mount after login. Since there is now way to to this with crypttab/fstab,
> I have to use Nautilus to do this.
> 
> I'm running a regular Debian Wheezy.
> 
> After clicking on the (unmounted) LUKS partition, the system asks for the
> LUKS passphrase and than for the admin password. Now the partition is
> mounted as expected. The only problem is the missing 'discard' option, so
> I can't use fstrim with this partition.
> 
> Does anyone knows some tricks how to add discard support?
> 
> This is the current output of mount:
> 
> /dev/mapper/udisks-luks-uuid-... on /media/PRIVAT_C type ext4
> (rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered,uhelper=udisks)

Hi Joerg,

to manually mount a luks device (let's say sda4), do this:

cryptsetup luksOpen /dev/sda4 home2

Now enter the passphrase.

You can then mount the device by using:

mount /dev/mapper/home2 /mnt

Note, the terms "home2" and the mountpoint can be chosen whatever you wish, as 
long as it does not interfere with the system itself (just as any other 
mounts).

Hope this helps.

Good luck!

Hans


Reply to: