Comment 10 for bug 663053

Revision history for this message
toobuntu (toobuntu) wrote :

The initrd's have the same cryptroot!

$ cat initrd-virtual/initrd/conf/conf.d/cryptroot
target=sda5_crypt,source=UUID=e8bd3ebc-0510-4df6-b734-826ea47050b6,key=none,rootdev,lvm=maverick-root

$ cat initrd-generic/initrd/conf/conf.d/cryptroot
target=sda5_crypt,source=UUID=e8bd3ebc-0510-4df6-b734-826ea47050b6,key=none,rootdev,lvm=maverick-root

I think this might be a regression of http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544487 (which is a bug in cryptsetup and its interaction with lvm2), but cryptsetup and lvm2 have reportedly been fixed since then.

From the debian bug: "the problem is that my root filesystem /dev/mapper/yoom-root is a symlink to /dev/dm-1,
(see fstab and mtab below). With this setup, the canonical_device function in /usr/share/initramfs-tools/hooks/cryptroot returns 1 since the target of the symlink is not in /dev/mapper, (without having checked that the symlink itself *is* in /dev/mapper)."

$ ls -lh /dev/mapper/
total 0
crw------- 1 root root 10, 59 2010-10-30 13:36 control
lrwxrwxrwx 1 root root 7 2010-10-30 13:36 maverick-root -> ../dm-1
lrwxrwxrwx 1 root root 7 2010-10-30 13:36 sda5_crypt -> ../dm-0

$ cat /etc/mtab | grep /dev
/dev/mapper/maverick-root / ext4 rw,nodiratime,relatime,errors=remount-ro,commit=0 0 0
none /dev devtmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
none /dev/shm tmpfs rw,nosuid,nodev 0 0
/dev/sda1 /boot ext2 rw,nosuid,nodev,noatime,nodiratime 0 0

$ apt-cache policy cryptsetup
cryptsetup:
  Installed: 2:1.1.2-1ubuntu1
  Candidate: 2:1.1.2-1ubuntu1
  Version table:
 *** 2:1.1.2-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status

$ apt-cache policy lvm2
lvm2:
  Installed: 2.02.54-1ubuntu6
  Candidate: 2.02.54-1ubuntu6
  Version table:
 *** 2.02.54-1ubuntu6 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status

Perhaps, though, this is a regression introduced in lvm2:

lvm2 (2.02.54-1ubuntu5) maverick; urgency=low

  * Backport from Debian:
    - Don't overwrite names of dm devices; use symlinks instead
      (LP: #621951).

 -- Colin Watson <email address hidden> Wed, 08 Sep 2010 22:50:26 +0100