[Bug 1848856] Re: zfs on root fails with grub syntax error with multidisks pools

Darrin Burger aenigma1372 at gmail.com
Tue Nov 19 07:08:10 UTC 2019

I also tested the fix propossed by jpb in #21 and can confirm that it
worked for me as well.

You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.

  zfs on root fails with grub syntax error with multidisks pools

Status in grub2 package in Ubuntu:
  In Progress
Status in grubzfs-testsuite package in Ubuntu:
Status in grub2 source package in Eoan:
Status in grubzfs-testsuite source package in Eoan:
Status in grub2 source package in Focal:
  In Progress
Status in grubzfs-testsuite source package in Focal:

Bug 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/grub.cfg.new file attached.
  run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
  dpkg: error processing package linux-image-5.3.0-18-generic (--configure):
   installed linux-image-5.3.0-18-generic package post-installation script subprocess returned error exit status 1
  Errors were encountered while processing:

  The system used https://github.com/zfsonlinux/zfs/wiki/Ubuntu-18.04
  -Root-on-ZFS to add zfs on root to a 19.04 system.

  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.d/10_linux_zfs which is dated October 11.  I attempted the
  upgrade on 10/18 and have done multiple updates to get the latest
  kernel and remove old kernels prior to the upgrade.  So, I believe the
  problem is with one of the upgrade modules.

To manage notifications about this bug go to:

More information about the Ubuntu-sponsors mailing list