[Bug 1912970] [NEW] Fix for GRUB_FLAVOUR_ORDER in grub-mkconfig_lib

Launchpad Bug Tracker 1912970 at bugs.launchpad.net
Sun Jan 24 23:23:02 UTC 2021


You have been subscribed to a public bug:

Description:	Ubuntu 20.04.1 LTS
Release:	20.04

I am submitting a patch for /usr/share/grub/grub-mkconfig_lib to fix the
usage of GRUB_FLAVOUR_ORDER in method version_test_gt().

I have installed the XanMod-LTS kernel in my Ubuntu 20.04 installation.
The Ubuntu 20.04 kernel is currently 5.8.0-38-generic and the current
xanmod1 kernel is 5.4.91-xanmod1.

The sort routine in /usr/share/grub/grub-mkconfig_lib will sort the
Ubuntu kernel ahead of the xanmod1 kernel due to the higher version
number when assigning the default Ubuntu menu entry at the beginning of
the grub2 menu.

If /etc/default/grub is updated to include the following entry, it should change the sort order:
# Set xanmod1 as the preferred flavour for the default Ubuntu menu entry
GRUB_FLAVOUR_ORDER="xanmod1 generic"

Unfortunately, there is a trivial bug in method version_test_gt() in
/usr/share/grub/grub-mkconfig_lib that prevents this from working. I
have attached a patch that corrects it.

Once the bug is fixed, the desired sort order is achieved and the
5.4.91-xanmod1 kernel is made the default Ubuntu menu entry.

$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
using custom appearance settings
Found background image: /usr/share/images/grub/Movie_TRON-Legacy_131740_1600x1200.tga
Found linux image: /boot/vmlinuz-5.4.91-xanmod1
Found initrd image: /boot/initrd.img-5.4.91-xanmod1
Found linux image: /boot/vmlinuz-5.4.89-xanmod1
Found initrd image: /boot/initrd.img-5.4.89-xanmod1
Found linux image: /boot/vmlinuz-5.8.0-38-generic
Found initrd image: /boot/initrd.img-5.8.0-38-generic
Found linux image: /boot/vmlinuz-5.8.0-36-generic
Found initrd image: /boot/initrd.img-5.8.0-36-generic

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: grub2
-- 
Fix for GRUB_FLAVOUR_ORDER in grub-mkconfig_lib
https://bugs.launchpad.net/bugs/1912970
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to grub2 in Ubuntu.



More information about the foundations-bugs mailing list