[regression-in-stable] grub-multi-install fails with exit 1 when question grub-efi/install_devices_empty is skipped
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| grub2 (Ubuntu) |
Undecided
|
Unassigned | ||
| Bionic |
Undecided
|
Unassigned | ||
| Focal |
Undecided
|
Unassigned | ||
| Groovy |
Undecided
|
Unassigned |
Bug Description
[Impact]
* When both grub-pc & grub-efi-*-signed are installed, it is ok for one of them to not install onto any devices and mark install_
* In such cases, the recently SRUed postinst will behave incorrectly upon reconfigure, instead demanding user to install both types of bootloaders somewhere.
* Error can only be triggered by abandonned grub-pc install, as grub-multi-install validates install_devices values and resets configuration logic.
[Test Case]
* Install in efi mode. Ensure that grub-pc is installed, configure debconf to have seen grub-pc/
* Attempt reconfigure of grub-pc, it should be successful.
All this can be done in chroot as follows:
mkdir -p /boot/grub/i386-pc
touch /boot/grub/
dpkg-reconfigure grub-pc
(answer defaults, and choose to not install GRUB to any devices)
Then:
dpkg-reconfigure -u grub-pc
should succed, with exit code 0, when this bug is fixed. The current broken packages return exit code 1.
* Populate grub-efi/
[Regression Potential]
* This partially revert previous update which made that code path error out. One too many error paths got added by xnox. The other bug, to ensure when installing onto missing devices noninteractively the package configure fails is still being check for (test #3).
[Other Info]
* original bug report
A 20.04 machine with grub-efi-
"""
dpkg: error processing package grub-efi-
installed grub-efi-
"""
unfortunately not much more context was provided. After some debugging it turns out that there are the following lines in /usr/lib/
"""
db_get "$question"
if [ -z "$RET" ]; then
# Reset the seen flag if the current answer is false, since
# otherwise we'll loop with no indication of why.
db_get grub-efi/
if [ "$RET" = false ]; then
db_fset grub-efi/
fi
if db_input critical grub-efi/
db_go
db_get grub-efi/
if [ "$RET" = true ]; then
break
else
db_fset "$question" seen false
db_fset grub-efi/
fi
else
exit 1 # noninteractive
fi
"""
when grub-efi/
if db_input critical grub-efi/
will return "30" if the question was already shown but the rfset eset happens only if the anser was "false" earlier. So the code jumps to "exit 1".
So either the code need to always reset the seen flag ( db_fset grub-efi/
I can provide a /var/cache/
Related branches
- Ubuntu Core Development Team: Pending requested 2020-10-27
-
Diff: 43648 lines (+27070/-3040)374 files modifiedINSTALL (+2/-20)
Makefile.am (+3/-0)
Makefile.util.def (+7/-0)
configure.ac (+12/-2)
debian/.git-dpm (+2/-2)
debian/build-efi-images (+9/-4)
debian/canonical-uefi-ca.crt (+25/-0)
debian/changelog (+1029/-0)
debian/control (+10/-6)
debian/gettext-patches/0001-Support-POTFILES-shell.patch (+54/-0)
debian/gettext-patches/0002-Handle-gettext_printf-shell-function.patch (+46/-0)
debian/gettext-patches/0003-Make-msgfmt-output-in-little-endian.patch (+34/-0)
debian/gettext-patches/0004-Use-SHELL-rather-than-bin-sh.patch (+26/-0)
debian/grub-check-signatures (+129/-0)
debian/grub-common.dirs (+1/-0)
debian/grub-common.install.in (+4/-0)
debian/grub-common.service (+14/-0)
debian/grub-common.templates (+53/-0)
debian/grub-multi-install (+417/-0)
debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch (+26/-0)
debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch (+86/-0)
debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch (+118/-0)
debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch (+25/-0)
debian/patches/0081-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch (+66/-0)
debian/patches/0082-safemath-Add-some-arithmetic-primitives-that-check-f.patch (+120/-0)
debian/patches/0083-calloc-Make-sure-we-always-have-an-overflow-checking.patch (+239/-0)
debian/patches/0084-calloc-Use-calloc-at-most-places.patch (+1833/-0)
debian/patches/0085-malloc-Use-overflow-checking-primitives-where-we-do-.patch (+1319/-0)
debian/patches/0086-iso9660-Don-t-leak-memory-on-realloc-failures.patch (+65/-0)
debian/patches/0087-font-Do-not-load-more-than-one-NAME-section.patch (+34/-0)
debian/patches/0088-gfxmenu-Fix-double-free-in-load_image.patch (+32/-0)
debian/patches/0089-lzma-Make-sure-we-don-t-dereference-past-array.patch (+48/-0)
debian/patches/0090-tftp-Do-not-use-priority-queue.patch (+279/-0)
debian/patches/0091-script-Remove-unused-fields-from-grub_script_functio.patch (+29/-0)
debian/patches/0092-script-Avoid-a-use-after-free-when-redefining-a-func.patch (+104/-0)
debian/patches/0093-hfsplus-fix-two-more-overflows.patch (+53/-0)
debian/patches/0094-lvm-fix-two-more-potential-data-dependent-alloc-over.patch (+98/-0)
debian/patches/0095-efi-fix-some-malformed-device-path-arithmetic-errors.patch (+247/-0)
debian/patches/0096-linuxefi-fail-kernel-validation-without-shim-protoco.patch (+90/-0)
debian/patches/0097-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch (+84/-0)
debian/patches/0098-efi-Fix-use-after-free-in-halt-reboot-path.patch (+175/-0)
debian/patches/0099-chainloader-Avoid-a-double-free-when-validation-fail.patch (+42/-0)
debian/patches/0100-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch (+146/-0)
debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch (+334/-0)
debian/patches/0102-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch (+42/-0)
debian/patches/0103-linux-loader-avoid-overflow-on-initrd-size-calculati.patch (+25/-0)
debian/patches/0104-linux-Fix-integer-overflows-in-initrd-size-handling.patch (+165/-0)
debian/patches/0105-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch (+50/-0)
debian/patches/at_keyboard-module-init.patch (+2/-2)
debian/patches/bash-completion-drop-have-checks.patch (+2/-2)
debian/patches/blacklist-1440x900x32.patch (+2/-2)
debian/patches/bootp-new-net_bootp6-command.patch (+4/-4)
debian/patches/bootp-process-dhcpack-http-boot.patch (+3/-3)
debian/patches/cherrypick-lsefisystab-define-smbios3.patch (+45/-0)
debian/patches/cherrypick-lsefisystab-show-dtb.patch (+40/-0)
debian/patches/cherrypick-smbios-module.patch (+771/-0)
debian/patches/core-in-fs.patch (+1/-1)
debian/patches/default-grub-d.patch (+3/-3)
debian/patches/disable-floppies.patch (+1/-1)
debian/patches/dpkg-version-comparison.patch (+1/-1)
debian/patches/efi-variable-storage-minimise-writes.patch (+19/-19)
debian/patches/efinet-set-dns-from-uefi-proto.patch (+3/-3)
debian/patches/efinet-set-network-from-uefi-devpath.patch (+3/-3)
debian/patches/efinet-uefi-ipv6-pxe-support.patch (+3/-3)
debian/patches/gettext-quiet.patch (+2/-2)
debian/patches/gfxpayload-dynamic.patch (+88/-9)
debian/patches/gfxpayload-keep-default.patch (+23/-7)
debian/patches/grub-install-backup-and-restore.patch (+175/-0)
debian/patches/grub-install-pvxen-paths.patch (+4/-4)
debian/patches/grub-legacy-0-based-partitions.patch (+1/-1)
debian/patches/grub.cfg-400.patch (+1/-1)
debian/patches/ieee1275-clear-reset.patch (+2/-2)
debian/patches/ignore-grub_func_test-failures.patch (+2/-2)
debian/patches/insmod-xzio-and-lzopio-on-xen.patch (+18/-5)
debian/patches/install-efi-fallback.patch (+2/-2)
debian/patches/install-efi-ubuntu-flavours.patch (+2/-2)
debian/patches/install-locale-langpack.patch (+2/-2)
debian/patches/install-powerpc-machtypes.patch (+7/-7)
debian/patches/install-stage2-confusion.patch (+2/-2)
debian/patches/maybe-quiet.patch (+50/-15)
debian/patches/mkconfig-loopback.patch (+4/-4)
debian/patches/mkconfig-mid-upgrade.patch (+2/-2)
debian/patches/mkconfig-nonexistent-loopback.patch (+3/-3)
debian/patches/mkconfig-other-inits.patch (+5/-5)
debian/patches/mkconfig-recovery-title.patch (+45/-10)
debian/patches/mkconfig-signed-kernel.patch (+48/-8)
debian/patches/mkconfig-ubuntu-distributor.patch (+25/-4)
debian/patches/mkconfig-ubuntu-recovery.patch (+58/-10)
debian/patches/mkrescue-efi-modules.patch (+2/-2)
debian/patches/net-read-bracketed-ipv6-addr.patch (+5/-5)
debian/patches/no-devicetree-if-secure-boot.patch (+3/-3)
debian/patches/no-insmod-on-sb.patch (+4/-4)
debian/patches/olpc-prefix-hack.patch (+1/-1)
debian/patches/ppc64el-disable-vsx.patch (+2/-2)
debian/patches/probe-fusionio.patch (+3/-3)
debian/patches/quick-boot-lvm.patch (+2/-2)
debian/patches/quick-boot.patch (+34/-10)
debian/patches/restore-mkdevicemap.patch (+7/-7)
debian/patches/series (+58/-5)
debian/patches/skip-grub_cmd_set_date.patch (+2/-2)
debian/patches/sleep-shift.patch (+3/-3)
debian/patches/ubuntu-add-devicetree-command-support.patch (+52/-0)
debian/patches/ubuntu-add-initrd-less-boot-fallback.patch (+213/-0)
debian/patches/ubuntu-add-initrd-less-boot-messages.patch (+56/-0)
debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch (+69/-0)
debian/patches/ubuntu-dejavu-font-path.patch (+25/-0)
debian/patches/ubuntu-dont-verify-loopback-images.patch (+37/-0)
debian/patches/ubuntu-efi-allow-loopmount-chainload.patch (+127/-0)
debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch (+197/-0)
debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch (+30/-0)
debian/patches/ubuntu-flavour-order.patch (+61/-0)
debian/patches/ubuntu-grub-install-extra-removable.patch (+64/-38)
debian/patches/ubuntu-install-signed.patch (+33/-30)
debian/patches/ubuntu-linuxefi-arm64.patch (+185/-0)
debian/patches/ubuntu-linuxefi.patch (+2795/-0)
debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch (+29/-0)
debian/patches/ubuntu-recovery-dis_ucode_ldr.patch (+84/-0)
debian/patches/ubuntu-resilient-boot-boot-order.patch (+231/-0)
debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch (+208/-0)
debian/patches/ubuntu-shorter-version-info.patch (+41/-0)
debian/patches/ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch (+59/-0)
debian/patches/ubuntu-speed-zsys-history.patch (+158/-0)
debian/patches/ubuntu-support-initrd-less-boot.patch (+107/-0)
debian/patches/ubuntu-temp-keep-auto-nvram.patch (+39/-0)
debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch (+56/-0)
debian/patches/ubuntu-zfs-enhance-support.patch (+1031/-0)
debian/patches/uefi-firmware-setup.patch (+4/-4)
debian/patches/uefi-secure-boot-cryptomount.patch (+3/-3)
debian/patches/vsnprintf-upper-case-hex.patch (+2/-2)
debian/patches/vt-handoff.patch (+70/-9)
debian/patches/wubi-no-windows.patch (+2/-2)
debian/patches/zpool-full-device-name.patch (+2/-2)
debian/po/ar.po (+99/-18)
debian/po/ast.po (+107/-18)
debian/po/be.po (+118/-18)
debian/po/bg.po (+119/-18)
debian/po/ca.po (+120/-18)
debian/po/cs.po (+118/-18)
debian/po/cy.po (+109/-18)
debian/po/da.po (+119/-18)
debian/po/de.po (+122/-18)
debian/po/dz.po (+107/-18)
debian/po/el.po (+120/-18)
debian/po/eo.po (+118/-18)
debian/po/es.po (+119/-18)
debian/po/eu.po (+118/-18)
debian/po/fa.po (+108/-18)
debian/po/fi.po (+118/-18)
debian/po/fr.po (+120/-18)
debian/po/gl.po (+108/-18)
debian/po/gu.po (+106/-18)
debian/po/he.po (+117/-18)
debian/po/hr.po (+118/-18)
debian/po/hu.po (+109/-18)
debian/po/id.po (+107/-18)
debian/po/is.po (+119/-18)
debian/po/it.po (+120/-18)
debian/po/ja.po (+119/-18)
debian/po/ka.po (+87/-18)
debian/po/kk.po (+119/-18)
debian/po/km.po (+106/-18)
debian/po/ko.po (+118/-18)
debian/po/lt.po (+118/-18)
debian/po/lv.po (+118/-18)
debian/po/mr.po (+117/-18)
debian/po/nb.po (+119/-18)
debian/po/nl.po (+120/-18)
debian/po/pl.po (+120/-18)
debian/po/pt.po (+120/-18)
debian/po/pt_BR.po (+120/-18)
debian/po/ro.po (+119/-18)
debian/po/ru.po (+118/-18)
debian/po/si.po (+106/-18)
debian/po/sk.po (+107/-18)
debian/po/sl.po (+118/-18)
debian/po/sq.po (+105/-18)
debian/po/sr.po (+107/-18)
debian/po/sr@latin.po (+107/-18)
debian/po/sv.po (+119/-18)
debian/po/ta.po (+106/-18)
debian/po/templates.pot (+87/-18)
debian/po/th.po (+117/-18)
debian/po/tr.po (+118/-18)
debian/po/ug.po (+119/-18)
debian/po/uk.po (+118/-18)
debian/po/vi.po (+119/-18)
debian/po/zh_CN.po (+105/-18)
debian/po/zh_TW.po (+116/-18)
debian/postinst.in (+80/-14)
debian/rules (+21/-6)
debian/signing-template.json.in (+0/-1)
debian/templates.in (+78/-8)
dev/null (+0/-550)
docs/grub.info (+13/-0)
docs/grub.texi (+88/-0)
grub-core/Makefile.am (+1/-0)
grub-core/Makefile.core.def (+24/-2)
grub-core/bus/usb/usbhub.c (+4/-4)
grub-core/commands/efi/lsefisystab.c (+4/-1)
grub-core/commands/efi/smbios.c (+61/-0)
grub-core/commands/efi/tpm.c (+8/-4)
grub-core/commands/i386/pc/smbios.c (+52/-0)
grub-core/commands/iorw.c (+7/-0)
grub-core/commands/legacycfg.c (+27/-8)
grub-core/commands/memrw.c (+7/-0)
grub-core/commands/menuentry.c (+1/-1)
grub-core/commands/nativedisk.c (+1/-1)
grub-core/commands/parttool.c (+9/-3)
grub-core/commands/regexp.c (+1/-1)
grub-core/commands/search_wrap.c (+1/-1)
grub-core/commands/smbios.c (+398/-0)
grub-core/commands/wildcard.c (+31/-5)
grub-core/disk/diskfilter.c (+2/-2)
grub-core/disk/ieee1275/ofdisk.c (+1/-1)
grub-core/disk/ldm.c (+30/-16)
grub-core/disk/loopback.c (+3/-9)
grub-core/disk/luks.c (+1/-1)
grub-core/disk/lvm.c (+35/-12)
grub-core/disk/xen/xendisk.c (+1/-1)
grub-core/efiemu/i386/pc/cfgtables.c (+4/-11)
grub-core/efiemu/loadcore.c (+1/-1)
grub-core/efiemu/mm.c (+3/-3)
grub-core/font/font.c (+13/-3)
grub-core/fs/affs.c (+3/-3)
grub-core/fs/btrfs.c (+22/-12)
grub-core/fs/ext2.c (+9/-1)
grub-core/fs/hfs.c (+1/-1)
grub-core/fs/hfsplus.c (+11/-6)
grub-core/fs/iso9660.c (+55/-18)
grub-core/fs/ntfs.c (+2/-2)
grub-core/fs/sfs.c (+23/-6)
grub-core/fs/squash4.c (+34/-11)
grub-core/fs/tar.c (+1/-1)
grub-core/fs/udf.c (+29/-16)
grub-core/fs/xfs.c (+7/-4)
grub-core/fs/zfs/zfs.c (+17/-9)
grub-core/fs/zfs/zfscrypt.c (+6/-1)
grub-core/gfxmenu/gui_image.c (+4/-1)
grub-core/gfxmenu/gui_string_util.c (+1/-1)
grub-core/gfxmenu/widget-box.c (+2/-2)
grub-core/io/gzio.c (+1/-1)
grub-core/kern/arm/coreboot/coreboot.S (+6/-0)
grub-core/kern/arm/efi/init.c (+3/-0)
grub-core/kern/arm64/efi/init.c (+3/-0)
grub-core/kern/dl.c (+1/-0)
grub-core/kern/efi/efi.c (+62/-42)
grub-core/kern/efi/init.c (+0/-1)
grub-core/kern/efi/sb.c (+66/-0)
grub-core/kern/emu/hostdisk.c (+1/-1)
grub-core/kern/emu/misc.c (+12/-0)
grub-core/kern/emu/mm.c (+10/-0)
grub-core/kern/fs.c (+1/-1)
grub-core/kern/i386/efi/init.c (+7/-2)
grub-core/kern/ia64/efi/init.c (+7/-2)
grub-core/kern/misc.c (+1/-1)
grub-core/kern/mm.c (+40/-0)
grub-core/kern/parser.c (+1/-1)
grub-core/kern/riscv/efi/init.c (+3/-0)
grub-core/kern/uboot/uboot.c (+1/-1)
grub-core/lib/LzmaEnc.c (+8/-2)
grub-core/lib/arg.c (+18/-2)
grub-core/lib/efi/halt.c (+2/-1)
grub-core/lib/i386/relocator.c (+11/-17)
grub-core/lib/libgcrypt/cipher/ac.c (+4/-4)
grub-core/lib/libgcrypt/cipher/primegen.c (+2/-2)
grub-core/lib/libgcrypt/cipher/pubkey.c (+2/-2)
grub-core/lib/libgcrypt_wrap/mem.c (+9/-2)
grub-core/lib/mips/relocator.c (+2/-4)
grub-core/lib/posix_wrap/stdlib.h (+7/-1)
grub-core/lib/powerpc/relocator.c (+2/-4)
grub-core/lib/priority_queue.c (+1/-1)
grub-core/lib/reed_solomon.c (+3/-4)
grub-core/lib/relocator.c (+7/-7)
grub-core/lib/x86_64/efi/relocator.c (+3/-4)
grub-core/lib/zstd/fse_decompress.c (+1/-1)
grub-core/loader/arm/linux.c (+1/-1)
grub-core/loader/arm64/linux.c (+77/-50)
grub-core/loader/efi/appleloader.c (+7/-0)
grub-core/loader/efi/chainloader.c (+796/-78)
grub-core/loader/efi/fdt.c (+1/-0)
grub-core/loader/efi/linux.c (+87/-0)
grub-core/loader/i386/bsd.c (+14/-1)
grub-core/loader/i386/bsdXX.c (+1/-1)
grub-core/loader/i386/efi/linux.c (+154/-150)
grub-core/loader/i386/linux.c (+59/-39)
grub-core/loader/i386/multiboot_mbi.c (+3/-4)
grub-core/loader/i386/pc/linux.c (+37/-18)
grub-core/loader/i386/xen.c (+10/-2)
grub-core/loader/i386/xnu.c (+7/-6)
grub-core/loader/linux.c (+56/-22)
grub-core/loader/macho.c (+1/-1)
grub-core/loader/mips/linux.c (+3/-6)
grub-core/loader/multiboot.c (+8/-1)
grub-core/loader/multiboot_elfxx.c (+6/-6)
grub-core/loader/multiboot_mbi2.c (+5/-5)
grub-core/loader/xnu.c (+15/-5)
grub-core/loader/xnu_resume.c (+1/-1)
grub-core/mmap/mmap.c (+2/-2)
grub-core/net/bootp.c (+1/-1)
grub-core/net/dns.c (+13/-6)
grub-core/net/net.c (+2/-2)
grub-core/net/tftp.c (+53/-118)
grub-core/normal/charset.c (+13/-7)
grub-core/normal/cmdline.c (+19/-9)
grub-core/normal/main.c (+4/-1)
grub-core/normal/menu_entry.c (+18/-9)
grub-core/normal/menu_text.c (+2/-2)
grub-core/normal/term.c (+2/-2)
grub-core/osdep/basic/no_platform.c (+1/-1)
grub-core/osdep/linux/getroot.c (+3/-3)
grub-core/osdep/unix/config.c (+1/-1)
grub-core/osdep/unix/efivar.c (+167/-11)
grub-core/osdep/unix/platform.c (+3/-3)
grub-core/osdep/windows/getroot.c (+1/-1)
grub-core/osdep/windows/hostdisk.c (+2/-2)
grub-core/osdep/windows/init.c (+1/-1)
grub-core/osdep/windows/platform.c (+3/-3)
grub-core/osdep/windows/relpath.c (+1/-1)
grub-core/partmap/gpt.c (+1/-1)
grub-core/partmap/msdos.c (+1/-1)
grub-core/script/argv.c (+14/-2)
grub-core/script/execute.c (+3/-1)
grub-core/script/function.c (+13/-3)
grub-core/script/lexer.c (+18/-3)
grub-core/script/parser.y (+2/-1)
grub-core/script/yylex.l (+2/-2)
grub-core/term/efi/console.c (+45/-23)
grub-core/tests/fake_input.c (+1/-1)
grub-core/tests/video_checksum.c (+3/-3)
grub-core/video/bitmap.c (+16/-9)
grub-core/video/capture.c (+1/-1)
grub-core/video/emu/sdl.c (+1/-1)
grub-core/video/i386/pc/vga.c (+1/-1)
grub-core/video/readers/png.c (+12/-3)
grub-initrd-fallback.service (+12/-0)
include/grub/arm64/linux.h (+2/-0)
include/grub/compiler.h (+8/-0)
include/grub/efi/api.h (+14/-5)
include/grub/efi/efi.h (+0/-1)
include/grub/efi/linux.h (+31/-0)
include/grub/efi/pe32.h (+47/-5)
include/grub/efi/sb.h (+29/-0)
include/grub/emu/misc.h (+1/-0)
include/grub/i386/linux.h (+6/-1)
include/grub/ia64/linux.h (+0/-0)
include/grub/loader.h (+1/-0)
include/grub/loopback.h (+30/-0)
include/grub/mips/linux.h (+0/-0)
include/grub/mm.h (+6/-0)
include/grub/powerpc/linux.h (+0/-0)
include/grub/relocator.h (+29/-0)
include/grub/safemath.h (+37/-0)
include/grub/script_sh.h (+1/-4)
include/grub/smbios.h (+69/-0)
include/grub/sparc64/linux.h (+0/-0)
include/grub/unicode.h (+2/-2)
include/grub/util/install.h (+8/-9)
util/deviceiter.c (+3/-0)
util/getroot.c (+1/-1)
util/grub-file.c (+1/-1)
util/grub-fstest.c (+2/-2)
util/grub-install-common.c (+91/-16)
util/grub-install.c (+90/-109)
util/grub-mkconfig.in (+6/-1)
util/grub-mkconfig_lib.in (+15/-0)
util/grub-mkimagexx.c (+2/-4)
util/grub-mkrescue.c (+2/-2)
util/grub-mkstandalone.c (+1/-1)
util/grub-pe2elf.c (+5/-7)
util/grub-probe.c (+2/-2)
util/grub.d/00_header.in (+27/-0)
util/grub.d/10_linux.in (+133/-13)
util/grub.d/10_linux_zfs.in (+1117/-0)
util/grub.d/30_uefi-firmware.in (+2/-2)
- Michael Vogt: Pending requested 2020-09-28
- Julian Andres Klode: Pending requested 2020-09-28
- Ubuntu Core Development Team: Pending requested 2020-09-28
-
Diff: 56 lines (+24/-2)3 files modifieddebian/changelog (+8/-0)
debian/grub-multi-install (+8/-1)
debian/postinst.in (+8/-1)
- Michael Vogt: Approve on 2020-09-30
- Julian Andres Klode: Pending requested 2020-09-28
- Ubuntu Core Development Team: Pending requested 2020-09-28
-
Diff: 56 lines (+24/-2)3 files modifieddebian/changelog (+8/-0)
debian/grub-multi-install (+8/-1)
debian/postinst.in (+8/-1)
Michael Vogt (mvo) wrote : | #1 |
Michael Vogt (mvo) wrote : | #2 |
Looking at the diff in http://
"""
diff -Nru grub2-2.
--- grub2-2.
+++ grub2-2.
@@ -8,6 +8,13 @@
. /usr/share/
+# shamelessly stolen from ucf:
+#
+# Load our templates, just in case our template has
+# not been loaded or the Debconf DB lost or corrupted
+# since then.
+db_x_loadtempl
+
######
# COPY FROM POSTINST
######
@@ -373,7 +380,7 @@
continue
fi
else
- break # noninteractive
+ exit 1 # noninteractive
fi
fi
@@ -395,7 +402,7 @@
db_fset grub-efi/
fi
else
- break # noninteractive
+ exit 1 # noninteractive
fi
else
break
"""
The new "exit 1" will break stable users that have answered the "grub-efi/
summary: |
- grub-multi-install fails with exit 1 when question grub- - efi/install_devices_empty is skipped + [regression-in-stable] grub-multi-install fails with exit 1 when + question grub-efi/install_devices_empty is skipped |
Michael Vogt (mvo) wrote : | #3 |
One more idea: maybe if we really need to exit, then instead of two "exit 1" (which is super generic) have "exit 22" and "exit 33" (or similar). And maybe a message to stderr. I think this would help the automatic errortracker reports too.
Łukasz Zemczak (sil2100) wrote : | #4 |
We'll make sure this gets looked at and prioritize accordingly. Thank you for reporting it!
tags: | added: regression-update rls-ff-incoming |
Dimitri John Ledkov (xnox) wrote : | #5 |
Name: grub-efi/
Template: grub-efi/
Value:
Owners: grub-common, grub-efi-amd64
Flags: seen
Variables:
CHOICES =
RAW_CHOICES =
Name: grub-efi/
Template: grub-efi/
Value: true
Owners: grub-common, grub-efi-amd64
Flags: seen
question is grub-efi/
db_get "$question"
if [ -z "$RET" ]; then
# Reset the seen flag if the current answer is false, since
# otherwise we'll loop with no indication of why.
db_get grub-efi/
if [ "$RET" = false ]; then
db_fset grub-efi/
fi
if db_input critical grub-efi/
db_go
db_get grub-efi/
if [ "$RET" = true ]; then
break
else
db_fset "$question" seen false
db_fset grub-efi/
fi
else
exit 1 # noninteractive
fi
else
break
fi
So, if install_devices is empty & install_
I wonder if I cause this mistake in postinst, and grub-multi-install.
description: | updated |
Dimitri John Ledkov (xnox) wrote : | #6 |
Hm, so before calling grub_multi_install we check if we have been installed into target as efi with
if test -e /boot/grub/
db_get grub2/no_
if [ "$RET" = true ]; then
fi
fi
so it would seem that /boot/grub/
Dimitri John Ledkov (xnox) wrote : | #7 |
we do similar check for grub-pc checking for /core.img to be present.
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
tags: | removed: rls-ff-incoming |
Launchpad Janitor (janitor) wrote : | #8 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in grub2 (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in grub2 (Ubuntu Focal): | |
status: | New → Confirmed |
Changed in grub2 (Ubuntu): | |
status: | New → Confirmed |
Launchpad Janitor (janitor) wrote : | #11 |
This bug was fixed in the package grub2 - 2.04-1ubuntu35
---------------
grub2 (2.04-1ubuntu35) groovy; urgency=medium
* postinst.in, grub-multi-install: fix logic of skipping installing onto
any device, if one chose to not install bootloader on any device. LP:
#1896608
* Do not finalize params twice on arm64. LP: #1897819
-- Dimitri John Ledkov <email address hidden> Thu, 01 Oct 2020 22:59:51 +0800
Changed in grub2 (Ubuntu Groovy): | |
status: | Confirmed → Fix Released |
Hello Michael, or anyone else affected,
Accepted grub2 into focal-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-
Further information regarding the verification process can be found at https:/
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.
Changed in grub2 (Ubuntu Focal): | |
status: | Confirmed → Fix Committed |
tags: | added: verification-needed verification-needed-focal |
costinel (costinel) wrote : | #13 |
I have upgrade the packages from the link provided (manual download since they're not yet accepted into focal-proposed) and grub-pc postinst script exits cleanly now. thanks.
Scott Talbert (swt-techie) wrote : | #14 |
The build page for this update for focal seems to indicate that the packages for amd64 and arm64 are in an UNAPPROVED queue. Does something need to be triggered there?
https:/
Scott Talbert (swt-techie) wrote : | #15 |
Never mind my last comment - that issue with the UNAPPROVED builds seems to have been resolved.
The 2.04-1ubuntu26.6 packages from focal-proposed seem to have resolved the issue for me as well.
All autopkgtests for the newly accepted grub2 (2.04-1ubuntu26.6) for focal have finished running.
The following regressions have been reported in tests triggered by the package:
ubuntu-
Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUp
https:/
[1] https:/
Thank you!
comment 13 suggests the fix works.
tags: |
added: verification-done verification-done-focal removed: verification-needed verification-needed-focal |
Keith (keith7) wrote : | #18 |
The fix on the proposed channel is working for me too. Thanks guys!
Launchpad Janitor (janitor) wrote : | #19 |
This bug was fixed in the package grub2 - 2.04-1ubuntu26.6
---------------
grub2 (2.04-1ubuntu26.6) focal; urgency=medium
* postinst.in, grub-multi-install: fix logic of skipping installing onto
any device, if one chose to not install bootloader on any device. LP:
#1896608
* Do not finalize params twice on arm64. LP: #1897819
grub2 (2.04-1ubuntu26.5) focal; urgency=medium
* ubuntu-
-- Dimitri John Ledkov <email address hidden> Thu, 01 Oct 2020 23:19:24 +0800
Changed in grub2 (Ubuntu Focal): | |
status: | Fix Committed → Fix Released |
The verification of the Stable Release Update for grub2 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
Hello Michael, or anyone else affected,
Accepted grub2 into bionic-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-
Further information regarding the verification process can be found at https:/
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.
Changed in grub2 (Ubuntu Bionic): | |
status: | Confirmed → Fix Committed |
tags: |
added: verification-needed verification-needed-bionic removed: verification-done |
All autopkgtests for the newly accepted grub2 (2.02-2ubuntu8.19) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:
ubuntu-
Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUp
https:/
[1] https:/
Thank you!
Dimitri John Ledkov (xnox) wrote : | #23 |
installed grub2 2.02-2ubuntu8.18 and configured debconf & /boot to reproduce the issue (touched the core.img, as well as enxsured that install_
dpkg-reconfigure -u grub-pc exits zero as expected.
upgraded to 2.04-2ubuntu8.19, and executed dpkg-reconfigure -u grub-pc again, and it is also successful.
bionic-updates didn't have the "exit 1" bug, and it still is not there with latest round of fixes from focal.
tags: |
added: verification-done verification-done-bionic removed: verification-needed verification-needed-bionic |
Launchpad Janitor (janitor) wrote : | #24 |
This bug was fixed in the package grub2 - 2.02-2ubuntu8.19
---------------
grub2 (2.02-2ubuntu8.19) bionic; urgency=medium
* grub-install: cherry-pick patch from grub-devel to make grub-install
fault tolerant. Create backup of files in /boot/grub, and restore them
on failure to complete grub-install. LP: #1891680
Also cherry-pick patch to make atexit work correctly.
* postinst.in: do not exit successfully when failing to show critical
grub-
prompts in non-interactive mode. This enables surfacing upgrade errors
to the users and/or automation. LP: #1891680 LP: #1896608
* postinst.in: do not attempt to call grub-install upon fresh install of
grub-pc because it it a job of installers to do that after fresh
install. Fixup for the issue unmasked by above. LP: #1891680
* postinst.in: Fixup postinst.in, to attempt grub-install upon explicit
dpkg-
-- Dimitri John Ledkov <email address hidden> Thu, 22 Oct 2020 15:01:52 +0100
Changed in grub2 (Ubuntu Bionic): | |
status: | Fix Committed → Fix Released |
Some debug lines from setting "sh -x" inside the grub-multi-install https:/ /paste. ubuntu. com/p/9CBGGvJjz 9/
and the debconf db grub entries: https:/ /paste. ubuntu. com/p/j2DwtQHzS b/
I think the only relevant part here is that grub-efi/ install_ devices_ empty was already seen *and* is set to "True" as this leads to the issue.