[Bug 1990143] Re: grub-common update broke zfs root boots
satmandu
1990143 at bugs.launchpad.net
Mon Sep 19 13:29:10 UTC 2022
--- 10_linux_zfs.working 2022-09-19 09:28:36.280002568 -0400
+++ 10_linux_zfs.broken 2022-09-19 09:28:14.093006608 -0400
@@ -529,11 +529,15 @@ get_dataset_info() {
umount "${mntdir}" || true
# We needed to look in / for snapshots on root dataset, umount the snapshot for etc before zfs lazily unmount it
- case "${etc_dir}" in /.zfs/snapshot/*/etc)
- snapshot_path="$(findmnt -n -o TARGET -T "${etc_dir}")"
- umount "${snapshot_path}" || true
- ;;
- esac
+ # This process only needs to run if the snapshot contains an .../etc path,
+ # otherwise the build process may silently fail and produce no kernel lines in grub.cfg
+ if [ -e "${etc_dir}" ]; then
+ case "${etc_dir}" in /.zfs/snapshot/*/etc)
+ snapshot_path="$(findmnt -n -o TARGET -T "${etc_dir}")"
+ umount "${snapshot_path}" || true
+ ;;
+ esac
+ fi
}
# Scan available boot options and returns in a formatted list
@@ -1128,7 +1132,3 @@ case "${GRUB_LINUX_ZFS_TEST}" in
grub_menu="$(generate_grub_menu "${menu_metadata}")"
if [ -n "${grub_menu}" ]; then
# We want the trailing newline as a marker will be added
- echo "${grub_menu}"
- fi
- ;;
--
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/1990143
Title:
grub-common update to 2.06-2ubuntu11 broke zfs root boots
Status in grub2 package in Ubuntu:
New
Bug description:
Running update-grub after updating to grub-common (2.06-2ubuntu11)
causes this issue:
sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/10_linux_zfs: 1135: Syntax error: end of file unexpected (expecting "fi")
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
This leads to a grub prompt at boot.
Reverting to grub-common (2.06-2ubuntu7) fixes the issue:
sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: vmlinuz-6.0.0-rc6 in rpool/ROOT/ubuntu_s2a3h5
Found initrd image: initrd.img-6.0.0-rc6 in rpool/ROOT/ubuntu_s2a3h5
Found linux image: vmlinuz-6.0.0-rc5 in rpool/ROOT/ubuntu_s2a3h5
Found initrd image: initrd.img-6.0.0-rc5 in rpool/ROOT/ubuntu_s2a3h5
Found linux image: vmlinuz-5.19.1 in rpool/ROOT/ubuntu_s2a3h5
Found initrd image: initrd.img-5.19.1 in rpool/ROOT/ubuntu_s2a3h5
Found linux image: vmlinuz-5.19.0-17-generic in rpool/ROOT/ubuntu_s2a3h5
Found initrd image: initrd.img-5.19.0-17-generic in rpool/ROOT/ubuntu_s2a3h5
Found linux image: vmlinuz-5.19.0-16-generic in rpool/ROOT/ubuntu_s2a3h5
Found initrd image: initrd.img-5.19.0-16-generic in rpool/ROOT/ubuntu_s2a3h5
Found linux image: vmlinuz-5.15.0-18-generic in rpool/ROOT/ubuntu_s2a3h5 at autozsys_1yhf2b
Found initrd image: initrd.img-5.15.0-18-generic in rpool/ROOT/ubuntu_s2a3h5 at autozsys_1yhf2b
Found linux image: vmlinuz-5.15.0-18-generic in rpool/ROOT/ubuntu_s2a3h5 at autozsys_0no5ee
Found initrd image: initrd.img-5.15.0-18-generic in rpool/ROOT/ubuntu_s2a3h5 at autozsys_0no5ee
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: grub-common 2.06-2ubuntu11
Uname: Linux 6.0.0-rc6 x86_64
NonfreeKernelModules: wl zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.23.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Mon Sep 19 09:22:41 2022
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.grub.d.40_custom: 2022-03-01T21:57:38.749768
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1990143/+subscriptions
More information about the foundations-bugs
mailing list