Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920708 - sys-boot/grub-2.12: breaks boot with 'error: symbol 'grub_is_shimlock_enabled' not found'
Summary: sys-boot/grub-2.12: breaks boot with 'error: symbol 'grub_is_shimlock_enabled...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-26 01:42 UTC by Tiago
Modified: 2024-02-28 20:59 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago 2023-12-26 01:42:05 UTC
After updating to GRUB 2.12 and generating a new GRUB configuration as usual, my computer reboots when entering the GRUB menu. Reverting to GRUB stable (2.06-r9) and generating a new GRUB configuration, I was able to boot.
Comment 1 Dutch Ingraham 2023-12-26 19:10:32 UTC
I can confirm.  I was able to coax an error message to wit: error: symbol 'grub_is_shimlock_enabled' not found

Downgrading to 2.06-r9, reinstalling to disk, and re-configuring was sucessful and was able to boot.

Some folks have had sucess on Arch Linux by adding --disable-shim-lock to their grub-install invocation.  See https://bbs.archlinux.org/viewtopic.php?id=287024

# emerge --info
Portage 3.0.58 (python 3.11.7-final-0, default/linux/amd64/17.1/desktop/plasma/systemd/merged-usr, gcc-13, glibc-2.38-r8, 6.6.8-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.6.8-gentoo-dist-x86_64-AMD_Ryzen_7_5700G_with_Radeon_Graphics-with-glibc2.38
KiB Mem:    32133808 total,  27094640 free
KiB Swap:    5242876 total,   5242876 free
Timestamp of repository gentoo: Tue, 26 Dec 2023 18:02:02 +0000
Head commit of repository gentoo: b7fb67c938b36d952da6423d8983f294f185518c

sh bash 5.2_p21-r1
ld GNU ld (Gentoo 2.41 p4) 2.41.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p21-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust:             1.74.1::gentoo
dev-util/cmake:            3.28.1::gentoo
dev-util/meson:            1.3.0-r2::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          255.2::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r3::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20231216::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: yes

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=9.0"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://mirrors.rit.edu/gentoo/ https://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="--jobs=12 --load-average=13.0"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 branding bzip2 cairo cdda cdr cli crypt cups dav1d dbus declarative dri dts dvd dvdr encode exif ffmpeg flac fortran gdbm gif gpm gstreamer gtk gui iconv icu ipv6 jpeg kde lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp semantic-desktop sound spell ssl startup-notification svg systemd test-rust theora tiff truetype udev udisks unicode upower usb vorbis vulkan wayland widgets wxwidgets x264 x265 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" SANE_BACKENDS="canon pixma" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-26 19:12:44 UTC
Did you make sure to grub-install and grub-mkconfig?
Comment 3 Dutch Ingraham 2023-12-26 21:13:46 UTC
> Did you make sure to grub-install and grub-mkconfig?

Are you asking whether this was done as part of the upgrade process? If this is your question, then no, I did not run grub-install, but did run grub-mkconfig.  If there was news or other communication that it was necessary to run grub-install post-upgrade, I missed it.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-26 21:17:17 UTC
(In reply to Dutch Ingraham from comment #3)
> > Did you make sure to grub-install and grub-mkconfig?
> 
> Are you asking whether this was done as part of the upgrade process? If this
> is your question, then no, I did not run grub-install, but did run
> grub-mkconfig.  If there was news or other communication that it was
> necessary to run grub-install post-upgrade, I missed it.

The package notifies you that you should run it in pkg_postinst:
```
        if [[ -n ${REPLACING_VERSIONS} ]]; then
                local v
                for v in ${REPLACING_VERSIONS}; do
                        if ver_test -gt ${v}; then
                                ewarn
                                ewarn "Re-run grub-install to update installed boot code!"
                                ewarn "Re-run grub-mkconfig to update grub.cfg!"
                                ewarn
                                break
                        fi
                done
        else
                elog
                optfeature "detecting other operating systems (grub-mkconfig)" sys-boot/os-prober
                optfeature "creating rescue media (grub-mkrescue)" dev-libs/libisoburn
                optfeature "enabling RAID device detection" sys-fs/mdadm
        fi
```

It is important that the grub version installed to /boot matches the version used for grub-mkconfig, or they may generate e.g. incompatible configuration files.
Comment 5 Dutch Ingraham 2023-12-26 21:25:40 UTC
Actually, now that I think about it, I did run grub-install and grub-mkconfig after the upgrade - just not *immediately* after the upgrade.  I upgraded the system a couple of days ago, logged out, and did not try and boot back into that system until today.  At which point, after failing to boot, I chrooted in, updated the system, ran grub-install and grub-mkconfig, and rebooted, which failed.  On that failed boot, I was presented with the error message noted above and was then able to research the error.  I chrooted back in a second time, downgraded grub and re-ran grub-install and grub-mkconfig.
Comment 6 Aidan Marks 2023-12-27 10:44:33 UTC
Upgrade to grub 2.12 broke my system too - same as others, would reboot when entering grub.  Downgrade to 2.06-r9 fixed it.  Seems like it needs to be made ultra clear about this stuff.  I will stick to stable grub after this experience, even if this is put in the user error category.
Comment 7 Mike Gilbert gentoo-dev 2023-12-27 12:58:40 UTC
Per the GRUB bug report, this is likely caused by some stale copy of GRUB hanging around on your ESP.

https://savannah.gnu.org/bugs/?64406#comment5

Please try cleaning up any extra grubx64.efi or bootx64.efi files.
Comment 8 Dutch Ingraham 2023-12-27 14:07:58 UTC
(In reply to Sam James from comment #4)
> (In reply to Dutch Ingraham from comment #3)
> > > Did you make sure to grub-install and grub-mkconfig?
> > 
> > Are you asking whether this was done as part of the upgrade process? If this
> > is your question, then no, I did not run grub-install, but did run
> > grub-mkconfig.  If there was news or other communication that it was
> > necessary to run grub-install post-upgrade, I missed it.
> 
> The package notifies you that you should run it in pkg_postinst:
> ```
>         if [[ -n ${REPLACING_VERSIONS} ]]; then
>                 local v
>                 for v in ${REPLACING_VERSIONS}; do
>                         if ver_test -gt ${v}; then
>                                 ewarn
>                                 ewarn "Re-run grub-install to update
> installed boot code!"
>                                 ewarn "Re-run grub-mkconfig to update
> grub.cfg!"
>                                 ewarn
>                                 break
>                         fi
>                 done
>         else
>                 elog
>                 optfeature "detecting other operating systems
> (grub-mkconfig)" sys-boot/os-prober
>                 optfeature "creating rescue media (grub-mkrescue)"
> dev-libs/libisoburn
>                 optfeature "enabling RAID device detection" sys-fs/mdadm
>         fi
> ```
> 
> It is important that the grub version installed to /boot matches the version
> used for grub-mkconfig, or they may generate e.g. incompatible configuration
> files.

Is there some type of cache whereby this notification will only appear after the first upgrade of a package?  I ask because I'm not getting any post-install message when upgrading to 2.12 after downgrading to 2.06-r9:


gentoosdb ~ # emerge -avuDU @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 12.83 s (backtrack: 0/20).

[ebuild     U  ] sys-boot/grub-2.12:2/2.12::gentoo [2.06-r9:2/2.06-r9::gentoo] USE="fonts nls sdl themes truetype -device-mapper -doc -efiemu -libzfs -mount (-test) -verify-sig" GRUB_PLATFORMS="efi-64 -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -pc -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-boot/grub-2.12::gentoo
>>> Installing (1 of 1) sys-boot/grub-2.12::gentoo
>>> Completed (1 of 1) sys-boot/grub-2.12::gentoo
>>> Jobs: 1 of 1 complete                           Load avg: 2.83, 0.85, 0.32

 * Regenerating GNU info directory index...
 * Processed 129 info files.
 * After world updates, it is important to remove obsolete packages with
 * emerge --depclean. Refer to `man emerge` for more information.
gentoosdb ~ #
Comment 9 Mike Gilbert gentoo-dev 2023-12-27 20:45:33 UTC
(In reply to Dutch Ingraham from comment #8)

The message should be displayed any time grub is upgraded.

Perhaps you have removed "echo" from PORTAGE_ELOG_SYSTEM, or removed "warn" from PORTAGE_ELOG_CLASSES in make.conf.
Comment 10 Dutch Ingraham 2023-12-28 00:08:46 UTC
(In reply to Mike Gilbert from comment #9)
> (In reply to Dutch Ingraham from comment #8)
> 
> The message should be displayed any time grub is upgraded.
> 
> Perhaps you have removed "echo" from PORTAGE_ELOG_SYSTEM, or removed "warn"
> from PORTAGE_ELOG_CLASSES in make.conf.

Thanks for that, Mike.  In fact, I had neither "echo" nor "warn" in my ELOG settings.  (I've been carrying this make.conf around for years; I have no idea when or why I made the settings i had.)  Reinstalling GRUB now produces the expected admonishments.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-07 21:08:13 UTC
commit 6ad32a60e7c1ddb580c3e9d564a594a62583f046 (HEAD -> master, origin/master, origin/HEAD)
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Tue Feb 6 14:29:45 2024 -0500

    2024-02-01-grub-upgrades: fix typo

    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

commit e0e93c981baef4a697dac91e8a9efed0a4a204b5
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Tue Feb 6 14:26:29 2024 -0500

    2024-02-01-grub-upgrades: x86_64-pc -> x86_64-efi

    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

commit 65b494db54e9228fbb4dd0c647f9dd11998c3f4c
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Sun Jan 28 11:23:22 2024 -0500

    2024-02-01-grub-upgrades: add news item

    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Comment 12 Pacho Ramos gentoo-dev 2024-02-15 13:57:09 UTC
Thanks for the news item

Only a small remark: I would update it to use /efi/EFI path (instead of /boot/efi/EFI) as recommended by the install documentation:
https://wiki.gentoo.org/wiki/EFI_System_Partition#Mount_point

Cheers
Comment 13 Mike Gilbert gentoo-dev 2024-02-28 20:59:03 UTC
(In reply to Pacho Ramos from comment #12)
> Thanks for the news item
> 
> Only a small remark: I would update it to use /efi/EFI path (instead of
> /boot/efi/EFI) as recommended by the install documentation:
> https://wiki.gentoo.org/wiki/EFI_System_Partition#Mount_point

grub-install defaults to using /boot/efi as the path the to the EFI system partition. The news item was written with that in mind.