[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, Jun 28, 2010 at 01:35:20PM +0100, Ben Hutchings wrote:
> On Mon, 2010-06-28 at 10:45 +0200, maximilian attems wrote:
> > On Mon, 28 Jun 2010, Ben Hutchings wrote:
> [...]
> > > 4. During a kernel package installation, upgrade or removal, various
> > > boot loader hooks may be invoked (in this order):
> > > 
> > > a. A postinst_hook or postrm_hook command set by the user or the
> > >    installer in /etc/kernel-img.conf
> > > b. A hook script in /etc/mkinitramfs/post-update.d
> > > c. A hook script in /etc/kernel/postinst.d or .../postrm.d
> > > 
> > > To avoid unnecessary updates, the hooks invoked at step a and b may
> > > check whether $DPKG_MAINTSCRIPT_PACKAGE begins with 'linux-image-' and
> > > do nothing in this case.  [Is this sensible or is it too 'clever'?]
> > 
> > what is the intent of that point?
> > sorry you lost me here.
> 
> I'm wondering whether this is a reasonable way to test whether a kernel
> package upgrade is in progress.

currently it is easy to tell in /etc/kernel if you are invoked by
linux-2.6 as it doesn't define KERNEL_PACKAGE_VERSION.

make deb-pkg run-parts invocation doesn't pass at all the second stupid
arg.

for update-initramfs it shouldn't be necessary as the updates are
trigger updated anyway.
 
> > > 5. Kernel and initramfs builder packages must not invoke boot loaders
> > > except via hooks.  If /etc/kernel-img.conf contains an explicit
> > > 'do_bootloader = yes', kernel package maintainer scripts should warn
> > > that this is now ignored.
> > 
> > for backward compat and upgrade purpose from lenny,
> > I think the must is wrong.
> [...]
> 
> Do you mean that the boot loader might not get updated during a
> dist-upgrade?  I think that even if the kernel or initramfs builder
> package is installed/upgraded before the boot loader package is upgraded
> to include hook scripts, the boot loader package will update the boot
> loader when it is upgraded.  (And the boot loader package is sure to be
> upgraded in order to add those hook scripts.)

yes the bootloader might be Lenny one and thus no hooks to be run.
in partial upgrades you get all kind of crazy pathes,
thus it is better to handle the previsous distro.


Reply to: