/etc/grub.d/10_linux_zfs doesn't add savedefault

Bug #1850202 reported by Deltik
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
High
Jean-Baptiste Lallement
Eoan
Won't Fix
High
Jean-Baptiste Lallement
Focal
Fix Released
High
Jean-Baptiste Lallement

Bug Description

[Impact]
Ubuntu's ZFS boot support (`/etc/grub.d/10_linux_zfs`) does not add the `savedefault` command to non-recovery entries. This differs from the `/etc/grub.d/10_linux` (without ZFS) behavior, which adds `savedefault` to non-recovery entries.

[Test Case]
1. On a system that has a ZFS root (e.g. one installed with zsys), run `sudo update-grub`.

2. See that there are no mentions of `savedefault` in the relevant generated section:

    sed -n '/^### BEGIN \/etc\/grub\.d\/10_linux_zfs ###$/,/^### END \/etc\/grub\.d\/10_linux_zfs ###$/p;/^### END \/etc\/grub\.d\/10_linux_zfs ###$/q' /boot/grub/grub.cfg | grep savedefault

If this bug is fixed, the command above will return an output that has the string "savedefault".

[Regression Potential]
The patch makes the `/etc/grub.d/10_linux_zfs` logic for adding the `savedefault` command the same as that of `/etc/grub.d/10_linux`. It is a behavioral change but restores consistency with the non-ZFS Linux entry generator. The change should only affect those using the `GRUB_SAVEDEFAULT=true` and `GRUB_DEFAULT=saved` options in `/etc/default/grub`.

Tags: patch eoan zfs
Revision history for this message
Deltik (deltik) wrote :
tags: added: zfs
Changed in grub2 (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in grub2 (Ubuntu Focal):
assignee: nobody → Jean-Baptiste Lallement (jibel)
no longer affects: grubzfs-testsuite (Ubuntu)
no longer affects: grubzfs-testsuite (Ubuntu Focal)
Changed in grub2 (Ubuntu Eoan):
importance: Undecided → Medium
importance: Medium → High
status: New → Triaged
Changed in grub2 (Ubuntu Focal):
status: Triaged → In Progress
Changed in grub2 (Ubuntu Eoan):
assignee: nobody → Jean-Baptiste Lallement (jibel)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
grub2 (2.04-1ubuntu14) focal; urgency=medium

  * debian/patches/ubuntu-zfs-enhance-support.patch:
    - Handle the case where grub-probe returns several devices for a single
      pool (LP: #1848856). Thanks jpb for the report and the proposed patch.
    - Add savedefault to non-recovery entries (LP: #1850202). Thanks Deltik
      for the patch.
    - Do not crash on invalid fstab and report the invalid entry.
      (LP: #1849347) Thanks Deltik for the patch.
    - When a pool fails to import, catch and display the error message and
      continue with other pools. Import all the pools in readonly mode so we
      can import other pools with unsupported features (LP: #1848399) Thanks
      satmandu for the investigation and the proposed patch

 -- Jean-Baptiste Lallement <email address hidden> Mon, 18 Nov 2019 11:22:43 +0100

Changed in grub2 (Ubuntu Focal):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

The Eoan Ermine has reached end of life, so this bug will not be fixed for that release

Changed in grub2 (Ubuntu Eoan):
status: Triaged → Won't Fix
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.