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

Re: Symbolic links to kernel image files and initial RAM file system image files



On Wed, 2011-07-20 at 07:39 -0400, Stephen Powell wrote:
> On Wed, 20 Jul 2011 04:52:59 -0400 (EDT), Ben Hutchings wrote:
> > 
> > Boot loaders *should not* maintain symbolic links, since that means
> > duplicating logic (and there are probably cases where multiple boot
> > loaders are installed and they may trip over each other).
> 
> I agree that if it's going to be done it would be best to do it
> in one place (i.e. avoid duplicating logic).
> > 
> > Hook scripts will just perpetuate the use of the undocumented
> > /etc/kernel-img.conf.
> 
> Hmm.  I don't follow that logic.  If symbolic links are maintained
> in hook scripts, then it makes sense to me that the user would set
> "do_symlinks = no" in /etc/kernel-img.conf to avoid duplication
> of effort.

If the hook scripts are in some common package then they would need to
be configured somehow.

[...]
> > I would like to see these 'traditional' boot loaders provide the option
> > to update their configuration automatically.  This should be done with
> > the aid of the new 'linux-version' command from linux-base.
> 
> I guess my working definition of "traditional" boot loaders means anything
> other than grub (either version).  But keep in mind that on some
> architectures a "traditional" boot loader is all that is available.
> zipl is all there is for s390, for example.
> 
> That's a nice idea, but there are implementation problems
> that come to mind.  I don't know about zipl, I'll check; but I do know that
> lilo, for example, is limited to 15-character names in it's labels.  The
> traditional labels, used with the symbolic links, are something like
> "Linux" and "LinuxOLD", which are well within the 15-character limit.
> But if one attempts to auto-generate labels based on the name of the
> kernel, I can easily see a problem with guaranteeing uniqueness while
> still remaining within the 15-character limit.

The version list could then be truncated, e.g.:

    #!/bin/bash

    generate_entry() {
        ...
    }

    { read new_version; read old_version; } < <(linux-version list | linux-version sort --reverse)
    [ -z "new_version" ] || generate_entry Linux "$new_version"
    [ -z "old_version" ] || generate_entry LinuxOLD "$old_version"

> Also, since each boot
> loader has its own unique configuration file format, similar logic will
> need to be invented multiple times.
[...]

I'm not convinced it's that complicated.

Ben.

-- 
Ben Hutchings
Absolutum obsoletum. (If it works, it's out of date.) - Stafford Beer

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: