I upgraded from 9.04 to 10.04 and hit this, using a vanilla kernel (2.6.34) and
a luks-encrypted swap.
I'm using the following workaround, which seems to work. I thought I should
paste it here in case anyone is in a similar situation and wants to give it a try.
- Put the contents below in /etc/initramfs-tools/scripts/local-top/encrypted_swap,
replacing /dev/sda2 with the disk your swap is on, and swap-crypt with the
device-mapper name of your swap disk (must match the one used in
/etc/crypttab and /etc/fstab):
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
# extracted from cryptroot
udev_settle()
{
# Wait for udev to be ready, see https://launchpad.net/bugs/85640
if [ -x /sbin/udevadm ]; then /sbin/udevadm settle --timeout=30
elif [ -x /sbin/udevsettle ]; then /sbin/udevsettle --timeout=30
fi
return 0
}
udev_settle
# Replace "/dev/sda2" with your device, and "swap-crypt" with the
# device-mapper name, which can be found in /etc/crypttab or /etc/fstab
Hi!
I upgraded from 9.04 to 10.04 and hit this, using a vanilla kernel (2.6.34) and
a luks-encrypted swap.
I'm using the following workaround, which seems to work. I thought I should
paste it here in case anyone is in a similar situation and wants to give it a try.
- Put the contents below in /etc/initramfs- tools/scripts/ local-top/ encrypted_ swap,
replacing /dev/sda2 with the disk your swap is on, and swap-crypt with the
device-mapper name of your swap disk (must match the one used in
/etc/crypttab and /etc/fstab):
---------- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
# extracted from cryptroot /launchpad. net/bugs/ 85640
/sbin/ udevadm settle --timeout=30
/sbin/ udevsettle --timeout=30
udev_settle()
{
# Wait for udev to be ready, see https:/
if [ -x /sbin/udevadm ]; then
elif [ -x /sbin/udevsettle ]; then
fi
return 0
}
udev_settle
# Replace "/dev/sda2" with your device, and "swap-crypt" with the
# device-mapper name, which can be found in /etc/crypttab or /etc/fstab
/sbin/cryptsetup luksOpen /dev/sda2 swap-crypt
---------- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
- chmod +x /etc/initramfs- tools/scripts/ local-top/ encrypted_ swap
- Rebuild your initramfs using update-initramfs
Thanks,
Alberto