All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Updating boot loaders in lenny and squeeze
@ 2010-06-19  2:55 Ben Hutchings
  2010-06-19  9:37 ` Joachim Wiedorn
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2010-06-19  2:55 UTC (permalink / raw)
  To: debian-kernel-0aAXYlwwYIJuHlm7Suoebg
  Cc: debian-devel-0aAXYlwwYIJuHlm7Suoebg, Stephen Powell,
	initramfs-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 2584 bytes --]

Stephen Powell recently reminded the kernel team that LILO is not
automatically updated on installation of a new kernel version in lenny.
In fact there is a general problem that there are several different ways
a boot loader may be updated automatically and currently no guarantee
that this does happen whenever it should.

There are two major cases where a boot loader should be updated
automatically:

1. Where the boot loader relies on block lists rather than reading the
filesystem, these block lists need to be updated whenever a kernel image
or an initramfs is updated or removed.

2. Where the boot loader allows selection between arbitrarily many
installed versions, the configuration should be updated whenever a
kernel package is newly installed or removed.

There are several ways such updates may be triggered:

A. Packages built with older versions of kernel-package, including the
official kernel packages in etch, run a platform-specific default boot
loader if it is installed and if it falls into case 1 above.

B. The maintainer scripts of kernel packages invoke hook scripts
installed in appropriate subdirectories under /etc/kernel/.

C. The maintainer scripts of kernel packages invoke hook commands
specified in /etc/kernel-img.conf.

D. "update-initramfs -u" will run certain boot loader update programs if
installed.

In lenny, route A was effectively disabled in official kernel packages.
However, no boot loader uses route B and debian-installer enables route
C only for GRUB (as far as I know).  Disabling route A in lenny was
clearly premature and I intend to restore it in a stable update.

However, given that route B is present in both lenny and squeeze (and
even in etch, I think) there is no good reason for packages not to rely
on it now.  (Well, except lack of documentation.)  All boot loader
packages that fall into case 1 or 2 should be installing hook scripts,
but currently only extlinux does.  I intend to remove the vestigial code
for route A, and file bugs on all boot loaders in case 1 or 2 that do
not use route B.

In case 1, the boot loader should also be called by update-initramfs
when it is called outside of kernel package installation and removal.
This is normally covered by route D, but this seems a little fragile.  I
would prefer to replace this with a hook system (as already exists for
building the initramfs itself), but I'm not that involved in
initramfs-tools development.

Ben.

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] Updating boot loaders in lenny and squeeze
  2010-06-19  2:55 [RFC] Updating boot loaders in lenny and squeeze Ben Hutchings
@ 2010-06-19  9:37 ` Joachim Wiedorn
  0 siblings, 0 replies; 2+ messages in thread
From: Joachim Wiedorn @ 2010-06-19  9:37 UTC (permalink / raw)
  To: debian-devel, Ben Hutchings
  Cc: debian-kernel, Stephen Powell, initramfs, William Pitcock

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

Hello,

Ben Hutchings <ben@decadent.org.uk> wrote on 2010-06-19 03:55:

> However, given that route B is present in both lenny and squeeze (and
> even in etch, I think) there is no good reason for packages not to rely
> on it now.  (Well, except lack of documentation.)  All boot loader
> packages that fall into case 1 or 2 should be installing hook scripts,
> but currently only extlinux does.  I intend to remove the vestigial code
> for route A, and file bugs on all boot loaders in case 1 or 2 that do
> not use route B.

It seems this is the first step for optimizing lilo. I have checked the
sources for extlinux (package syslinux) and the scripts appears to be
simple.

> In case 1, the boot loader should also be called by update-initramfs
> when it is called outside of kernel package installation and removal.
> This is normally covered by route D, but this seems a little fragile.  I

I have tested this behaviour with a hook script for update-initramfs. 
There is still a problem: Until now in the script is a check about which
bootloader is active. Only if no grub is installed then the script starts
lilo after install/update/remove of initrd's. But this feature shall go
away and then a hook script for update-initramfs is a good solution
(in /etc/initramfs-tools/hooks/).

Over all - thanks for you very detailed information. Now I think the lilo
package can better maintained again.

Have a nice day,

Joachim (Germany)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-19  9:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-19  2:55 [RFC] Updating boot loaders in lenny and squeeze Ben Hutchings
2010-06-19  9:37 ` Joachim Wiedorn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.