Grub 2.12~rc1-4ubuntu2 with ZFS will not list any boot entries

Bug #2033256 reported by Danilo Egea Gondolfo
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Critical
Julian Andres Klode
Mantic
Fix Released
Critical
Julian Andres Klode

Bug Description

After upgrading to the new grub the boot menu only contains the memtest86 entries.

It can be easily reproduced by installing the system with ZFS (either plain ZFS or with encryption) using the latest desktop legacy image https://cdimage.ubuntu.com/daily-legacy/current/. After installation the system will boot straight into memtest86 (because that's the only thing in the menu).

For people facing the same issue, you can boot your system manually from grub with this:

set root=(hd0,gptX)
linux /BOOT/ubuntu_nedhsb/@/vmlinuz root=ZFS=rpool/ROOT/ubuntu_nedhsb boot=zfs
initrd /BOOT/ubuntu_nedhsb/@/initrd.img
boot

Steve Langasek (vorlon)
Changed in grub2 (Ubuntu):
importance: Undecided → Critical
tags: added: foundations-todo
Changed in grub2 (Ubuntu Mantic):
assignee: nobody → Julian Andres Klode (juliank)
Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Here is what I get from update-grub2:

$ sudo update-grub2

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/10_linux_zfs: 229: version_sort_sort_has_v: parameter not set
Warning: didn't find any valid initrd or kernel.
Found memtest86+ 64bit EFI image: /BOOT/ubuntu_nedhsb@/memtest86+x64.efi
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Is version_sort_sort_has_v missing initialization somewhere? https://git.launchpad.net/ubuntu/+source/grub2/tree/util/grub-mkconfig_lib.in?id=06f86533332124471075e20d139ceb97ce7a655b#n205

I initialized it to "yes" before calling the function version_sort and it generated the list.

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

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

This bug was fixed in the package grub2 - 2.12~rc1-4ubuntu3

---------------
grub2 (2.12~rc1-4ubuntu3) mantic; urgency=medium

  * zfs: Drop `set -u`, incompatible with undefined variables in library
    (LP: #2033256)

 -- Julian Andres Klode <email address hidden> Tue, 29 Aug 2023 16:03:49 +0200

Changed in grub2 (Ubuntu Mantic):
status: Fix Committed → Fix Released
Benjamin Drung (bdrung)
tags: removed: foundations-todo
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.