[Bug 1912970] Re: Fix for GRUB_FLAVOUR_ORDER in grub-mkconfig_lib

Julian Andres Klode 1912970 at bugs.launchpad.net
Mon Jan 25 07:56:52 UTC 2021


The attachment is not a patch. I can't read it. Please create one by
running diff -u or use git.

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

Title:
  Fix for GRUB_FLAVOUR_ORDER in grub-mkconfig_lib

Status in grub2 package in Ubuntu:
  New

Bug description:
  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1912970/+subscriptions



More information about the foundations-bugs mailing list