Comment 17 for bug 1848856

Revision history for this message
jpb (jbrown10) wrote : Re: [Bug 1848856] Re: Upgrade from 19.04 to 19.10 with zfs on root fails with grub syntax error

Hi Rex - you essentially removed the line that set at_least_one_entry=1.
Yes, that removes an extra "}" but if you look at the generated script, the
linux line specifies no kernel image and the initrd line includes no file.
This will result in an unbootable system.

 linux root=ZFS=rpool/ROOT/ubuntu ro intel_iommu=on iommu=pt quiet splash
intel_iommu=on iommu=pt rootdelay=3 zswap.enabled=1 zswap.compressor=lz4
zswap.zpool=z3fold ${vt_handoff}
initrd
}

So, I believe the problem is deeper than a simple syntax error, there is
content missing. Additionally, when you look at the debug output you'll
see there were other kernels installed which should have gone under a
submenu. Content is being truncated or not carried through. This might be
a dash problem -- I can't tell.

But to remove the extra "}" does not resolve the issue.
Thanks,
Jeff

On Sun, Oct 20, 2019 at 9:35 AM Rex Tsai <email address hidden> wrote:

> I believe the invalid grub menu is caused by wrong "}", when there is
> only a main section.
>
> ** Patch added: "1848856.debdiff"
>
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1848856/+attachment/5298611/+files/1848856.debdiff
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1848856
>
> Title:
> Upgrade from 19.04 to 19.10 with zfs on root fails with grub syntax
> error
>
> Status in grub2 package in Ubuntu:
> Confirmed
>
> Bug 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:
> friendly-recovery
> grub-efi-amd64
> grub-efi
> grub-efi-amd64-signed
> shim-signed
> linux-image-5.3.0-18-generic
>
> 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:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1848856/+subscriptions
>