[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#365747: Add crypto nodes as well



Frans Pop (elendil@planet.nl) wrote:
>On Thursday 11 May 2006 01:10, David Härdeman wrote:
>> Something like the attached patch should suffice. Is it acceptable?
>
> Is it a specific set of devices you need or do they vary depending on the
> crypto method used or number of encrypted partitions?

If the partition mounted at /target is encrypted (using dm-crypt), the
corresponding /dev/mapper/cryptX node needs to be present in
/target/dev/mapper in order for grub-install, initramfs-tools and yaird to
work.

So it would be enough to only add one node and only in the case when root is
encrypted.

The only problem I foresee is that the device-mapper nodes have a dynamic
minor. So if you create an encrypted swap partition as crypt0 and an encrypted
root partition as crypt1 in partman-crypto, they will likely have different
minors after a reboot into the newly installed system as the root partition is
setup first in the initramfs.

I'm not sure if this is in fact a problem?

Would it be "better" to remove the /target/dev/mapper/cryptX node in a
prebaseconfig script after it has served its purpose rather than keeping
static nodes around which may or may not be correct after a reboot?

> I think using mknod would be preferred over just copying the devices.

Ok

> Is there any way you can detect whether crypto is in use (from /proc or
> something) and create the devices using mknod?

Probably, I'll take a look

> I intend to upload base-installer with the changes needed for partman
> crypto after this is settled.

Ok, thanks.

Regards,
David




Reply to: