From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XSYMM-0002Rk-8d for mharc-grub-devel@gnu.org; Fri, 12 Sep 2014 17:26:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSYMF-0002QW-71 for grub-devel@gnu.org; Fri, 12 Sep 2014 17:26:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSYM6-00040J-81 for grub-devel@gnu.org; Fri, 12 Sep 2014 17:26:19 -0400 Received: from mail.doug-brunner.com ([54.187.162.22]:33142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSYM6-0003yj-2T for grub-devel@gnu.org; Fri, 12 Sep 2014 17:26:10 -0400 Received: from [192.168.1.64] (rrcs-24-43-90-62.west.biz.rr.com [24.43.90.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: doug@doug-brunner.com) by mail.doug-brunner.com (Postfix) with ESMTPSA id 2184F83C5C for ; Fri, 12 Sep 2014 21:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=doug-brunner.com; s=mail; t=1410557146; bh=olwMShpDDfOrCGTeEzZCdjTEe29cDgcq8uVT+381Nuc=; h=Date:From:To:Subject:References:In-Reply-To:From; b=eptuTrtH4tjYmUC+ZxhBX3/rGnbUO0UFSecXf0n9kd1QOndMxgP5OilNLke4GT3Fm xP4kv5NaEfKmd53Gx1sO1EFpDeCozBnPQu9RsWjR1Ri1InJrLk2tu6aBNxxPqBeL70 4Te/FVab3BwasMaVTNFjD0zD9Ez27Oh+n0kzny4w= Message-ID: <541364E8.7020602@doug-brunner.com> Date: Fri, 12 Sep 2014 14:26:00 -0700 From: Doug Brunner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: [PATCH] Add config option to prefer Linux kernel versions by substring match References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 54.187.162.22 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 21:26:24 -0000 > On Sun, Sep 7, 2014 at 12:37 PM, Doug Brunner w= rote: >> 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 yo= u have 3.14.1-generic, 3.14.2-generic, >> 3.8.13-fnord1, and 3.8.13-fnord2 and the substring is 'fnord', the ord= er 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/2163= 98/set-older-kernel-as-default-grub-entry) needed >> to change the Linux kernel version GRUB sets as default. The process i= s 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 kern= els with a distinctive local version naming scheme >> that I wanted preferred over the stock kernels, but it could also be u= sed to specify a particular kernel version. >=20 > 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). >=20 I think there would still be some usability gains; if I understand it cor= rectly, 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 re= doing 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