From owner-freebsd-geom@FreeBSD.ORG Sun Nov 13 12:57:30 2005 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 717CA16A420 for ; Sun, 13 Nov 2005 12:57:30 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0A2143D46 for ; Sun, 13 Nov 2005 12:57:27 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id B4AE952D59; Sun, 13 Nov 2005 13:57:25 +0100 (CET) Received: from localhost (dlf5.neoplus.adsl.tpnet.pl [83.24.35.5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id A027152D57; Sun, 13 Nov 2005 13:57:20 +0100 (CET) Date: Sun, 13 Nov 2005 13:56:57 +0100 From: Pawel Jakub Dawidek To: Alexey Luckyanchikov Message-ID: <20051113125657.GE34696@garage.freebsd.pl> References: <20051113105915.GC13743@alkar.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xJK8B5Wah2CMJs8h" Content-Disposition: inline In-Reply-To: <20051113105915.GC13743@alkar.net> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-geom@freebsd.org Subject: Re: GELI doesn't ask passphrase on boot X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2005 12:57:30 -0000 --xJK8B5Wah2CMJs8h Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 13, 2005 at 12:59:15PM +0200, Alexey Luckyanchikov wrote: +> Hi. +>=20 +> I want GELI to ask password on boot as described in GELI(8): +> -b Ask for the passphrase on boot, before the root parti- +> tion is mounted. This makes it possible to use an +> encrypted root partition. One will still need bootable +> unencrypted storage with a /boot/ directory, which can +> be a CD-ROM disc or USB pen-drive, that can be removed +> after boot. +> But on boot GELI doesn't ask passphrase and doesn't create provider. +>=20 +> FreeBSD version is 6.0-RELEASE, provider was initialized with: +> geli init -b -v -l 256 -s 2048 /dev/ad1s1a +>=20 +> /boot/loader.conf contain: +> geom_eli_load=3D"YES" +> kern.geom.eli.debug=3D"255" +> kern.geom.debugflags=3D"1" +>=20 +> After boot "dmesg -a | fgrep -i eli" show: +> GEOM_ELI[1]: Start tasting. +> g_modevent(ELI, LOAD) +> g_load_class(ELI) +> g_eli_taste(ELI, ad0) +> GEOM_ELI[3]: Tasting ad0. +> g_destroy_geom(0xc1257300(eli:taste)) +> g_eli_taste(ELI, ad0s1) +> GEOM_ELI[3]: Tasting ad0s1. +> g_destroy_geom(0xc1256e80(eli:taste)) +> GEOM_ELI[1]: Tasting no more. +> g_eli_taste(ELI, ad0s1a) +> g_eli_taste(ELI, ad0s1b) +> g_eli_taste(ELI, ad0s1c) +> g_eli_taste(ELI, ad1) +> g_eli_taste(ELI, ad1s1) +> g_eli_taste(ELI, ad1s1a) +> g_eli_taste(ELI, ad1s1c) +> g_eli_taste(ELI, ad0s1a) +>=20 +> It seems that problem is in g_eli.c, line 1092: +> SYSINIT(geli_boot_end, SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY, g_eli_on_boot= _end, NULL) +> geli_boot_end() called before GELI finish tasting. Use this feature only for encrypting root file system. In case of other file systems, check out /etc/defaults/rc.conf for examples of geli configuration on boot. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --xJK8B5Wah2CMJs8h Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDdzgZForvXbEpPzQRAnHuAJ9QRYqPF6rOKG0z9chan05fE9qa8wCfezDY eEZNr2fePW7SEHo/SBQn4nc= =RM/g -----END PGP SIGNATURE----- --xJK8B5Wah2CMJs8h--