Accepting request 912247 from Base:System

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/912247
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=247
This commit is contained in:
Richard Brown 2021-08-19 08:00:38 +00:00 committed by Git OBS Bridge
commit cf1f399b74
2 changed files with 24 additions and 5 deletions

View File

@ -121,6 +121,8 @@ grub-once-restore()
# We need this, if more than one kernel is installed. This works reasonably
# well with grub, if all kernels are named "vmlinuz-`uname -r`" and are
# located in /boot. If they are not, good luck ;-)
# for 2021-style usrmerged kernels, the location in /usr/lib/modules/ \
# `uname -r`/vmlinuz is resolved to match...
find-kernel-entry()
{
NEXT_BOOT=""
@ -128,9 +130,14 @@ find-kernel-entry()
# DEBUG "running kernel: $RUNNING" DIAG
while [ -n "${KERNELS[$I]}" ]; do
BOOTING="${KERNELS[$I]}"
if IMAGE=`readlink /boot/$BOOTING` && [ -e "/boot/${IMAGE##*/}" ]; then
# DEBUG "Found kernel symlink $BOOTING => $IMAGE" INFO
BOOTING=$IMAGE
if IMAGE=$(readlink /boot/"$BOOTING"); then
if [[ $IMAGE == */vmlinuz ]]; then # new usrmerged setup
BOOTING=${IMAGE%/vmlinuz} # the directory name is what counts
BOOTING=${BOOTING##*/}
elif [ -e "/boot/${IMAGE##*/}" ]; then
# DEBUG "Found kernel symlink $BOOTING => $IMAGE" INFO
BOOTING=$IMAGE
fi
fi
BOOTING="${BOOTING#*${VMLINUZ}-}"
if [ "$RUNNING" == "$BOOTING" -a -n "${MENU_ENTRIES[$I]}" ]; then
@ -169,8 +176,13 @@ prepare-grub()
# if there is no default entry (no menu.lst?) we fall back to
# the default of /boot/${VMLINUZ}.
[ -z "$BOOTING" ] && BOOTING="${VMLINUZ}"
if IMAGE=`readlink /boot/$BOOTING` && [ -e "/boot/${IMAGE##*/}" ]; then
BOOTING=$IMAGE
if IMAGE=$(readlink /boot/"$BOOTING"); then
if [[ $IMAGE == */vmlinuz ]]; then # new usrmerged setup
BOOTING=${IMAGE%/vmlinuz} # the directory name is what counts
BOOTING=${BOOTING##*/}
elif [ -e "/boot/${IMAGE##*/}" ]; then
BOOTING=$IMAGE
fi
fi
BOOTING="${BOOTING#*${VMLINUZ}-}"
echo "running kernel: '$RUNNING', probably booting kernel: '$BOOTING'"

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Aug 4 10:28:49 UTC 2021 - Stefan Seyfried <seife+obs@b1-systems.com>
- update grub2-systemd-sleep.sh to fix hibernation by avoiding the
error "no kernelfile matching the running kernel found" on
usrmerged setup
-------------------------------------------------------------------
Thu Jul 22 16:43:20 UTC 2021 - Petr Vorel <pvorel@suse.cz>