[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
Sun Oct 20 04:44:13 UTC 2019
Yes, my rpool is mirrored.
pool: rpool
state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(5) for details.
scan: scrub repaired 0B in 0 days 05:45:25 with 0 errors on Sun Oct 13 06:09:31 2019
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
wwn-0x5000cca24ce19a84-part1 ONLINE 0 0 0
wwn-0x5000c5004e60c802-part1 ONLINE 0 0 0
logs
nvme-eui.00000000010000004ce00018dd8c9084-part2 ONLINE 0 0 0
cache
nvme0n1p4 ONLINE 0 0 0
errors: No known data errors
In 10_linux_zfs, there is an if statement that echos data:
if [ -n "${initrd_list}" -a -n "${kernel_list}" ]; then
echo "${dataset}\t${is_zsys}\t${machine_id}\t${pretty_name}\t${last_used}\t${initrd_device}\t${initrd_list}\t${kernel_list}\t${last_booted_kernel}"
else
grub_warn "didn't find any valid initrd or kernel."
fi
The problem is that execution time, the last 3 parameters are dropped
even though they have data.
+ [ -n /ROOT/ubuntu@/boot/initrd.img-5.3.0-18-generic|/ROOT/ubuntu@/boot/initrd.img-5.0.0-32-generic|/ROOT/ubuntu@/boot/initrd.img-5.0.0-31-generic|/ROOT/ubuntu@/boot/initrd.img-5.0.0-29-generic -a -n /ROOT/ubuntu@/boot/vmlinuz-5.3.0-18-generic|/ROOT/ubuntu@/boot/vmlinuz-5.0.0-32-generic|/ROOT/ubuntu@/boot/vmlinuz-5.0.0-31-generic|/ROOT/ubuntu@/boot/vmlinuz-5.0.0-29-generic ]
+ echo rpool/ROOT/ubuntu\t-\t6d41e97f07794e0b9d409db9a99529a5\tUbuntu 19.10\t1571542278\t/dev/sdc1
You can see from the expanded debug of the run (set -xv) that both
initrd_list and kernel_list had data that included the kernel and initrd
but within the if, it gets dropped. That is causing the generated
grub.cfg.new to be missing the kernel, initrd, and the advanced submenu
items that would normally be generated.
--
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