All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Brunner <doug@doug-brunner.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] Add config option to prefer Linux kernel versions by substring match
Date: Fri, 12 Sep 2014 14:26:00 -0700	[thread overview]
Message-ID: <541364E8.7020602@doug-brunner.com> (raw)
In-Reply-To: <mailman.69.1410537627.19647.grub-devel@gnu.org>

> On Sun, Sep 7, 2014 at 12:37 PM, Doug Brunner <doug@doug-brunner.com> wrote:
>> Hi all,
>>
>> First time submitting - please let me know if I'm doing anything wrong.
>>
>> This patch adds an option, GRUB_LINUX_PREF_VERSION_SUBSTR, that can be set to prioritize Linux kernels containing a
>> given substring. This takes precedence over version ordering, so if you have 3.14.1-generic, 3.14.2-generic,
>> 3.8.13-fnord1, and 3.8.13-fnord2 and the substring is 'fnord', the order is:
>> 3.8.13-fnord2
>> 3.8.13-fnord1
>> 3.14.2-generic
>> 3.14.1-generic
>>
>> Rationale: I and others, (see e.g. http://askubuntu.com/questions/216398/set-older-kernel-as-default-grub-entry) needed
>> to change the Linux kernel version GRUB sets as default. The process is error-prone: you have to figure out where in the
>> GRUB menu it will appear, then enter that in /etc/default/grub, and if the menu position changes due to new kernels
>> added to the system you have to do it all over again. I had older kernels with a distinctive local version naming scheme
>> that I wanted preferred over the stock kernels, but it could also be used to specify a particular kernel version.
> 
> Your rationale, as stated, is completely solved by using the menuentry
> ID, as documented in "info -f grub -n 'Simple configuration' ", rather
> than using a menuentry number. The answer given to that askubuntu.com
> question is a poor one, as noted by one of the commentors (though that
> commenter recommends menuentry titles, which have their own issues,
> again as documented in the texinfo manual).
> 
I think there would still be some usability gains; if I understand it correctly, to use menuentry IDs, I would have to
enter e.g. 'gnulinux-advanced-UUID>gnulinux-3.8.13-fnord1-advanced-UUID', where UUID is for my root partition. This is
still somewhat laborious to compose; for my use case, it also requires redoing the entry every time I build a new -fnord
kernel.

If I can come up with a way of making GRUB_DEFAULT use a substring match rather than exact match (in the case of
multiple matches, perhaps choosing the latest kernel version that matches) would that be acceptable?

Doug Brunner


       reply	other threads:[~2014-09-12 21:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.69.1410537627.19647.grub-devel@gnu.org>
2014-09-12 21:26 ` Doug Brunner [this message]
2014-09-07 19:37 [PATCH] Add config option to prefer Linux kernel versions by substring match Doug Brunner
2014-09-11 17:52 ` Jordan Uggla
2014-09-13 16:01 ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=541364E8.7020602@doug-brunner.com \
    --to=doug@doug-brunner.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.