[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 18:57 +0200, maximilian attems wrote:
> 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.

OK.  Should we say that if the second argument is missing then the
absolute path is /boot/vmlinuz-$version or /boot/vmlinux-$version
according to architecture convention?

> 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.

You're thinking of a system with lilo from lenny and initramfs-tools
from squeeze?  Yes, I see that would be a problem.

How do we keep initramfs-tools working in this case while still allowing
newer boot loader packages to avoid redundant updates?  Could we say
that initramfs-tools mustn't invoke boot loaders directly if
/etc/initramfs/post-update.d exists and is non-empty?

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: