[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
Fri Sep 25 14:31:27 UTC 2009


On Thu, Sep 24, 2009 at 09:29:58PM +0200, Jonas Meurer wrote:
> hello,
> 
> On 17/09/2009 Agustin Martin wrote:
> > Rebuilt 2.6.29 initrd in current sid and problem reappeared.
> > 
> > However seems I found the package responsible for the problem, cryptsetup.
> > If I install lenny cryptsetup (1.0.6-7) and rebuild he initrd things work
> > again as expected. However, if I install previous (1.0.7-1) or current
> > (1.0.7-2) cryptsetup problem reappears.
> > 
> > Reassigning,
> 
> 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.

I have been playing with attached patch. However, I have just noticed that
it does not play nicely with more than one cryptopts= entry in cmdline. 
Since I am not familiar with the code, I cannot discard other drawbacks.

I am thinking about putting another cmdline parsing loop for root=
before your pristine current loop for crypopts=. Another possibility may
be keep a single loop and assign cryptopts match if $cryptopts is empty
or concatenate to its previous value with a separating whitespace
otherwise, or simply use again $found to signal crypopts= presence. But you
know the code much better than me.

Hope this helps,

-- 
Agustin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cryptroot.v1.diff
Type: text/x-diff
Size: 930 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-cryptsetup-devel/attachments/20090925/0ddf2e19/attachment.diff>


More information about the pkg-cryptsetup-devel mailing list