From owner-freebsd-bugs@freebsd.org Sat Jan 23 13:54:48 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CE23A8DB16 for ; Sat, 23 Jan 2016 13:54:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CBA71DC5 for ; Sat, 23 Jan 2016 13:54:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0NDsmPd028841 for ; Sat, 23 Jan 2016 13:54:48 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 206521] Can't decrypt disks on ZFS+Geli installation after order of devices changed Date: Sat, 23 Jan 2016 13:54:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: florian.ermisch@alumni.tu-berlin.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2016 13:54:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206521 Bug ID: 206521 Summary: Can't decrypt disks on ZFS+Geli installation after order of devices changed Product: Base System Version: 10.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: florian.ermisch@alumni.tu-berlin.de (Rendered Markdown here: https://gist.github.com/0xf10e/ddefc6fad77d6b51672= f) ## Preface I added a 256GB mSATA SSD to my Lenovo x220 of which I planned to use a nice chunk as L2ARC for the SATA HDD. Even without a SATA disk=20 present the SSD showed up as HDD2 in the BIOS. Made a fresh installation of FreeBSD 10.2 amd64 with the memstick image and chose ZFS+Geli.=20 Booted, worked, everything just fine. I added a=20 SATA HDD which the BIOS listed as HDD0 just as=20 I expected from the previous SATA-only setup. When I now tried to boot from the SSD I was=20 prompted for the GELI key of a different device than before, `ada1p3` instead of `ada0p3`. But my passphrase wasn't accepted. Never. Re-installed, added HDD, same result.=20 Reinstalled with HDD present, the removed the=20 HDD, same result (then prompted for `ada0p3`=20 instead of `ada1p3`, of course). When I restored the configuration which was present during the installation process (either remove the HDD or add it back in)=20 everything worked fine again. ## Using bhyve to reproduce Created a VM, added more disks: ``` floh@fuchi-cyber220:~:1305% iohyve info Name Size RAM CPU OS Loader fbsd102 - 2G 1 default bhyveload fbsd102/disk0 2G 2G 1 default bhyveload fbsd102/disk1 2G 2G 1 default bhyveload fbsd102/disk2 4G 2G 1 default bhyveload ``` Install FreeBSD 10.2 (the one I used for my laptop): ``` floh@fuchi-cyber220:~:1305% sudo iohyve install fbsd102 FreeBSD-10.2-RELEASE-amd64-disc1.iso Installing fbsd102... floh@fuchi-cyber220:~:1307% sudo iohyve console fbsd102 Starting console on fbsd102... ~~. to escape console [uses cu(1) for console] Connected ``` * Chose Auto (ZFS), added only ada2/disk2 to the rootpool. ``` =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80ZFS Configuration=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82 Configure Options: =E2=94=82 =E2=94=82 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=90 =E2=94=82 =E2=94=82 =E2=94=82 >>> Install Proceed with Installation =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 T Pool Type/Disks: stripe: 1 disk =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 - Rescan Devices * =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 - Disk Info * =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 N Pool Name zroot =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 4 Force 4K Sectors? YES =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 E Encrypt Disks? YES =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 P Partition Scheme GPT =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 S Swap Size 256m =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 M Mirror Swap? NO =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 W Encrypt Swap? YES =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=98 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=A4 =E2=94=82