From owner-freebsd-geom@freebsd.org Fri Oct 26 09:54:53 2018 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B22D10DD95D for ; Fri, 26 Oct 2018 09:54:53 +0000 (UTC) (envelope-from mikey@usa.com) Received: from mout.gmx.com (mout.gmx.com [74.208.4.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.com", Issuer "GeoTrust RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0005A6F29C for ; Fri, 26 Oct 2018 09:54:52 +0000 (UTC) (envelope-from mikey@usa.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1540547684; bh=8w4OFYHtkQzQKElsLpDAUnCZO4MWoM6wXvfWbrDr5t8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=EkM5W/JvpPOVGofbqpHPWnzDsxBfupT+0dT7lpYIR3BHm0yLEMKLBxpoCHGMjR69b RZvn2jxRxkTX+wahcAkTBvYeY60lHnHyBy8QrWYYFnO5LcTY98/x9O5VpKB9YwsIkI 5I76S2el0hmaQyZ+I14XPhNPl7tT5CunHYa6oLKA= X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79 Received: from [81.108.220.86] ([81.108.220.86]) by web-mail.mail.com (3c-app-mailcom-lxa10.server.lan [10.76.45.11]) (via HTTP); Fri, 26 Oct 2018 11:54:44 +0200 MIME-Version: 1.0 Message-ID: From: "Michael .." To: "John-Mark Gurney" Cc: freebsd-geom@freebsd.org Subject: Re: GELI without passphrase on ZFS root Content-Type: text/plain; charset=UTF-8 Date: Fri, 26 Oct 2018 11:54:44 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20181026010630.GD75530@funkthat.com> References: <20181026010630.GD75530@funkthat.com> Content-Transfer-Encoding: quoted-printable X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:WA63mUu2EcLQfIsNntDslbv5t7EWMq2gxMiXIKmrlDbKYxud+eSOPGPDcS3SickzepWqD y7o0+MysxKGaHZcZ0gyrCrXdsspB2LvnPRVAVxKAHNli4HJJDvHxfvXYGlrST4H7uAVL70NGB80D a7FQExBl06jlxjtfNZ+5F3At5EMuTWfqKxwV4m1Bj04Af1F2//ach95BVFdvzDWTrdBoueZ9Gg28 dAvTDIWTWOwk0jSL4fquw3kUHG91TWQiDuFEMTyZakH1A6Ktq9a/qFuhSlDIUJUnWHHGI+Nz0DVr 2s= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:013dej1GnRs=:9HLZOp42SGyxWHctdXwwI+ VDoN/B452oBu1HFwL8d9L2rLF/DbT+kRsNSzPVExiOPWkdZPQ0oIGTR62EoF6Crs8Ii5x50+W Z4Aq36YXIgF0Y4VCQpJuz9qHqOE80NRD2jQVT0DzeXSwB0BiVO9N3ejZNuvYSmz9aZVezxXZx ub8Mkr+waKxhca3Df6FSuIdh6E9gfgv0QpcW7mSpjOuuw3FHU8ekQy2Mpb+W5lDOyc3Qor/9l InM8p7TelF/mb+JL1arYr+pHC45/wfZlPXuAAZfwDh57NBWkDYRfhrOa7EHsNcudB2C+1DLxT nB4kJvDf3MM80PFH7nw8I94nXd09241yh8ULzRNOgXh+5Me4gM/LdmckHKa2g2uUQCHt0/4xz FJqdCocINt08e1OfVncO7vE4RlXGFBD5W55g08/YkTonGNnVc5gu3xNJOrl+T0CjwvjDBOQVn zAbMKN6hCdwObiw0WGR8iSB6TLHL8KyEzYQBzNC1HhlCl7NOzrry X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 09:54:53 -0000 I can boot using passphrase *and* keyfile encrypted userkey=2E The keyfile= is accessible on /boot/ unencrypted=2E (realise this is in no way "secure"= but proves keyfile is accessible) i=2Ee: geli setkey -K /boot/encryption=2Ekey /dev/xyz (prompted for new passphrase) Able to reboot correctly by entering new passphrase=2E The problem is as soon as I update the userkey to be without the passphras= e component, it is still requested during boot and then obviously there is = no correct entry=2E i=2Ee=2E geli setkey -K /boot/encryption=2Ekey -P /dev/xyz (no passphrase prompt due to -P) Passphrase is still requested during boot and cannot proceed=2E I tried "geli configure -B /dev/xyz" as suggested by Alaksiej, there is no= prompt for passphrase but booting breaks at mountroot (I guess because the= "boot" flag has been removed?)=2E Is this a bug in that geom_eli does not try to decrypt using just keyfile = before prompting user for passphrase? Regards, Michael=2E Sent:=C2=A0Friday, October 26, 2018 at 2:06 AM From:=C2=A0"John-Mark Gurney" To:=C2=A0"Michael =2E=2E" Cc:=C2=A0freebsd-geom@freebsd=2Eorg Subject:=C2=A0Re: GELI without passphrase on ZFS root Michael =2E=2E wrote this message on Thu, Oct 25, 2018 at 12:25 +0200: > Has anyone been able to achieve this? > =C2=A0 > I installed FreeBSD 11=2E2 using AutoZFS option with encryption turned o= n=2E=C2=A0 Passphrase is specified as part of install=2E > =C2=A0 > I want to switch to only a keyfile and no passphrase: > =C2=A0 > geli setkey -K /boot/encryption=2Ekey -P /dev/xyz If this is on your ZFS root that is encrypted w/ the key file, how do you expect to be able to boot the system when the keyfile you need to decrypt is encrypted? > This completes, but I'm still prompted for passphrase on boot=2E=C2=A0 N= othing appears accepted by the prompt (as the userkey is using only keyfile= now?) > =C2=A0 > Setting geom_eli_passphrase_prompt=3D"NO" doesn't help=2E Well, the default boot I believe can only handle passphrase=2E You can look at this instructions on booting from a USB drive which can contain the key file: https://forums=2Efreebsd=2Eorg/threads/zfs-boot-from-usb=2E45880/ I don't think zfsboot (which is needed for ZFS root booting) can handle key files, because it needs to get the key file from somewhere, and it is a very small binary, and so does not have the space to load it from other drives=2E=2E=2E -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not=2E"