grub fails to add boot entries if python3-apt is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
In mantic and noble, when update-grub is run without python3-apt installed, the following output is generated:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Traceback (most recent call last):
File "/usr/lib/
import apt_pkg
ModuleNotFo
Traceback (most recent call last):
File "/usr/lib/
import apt_pkg
ModuleNotFo
Traceback (most recent call last):
File "/usr/lib/
import apt_pkg
ModuleNotFo
Adding boot menu entry for UEFI Firmware Settings ...
done
When this occurs, no Linux boot options are added to the GRUB config.
grub-sort-version was added to the grub-common binary package in 2.12~rc1-10ubuntu2. It is a python script which sorts the kernel versions via Debian rules using apt_pkg. The grub package was updated to depend on python3 so this script could run. However, the script also depends on python3-apt.
Either grub-sort-version should be changed not to depend on python3-apt (or fail gracefully when it's missing) or python3-apt should be added to the dependencies of grub-common.
Related branches
- Julian Andres Klode: Pending requested
-
Diff: 95559 lines (+35434/-11890)299 files modifiedChangeLog (+1496/-0)
INSTALL (+1/-1)
Makefile.in (+43/-28)
Makefile.util.am (+10/-1)
Makefile.util.def (+7/-1)
NEWS (+20/-0)
autogen.sh (+1/-1)
conf/Makefile.common (+1/-1)
config-util.h.in (+7/-4)
config.h.in (+2/-0)
configure (+191/-59)
configure.ac (+101/-36)
debian/build-efi-images (+13/-13)
debian/canonical-uefi-ca.crt (+25/-0)
debian/changelog (+2069/-0)
debian/control (+17/-20)
debian/grub-check-signatures (+136/-0)
debian/grub-common.dirs (+1/-0)
debian/grub-common.install.in (+5/-0)
debian/grub-common.templates (+53/-0)
debian/grub-multi-install (+419/-0)
debian/grub-sort-version (+56/-0)
debian/patches/Revert-kern-ieee1275-cmain-ppc64-Introduce-flags-to-ident.patch (+52/-0)
debian/patches/Revert-kern-ieee1275-ieee1275-Display-successful-memory-c.patch (+52/-0)
debian/patches/Revert-kern-ieee1275-init-ppc64-Add-support-for-alignment.patch (+48/-0)
debian/patches/Revert-kern-ieee1275-init-ppc64-Decide-by-request-whether.patch (+60/-0)
debian/patches/Revert-kern-ieee1275-init-ppc64-Display-upper_mem_limit-w.patch (+24/-0)
debian/patches/Revert-kern-ieee1275-init-ppc64-Fix-a-comment.patch (+22/-0)
debian/patches/Revert-kern-ieee1275-init-ppc64-Introduce-a-request-for-r.patch (+164/-0)
debian/patches/Revert-kern-ieee1275-init-ppc64-Rename-regions_claim-to-g.patch (+58/-0)
debian/patches/Revert-kern-ieee1275-init-ppc64-Return-allocated-address-.patch (+36/-0)
debian/patches/Revert-loader-powerpc-ieee1275-Use-new-allocation-functio.patch (+99/-0)
debian/patches/efi-variable-storage-minimise-writes.patch (+6/-6)
debian/patches/extra_deps_lst.patch (+17/-0)
debian/patches/fdt-device-tree-fixup-protocol.patch (+1/-1)
debian/patches/gfxpayload-dynamic.patch (+6/-6)
debian/patches/grub-install-pvxen-paths.patch (+3/-3)
debian/patches/grub-legacy-0-based-partitions.patch (+1/-1)
debian/patches/grub-sort-version.patch (+37/-0)
debian/patches/hwmatch-only-on-grub-pc-platform.patch (+2/-2)
debian/patches/insmod-xzio-and-lzopio-on-xen.patch (+2/-2)
debian/patches/install-efi-adjust-distributor.patch (+1/-1)
debian/patches/install-locale-langpack.patch (+7/-7)
debian/patches/install-powerpc-machtypes.patch (+1/-1)
debian/patches/install-stage2-confusion.patch (+2/-2)
debian/patches/maybe-quiet.patch (+6/-6)
debian/patches/mkconfig-loopback.patch (+2/-2)
debian/patches/mkconfig-nonexistent-loopback.patch (+1/-1)
debian/patches/mkconfig-recovery-title.patch (+8/-8)
debian/patches/mkconfig-ubuntu-distributor.patch (+1/-1)
debian/patches/mkconfig-ubuntu-recovery.patch (+19/-11)
debian/patches/network/bootp-new-net_bootp6-command.patch (+1/-1)
debian/patches/network/efinet-Configure-network-from-UEFI-device-path.patch (+1/-1)
debian/patches/network/efinet-add-structures-for-PXE-messages.patch (+1/-1)
debian/patches/network/efinet-set-dns-from-uefi-proto.patch (+1/-1)
debian/patches/network/http-prepend-prefix-when-the-http-path-is-relative.patch (+2/-2)
debian/patches/network/net-http-check-result-of-grub_netbuff_put-in-http_receive.patch (+2/-2)
debian/patches/network/support-uefi-networking-protocols.patch (+13/-15)
debian/patches/network/try-prefixes-for-tftp-config-file.patch (+2/-2)
debian/patches/olpc-prefix-hack.patch (+4/-4)
debian/patches/pc-verifiers-module.patch (+2/-2)
debian/patches/quick-boot.patch (+6/-6)
debian/patches/recovery-dis_ucode_ldr.patch (+2/-2)
debian/patches/restore-mkdevicemap.patch (+1/-1)
debian/patches/rhboot-f34-dont-use-int-for-efi-status.patch (+23/-0)
debian/patches/rhboot-f34-make-exit-take-a-return-code.patch (+280/-0)
debian/patches/secure-boot/efi-use-peimage-shim.patch (+1/-1)
debian/patches/secure-boot/loader-framework.patch (+7/-7)
debian/patches/secure-boot/revert-efi-fallback-to-legacy.patch (+27/-8)
debian/patches/series (+42/-14)
debian/patches/suse-grub.texi-add-net_bootp6-document.patch (+49/-0)
debian/patches/ubuntu-add-devicetree-command-support.patch (+51/-0)
debian/patches/ubuntu-add-initrd-less-boot-fallback.patch (+212/-0)
debian/patches/ubuntu-add-initrd-less-boot-messages.patch (+68/-0)
debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch (+68/-0)
debian/patches/ubuntu-dont-verify-loopback-images.patch (+35/-0)
debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch (+29/-0)
debian/patches/ubuntu-grub-install-extra-removable.patch (+65/-39)
debian/patches/ubuntu-install-signed.patch (+43/-42)
debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch (+28/-0)
debian/patches/ubuntu-os-prober-auto.patch (+51/-0)
debian/patches/ubuntu-recovery-dis_ucode_ldr.patch (+67/-0)
debian/patches/ubuntu-resilient-boot-boot-order.patch (+236/-0)
debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch (+212/-0)
debian/patches/ubuntu-shorter-version-info.patch (+40/-0)
debian/patches/ubuntu-speed-zsys-history.patch (+157/-0)
debian/patches/ubuntu-support-initrd-less-boot.patch (+80/-0)
debian/patches/ubuntu-verifiers-last.patch (+59/-0)
debian/patches/ubuntu-zfs-enhance-support.patch (+1048/-0)
debian/patches/ubuntu-zfs-gfxpayload-dynamic.patch (+95/-0)
debian/patches/ubuntu-zfs-gfxpayload-keep-default.patch (+38/-0)
debian/patches/ubuntu-zfs-insmod-xzio-and-lzopio-on-xen.patch (+32/-0)
debian/patches/ubuntu-zfs-mkconfig-recovery-title.patch (+49/-0)
debian/patches/ubuntu-zfs-mkconfig-signed-kernel.patch (+93/-0)
debian/patches/ubuntu-zfs-mkconfig-ubuntu-distributor.patch (+36/-0)
debian/patches/ubuntu-zfs-mkconfig-ubuntu-recovery.patch (+66/-0)
debian/patches/ubuntu-zfs-vt-handoff.patch (+77/-0)
debian/patches/uefi-secure-boot-cryptomount.patch (+2/-2)
debian/patches/vt-handoff.patch (+6/-6)
debian/patches/xen-no-xsm-policy-in-non-xsm-options.patch (+1/-1)
debian/patches/zpool-full-device-name.patch (+1/-1)
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 (+120/-18)
debian/po/da.po (+119/-18)
debian/po/de.po (+122/-18)
debian/po/dz.po (+107/-18)
debian/po/el.po (+134/-33)
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 (+136/-33)
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 (+119/-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 (+129/-31)
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 (+265/-157)
debian/po/ru.po (+127/-27)
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 (+74/-4)
debian/rules (+81/-11)
debian/sbat.ubuntu.csv.in (+4/-0)
debian/signing-template/control.in (+1/-1)
debian/templates.in (+78/-8)
dev/null (+0/-48)
docs/Makefile.in (+1/-0)
docs/grub-dev.info (+55/-55)
docs/grub-dev.texi (+8/-2)
docs/grub.info (+265/-263)
docs/grub.info-1 (+155/-186)
docs/grub.info-2 (+123/-17)
docs/grub.texi (+101/-30)
docs/stamp-1 (+4/-4)
docs/stamp-vti (+4/-4)
docs/version-dev.texi (+4/-4)
docs/version.texi (+4/-4)
grub-core/Makefile.am (+4/-2)
grub-core/Makefile.core.am (+1/-1)
grub-core/Makefile.core.def (+1/-1)
grub-core/Makefile.in (+7/-4)
grub-core/commands/acpi.c (+22/-11)
grub-core/commands/efi/loadbios.c (+9/-28)
grub-core/commands/efi/lsefi.c (+2/-2)
grub-core/commands/efi/lsefisystab.c (+8/-2)
grub-core/commands/efi/lssal.c (+6/-12)
grub-core/commands/efi/smbios.c (+2/-26)
grub-core/commands/ls.c (+13/-13)
grub-core/commands/videoinfo.c (+5/-0)
grub-core/disk/cryptodisk.c (+23/-9)
grub-core/disk/diskfilter.c (+1/-3)
grub-core/disk/i386/pc/biosdisk.c (+4/-1)
grub-core/efiemu/runtime/efiemu.c (+31/-10)
grub-core/fs/archelp.c (+8/-0)
grub-core/fs/btrfs.c (+2/-0)
grub-core/fs/ntfs.c (+105/-16)
grub-core/fs/xfs.c (+65/-24)
grub-core/fs/zfs/zfs.c (+22/-7)
grub-core/fs/zfs/zfsinfo.c (+2/-2)
grub-core/genmoddep.awk (+4/-0)
grub-core/gfxmenu/gui_image.c (+7/-4)
grub-core/kern/acpi.c (+8/-0)
grub-core/kern/efi/acpi.c (+2/-24)
grub-core/kern/efi/efi.c (+18/-0)
grub-core/kern/efi/fdt.c (+6/-14)
grub-core/kern/efi/init.c (+3/-2)
grub-core/kern/efi/sb.c (+8/-0)
grub-core/kern/i386/pc/init.c (+10/-1)
grub-core/kern/ieee1275/cmain.c (+7/-1)
grub-core/kern/ieee1275/ieee1275.c (+3/-0)
grub-core/kern/ieee1275/init.c (+200/-15)
grub-core/kern/misc.c (+2/-2)
grub-core/kern/mm.c (+2/-2)
grub-core/lib/gnulib/Makefile.in (+1/-0)
grub-core/lib/i386/relocator64.S (+1/-1)
grub-core/lib/libgcrypt-grub/cipher/ChangeLog (+1/-1)
grub-core/loader/efi/linux.c (+3/-0)
grub-core/loader/i386/bsdXX.c (+12/-8)
grub-core/loader/i386/linux.c (+12/-0)
grub-core/loader/i386/xnu.c (+1/-1)
grub-core/loader/powerpc/ieee1275/linux.c (+46/-9)
grub-core/net/http.c (+2/-6)
grub-core/osdep/bsd/hostdisk.c (+6/-2)
grub-core/osdep/generic/blocklist.c (+26/-2)
grub-core/osdep/unix/getroot.c (+6/-6)
grub-core/partmap/gpt.c (+3/-0)
grub-core/term/ns8250-spcr.c (+3/-1)
grub-core/term/serial.c (+4/-1)
grub-core/video/efi_gop.c (+4/-0)
include/grub/disk.h (+3/-0)
include/grub/efi/api.h (+6/-6)
include/grub/efi/efi.h (+3/-0)
include/grub/efi/pe32.h (+6/-0)
include/grub/efiemu/efiemu.h (+2/-2)
include/grub/efiemu/runtime.h (+1/-1)
include/grub/gpt_partition.h (+1/-1)
include/grub/i386/linux.h (+13/-2)
include/grub/ieee1275/alloc.h (+39/-0)
include/grub/ieee1275/ieee1275.h (+4/-0)
include/grub/powerpc/ieee1275/ieee1275.h (+3/-0)
include/grub/sparc64/ieee1275/ieee1275.h (+3/-0)
include/grub/types.h (+11/-2)
include/grub/util/libnvpair.h (+9/-3)
po/LINGUAS (+1/-1)
po/POTFILES.in (+1/-0)
po/ast.po (+180/-153)
po/ca.po (+180/-153)
po/da.po (+180/-153)
po/de.po (+418/-394)
po/de@hebrew.po (+410/-386)
po/de_CH.po (+419/-394)
po/en@arabic.po (+185/-156)
po/en@cyrillic.po (+185/-156)
po/en@greek.po (+185/-156)
po/en@hebrew.po (+185/-156)
po/en@piglatin.po (+187/-156)
po/en@quot.po (+185/-156)
po/eo.po (+180/-153)
po/es.po (+180/-153)
po/fi.po (+181/-154)
po/fr.po (+393/-358)
po/gl.po (+180/-153)
po/grub.pot (+181/-154)
po/he.po (+7539/-0)
po/hr.po (+181/-154)
po/hu.po (+181/-154)
po/id.po (+181/-154)
po/it.po (+180/-153)
po/ja.po (+180/-153)
po/ka.po (+324/-326)
po/ko.po (+378/-369)
po/lg.po (+180/-153)
po/lt.po (+180/-153)
po/nb.po (+181/-154)
po/nl.po (+181/-154)
po/pa.po (+180/-153)
po/pl.po (+383/-382)
po/pt.po (+181/-154)
po/pt_BR.po (+180/-153)
po/ro.po (+432/-413)
po/ru.po (+181/-154)
po/sl.po (+180/-153)
po/sr.po (+383/-369)
po/sv.po (+181/-154)
po/tr.po (+180/-153)
po/uk.po (+382/-369)
po/vi.po (+385/-377)
po/zh_CN.po (+374/-374)
po/zh_TW.po (+180/-153)
tests/serial_test.in (+55/-0)
tests/util/grub-shell-luks-tester.in (+8/-3)
tests/util/grub-shell.in (+26/-13)
util/bash-completion.d/Makefile.in (+1/-0)
util/editenv.c (+2/-2)
util/getroot.c (+3/-3)
util/grub-install-common.c (+31/-18)
util/grub-install.c (+32/-30)
util/grub-mkconfig_lib.in (+54/-0)
util/grub-mkstandalone.c (+29/-8)
util/grub-mount.c (+3/-0)
util/grub.d/20_linux_xen.in (+8/-8)
util/grub.d/25_bli.in (+1/-1)
affects: | grub (Ubuntu) → grub2 (Ubuntu) |
tags: | added: rls-nn-incoming |
tags: | removed: rls-nn-incoming |
Changed in grub2 (Ubuntu): | |
status: | Triaged → Fix Committed |
The whole thing is a bit annoying but it was nicer than forking dpkg --compare-versions for each pair. I'm not sure how you ended up with a system without python3-apt, it should be pulled in via ubuntu- minimal- >uuntu- advantage- tools already and you can't just go remove those packages and still pretend you have a supported system.