[pkg-cryptsetup-devel] Bug#546610: cryptsetup: root= cmdline call is not honoured by initrd in crypto+lvm (Was initramfs-tools: ...)

Agustin Martin agmartin at debian.org
Thu Feb 16 12:14:34 UTC 2012


On Tue, Sep 07, 2010 at 05:04:38PM +0200, Agustin Martin wrote:
> On Tue, Sep 07, 2010 at 04:50:05PM +0200, Agustin Martin wrote:
> > > > On Thu, Sep 24, 2009 at 09:29:58PM +0200, Jonas Meurer wrote:
> > > > > first, thanks for the bugreport. the reason for change of bahaviour is a
> > > > > line in /usr/share/initramfs/scripts/local-top/cryptroot that sets $ROOT
> > > > > to $NEWROOT in /conf/params.conf in the initramfs:
> > > > > 
> > > > > 302:			if [ "$cryptrootdev" = "yes" ]; then
> > > > > 303:				# required for lilo to find the root device
> > > > > 304:				echo "ROOT=$NEWROOT" >> /conf/param.conf
> > > > > 305:			fi
> > > > > 
> > > > > commenting out these lines and regenerating the initramfs
> > > > > (update-initramfs -u) afterwards should fix it. could you verify that?
> > > > 
> > > > Working well with that change. Thanks for debugging.
> > > > 
> > > > > unfortunately these lines are required in order to support setups with
> > > > > cryptroot on lvm and lilo as bootloader. thus i don't know what to do
> > > > > about that bug yet. will have to do further investigation and testing
> > > > > with lilo as bootloader first.
> 
> > Patch with my current changes is attached. Seems to work in a basic
> > lilo-booted box and in my usual grub-booted box. Not tested in syslinux.
> 
> Forgot to mention that I did the lilo tests in a box with cryptroot on lvm 
> and lilo as bootloader, with a single bootable partition inside that lvm.

Hi, Jonas,

Re-reading the above I was not fully correct, I then tested with lilo in a
system with a separate unencrypted boot partition and a big cryptroot volume
with lvm on top of it.

At that time I tested my patched cryptsetup with a single lvm-partition to boot
inside that cryptroot and another lvm partition to hold common data. 

I have later extended the test in the lilo booted box to be able to boot to
two different partitions on lvm, one with testing (where all kernels are
installed and images created, although modules are put in the shared
partition) and one running stable. With my patched cryptsetup I can boot
from both. 

Note that my box is rather unusual, and I need to make all stuff that needs
to be made visible from both partitions (modules ...) available from the
shared partition, which is made available in early boot stage. However this
should also work for a system where /usr/lib/modules is a symlink pointing to
somewhere under /boot.

By the way, patch still appplies cleanly to 1.4 and seems to work properly,
both in my lilo and grub booted boxes.

Regards,

-- 
Agustin





More information about the pkg-cryptsetup-devel mailing list