From owner-freebsd-geom@FreeBSD.ORG Tue Nov 22 11:12:37 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 97F2616A41F for ; Tue, 22 Nov 2005 11:12:37 +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 3E94B43D7C for ; Tue, 22 Nov 2005 11:12:25 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 6F62450F93; Tue, 22 Nov 2005 12:12:23 +0100 (CET) Received: from localhost (dkm94.neoplus.adsl.tpnet.pl [83.24.16.94]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 8877250B83; Tue, 22 Nov 2005 12:12:17 +0100 (CET) Date: Tue, 22 Nov 2005 12:11:52 +0100 From: Pawel Jakub Dawidek To: Alexey Luckyanchikov Message-ID: <20051122111152.GB7826@garage.freebsd.pl> References: <20051113105915.GC13743@alkar.net> <20051113125657.GE34696@garage.freebsd.pl> <20051114144637.GS13743@alkar.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V0207lvV8h4k8FAm" Content-Disposition: inline In-Reply-To: <20051114144637.GS13743@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: Tue, 22 Nov 2005 11:12:37 -0000 --V0207lvV8h4k8FAm Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 14, 2005 at 04:46:37PM +0200, Alexey Luckyanchikov wrote: +> On Sun, 13 Nov 2005, Pawel Jakub Dawidek wrote: +>=20 +> PJD> +> After boot "dmesg -a | fgrep -i eli" show: +> PJD> +> GEOM_ELI[1]: Start tasting. +> PJD> +> g_modevent(ELI, LOAD) +> PJD> +> g_load_class(ELI) +> PJD> +> g_eli_taste(ELI, ad0) +> PJD> +> GEOM_ELI[3]: Tasting ad0. +> PJD> +> g_destroy_geom(0xc1257300(eli:taste)) +> PJD> +> g_eli_taste(ELI, ad0s1) +> PJD> +> GEOM_ELI[3]: Tasting ad0s1. +> PJD> +> g_destroy_geom(0xc1256e80(eli:taste)) +> PJD> +> GEOM_ELI[1]: Tasting no more. +> PJD> +> g_eli_taste(ELI, ad0s1a) +> PJD> +> g_eli_taste(ELI, ad0s1b) +> PJD> +> g_eli_taste(ELI, ad0s1c) +> PJD> +> g_eli_taste(ELI, ad1) +> PJD> +> g_eli_taste(ELI, ad1s1) +> PJD> +> g_eli_taste(ELI, ad1s1a) +> PJD> +> g_eli_taste(ELI, ad1s1c) +> PJD> +> g_eli_taste(ELI, ad0s1a) +> PJD> +>=20 +> PJD> +> It seems that problem is in g_eli.c, line 1092: +> PJD> +> SYSINIT(geli_boot_end, SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY, g_eli= _on_boot_end, NULL) +> PJD> +> geli_boot_end() called before GELI finish tasting. +> PJD>=20 +> PJD> Use this feature only for encrypting root file system. +> PJD> In case of other file systems, check out /etc/defaults/rc.conf for +> PJD> examples of geli configuration on boot. +>=20 +> It was just an experiment, actually I want to encrypt root partition. +> Let us assume that ad0 contain only unencrypted /boot and /etc/fstab +> with: +> /dev/ad1s1a.eli / ufs rw 1 1 +> AIUI GELI doesn't ask passphrase on boot for /dev/ad1s1a.eli. +>=20 +> Could you explain "right way" to create encrypted root partition? You are right, something is wrong here. Hard to say how it can be fixed easly... There is root_mount() KPI for delying root file system mount, but you have to know that there is a reason to delay it. Maybe root_mount() KPI should be used in GEOM itself, to delay root mount if there are provider for taste... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --V0207lvV8h4k8FAm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDgvz4ForvXbEpPzQRAmnoAKCm5YqdAkj8t95nBTRUQd1UsmncaQCfVHDz VpyzmAqh49B21e7MxJ4yTvk= =vvEw -----END PGP SIGNATURE----- --V0207lvV8h4k8FAm--