Thread: [all variants] Boot Error with Encrypted Disk
View Single Post
Old April 27th, 2009   #4
fieus
First Cup of Ubuntu
 
Join Date: Mar 2007
Beans: 2
Re: Boot Error with Encrypted Disk

OK! I was able to fix it.

My setup:
/dev/sda1 boot partition (unencrypted)
/dev/sda5 root partition (encrypted)
/dev/sda6 swap partition (encrypted)

Boot a live-cd.
# Become root
sudo su
# Mount the boot partition temporarily somewhere
mount /dev/sda1 /mnt
# make a temp directory to extract the initrd image
mkdir /tmp/image
# Copy your current initrd image to tmp/image (check this in /mnt/grub/menu.lst)
cp /mnt/initrd.img-2.6.28-11-generic /tmp/image/initrd.img-2.6.28-11-generic.orig

cd /tmp/image
# extract the initrd image
gzip -d < initrd.img-2.6.28-11-generic.orig | cpio --extract --verbose --make-directories --no-absolute-filenames
vi conf/conf.d/cryptroot

>> There you will see something like
target=sda5_crypt,source=/dev/disk/by-uuid/blahdiblah,key=none

Change this to:
target=sda5_crypt,source=/dev/sda5,key=none

find . | cpio -H newc --create --verbose | gzip -9 > initrd.img-2.6.28-11-generic

cp initrd.img-2.6.28-11-generic /mnt

Reboot and enjoy the Jaunty bitch
fieus is offline   Reply With Quote