GNU GRUB - Bugs: bug #42597, Alpha sorting for kernel names...
You are not allowed to post comments on this tracker with your current authentication level.
bug #42597: Alpha sorting for kernel names without versions (rolling release)
Submitter: | Troy Engel <troyengel> | ||
Submitted: | Sun 22 Jun 2014 05:32:44 PM UTC | ||
Category: | User Interface | Severity: | Major |
Priority: | 5 - Normal | Item Group: | Feature Request |
Status: | None | Privacy: | Public |
Assigned to: | None | Originator Name: | |
Open/Closed: | Open | Release: | 2.02~beta1 |
Release: | Reproducibility: | Every Time | |
Planned Release: | 2.03+ |
Wed 31 Jan 2018 02:15:41 AM UTC, comment #1: |
Sir Grublon <grublon> |
Sun 22 Jun 2014 05:32:44 PM UTC, original submission:
The /etc/grub.d/10_linux design is based around the expectation that kernel names in /boot will contain version numbers, allowing the newest version to sort to the top and become the default entry. For systems like Fedora/Red Hat/CentOS this works fine.
|
Troy Engel <troyengel> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-02-25 | tyilo | Carbon-Copy | - | ![]() |
Added -email is unavailable- |
2018-01-31 | grublon | Attached File | - | ![]() |
Added grub.patch, #43128 |
2016-03-02 | phcoder | Planned Release | None | ![]() |
2.03+ |
2014-06-22 | troyengel | Attached File | - | ![]() |
Added 10_linux_noversion.patch, #31596 |
Powered by Savane 3.12.
Corresponding source code
wrong sort in version_test_numeric().
I installed different kernels under arch linux. A grub-mkconfig ordered the menu entries oddly.
As arch is not using versioning numbers in the kernel image's filenames, it should sort alphabetically.
Example
/boot/vmlinuz-linux-lts
/boot/vmlinuz-hardened
/boot/vmlinuz-zen
the lts entry somehow always was sorted out as "newest". But it should be following order hardened, lts, zen.
I found a typo in grub-mkconfig_lib.in line 233:
if (echo "$version_test_numeric_a" ; echo "$version_test_numeric_b") | version_sort | head -n 1 | grep -qx "$version_test_numeric_b" ; then
It should be
....... | grep -qx "$version_test_numeric_a" ; then
After that fix the ordering is correct in my case.
(file #43128)