update-grub produces broken grub.cfg with ZFS mirror volume

Bug #1582811 reported by Will Rouesnel on 2016-05-17
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Medium
Unassigned
Xenial
Medium
Unassigned
Bionic
Medium
Unassigned
Disco
Medium
Unassigned
Eoan
Medium
Unassigned
Focal
Medium
Unassigned

Bug Description

When running update-grub on Xenial with an mirrored ZFS root, broken grub.cfg files are consistently produced due to the root= line being formatted with block devices and a newline inserted.

Specifically I get a line like so:
 linux /ROOT/mint-13@/boot/vmlinuz-4.6.0-040600-generic root=/dev/sdj1
/dev/sdi3 ro nomdmonddf nomdmonisw

The newline is what's included.

Will Rouesnel (w-rouesnel) wrote :
Will Rouesnel (w-rouesnel) wrote :

The problem seems to be that grub-mkconfig doesn't account for grub-probe producing a multiple lines of output with a ZFS root device:

/usr/sbin/grub-probe --target=device /
/dev/sdj1
/dev/sdi3

Launchpad Janitor (janitor) wrote :

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

Changed in grub2 (Ubuntu):
status: New → Confirmed
Nick Niehoff (nniehoff) wrote :

In Eoan a workaround for this seems to be to add head -1 to the following line of /etc/grub.d/10_linux_zfs:

initrd_device=$(${grub_probe} --target=device "${boot_dir}")

to

initrd_device=$(${grub_probe} --target=device "${boot_dir}" | head -1)

This limits the initrd devices to 1, this is only a workaround for this bug

Dan Streetman (ddstreet) on 2019-10-24
Changed in grub2 (Ubuntu Eoan):
status: New → Confirmed
Changed in grub2 (Ubuntu Disco):
status: New → Confirmed
Changed in grub2 (Ubuntu Bionic):
status: New → Confirmed
Changed in grub2 (Ubuntu Xenial):
status: New → Confirmed
Changed in grub2 (Ubuntu Focal):
importance: Undecided → High
Changed in grub2 (Ubuntu Eoan):
importance: Undecided → High
Changed in grub2 (Ubuntu Bionic):
importance: Undecided → High
Changed in grub2 (Ubuntu Disco):
importance: Undecided → High
Changed in grub2 (Ubuntu Xenial):
importance: Undecided → High
Changed in grub2 (Ubuntu Eoan):
importance: High → Medium
Changed in grub2 (Ubuntu Focal):
importance: High → Medium
Changed in grub2 (Ubuntu Bionic):
importance: High → Medium
Changed in grub2 (Ubuntu Xenial):
importance: High → Medium
Changed in grub2 (Ubuntu Disco):
importance: High → Medium
HARI NARAYAN MAHTO (hnm555) wrote :

install ubuntu. then run boot-repair in terminal to fix this via liveusb then try to reboot system. i fixed this and now i'm able to boot into ubuntu 20.04.

Steve Langasek (vorlon) on 2020-07-02
Changed in grub2 (Ubuntu Disco):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers