All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] u?mount (8) helper script for luks encrypted disks
@ 2013-08-24 15:40 Steffen Vogel
  2013-08-26  8:23 ` Matthias Schniedermeyer
  0 siblings, 1 reply; 11+ messages in thread
From: Steffen Vogel @ 2013-08-24 15:40 UTC (permalink / raw)
  To: dm-crypt; +Cc: Debian Cryptsetup Team

[-- Attachment #1: Type: text/plain, Size: 1678 bytes --]

Dear list,

Today I worked on a simple way to mount/umount luks encrypted disks:

I know, there a several ways to do this: cryptmount, cryptsetup, initd
scripts etc..

But I was looking for a way to use the standard mount (8) utility for
this. I came up with mount "helper" scripts as used sometimes with
ntfs-3g, fuse or nfs filesystems. These helper scripts are located
in /sbin/mount.FSTYPE and executed in precendence if they exist.
I introduced a "virtual" FSTYPE named "luks" to identify my luks
encrypted drives.

My version a simple Bash script which is based on cryptsetup:

https://github.com/stv0g/snippets/blob/master/bash/mount.luks.sh
(Please note the comments in the script for further tech details.)

Now I'm able to mount my drives with a simple call to mount (8):

	mount -t luks /dev/sda1 /home

Or use a line in my /etc/fstab for this:

	/dev/sda/   /home   luks   defaults,compress   0 0

Followed by a std "mount /home"

At the moment my script has some minor drawbacks which could be
fixed for the future:

1. Mount has to automatically determine the real filesystem type.
   If it fails with this, my script wont work.

2. Currently, passphrases can only supplied via STDIN.



I'm curious about your feedback. And perhaps we could add this to the
cryptsetup tarball as it's a helper script based on cryptsetup.

Or do you think thats its up to the distro maintainers to include such a
enhancement?

Regards,

	Steffen

-- 
Steffen Vogel
Robensstraße 69
52070 Aachen

Mail: post@steffenvogel.de
Mobil: +49 176 34911387
Web: http://www.steffenvogel.de
Jabber: steffen.vogel@jabber.rwth-aachen.de

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-08-30  8:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-24 15:40 [dm-crypt] u?mount (8) helper script for luks encrypted disks Steffen Vogel
2013-08-26  8:23 ` Matthias Schniedermeyer
2013-08-29  5:50   ` Milan Broz
2013-08-29 23:16     ` Matthias Schniedermeyer
2013-08-29 23:56       ` .. ink ..
2013-08-30  5:29         ` Milan Broz
2013-08-30  5:58           ` .. ink ..
2013-08-30  6:23             ` Milan Broz
2013-08-30  7:59         ` Matthias Schniedermeyer
2013-08-30  8:24           ` .. ink ..
2013-08-30  8:58             ` Matthias Schniedermeyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.