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

Re: r51921 - in trunk/packages/partman/partman-crypto: debian finish-install.d

Hi Frans,

On Fri, Mar 14, 2008 at 08:34:58PM +0100, Frans Pop wrote:
> > Log:
> > Regenerate the initramfs for root on loop-AES.
> [...]
> > +++ trunk/packages/partman/partman-crypto/finish-install.d/05crypto
> [...]
> Couldn't this be done in post-base-installer.d instead so there is no need 
> to regenerate the initramfs?

Unfortunately, I don't think it can.

At the point post-base-installer.d runs the kernel has 
not yet been selected.

It's a bit of a catch-22 situation. 

Before the kernel is installed, we can't install the 
modules (we don't know the flavour, and the module package
depend on the kernel image package). 

After the kernel has been installed, its postinst has
already generated initramfs once.

I've thought about this for some time, but I don't see
a solution short of using something like triggers for
all update-initramfs invokations.

Another thing I considered was to have some kind of 
queue mechanism which we could tell: "Please install 
foo-modules-%KERNEL% at the same time as the kernel itself". 

But AFAICS that wouldn't help either - there is no guarantee
that the module package will have been unpacked before
the kernel postinst runs.

That's about as far as I got before I sort of gave up 
and added the brute-force approach above.

Any ideas for a better approach? I'm happy to invest
some time getting it to work, but right know I can't 
think of anything else that would work.


Reply to: