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

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


So while this was presented as a draft for Linux kernels, it touches
interfaces shared with other kernels, so I think it would be nice to
try to get it to be kernel agnostic, CCing debian-bsd@ and debian-hurd@
just for that. The complete draft can be found in debian-kernel@.

A bit of background info. For GNU/kFreeBSD the kernel images are named
'kfreebsd-image-*', for GNU/Hurd they are named 'gnumach'. (I should
probably rename gnumach to match the current kernel naming convention.)

GNU/kFreeBSD can boot using either the native FreeBSD boot loader, or
grub. GNU/Hurd can boot with any multiboot compliant boot loader.

Currently neither make use or need any initrd image to boot, due to
using boot loader loadable modules. But there's been talk about adding
initrd support to gnumach for d-i.

On Sun, 2010-07-04 at 18:48:20 +0100, 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

kfreebsd-image-* packages honour those hooks. I'll add support for
those to gnumach.

> b. A hook script in /etc/initramfs/post-update.d

Neither kfreebsd nor gnumach honour this, not needed yet though.

> c. A hook script in /etc/kernel/postinst.d or .../postrm.d

Neither do honour these, they need support added. I can probably make
some time to do that for both.

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

Take into account that DPKG_MAINTSCRIPT_PACKAGE is only set if running
under dpkg, dpkg-reconfigure (from debconf) does not set this nor other
variables yet. See #560317.

It would be nice to consider the other kernel package names. But even
nicer to just have a centralized place where all currently known package
patterns are listed or can be queried so that there's no need to update
multiple scripts on new kernel additions, or name convention changes.

> 5. Kernel packages must not invoke boot loaders except via hooks.
> If /etc/kernel-img.conf contains 'do_bootloader = yes' or equivalent,
> maintainer scripts that previously acted on this must warn that they are
> ignoring it.  linux-base must also warn on upgrade that the default has
> changed.  In squeeze+1, this prohibition extends to initramfs builder
> packages.

Neither kfreebsd-image-* nor gnumach packages have ever honoured


Reply to: