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

Re: [DRAFT] Policy for Linux kernel, initramfs, boot loader update process



On Mon, 2010-06-28 at 22:19 +0000, Colin Watson wrote:
> On Mon, Jun 28, 2010 at 03:02:35AM +0100, Ben Hutchings wrote:
> > 1. Packages for boot loaders that need to be updated whenever the files
> > they load are modified (i.e. those that store a block list) must install
> > hook scripts in /etc/kernel/postinst.d and /etc/kernel/postrm.d, which
> > will be called on installation/upgrade and removal of kernel packages,
> > respectively.
> 
> It seems to me (particularly from the fact that you upgraded a grub2 bug
> report about this to important - GRUB 2 does not store block lists for
> kernels) that this is not limited to boot loaders that store block lists
> for the files they load: it also affects boot loaders that need to be
> updated whenever the *list* of files they load is modified.  Can you
> confirm that my understanding is correct?

Sorry, I managed to lose this sentence during editing:

'Packages for boot loaders that can provide a menu of kernel versions
should install kernel hook scripts in order to update that menu.'

> > 2. Packages for boot loaders that need to be updated whenever the files
> > they load are modified must also install hook scripts in
> > /etc/mkinitramfs/post-update.d.  Initramfs builders must call these
> > scripts using run-parts after they create, update or delete an
> > initramfs.  The arguments given to these hook scripts are the kernel ABI
> > version and the absolute path to the initramfs image.
> 
> Does the same apply here, or not?  This is going to be quite a lot of
> calls to update-grub if so, although at least it's quite a bit faster
> now than it used to be ...

No.

> > 3. Initramfs builders must complete their work before returning from the
> > kernel postinst hook script.  [initramfs-tools currently uses a trigger
> > to defer this because it can also be invoked twice, but this means it
> > also has to know how to update specific boot loaders.]
> 
> Is an initramfs guaranteed to be built before any of the boot loader
> hooks are executed?  It seems like a waste of time calling boot loader
> hooks otherwise.  (This may be implied by your design, but it was a
> little bit implicit if so.)
[...]

This requirement and the naming requirements on hook scripts are
intended to guarantee that.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: