[Bug 1848856] Re: Upgrade from 19.04 to 19.10 with zfs on root fails with grub syntax error
jpb
1848856 at bugs.launchpad.net
Sat Oct 19 16:15:05 UTC 2019
I modified 10_linux_zfs to comment out the set -e and add the variables
for pkgdatadir and the GRUB* variables from /etc/default/grub and ran it
to see the output.
Notice at the end the double brace, lack of initrd value and linux image
even though it was found at the beginning when it correctly identified
the root dataset.
jpb at explorer:~/test$ sudo ./10_linux_zfs
Found linux image: vmlinuz-5.0.0-29-generic in rpool/ROOT/ubuntu
Found initrd image: initrd.img-5.0.0-29-generic in rpool/ROOT/ubuntu
Found linux image: vmlinuz-5.0.0-31-generic in rpool/ROOT/ubuntu
Found initrd image: initrd.img-5.0.0-31-generic in rpool/ROOT/ubuntu
Found linux image: vmlinuz-5.0.0-32-generic in rpool/ROOT/ubuntu
Found initrd image: initrd.img-5.0.0-32-generic in rpool/ROOT/ubuntu
Found linux image: vmlinuz-5.3.0-18-generic in rpool/ROOT/ubuntu
Found initrd image: initrd.img-5.3.0-18-generic in rpool/ROOT/ubuntu
Found linux image: vmlinuz-5.0.0-23-generic in rpool/ROOT/ubuntu at pyznap_2019-08-18_14:11:36_monthly
Found initrd image: initrd.img-5.0.0-23-generic in rpool/ROOT/ubuntu at pyznap_2019-08-18_14:11:36_monthly
********** removed a ton of snapshots that were listed which found the
linux image and initrd image. *****************
Found linux image: vmlinuz-5.3.0-18-generic in rpool/ROOT/ubuntu at apt2019-10-19_08.52.43--1w
Found initrd image: initrd.img-5.3.0-18-generic in rpool/ROOT/ubuntu at apt2019-10-19_08.52.43--1w
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=1
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu 19.10' --class ubuntu --class gnu-linux --class gnu --class os ${menuentry_id_option} 'gnulinux-rpool/ROOT/ubuntu-' {
recordfail
load_video
gfxmode ${linux_gfx_mode}
insmod gzio
if [ "${grub_platform}" = xen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod zfs
set root='hd2,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt1 --hint-efi=hd2,gpt1 --hint-baremetal=ahci2,gpt1 ba04856b80ac4244
else
search --no-floppy --fs-uuid --set=root ba04856b80ac4244
fi
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
}
}
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
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:
New
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
More information about the foundations-bugs
mailing list