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

Re: Detecting install vs upgrade in postinst



Ben Hutchings wrote:
> On Sun, 2016-06-05 at 11:29 +0200, Marco d'Itri wrote:
> > On Jun 05, Ben Hutchings <ben@decadent.org.uk> wrote:
> > > The postinst script for linux-image-* behaves differently on fresh
> > > installation vs upgrade.  For a fresh installation, it updates the
> > > default symlinks /vmlinuz and /initrd.img to point to the new kernel
> > > and initramfs versions.  On upgrade it generally doesn't.
> > BTW, can we remove these? At least on x86 they should not be useful 
> > anymore since lilo has bit rotten.
>
> Unfortunately there are many boot loaders (and custom configurations)
> that rely on them, not just lilo.  But they can be disabled by adding
> 'do_symlinks = no' to /etc/kernel-img.conf.

Which bootloaders still rely on them?  Is there a list somewhere?  It
might be feasible to go through and fix those bootloaders.  (Not just to
avoid needing a hardcoded kernel path, but more generally to support
booting more than just the current kernel and possibly one previous
kernel.)

For that matter, could do_symlinks default to no on i386 and amd64?

In the meantime, how feasible would it be to extract the logic from the
linux-image postinst and put it into a helper program?  That would make
it much easier to enhance the configuration handling and similar, such
as by adding support for /etc/kernel-img.conf.d/ .

- Josh Triplett


Reply to: