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

Bug #1582811 reported by Will Rouesnel
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Medium
Unassigned
Xenial
Confirmed
Medium
Unassigned
Bionic
Confirmed
Medium
Unassigned
Disco
Won't Fix
Medium
Unassigned
Eoan
Won't Fix
Medium
Unassigned
Focal
Confirmed
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.

Revision history for this message
Will Rouesnel (w-rouesnel) wrote :
Revision history for this message
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

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
Revision history for this message
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)
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
Revision history for this message
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)
Changed in grub2 (Ubuntu Disco):
status: Confirmed → Won't Fix
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: Confirmed → 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.