Package: initrd-tools Version: 0.1.82 Followup-For: Bug #303403 I have reproduced the bug with kernel 2.6.12-1-686 with a RAID setup. I have also found a workaround.
The system has both root and a swap partition on RAID1. The swap partition is ecnrypted with a random key, but the root partition isn't. In /etc/crypttab I have the following line: --------------------------------------------- swap /dev/md1 /dev/random swap --------------------------------------------- In /etc/fstab I have among other things: -------------------------------------------------------- /dev/mapper/vg0-root / reiserfs acl 0 1 /dev/mapper/swap none swap sw 0 0 -------------------------------------------------------- I should add that vg0-root is an LVM partition on /dev/md2. The /script generated by mkinitrd for this setup contains an unnecessary call to cryptsetup, and some cruft which mentions the swap partition. This is all totally wrong and causes the pass phrase prompt. (See attached file "script.bad".) (Note that this script is generated even if the swap partition is not activated, as long as it is configured in /etc/crypttab and /etc/fstab). If I remove the swap lines from /etc/crypttab and /etc/fstab and run "dpkg-reconfigure linux-image-2.6.12-1-686", a different /script is generated (see "script.good"). This one does not call cryptsetup, and there is no pass phrase prompt. Finally as a workaround I can set ROOT=/dev/mapper/vg0-root in /etc/mkinitrd/mkinitrd.conf (instead of the previous setting of "probe"), and this way mkinitrd does the right thing even if the swap is activated. I also have a second system where the swap is encrypted, but with both swap and root on a normal partition (no LVM or RAID). On this system the bug does not appear at all. -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-thales Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8) Versions of packages initrd-tools depends on: ii coreutils [fileutils] 5.2.1-2 The GNU core utilities ii cpio 2.5-1.2 GNU cpio -- a program to manage ar ii cramfsprogs 1.1-6 Tools for CramFs (Compressed ROM F ii dash 0.5.2-5 The Debian Almquist Shell ii util-linux 2.12p-4 Miscellaneous system utilities initrd-tools recommends no packages. -- no debconf information
mdadm -A /dev/md1 -R -u 8f156671:cab08648:28e926ad:553eb5cd /dev/sda5 /dev/sdb5 mount_tmpfs dev2 save_rootdev="$rootdev" save_ROOT="$ROOT" rootdev=2305 ROOT="/dev/md1" get_device rootdev="$save_rootdev" ROOT="$save_ROOT" export device export dmname="swap" export cipher_mode="aes-cbc-plain" for i in /keyscripts/*; do [ -f "$i" ] || continue case "$i" in *.sh) (. $i) ;; *) $i ;; esac done [ -b /dev/mapper/$dmname ] || \ /sbin/cryptsetup -c $cipher_mode create $dmname $device umount -n dev2 ROOT=/dev/mapper/vg0-root mdadm -A /dev/md2 -R -u 57823407:50072998:0a5ad2a9:9d9f102a /dev/sda6 /dev/sdb6 mkdir /devfs/vg0 mount_tmpfs /var if [ -f /etc/lvm/lvm.conf ]; then cat /etc/lvm/lvm.conf > /var/lvm.conf fi mount_tmpfs /etc/lvm if [ -f /var/lvm.conf ]; then cat /var/lvm.conf > /etc/lvm/lvm.conf fi mount -nt devfs devfs /dev vgchange -a y vg0 umount /dev umount -n /var umount -n /etc/lvm
ROOT=/dev/mapper/vg0-root mdadm -A /dev/md2 -R -u 57823407:50072998:0a5ad2a9:9d9f102a /dev/sda6 /dev/sdb6 mkdir /devfs/vg0 mount_tmpfs /var if [ -f /etc/lvm/lvm.conf ]; then cat /etc/lvm/lvm.conf > /var/lvm.conf fi mount_tmpfs /etc/lvm if [ -f /var/lvm.conf ]; then cat /var/lvm.conf > /etc/lvm/lvm.conf fi mount -nt devfs devfs /dev vgchange -a y vg0 umount /dev umount -n /var umount -n /etc/lvm