root on lvm w/ crypted pv doesn't work without this patch.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup (Ubuntu) |
Fix Released
|
Undecided
|
Ilkka Tuohela |
Bug Description
this doesn't work
physical <- luks dm-crypt <- volume group <- root logical volume
this is mysetup
/dev/hda1 <- boot
/dev/hda2 <- unused
/dev/hda3 <- luks encrypted
dm-crypt/luks creates /dev/mapper/pvcrypt from /dev/hda3
pvcrypt is the physical volume for volume group vgcrypt
root is the logical volume "root" in the volume group vgcrypt -> /dev/mapper/
This doesn't work with cryptsetup as shipped in edgy, the initrd trys to rm the lvm script first wich dies because lvm's physical disk doesn't exsist yet "pvcrypt"
If you apply this patch, the initrd cryptsetup script runs before the lvm patch in the initrd, The cryptseup script already has the logic to activate the volume group after it creates the dm-crypt physical volume, or activate the volume group before running cryptsetup if the device it needs is a logical volume
For that reason cryptsetup should run before lvm in the initrd.
The other change is not to use "vgchange" but use "lvm vgchange", the lvm script (incorrectly imho) creates symlinks from lvm to vgchange.
Eli
heres the patch