zfs on root fails with grub syntax error with multidisks pools
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Fix Released
|
Medium
|
Jean-Baptiste Lallement | ||
Focal |
Fix Released
|
Medium
|
Jean-Baptiste Lallement | ||
grubzfs-testsuite (Ubuntu) |
Fix Released
|
Medium
|
Jean-Baptiste Lallement | ||
Focal |
Fix Released
|
Medium
|
Jean-Baptiste Lallement |
Bug Description
[Description]
When a pool is created on several devices like cache and log on separate devices, mirror or raidz. When grub-probe queries the target to report the device attached to the boot directory, it reports all the devices that make the pool, one by line. The result is an error in 10_linux_zfs that generates an invalid grub configuration file. Only the case 1 pool = 1 device was considered
[Test Case]
1. Create a mirrored pool
$ zpool create mirror /dev/Xda1 /dev/Xda2
2. run update-grub
Expected result:
grub configuration is generated successfully.
Actual result:
The generated grub configuration file is incomplete and its syntax is invalid
[Regression Potential]
Low. The patch takes the first device returned by grub-probe which is the first device of data of the mirror.
[Original Description]
At the end of the upgrade from 19.04 to 19.10, the post process of the update-grub reports:
Syntax error at line 185
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/
run-parts: /etc/kernel/
dpkg: error processing package linux-image-
installed linux-image-
Errors were encountered while processing:
friendly-recovery
grub-efi-amd64
grub-efi
grub-efi-
shim-signed
linux-
The system used https:/
The syntax error in grub.cfg.new is an extra } on line 185. However, comparing the grub.cfg.new to the previously generated grub.cfg under 19.04, there is a significant quantity of configuration missing.
Manually running update-grub generates the same error. /etc/default/grub is the only file changed from default installation to include zswap. This file was not changed prior to upgrade.
The error is reported during the processing of /etc/grub.
tags: | added: rls-ff-incoming |
Changed in grub2 (Ubuntu): | |
importance: | Undecided → Medium |
Changed in grub2 (Ubuntu): | |
status: | Confirmed → Triaged |
assignee: | nobody → Jean-Baptiste Lallement (jibel) |
Changed in grub2 (Ubuntu Focal): | |
status: | Triaged → Fix Released |
Changed in grub2 (Ubuntu Focal): | |
status: | Fix Released → Triaged |
status: | Triaged → In Progress |
summary: |
- Upgrade from 19.04 to 19.10 with zfs on root fails with grub syntax - error + zfs on root fails with grub syntax error with multidisk pools |
Changed in grub2 (Ubuntu Eoan): | |
importance: | Undecided → Medium |
Changed in grubzfs-testsuite (Ubuntu Eoan): | |
importance: | Undecided → Medium |
Changed in grubzfs-testsuite (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in grub2 (Ubuntu Eoan): | |
assignee: | nobody → Jean-Baptiste Lallement (jibel) |
Changed in grubzfs-testsuite (Ubuntu Eoan): | |
assignee: | nobody → Jean-Baptiste Lallement (jibel) |
Changed in grubzfs-testsuite (Ubuntu Focal): | |
assignee: | nobody → Jean-Baptiste Lallement (jibel) |
Changed in grub2 (Ubuntu Eoan): | |
status: | New → Triaged |
Changed in grubzfs-testsuite (Ubuntu Eoan): | |
status: | New → Triaged |
Changed in grubzfs-testsuite (Ubuntu Focal): | |
status: | New → Triaged |
summary: |
- zfs on root fails with grub syntax error with multidisk pools + zfs on root fails with grub syntax error with multidisks pools |
description: | updated |
Looking closer at the 19.04 grub.cfg and the post19.10 grub.cfg.new I see that the 19.04 version of update-grub was using 10_linux instead of 10_linux_zfs to generate the grub.cfg.new.