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

Bug#370556: initramfs-tools: does not handle cryptroot-on-lvm properly



Hey Maximilian, thanks for the CC.

On Tue, June 6, 2006 1:05, maximilian attems said:
> On Mon, Jun 05, 2006 at 05:05:15PM -0400, Daniel Kahn Gillmor wrote:
>> root=/dev/mapper/croot ro
>
> this is obviously wrong,
> current cryptsetup scripts expect the cryptoroot to be set by cryptopts,
> try
> root=/dev/mapper/squeak0 cryptopts=cryptsource=/dev/mapper/croot

I guess this isn't very clear, but if you have an encrypted root partition
on top of lvm/evms/md, you have to point the root variable to the
underlying lvm/evms/md partition (this is a limitation of how the current
initramfs system works).

So, could you try to just change the root variable to
root=/dev/mapper/squeak0-rt and boot? Skip the cryptopts variable
suggested above, it should already be set to something sane via a config
file in the initramfs.

> i never found the way those cryptopts are specified to be pretty,
> README.initramfs is not yet enlighting on the subject,
> adding Davic on cc.

I agree that they're not pretty. OTOH, once all bugs are ironed out, they
shouldn't be necessary save for exceptional cases. I'll write more
documentation when the dust settles and the scripts become more stable.

>> Proposal:
>>
>> What if the end user could supply a list of volume groups that need
>> activation in some environment variable stored in conf.d/lvm?  if that
>> variable was set, it would be the one used, otherwise, the script
>> would try to automatically detect the proper vg.

I think a better approach (which I've suggested before) would be to have a
list of devices that should be present before we try to mount root. That
list could then contain md/lvm/evms/crypto/dmraid devices as necessary, in
the proper order.

E.g. for root-on-lvm-on-crypto-on-lvm-on-raid-on-two-hds
rootdeps=/dev/hda,/dev/hdb,/dev/md0,/dev/mapper/basevg-baselv,/dev/mapper/cryptdevice,/dev/mapper/mainvg-rootlv

Then each script can inspect the list and bring up the next device in the
order if it knows how to do so.

Regards,
David





Reply to: