[pkg-cryptsetup-devel] Bug#507721: Bug#507721: cryptsetup: Sometimes initrd ends up missing conf/conf.d/cryptroot file in it

Jonas Meurer jonas at freesources.org
Mon Dec 15 23:17:20 UTC 2008


tags 507721 + help
thanks

Hello,

I just tried to understand the whole issue. I'll try to describe what I
got so far, please tell me If i got something wrong:

On 03/12/2008 Christian Jaeger wrote:
> I did install the system using the capabilities of the Debian
> installer to create encrypted root partitions and LVM setups, and it
> worked for some time; probably the first occurrence of the problem was
> when I already started compiling and installing kernels manually (from
> kernel.org's Git, using make install and make modules_install),
> although this too worked upon the first (few?) kernel version(s). And,
> again, sometimes it still works, like when I installed 2.6.27.5 I
> could not reproduce the problem. This is also documented on a bug I
> reported against initramfs-tools, here:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=

Does this mean, that you've chosen 'Guided - use entire disk and setup
encrypted LVM' at the debian installer partitioner?

And you didn't change that setup except compiling custom kernels, right?

>   --- Logical volume ---
>   LV Name                /dev/main/root
>   VG Name                main
>   LV UUID                M51c6n-rw9j-vKBU-UnIJ-GvXD-nVw0-7yisre
>   LV Write Access        read/write
>   LV snapshot status     source of
>                          /dev/main/root_snap_23nov [INACTIVE]
>   LV Status              available
>   # open                 2
>   LV Size                17.43 GB
>   Current LE             4462
>   Segments               2
>   Allocation             inherit
>   Read ahead sectors     auto
>   - currently set to     256
>   Block device           253:2
> [...]
> novo:~# dmsetup ls
> plain-rootextend-real	(253, 8)
> main-root	(253, 2)
> sda8_crypt	(253, 0)
> plain-gpgbackups	(253, 5)
> plain-rootextend_snap_23nov-cow	(253, 10)
> plain-rootextend_snap_23nov	(253, 11)
> plain-plainswap2	(253, 12)
> plain-media	(253, 6)
> main-root_snap_23nov	(253, 4)
> plain-rootextend	(253, 9)
> plain-plainswap	(253, 7)
> main-root-real	(253, 1)
> plain-spdvd	(253, 13)
> main-root_snap_23nov-cow	(253, 3)

Ok, that one looks like you've much more dm-crypt mappings than a
default setup. you do have main-root, main-root-real,
main-root_snap_23nov and root_snap_23nov.

> novo:~# l /dev/dm-0
> brw-rw---- 1 root disk 253, 0 2008-12-03 21:00 /dev/dm-0
> 
> thus dm-0 is sda8_crypt
> 
> novo:~# cat /etc/crypttab 
> sda8_crypt /dev/sda8 none luks
> novo:~# 
> 
> novo:~# cat /etc/fstab |perl -wne 'print if m|\s/\s|'
> /dev/mapper/main-root /               reiserfs defaults,noatime        0       1
> novo:~# 

ok, you use main-root as rootfs, and main-root depends on main-root-real,
which itself depends on sda8_crypt, correct?
is this the reason why your LVM over dm-crypt setup has one more level
than the usual setups?

Could you try to explain what the reason is why your setup fails while
others work? and if the missing recursion of get_lvm_deps() is really
the reason, why does it only fail on some kernels for you? I'm not
confident that you tracked the real bug. And as David Härdeman, the one
who wrote all the cryptroot initramfs scripts, isn't available
currently, i hesitate to apply your patch.

greetings,
 jonas





More information about the pkg-cryptsetup-devel mailing list