root on lvm w/ crypted pv doesn't work without this patch.

Bug #72517 reported by Eli Criffield
4
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/vgcrypt-root

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

Revision history for this message
Eli Criffield (launchpad-zendo) wrote :

heres the patch

Revision history for this message
Reinhard Tartler (siretart) wrote :

Thanks for the bug report. This particular bug has already been
reported into our bug tracking system, but please feel free to report
any further bugs which you find.

Revision history for this message
Ilkka Tuohela (hile) wrote :

Fix for cryptsetup released in feisty and gutsy packages.

Changed in cryptsetup:
status: Unconfirmed → Fix Released
assignee: nobody → hile
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.