Specify flavour ordering

Bug #1882663 reported by Julian Andres Klode
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Eoan
Won't Fix
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
We need to be able to override the preferred kernel flavour, examples being:

- OEM metapackages need to set the kernel flavour to oem, and later to generic (e.g. when transitioning from 6.0-1000-oem to 6.0-1-generic)

- FIPS kernels might cause a downgrade compared to an HWE kernel, but if you enable FIPS and reboot, you want to be booting a FIPS kernel

[Regression potential]
The change affects the ordering of kernels inside grub, hence a regression could be that we end up with the wrong order of kernels.

[Test case]
Install two flavours, add flavour name with lower version to /etc/default/grub.d/somefilename

Related branches

Changed in grub2 (Ubuntu Groovy):
status: New → In Progress
tags: added: id-5dcc8f73df19e54dc1987bdf
summary: - Speicify flavour ordering
+ Specify flavour ordering
Revision history for this message
Julian Andres Klode (juliank) wrote :
Changed in grub2 (Ubuntu Groovy):
status: In Progress → Fix Committed
Changed in grub2 (Ubuntu Eoan):
status: New → Won't Fix
Revision history for this message
Julian Andres Klode (juliank) wrote :

groovy bileto: https://bileto.ubuntu.com/#/ticket/4093
focal bileto: https://bileto.ubuntu.com/#/ticket/4109

I'm denying this for eoan, as we're almost at the EOL, and this change is a bit too big to do that late in the cycle, and it's not relevant there anyway.

xenial and bionic still need to be done.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.04-1ubuntu28

---------------
grub2 (2.04-1ubuntu28) groovy; urgency=medium

  * Ensure that grub-multi-install can always find templates (LP: #1879948)
  * Fix changelog entries for security update

 -- Julian Andres Klode <email address hidden> Mon, 10 Aug 2020 15:07:29 +0200

Changed in grub2 (Ubuntu Groovy):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Julian, or anyone else affected,

Accepted grub2 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/grub2/2.04-1ubuntu26.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in grub2 (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (grub2/2.04-1ubuntu26.3)

All autopkgtests for the newly accepted grub2 (2.04-1ubuntu26.3) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-image/1.9+20.04ubuntu1 (arm64)
grubzfs-testsuite/0.4.10 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#grub2

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Changed in grub2 (Ubuntu Bionic):
status: New → Fix Committed
Changed in grub2 (Ubuntu Xenial):
status: New → Fix Committed
Changed in grub2 (Ubuntu Bionic):
status: Fix Committed → In Progress
Changed in grub2 (Ubuntu Xenial):
status: Fix Committed → Confirmed
status: Confirmed → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Julian, or anyone else affected,

Accepted grub2 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/grub2/2.02-2ubuntu8.18 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in grub2 (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Julian, or anyone else affected,

Accepted grub2 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/grub2/2.02~beta2-36ubuntu3.28 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in grub2 (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Julian Andres Klode (juliank) wrote :

Focal:

- Installed linux-image-oem-20.04
- Before: 5.6.0 oem kernel sorts higher in menu/grub.cfg than 5.4.0 generic kernel
- Upgrading grub to ubuntu26.3 does not change order
- Created /etc/default/grub.d/order.cfg with `GRUB_FLAVOUR_ORDER=generic`
- After: 5.4.0-*-generic now sorts higher in menu than 5.6.0-*-oem

OK

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Julian Andres Klode (juliank) wrote :

bionic:

- Installed linux-image-oem-osp1
- Upgraded grub to 18.8
- BEFORE: 5.4 generic HWE kernel sorts before 5.0 oem-osp1 kernel ✓
- Created /etc/default/grub.d/order.cfg with `GRUB_FLAVOUR_ORDER=generic`
- AFTER: 5.0 oem-osp1 kernel sorts before the 5.4 kernel ✓

Good.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Julian Andres Klode (juliank) wrote :

bionic: ✓

- Install linux-image-lowlatency
- BEFORE: 4.15 generic sorts higher in menu than 4.4 lowlatency ✓
- Created /etc/default/grub.d/order.cfg with `GRUB_FLAVOUR_ORDER=lowlatency`
- AFTER: 4.4 lowlatency preferred over 4.15 generic ✓

Revision history for this message
Julian Andres Klode (juliank) wrote :

Um, this was xenial and grub ubuntu3.28

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for grub2 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.04-1ubuntu26.3

---------------
grub2 (2.04-1ubuntu26.3) focal; urgency=medium

  * 2.04-1ubuntu27 and 2.04-1ubuntu28 folded together for focal
  * debian/patches/ubuntu-flavour-order.patch:
    - Add a (hidden) GRUB_FLAVOUR_ORDER setting that can mark certain kernel
      flavours as preferred, and specify an order between those preferred
      flavours (LP: #1882663)
  * debian/patches/ubuntu-zfs-enhance-support.patch:
    - Use version_find_latest for ordering kernels, so it also supports
      the GRUB_FLAVOUR_ORDER setting.
  * debian/patches/ubuntu-dont-verify-loopback-images.patch:
    - disk/loopback: Don't verify loopback images (LP: #1878541),
      Thanks to Chris Coulson for the patch
  * debian/patches/ubuntu-recovery-dis_ucode_ldr.patch
    - Pass dis_ucode_ldr to kernel for recovery mode (LP: #1831789)
  * debian/patches/ubuntu-add-initrd-less-boot-fallback.patch:
    - Merge changes from xnox to fix multiple initrds support (LP: #1878705)
  * debian/patches/ubuntu-clear-invalid-initrd-spacing.patch:
    - Remove, no longer needed thanks to xnox's patch
  * Ensure that grub-multi-install can always find templates (LP: #1879948)

 -- Julian Andres Klode <email address hidden> Mon, 17 Aug 2020 16:04:31 +0200

Changed in grub2 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02-2ubuntu8.18

---------------
grub2 (2.02-2ubuntu8.18) bionic; urgency=medium

  * debian/patches/ubuntu-flavour-order.patch:
    - Add a (hidden) GRUB_FLAVOUR_ORDER setting that can mark certain kernel
      flavours as preferred, and specify an order between those preferred
      flavours (LP: #1882663)
  * debian/patches/ubuntu-recovery-dis_ucode_ldr.patch:
    - Pass dis_ucode_ldr to kernel for recovery mode (LP: #1831789)

 -- Julian Andres Klode <email address hidden> Mon, 24 Aug 2020 10:45:45 +0200

Changed in grub2 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02~beta2-36ubuntu3.28

---------------
grub2 (2.02~beta2-36ubuntu3.28) xenial; urgency=medium

  * debian/patches/ubuntu-flavour-order.patch:
    - Add a (hidden) GRUB_FLAVOUR_ORDER setting that can mark certain kernel
      flavours as preferred, and specify an order between those preferred
      flavours (LP: #1882663)
  * debian/patches/ubuntu-recovery-dis_ucode_ldr.patch:
    - Pass dis_ucode_ldr to kernel for recovery mode (LP: #1831789)

 -- Julian Andres Klode <email address hidden> Mon, 24 Aug 2020 10:54:59 +0200

Changed in grub2 (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.