Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id djMoTRad1LGp for ; Sat, 24 Aug 2013 19:35:54 +0200 (CEST) Received: from m.0l.de (lux.0l.de [5.35.241.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Sat, 24 Aug 2013 19:35:54 +0200 (CEST) Message-ID: <1377358818.1313.21.camel@ryx.lan> From: Steffen Vogel Date: Sat, 24 Aug 2013 17:40:18 +0200 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-KKe5oSIk+L7XQPL9BHYS" Mime-Version: 1.0 Subject: [dm-crypt] u?mount (8) helper script for luks encrypted disks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Cc: Debian Cryptsetup Team --=-KKe5oSIk+L7XQPL9BHYS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 --=20 Steffen Vogel Robensstra=C3=9Fe 69 52070 Aachen Mail: post@steffenvogel.de Mobil: +49 176 34911387 Web: http://www.steffenvogel.de Jabber: steffen.vogel@jabber.rwth-aachen.de --=-KKe5oSIk+L7XQPL9BHYS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQEcBAABAgAGBQJSGNPiAAoJEFnVMbjtZZRyLjMH/3DCXzoiEWkuuZ+cPl+4Nhub 5mwJbYkPsgT47HiNs9/gECErAlPcuFZYj81dxcTRc6/xagowXSEhVMJUncZ29QOQ ZHHSgbXtk4o+4i3/8oG9GXXiThan0b7VYmibxAuOBThBy2Xx7bPz/9POtQaoP8RM FaKZWhPT76v0nmh7g5v3inKnIb43T/MKO3X8xn1xzUgBB4fSzVhgLUiJNifnr0bp xqTIoRxik7LmqB75WZ7AG9oubVwKBCQ3F9nMJbAS+wUKOhj0x5XtbqW+tAXHAmli iOdOPtM8skEBDm0D/pyjFnCh0Sn+kIdrkVubHgOKri9ack1Z5fUSDySl46/55TA= =yPNK -----END PGP SIGNATURE----- --=-KKe5oSIk+L7XQPL9BHYS--