Generated grub.cfg is invalid when booting from ZFS with /boot on multiple physical devices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When updating to Ubuntu 19.10 from Ubuntu 18.10 setup according to the popular ZFS root howto at https:/
This happens because the /boot partition is physically located on multiple devices (due to the ZFS mirror configuration setup). This causes /etc/grub.
$> grub-probe --target=device /boot
/dev/sda2
/dev/sdb2
Because newlines are used as record separation character for the results printed by get_dataset_info() in bootlist(), this causes the detected record to be truncated early and any information that would have come after $initrd_device (initrd_list, kernel_list, last_booted_kernel) to be lost.
Replacing
initrd_
in line 415 with
initrd_
seems to solve this issue.
Since the root-on-ZFS howto linked above is the defacto standard, this likely affects everybody using ZFS upgrading to 19.10.
ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: grub-common 2.04-1ubuntu12.1
ProcVersionSign
Uname: Linux 5.3.0-42-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu8.5
Architecture: amd64
CurrentDesktop: GNOME
Date: Wed Mar 18 12:10:39 2020
SourcePackage: grub2
UpgradeStatus: Upgraded to eoan on 2020-03-17 (0 days ago)
modified.
mtime.conffile.
mtime.conffile.
Possible duplicate of 1855605.