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

Re: [RFC] Updating boot loaders in lenny and squeeze



On Sun, 2010-06-27 at 10:19 +0200, Jonas Smedegaard wrote:
> On Sat, Jun 26, 2010 at 08:50:27PM +0100, Ben Hutchings wrote:
> >On Wed, 2010-06-23 at 23:31 +0200, Jonas Smedegaard wrote:
> >> On Wed, Jun 23, 2010 at 10:12:42AM -0400, Stephen Powell wrote:
> >>
> >> >That does seem like a more general-purpose solution, rather than 
> >> >having lilo and zipl treated as special cases.  But please keep the 
> >> >appropriate parties informed of any future design changes to 
> >> >update-initramfs. I myself have never used yaird, but I assume that 
> >> >to be consistent it should have a similar hook system.
> >>
> >> A great while back initramfs-tools and kernel packages broke the ABI 
> >> coordinated across initramfs-tools, linux-2.6, yaird and 
> >> kernel-package.
> >>
> >> Sure would be nice with a stable ABI again, and getting informed if 
> >> it changes.
> >
> >That is a separate issue.  What we need here is an interface for the 
> >initramfs builder to update the boot loader if necessary.  No such 
> >interface exists yet, AFAIK.
> 
> Agreed, this is a different ABI.  The wish for such ABI being treated as 
> a cross-package ABI still exist.
> 
> One approach would be to create a page at wiki.debian.org which all 
> interested parties could then subscribe to.
> 
> I would dislike if (as in the past) we simply rely on whatever internal 
> routines implemented by the most popular packages (initramfs-tools and 
> minux-2.6) which others then need to track sources of.

I agree.

> >I suggest something like the following:
> >
> >1. Boot loaders that maintain block lists install a script under
> >/etc/mkinitramfs/post-update.d which takes two arguments: the kernel ABI
> >version (uname -r) and the absolute path to an initramfs.
> >
> >2. Initramfs builders call the scripts in this directory after creating,
> >updating or deleting an initramfs by running:
> >    run-parts --verbose --exit-on-error --arg=$version --arg=$path /etc/mkinitramfs/post-update.d
> >or similar.
> >
> >We could alternately use multiple directories or an argument to
> >distinguish creation, update and deletion.  However, I suspect that
> >these scripts will need to invoke the same command in all cases.
> 
> Seems reasonable to me.

There is a minor problem with this, which is that it will likely result
in updating the boot loader twice during a kernel installation or
upgrade.  We could avoid that by specifying that:

3. Boot loaders must install kernel hook scripts named beginning with
'zz-'. All other packages must use names that sort before this. (This
ensures that the boot loader update happens last.)

4. Initramfs builders may omit calling initramfs hook scripts when they
are invoked from a kernel hook script.

We're still left with the question of how to transition from the current
mess.

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: