On Sun, Oct 08, 2006 at 12:27:00AM +0200, Frans Pop wrote:
Package: partman-auto-crypto
Version: 2
(1)
In autopartition-crypto there is a somewhat dangerous double use of
"$dev"; it would possibly be better to use separate variables. be better
to use separate variables.
Ok
I also wonder what that loop actually does. Why is it needed to loop over
$DEVICES when you have been passed a specific $dev? Would it be possible
that some other disk already has a method "crypto" (from a previous
installation maybe) and thus is used by mistake?
The loop is there because it needs to look not for the $dev device but
the virtual device-mapper device which has been created ontop of the
device pointed to by $dev after the crypto_setup step. It should be a
bit smarter and make sure the virtual-$dev <-> $dev mapping is correct
though....and it should probably exit the loop once that is
established...but I don't think the loop can be removed...
(2)
Choosing guided partitioning again after setting up crypto and choosing
regular LVM fails because encrypted partition is in use...
(3)
Choosing guided partitioning again after setting up crypto and choosing
regular partitioning works, but encrypted volume and LVM stuff is still
shown...
For both (2) and (3) we should just make sure things are cleaned up
properly as we are going to scratch the disk anyway. How can an encrypted
partition be "released"?
"dmsetup remove <device>" or "cryptsetup remove <device>". This is a generic
problem with partman-crypto as well. The best thing to do would probably
be to extend the checks that are already done for LVM-exists-on-device
and extend them to also check (+ warn) and wipe crypto on a device
which is going to be auto-partitioned.
I'll try to find time this week to look into it.
--
David Härdeman