[Pkg-cryptsetup-devel] Re: reviewing partman-crypto

Riku Voipio riku.voipio at iki.fi
Sun Apr 30 16:55:52 UTC 2006


On Sun, Apr 30, 2006 at 05:01:26PM +0200, Max Vozeler wrote:
> Hmm.. is it clear why /dev/mapper does not exist in target? I
> understand that device nodes in there are created by devmapper.
> The same problem would then exist for partman-lvm, no? Or does
> -lvm not need the device nodes to exist?! Perhaps looking at it
> could help find a solution.

http://svn.debian.org/wsvn/d-i/trunk/packages/base-installer/debian/postinst?op=file&rev=0&sc=0

create_devices () {
...
if pvdisplay | grep -iq "physical volume ---" && grep -q "device-mapper$" /proc/misc; then
	mkdir -p /target/dev/mapper
...

It seems to presume device-mapper is a lvm-only thing.

> Good question. I think the current work-around is to manually
> create a suitable menu.lst, but that breaks a lot of things in
> other parts of the installer, like detection of existing OSes and
> of course architectures that cannot use grub. I have no good idea
> ATM how we could solve this and haven't looked into it much. It
> seem easiest in theory to have the initramfs hooks handle the case
> where /dev/mapper/crypt$n is passed as root= device.
 
> But David knows more about both the hooks and the situation re
> grub and I think he has already tried and considered different
> ways to solve this. David is on vacation, but he has sent me a
> patch with local changes he uses to test root-on-crypto with
> cryptsetup. I'll forward it to you in a second.

Personally, I think it would be mistake to change the root= to point
to something that isn't really root. I've probably missed some esoteric
case, but crypttab already provides the 
/dev/mapper/crypt$n -> /dev/hda$n mapping, which a hook script could
just copy over to the initramfs. But I shall wait for David to return,
he probably has a more educated opinion than I have :)





More information about the Pkg-cryptsetup-devel mailing list