Return-Path: Received: from mail01.freesources.org (mx01.freesources.org [80.237.252.149]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Tue, 1 Sep 2009 03:13:38 +0200 (CEST) Date: Tue, 1 Sep 2009 03:13:35 +0200 From: Jonas Meurer Message-ID: <20090901011335.GC22049@resivo.wgnet.de> References: <4A9B01E1.5030205@tiscali.it> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="32u276st3Jlj2kUU" Content-Disposition: inline In-Reply-To: <4A9B01E1.5030205@tiscali.it> Subject: Re: [dm-crypt] Help: after crypttab modify > begin: waiting for root file system List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tommaso Cc: dm-crypt@saout.de --32u276st3Jlj2kUU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hey, this is an issue with the debian/ubuntu cryptroot implementation. On 31/08/2009 Tommaso wrote: > I run (ehm... I was running :( ) a headless debian lenny server with > encrypted LUKS filesystem. After I made an apparently harmless modify to > the crypttab file I can no longer boot the system. At startup I get the > message: >=20 > Begin: waiting for root file system... >=20 >=20 > And all is hanged up. I have a plaintext /boot partition with the > bootloader (grub), while everything else is encrypted. My /etc/crypttab > file was something like this: >=20 > lg0-lv0_crypt /dev/mapper/lg0-lv0 none luks >=20 > so that at boot time it was necessary to manually insert a passphrase to > unlock the filesystem (lg0-lv0_crypt is mounted as / on fstab). Now, I > must leave the place where the server resides for some weeks, so I > decided to temporarily override this behaviour with a cleartext key file > to avoid problems due to accidental rebooting. So I did: > 1) put a random key_temp file in /boot with 600 permission > 2) cryptsetup luksAddKey /dev/mapper/lg0-lv0 /boot/key_temp > 3) edited /etc/crypttab to look like this: >=20 > lg0-lv0_crypt /dev/mapper/lg0-lv0 /boot/key_temp luks i guess the problem here is that /boot is not mounted. try the following: - boot with boot parameter set to 'break' in grub - when the initramfs emergency shell is started, mount /boot: (initramfs) mount -t ext2 /dev/XXX /boot - try to unlock the crypted rootfs manually: (initramfs) cryptsetup --key-file=3D/boo/key_temp luksOpen /dev/mapper/lg0-= lv0 lg0-lv0_crypt if that works, you should change your /etc/crypttab to use the passdev keyscript in order to mount the /boot filesystem: lg0-lv0_crypt /dev/mapper/lg0-lv0 /dev/XXX:/key_temp luks,keyscript=3D/lib/= cryptsetup/scripts/passdev and regnerate your initramfs. for more information the see the section '10. the "passdev" keyscript' in /usr/share/doc/cryptsetup/README.initramfs.gz > 4) update-initramfs -u ALL that's never a good idea. better update the initramfs only for one kernel first and later if everything works as expected, update the others. you should have a backup of the old initramfs at initrd.img.bak though (i.e /boot/initrd.img-$(uname -r).bak). try booting with this old initramfs by adding '.bak' to the path of your initramfs in grub. greetings, jonas --32u276st3Jlj2kUU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqcdT8ACgkQd6lUs+JfIQLNJwCeM6bq3Ux03NudqS2+evoCWpoD W8MAnikHU0hR8azGbHSQb0ix/mnGVmCx =Axs8 -----END PGP SIGNATURE----- --32u276st3Jlj2kUU--