removing kernel linux-image-6.2.0-1014-lowlatency not possible, blocking all apt install and apt upgrade commands

Asked by Martin Schubert

I installed ubuntustudio 23.04 and recently made a dist upgrade to 23.10, since then, the kernel 6.2.0-1014 cannot be deinstalled. Furthermore, the system is running kernel 6.2.0-1015 instead of 6.5, which is also installed.

Entfernen von linux-image-6.2.0-1014-lowlatency (6.2.0-1014.14) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.2.0-1014-lowlatency
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
/etc/grub.d/09_lowlatency: 1: version_find_latest: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: Fehler beim Bearbeiten des Paketes linux-image-6.2.0-1014-lowlatency (--remove):
 »installiertes post-removal-Skript des Paketes linux-image-6.2.0-1014-lowlatency«-Unterprozess gab den Fehlerwert 1 zurück
dpkg: Zu viele Fehler, Abbruch
Fehler traten auf beim Bearbeiten von:
 linux-image-6.2.0-1014-lowlatency
Bearbeitung wurde angehalten, da zu viele Fehler auftraten.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Erich Eickmeyer (eeickmeyer) said :
#1

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Bug reporting is about finding & fixing problems thus preventing future users from hitting the same bug.

I suspect a Support site would be more appropriate, eg. https://answers.launchpad.net/ubuntu. You can also find help with your problem in the support forum of your local Ubuntu community http://loco.ubuntu.com/ or asking at https://askubuntu.com or https://ubuntuforums.org, or for more support options please look at https://discourse.ubuntu.com/t/community-support/709.

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

For diagnostic purposes, what is the output of the following commands (to be executed in a terminal window):

uname -a
lsb_release -crid
sudo update-grub
sudo apt update
dpkg -l | grep ' linux-'
apt policy ubuntustudio-lowlatency-settings

Revision history for this message
Martin Schubert (schubi83) said :
#3

uname -a:
Linux eddie 6.2.0-1015-lowlatency #15-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:04:59 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Martin Schubert (schubi83) said :
#4

lsb_release -crid:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic

Revision history for this message
Martin Schubert (schubi83) said :
#5

sudo update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
/etc/grub.d/09_lowlatency: 1: version_find_latest: not found

Revision history for this message
Martin Schubert (schubi83) said :
#6

sudo apt update:
OK:1 https://dl.winehq.org/wine-builds/ubuntu kinetic InRelease
Holen:2 https://updates.signal.org/desktop/apt xenial InRelease [5.887 B]
Holen:3 http://security.ubuntu.com/ubuntu mantic-security InRelease [109 kB]
Holen:4 https://updates.signal.org/desktop/apt xenial/main amd64 Packages [44,4 kB]
Holen:5 http://security.ubuntu.com/ubuntu mantic-security/main i386 Packages [16,1 kB]
Holen:6 http://security.ubuntu.com/ubuntu mantic-security/main amd64 Packages [38,0 kB]
Holen:7 http://security.ubuntu.com/ubuntu mantic-security/main Translation-en [12,2 kB]
Holen:8 http://security.ubuntu.com/ubuntu mantic-security/main amd64 DEP-11 Metadata [2.372 B]
Holen:9 http://security.ubuntu.com/ubuntu mantic-security/main DEP-11 48x48 Icons [587 B]
Holen:10 http://security.ubuntu.com/ubuntu mantic-security/main DEP-11 64x64 Icons [3.678 B]
Holen:11 http://security.ubuntu.com/ubuntu mantic-security/main DEP-11 128x128 Icons [7.414 B]
Holen:12 http://security.ubuntu.com/ubuntu mantic-security/main amd64 c-n-f Metadata [964 B]
Holen:13 http://security.ubuntu.com/ubuntu mantic-security/restricted amd64 Packages [32,5 kB]
Holen:14 http://security.ubuntu.com/ubuntu mantic-security/restricted Translation-en [7.068 B]
Holen:15 http://security.ubuntu.com/ubuntu mantic-security/universe amd64 DEP-11 Metadata [3.860 B]
OK:16 http://archive.ubuntu.com/ubuntu mantic InRelease
Holen:17 http://security.ubuntu.com/ubuntu mantic-security/universe DEP-11 48x48 Icons [4.111 B]
Holen:18 http://archive.ubuntu.com/ubuntu mantic-updates InRelease [109 kB]
Holen:19 http://security.ubuntu.com/ubuntu mantic-security/universe DEP-11 64x64 Icons [8.636 B]
Holen:20 http://security.ubuntu.com/ubuntu mantic-security/universe DEP-11 128x128 Icons [18,6 kB]
Holen:21 http://security.ubuntu.com/ubuntu mantic-security/universe amd64 c-n-f Metadata [648 B]
OK:22 http://archive.ubuntu.com/ubuntu mantic-backports InRelease
Holen:23 http://archive.ubuntu.com/ubuntu mantic-updates/main i386 Packages [18,5 kB]
Holen:24 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 Packages [40,9 kB]
Holen:25 http://archive.ubuntu.com/ubuntu mantic-updates/main Translation-en [14,2 kB]
Holen:26 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 DEP-11 Metadata [2.376 B]
Holen:27 http://archive.ubuntu.com/ubuntu mantic-updates/main DEP-11 48x48 Icons [587 B]
Holen:28 http://archive.ubuntu.com/ubuntu mantic-updates/main DEP-11 64x64 Icons [3.678 B]
Holen:29 http://archive.ubuntu.com/ubuntu mantic-updates/main DEP-11 128x128 Icons [7.414 B]
Holen:30 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 c-n-f Metadata [1.048 B]
Holen:31 http://archive.ubuntu.com/ubuntu mantic-updates/universe amd64 Packages [15,7 kB]
Holen:32 http://archive.ubuntu.com/ubuntu mantic-updates/universe i386 Packages [5.812 B]
Holen:33 http://archive.ubuntu.com/ubuntu mantic-updates/universe Translation-en [6.600 B]
Holen:34 http://archive.ubuntu.com/ubuntu mantic-updates/universe amd64 DEP-11 Metadata [3.864 B]
Holen:35 http://archive.ubuntu.com/ubuntu mantic-updates/universe DEP-11 48x48 Icons [4.111 B]
Holen:36 http://archive.ubuntu.com/ubuntu mantic-updates/universe DEP-11 64x64 Icons [8.636 B]
Holen:37 http://archive.ubuntu.com/ubuntu mantic-updates/universe DEP-11 128x128 Icons [18,6 kB]
Holen:38 http://archive.ubuntu.com/ubuntu mantic-updates/universe amd64 c-n-f Metadata [684 B]
Es wurden 577 kB in 2 s geholt (306 kB/s).
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Aktualisierung für 22 Pakete verfügbar. Führen Sie »apt list --upgradable« aus, um sie anzuzeigen.

Revision history for this message
Martin Schubert (schubi83) said :
#7

dpkg l | grep ' linux-'
ii ladspa-sdk 1.17-1 amd64 sample tools for linux-audio-dev plugin architecture
ii linux-base 4.5ubuntu9 all Linux image base package
ii linux-firmware 20230919.git3672ccab-0ubuntu2.1 amd64 Firmware for Linux kernel drivers
ii linux-headers-6.2.0-1014-lowlatency 6.2.0-1014.14 amd64 Linux kernel headers for version 6.2.0 on 64 bit x86 SMP
ii linux-headers-6.2.0-1015-lowlatency 6.2.0-1015.15 amd64 Linux kernel headers for version 6.2.0 on 64 bit x86 SMP
ii linux-headers-6.2.0-35 6.2.0-35.35 all Header files related to Linux kernel version 6.2.0
ii linux-headers-6.5.0-9 6.5.0-9.9 all Header files related to Linux kernel version 6.5.0
ii linux-headers-6.5.0-9-generic 6.5.0-9.9 amd64 Linux kernel headers for version 6.5.0 on 64 bit x86 SMP
ii linux-headers-6.5.0-9-lowlatency 6.5.0-9.9.1 amd64 Linux kernel headers for version 6.5.0 on 64 bit x86 SMP
ii linux-headers-generic 6.5.0.9.11 amd64 Generic Linux kernel headers
ii linux-headers-lowlatency 6.5.0.9.9.9 amd64 lowlatency Linux kernel headers
rc linux-image-5.19.0-1007-lowlatency 5.19.0-1007.7 amd64 Signed kernel image lowlatency
rc linux-image-5.19.0-1012-lowlatency 5.19.0-1012.13 amd64 Signed kernel image lowlatency
rc linux-image-5.19.0-1014-lowlatency 5.19.0-1014.15 amd64 Signed kernel image lowlatency
rc linux-image-5.19.0-1015-lowlatency 5.19.0-1015.16 amd64 Signed kernel image lowlatency
rc linux-image-5.19.0-1017-lowlatency 5.19.0-1017.18 amd64 Signed kernel image lowlatency
rc linux-image-5.19.0-1018-lowlatency 5.19.0-1018.19 amd64 Signed kernel image lowlatency
rc linux-image-5.19.0-1022-lowlatency 5.19.0-1022.23 amd64 Signed kernel image lowlatency
rc linux-image-6.2.0-1003-lowlatency 6.2.0-1003.3 amd64 Signed kernel image lowlatency
rc linux-image-6.2.0-1005-lowlatency 6.2.0-1005.5 amd64 Signed kernel image lowlatency
rc linux-image-6.2.0-1007-lowlatency 6.2.0-1007.7 amd64 Signed kernel image lowlatency
rc linux-image-6.2.0-1008-lowlatency 6.2.0-1008.8 amd64 Signed kernel image lowlatency
rc linux-image-6.2.0-1009-lowlatency 6.2.0-1009.9 amd64 Signed kernel image lowlatency
rc linux-image-6.2.0-1010-lowlatency 6.2.0-1010.10 amd64 Signed kernel image lowlatency
rc linux-image-6.2.0-1011-lowlatency 6.2.0-1011.11 amd64 Signed kernel image lowlatency
rc linux-image-6.2.0-1012-lowlatency 6.2.0-1012.12 amd64 Signed kernel image lowlatency
rc linux-image-6.2.0-1013-lowlatency 6.2.0-1013.13 amd64 Signed kernel image lowlatency
rH linux-image-6.2.0-1014-lowlatency 6.2.0-1014.14 amd64 Signed kernel image lowlatency
ii linux-image-6.2.0-1015-lowlatency 6.2.0-1015.15 amd64 Signed kernel image lowlatency
iF linux-image-6.5.0-9-lowlatency 6.5.0-9.9.1 amd64 Signed kernel image lowlatency
ii linux-image-lowlatency 6.5.0.9.9.9 amd64 lowlatency Linux kernel image
ii linux-libc-dev:amd64 6.5.0-9.9 amd64 Linux Kernel Headers for development
ii linux-lowlatency 6.5.0.9.9.9 amd64 Complete lowlatency Linux kernel
ii linux-lowlatency-headers-6.2.0-1014 6.2.0-1014.14 all Header files related to Linux kernel version 6.2.0
ii linux-lowlatency-headers-6.2.0-1015 6.2.0-1015.15 all Header files related to Linux kernel version 6.2.0
ii linux-lowlatency-headers-6.5.0-9 6.5.0-9.9.1 all Header files related to Linux kernel version 6.5.0
rc linux-modules-5.19.0-1007-lowlatency 5.19.0-1007.7 amd64 Linux kernel extra modules for version 5.19.0 on 64 bit x86 SMP
rc linux-modules-5.19.0-1012-lowlatency 5.19.0-1012.13 amd64 Linux kernel extra modules for version 5.19.0 on 64 bit x86 SMP
rc linux-modules-5.19.0-1014-lowlatency 5.19.0-1014.15 amd64 Linux kernel extra modules for version 5.19.0 on 64 bit x86 SMP
rc linux-modules-5.19.0-1015-lowlatency 5.19.0-1015.16 amd64 Linux kernel extra modules for version 5.19.0 on 64 bit x86 SMP
rc linux-modules-5.19.0-1017-lowlatency 5.19.0-1017.18 amd64 Linux kernel extra modules for version 5.19.0 on 64 bit x86 SMP
rc linux-modules-5.19.0-1018-lowlatency 5.19.0-1018.19 amd64 Linux kernel extra modules for version 5.19.0 on 64 bit x86 SMP
rc linux-modules-5.19.0-1022-lowlatency 5.19.0-1022.23 amd64 Linux kernel extra modules for version 5.19.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1003-lowlatency 6.2.0-1003.3 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1005-lowlatency 6.2.0-1005.5 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1007-lowlatency 6.2.0-1007.7 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1008-lowlatency 6.2.0-1008.8 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1009-lowlatency 6.2.0-1009.9 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1010-lowlatency 6.2.0-1010.10 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1011-lowlatency 6.2.0-1011.11 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1012-lowlatency 6.2.0-1012.12 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1013-lowlatency 6.2.0-1013.13 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-1014-lowlatency 6.2.0-1014.14 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
ii linux-modules-6.2.0-1015-lowlatency 6.2.0-1015.15 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
ii linux-modules-6.5.0-9-lowlatency 6.5.0-9.9.1 amd64 Linux kernel extra modules for version 6.5.0 on 64 bit x86 SMP
ii linux-sound-base 1.0.25+dfsg-0ubuntu7 all base package for ALSA and OSS sound systems

Revision history for this message
Martin Schubert (schubi83) said :
#8

apt policy ubuntustudio-lowlatency-settings:
ubuntustudio-lowlatency-settings:
  Installiert: (keine)
  Installationskandidat: 23.10.15
  Versionstabelle:
     23.10.15 500
        500 http://archive.ubuntu.com/ubuntu mantic/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu mantic/universe i386 Packages
     22.10.6 -1
        100 /var/lib/dpkg/status

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

What output do you receive for

cat -n /etc/grub.d/09_lowlatency
sudo dpkg --audit
sudo dpkg --configure -a

Revision history for this message
Martin Schubert (schubi83) said :
#10

cat -n /etc/grub.d/09_lowlatency:
     1 #! /bin/sh
     2 set -e
     3
     4 # grub-mkconfig helper script.
     5 # Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
     6 #
     7 # GRUB is free software: you can redistribute it and/or modify
     8 # it under the terms of the GNU General Public License as published by
     9 # the Free Software Foundation, either version 3 of the License, or
    10 # (at your option) any later version.
    11 #
    12 # GRUB is distributed in the hope that it will be useful,
    13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    15 # GNU General Public License for more details.
    16 #
    17 # You should have received a copy of the GNU General Public License
    18 # along with GRUB. If not, see <http://www.gnu.org/licenses/>.
    19 #
    20 # Ubuntustudio customization that keeps the latest lowlatency kernel
    21 # as the first menu item and default boot even if there is a newer
    22 # generic or other kernel. Often the updated generic kernel is
    23 # released a few days earlier than the lowlatency kernel
    24
    25 prefix="/usr"
    26 exec_prefix="/usr"
    27 datarootdir="/usr/share"
    28 ubuntu_recovery="1"
    29 quiet_boot="1"
    30 quick_boot="1"
    31 gfxpayload_dynamic="1"
    32 vt_handoff="1"
    33
    34 . "$pkgdatadir/grub-mkconfig_lib"
    35
    36 export TEXTDOMAIN=grub
    37 export TEXTDOMAINDIR="${datarootdir}/locale"
    38
    39 # only 09_lowlatency or 10_linux should run, since we got this far
    40 # 10_linux should not run next
    41 if [ -x /etc/grub.d/10_linux ]; then
    42 chmod -x /etc/grub.d/10_linux
    43 fi
    44
    45 CLASS="--class gnu-linux --class gnu --class os"
    46 SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd upstart:/sbin/upstart"
    47
    48 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
    49 OS=GNU/Linux
    50 else
    51 case ${GRUB_DISTRIBUTOR} in
    52 Ubuntu|Kubuntu)
    53 OS="${GRUB_DISTRIBUTOR}"
    54 ;;
    55 *)
    56 OS="${GRUB_DISTRIBUTOR} GNU/Linux"
    57 ;;
    58 esac
    59 CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
    60 fi
    61
    62 # loop-AES arranges things so that /dev/loop/X can be our root device, but
    63 # the initrds that Linux uses don't like that.
    64 case ${GRUB_DEVICE} in
    65 /dev/loop/*|/dev/loop[0-9])
    66 GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
    67 # We can't cope with devices loop-mounted from files here.
    68 case ${GRUB_DEVICE} in
    69 /dev/*) ;;
    70 *) exit 0 ;;
    71 esac
    72 ;;
    73 esac
    74
    75 # btrfs may reside on multiple devices. We cannot pass them as value of root= parameter
    76 # and mounting btrfs requires user space scanning, so force UUID in this case.
    77 if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
    78 || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
    79 || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
    80 LINUX_ROOT_DEVICE=${GRUB_DEVICE}
    81 else
    82 LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
    83 fi
    84
    85 case x"$GRUB_FS" in
    86 xbtrfs)
    87 rootsubvol="`make_system_path_relative_to_its_root /`"
    88 rootsubvol="${rootsubvol#/}"
    89 if [ "x${rootsubvol}" != x ]; then
    90 GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} threadirqs ${GRUB_CMDLINE_LINUX}"
    91 fi;;
    92 xzfs)
    93 rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
    94 bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
    95 LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"
    96 ;;
    97 esac
    98
    99 title_correction_code=
   100
   101 if [ -x /lib/recovery-mode/recovery-menu ]; then
   102 GRUB_CMDLINE_LINUX_RECOVERY=recovery
   103 else
   104 GRUB_CMDLINE_LINUX_RECOVERY=single
   105 fi
   106 if [ "$ubuntu_recovery" = 1 ]; then
   107 GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY nomodeset"
   108 fi
   109
   110 if [ "$vt_handoff" = 1 ]; then
   111 for word in $GRUB_CMDLINE_LINUX_DEFAULT; do
   112 if [ "$word" = splash ]; then
   113 GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \$vt_handoff"
   114 fi
   115 done
   116 fi
   117
   118 if [ x"$GRUB_FORCE_PARTUUID" != x ]; then
   119 echo "set partuuid=${GRUB_FORCE_PARTUUID}"
   120 fi
   121
   122 linux_entry ()
   123 {
   124 os="$1"
   125 version="$2"
   126 type="$3"
   127 args="$4"
   128
   129 if [ -z "$boot_device_id" ]; then
   130 boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
   131 fi
   132 if [ x$type != xsimple ] ; then
   133 case $type in
   134 recovery)
   135 title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")" ;;
   136 init-*)
   137 title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "${type#init-}")" ;;
   138 *)
   139 title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
   140 esac
   141 if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
   142 replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
   143 quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
   144 title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
   145 grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
   146 fi
   147 echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
   148 else
   149 echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
   150 fi
   151 if [ "$quick_boot" = 1 ]; then
   152 echo " recordfail" | sed "s/^/$submenu_indentation/"
   153 fi
   154 if [ x$type != xrecovery ] ; then
   155 save_default_entry | grub_add_tab
   156 fi
   157
   158 # Use ELILO's generic "efifb" when it's known to be available.
   159 # FIXME: We need an interface to select vesafb in case efifb can't be used.
   160 if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
   161 echo " load_video" | sed "s/^/$submenu_indentation/"
   162 else
   163 if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
   164 echo " load_video" | sed "s/^/$submenu_indentation/"
   165 fi
   166 fi
   167 if ([ "$ubuntu_recovery" = 0 ] || [ x$type != xrecovery ]) && \
   168 ([ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 1 ]); then
   169 echo " gfxmode \$linux_gfx_mode" | sed "s/^/$submenu_indentation/"
   170 fi
   171
   172 echo " insmod gzio" | sed "s/^/$submenu_indentation/"
   173 echo " if [ x\$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi" | sed "s/^/$submenu_indentation/"
   174
   175 if [ x$dirname = x/ ]; then
   176 if [ -z "${prepare_root_cache}" ]; then
   177 prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
   178 fi
   179 printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
   180 else
   181 if [ -z "${prepare_boot_cache}" ]; then
   182 prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
   183 fi
   184 printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
   185 fi
   186 if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
   187 message="$(gettext_printf "Loading Linux %s ..." ${version})"
   188 sed "s/^/$submenu_indentation/" << EOF
   189 echo '$(echo "$message" | grub_quote)'
   190 EOF
   191 fi
   192 if test -d /sys/firmware/efi && test -e "${linux}.efi.signed"; then
   193 sed "s/^/$submenu_indentation/" << EOF
   194 linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args}
   195 EOF
   196 else
   197 # We have initrd and PARTUUID is set - we try to boot without initrd, and fallback to using it
   198 # if it fails.
   199 # "panic=-1" means "on panic reboot immediately". "panic=0" disables the reboot behavior.
   200 if [ x"$GRUB_FORCE_PARTUUID" != x ]; then
   201 linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}"
   202 fi
   203 message="$(gettext_printf "Loading initial ramdisk ...")"
   204 if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then
   205 sed "s/^/$submenu_indentation/" << EOF
   206 if [ "\${initrdfail}" = 1 ]; then
   207 linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
   208 EOF
   209 if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
   210 sed "s/^/$submenu_indentation/" << EOF
   211 echo '$(echo "$message" | grub_quote)'
   212 EOF
   213 fi
   214
   215 sed "s/^/$submenu_indentation/" << EOF
   216 initrd ${rel_dirname}/${initrd}
   217 else
   218 linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1
   219 fi
   220 initrdfail
   221 EOF
   222 else
   223 # We don't have initrd or we don't want to set PARTUUID. Don't try initrd-less boot with fallback.
   224 sed "s/^/$submenu_indentation/" << EOF
   225 linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
   226 EOF
   227 if test -n "${initrd}"; then
   228 # We do have initrd - let's use it at boot.
   229 # TRANSLATORS: ramdisk isn't identifier. Should be translated.
   230 if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
   231 sed "s/^/$submenu_indentation/" << EOF
   232 echo '$(echo "$message" | grub_quote)'
   233 EOF
   234 fi
   235 sed "s/^/$submenu_indentation/" << EOF
   236 initrd ${rel_dirname}/${initrd}
   237 EOF
   238 fi
   239 fi
   240 fi
   241 sed "s/^/$submenu_indentation/" << EOF
   242 }
   243 EOF
   244 }
   245
   246 machine=`uname -m`
   247 case "x$machine" in
   248 xi?86 | xx86_64)
   249 list=
   250 for i in /boot/vmlinuz-*lowlatency /vmlinuz-*lowlatency /boot/kernel-*lowlatency ; do
   251 if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
   252 done
   253 list2=
   254 for i in /boot/vmlinuz-*generic /vmlinuz-*generic /boot/kernel-*generic ; do
   255 if grub_file_is_not_garbage "$i" ; then list2="$list2 $i" ; fi
   256 done ;;
   257 *)
   258 list=
   259 for i in /boot/vmlinuz-*lowlatency /boot/vmlinux-*lowlatency /vmlinuz-*lowlatency /vmlinux-*lowlatency /boot/kernel-*lowlatency ; do
   260 if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
   261 done
   262 list2=
   263 for i in /boot/vmlinuz-*generic /boot/vmlinux-*generic /vmlinuz-*generic /vmlinux-*generic /boot/kernel-*generic ; do
   264 if grub_file_is_not_garbage "$i" ; then list2="$list2 $i" ; fi
   265 done ;;
   266 esac
   267
   268 case "$machine" in
   269 i?86) GENKERNEL_ARCH="x86" ;;
   270 mips|mips64) GENKERNEL_ARCH="mips" ;;
   271 mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
   272 arm*) GENKERNEL_ARCH="arm" ;;
   273 *) GENKERNEL_ARCH="$machine" ;;
   274 esac
   275
   276 prepare_boot_cache=
   277 prepare_root_cache=
   278 boot_device_id=
   279 title_correction_code=
   280
   281 cat << 'EOF'
   282 function gfxmode {
   283 set gfxpayload="${1}"
   284 EOF
   285 if [ "$vt_handoff" = 1 ]; then
   286 cat << 'EOF'
   287 if [ "${1}" = "keep" ]; then
   288 set vt_handoff=vt.handoff=1
   289 else
   290 set vt_handoff=
   291 fi
   292 EOF
   293 fi
   294 cat << EOF
   295 }
   296 EOF
   297
   298 # Use ELILO's generic "efifb" when it's known to be available.
   299 # FIXME: We need an interface to select vesafb in case efifb can't be used.
   300 if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 0 ]; then
   301 echo "set linux_gfx_mode=$GRUB_GFXPAYLOAD_LINUX"
   302 else
   303 cat << EOF
   304 if [ "\${recordfail}" != 1 ]; then
   305 if [ -e \${prefix}/gfxblacklist.txt ]; then
   306 if hwmatch \${prefix}/gfxblacklist.txt 3; then
   307 if [ \${match} = 0 ]; then
   308 set linux_gfx_mode=keep
   309 else
   310 set linux_gfx_mode=text
   311 fi
   312 else
   313 set linux_gfx_mode=text
   314 fi
   315 else
   316 set linux_gfx_mode=keep
   317 fi
   318 else
   319 set linux_gfx_mode=text
   320 fi
   321 EOF
   322 fi
   323 cat << EOF
   324 export linux_gfx_mode
   325 EOF
   326
   327 # Extra indentation to add to menu entries in a submenu. We're not in a submenu
   328 # yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
   329 submenu_indentation=""
   330
   331 is_top_level=true
   332 is_generic_top=true
   333 if [ "x$list" = "x" ]; then
   334 is_top_level=false
   335 generic_is_default=true
   336 fi
   337 if [ "x$list2" = "x" ]; then
   338 is_generic_top=false
   339 fi
   340 while [ "x$list $list2" != "x" ] ; do
   341 if [ "x$is_generic_top" = xtrue ] && [ "x$is_top_level" != xtrue ]; then
   342 linux=`version_find_latest $list2`
   343 case $linux in
   344 *.efi.signed)
   345 # We handle these in linux_entry.
   346 list2=`echo $list2 | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
   347 continue
   348 ;;
   349 esac
   350 else
   351 linux=`version_find_latest $list`
   352 if [ "x$linux" = "x" ]; then
   353 break
   354 fi
   355 case $linux in
   356 *.efi.signed)
   357 # We handle these in linux_entry.
   358 list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
   359 continue
   360 ;;
   361 esac
   362 fi
   363 gettext_printf "Found linux image: %s\n" "$linux" >&2
   364 basename=`basename $linux`
   365 dirname=`dirname $linux`
   366 rel_dirname=`make_system_path_relative_to_its_root $dirname`
   367 version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
   368 alt_version=`echo $version | sed -e "s,\.old$,,g"`
   369 linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
   370
   371 initrd=
   372 for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
   373 "initrd-${version}" "initramfs-${version}.img" \
   374 "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
   375 "initrd-${alt_version}" "initramfs-${alt_version}.img" \
   376 "initramfs-genkernel-${version}" \
   377 "initramfs-genkernel-${alt_version}" \
   378 "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
   379 "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
   380 if test -e "${dirname}/${i}" ; then
   381 initrd="$i"
   382 break
   383 fi
   384 done
   385
   386 config=
   387 for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
   388 if test -e "${i}" ; then
   389 config="${i}"
   390 break
   391 fi
   392 done
   393
   394 initramfs=
   395 if test -n "${config}" ; then
   396 initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
   397 fi
   398
   399 if test -n "${initrd}" ; then
   400 gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
   401 elif test -z "${initramfs}" ; then
   402 # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
   403 # no initrd or builtin initramfs, it can't work here.
   404 linux_root_device_thisversion=${GRUB_DEVICE}
   405 fi
   406
   407 if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
   408 linux_entry "${OS} (lowlatency)" "${version}" simple \
   409 "${GRUB_CMDLINE_LINUX} threadirqs ${GRUB_CMDLINE_LINUX_DEFAULT}"
   410
   411 if [ -z "$boot_device_id" ]; then
   412 boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
   413 fi
   414 if [ "x$is_generic_top" != xtrue ]; then
   415 submenu_indentation="$grub_tab"
   416 # TRANSLATORS: %s is replaced with an OS name
   417 echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
   418 fi
   419 is_top_level=false
   420 continue
   421 fi
   422
   423 if [ "x$is_generic_top" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
   424 linux_entry "${OS} (generic)" "${version}" simple \
   425 "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
   426
   427 submenu_indentation="$grub_tab"
   428 list="$list $list2"
   429
   430 if [ -z "$boot_device_id" ]; then
   431 boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
   432 fi
   433 # TRANSLATORS: %s is replaced with an OS name
   434 echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
   435 is_generic_top=false
   436 continue
   437
   438 fi
   439
   440 linux_entry "${OS}" "${version}" advanced \
   441 "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
   442 for supported_init in ${SUPPORTED_INITS}; do
   443 init_path="${supported_init#*:}"
   444 if [ -x "${init_path}" ] && [ "$(readlink -f /sbin/init)" != "$(readlink -f "${init_path}")" ]; then
   445 linux_entry "${OS}" "${version}" "init-${supported_init%%:*}" \
   446 "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} init=${init_path}"
   447 fi
   448 done
   449 if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
   450 linux_entry "${OS}" "${version}" recovery \
   451 "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
   452 fi
   453
   454 list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
   455 done
   456
   457 # If at least one kernel was found, then we need to
   458 # add a closing '}' for the submenu command.
   459 if [ x"$is_top_level" != xtrue ]; then
   460 echo '}'
   461 fi
   462
   463 echo "$title_correction_code"

Revision history for this message
Martin Schubert (schubi83) said :
#11

sudo dkpg --audit:
Die folgenden Pakete wurden entpackt, aber noch nicht konfiguriert.
Sie müssen mit dpkg --configure oder dem Konfigurations-Menüeintrag in
dselect konfiguriert werden, damit sie ordnungsgemäß funktionieren:
 grub-efi-amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
 grub-efi-amd64-signed GRand Unified Bootloader, version 2 (EFI-AMD64 version,
 shim-signed Secure Boot chain-loading bootloader (Microsoft-signed bi

Die folgenden Pakete sind nur halb konfiguriert, wahrscheinlich durch
Probleme während der ersten Konfiguration. Die Konfiguration sollte mit
dpkg --configure <Paket> oder mit dem Konfigurations-Menüeintrag in
dselect erneut versucht werden:
 linux-image-6.5.0-9-lowlatency Signed kernel image lowlatency
 memtest86+ thorough real-mode memory tester

Die folgenden Pakete sind wegen Problemen während der Installation nur halb
installiert. Die Installation kann wahrscheinlich durch erneuten Versuch
beendet werden; die Pakete können mit dselect oder mit dpkg --remove entfernt
werden:
 linux-image-6.2.0-1014-lowlatency Signed kernel image lowlatency

Die folgenden Pakete sind getriggert worden, aber die Triggerverarbeitung
ist noch nicht erfolgt. Triggerverarbeitung kann mit dselect oder
dpkg --configure --pending (oder dpkg --triggers-only) angefordert werden:
 man-db tools for reading manual pages

Revision history for this message
Martin Schubert (schubi83) said :
#12

sudo dpkg --configure -a
memtest86+ (6.20-3) wird eingerichtet ...
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
/etc/grub.d/09_lowlatency: 1: version_find_latest: not found
dpkg: Fehler beim Bearbeiten des Paketes memtest86+ (--configure):
 »installiertes post-installation-Skript des Paketes memtest86+«-Unterprozess gab den Fehlerwert 127 zurück
linux-image-6.5.0-9-lowlatency (6.5.0-9.9.1) wird eingerichtet ...
grub-efi-amd64 (2.12~rc1-10ubuntu4) wird eingerichtet ...
Installing grub to /boot/efi.
x86_64-efi wird für Ihre Plattform installiert.
Installation beendet. Keine Fehler aufgetreten.
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
/etc/grub.d/09_lowlatency: 1: version_find_latest: not found
dpkg: Fehler beim Bearbeiten des Paketes grub-efi-amd64 (--configure):
 »installiertes post-installation-Skript des Paketes grub-efi-amd64«-Unterprozess gab den Fehlerwert 127 zurück
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von grub-efi-amd64-signed:
 grub-efi-amd64-signed hängt ab von grub-efi-amd64 | grub-pc; aber:
  Paket grub-efi-amd64 ist noch nicht konfiguriert.
  Paket grub-pc ist nicht installiert.

dpkg: Fehler beim Bearbeiten des Paketes grub-efi-amd64-signed (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von shim-signed:
 shim-signed hängt ab von grub-efi-amd64-signed (>= 1.191~) | grub-efi-arm64-signed (>= 1.191~) | base-files (<< 12.3); aber:
  Paket grub-efi-amd64-signed ist noch nicht konfiguriert.
  Paket grub-efi-arm64-signed ist nicht installiert.
  Version von base-files auf dem System ist 13ubuntu2.
 shim-signed hängt ab von grub-efi-amd64-signed (>= 1.187.2~) | grub-efi-arm64-signed (>= 1.187.2~); aber:
  Paket grub-efi-amd64-signed ist noch nicht konfiguriert.
  Paket grub-efi-arm64-signed ist nicht installiert.

dpkg: Fehler beim Bearbeiten des Paketes shim-signed (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Trigger für man-db (2.11.2-3) werden verarbeitet ...
Trigger für linux-image-6.5.0-9-lowlatency (6.5.0-9.9.1) werden verarbeitet ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.5.0-9-lowlatency
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
/etc/grub.d/09_lowlatency: 1: version_find_latest: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: Fehler beim Bearbeiten des Paketes linux-image-6.5.0-9-lowlatency (--configure):
 »installiertes post-installation-Skript des Paketes linux-image-6.5.0-9-lowlatency«-Unterprozess gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 memtest86+
 grub-efi-amd64
 grub-efi-amd64-signed
 shim-signed
 linux-image-6.5.0-9-lowlatency

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

This looks somewhat like a version conflict with files from an older release conflicting with the newest version.

/etc/grub.d/09_lowlatency is part of the package ubuntustudio-lowlatency-settings, but that is not (or no more) installed on your system.

What output do you receive for

apt policy grub-common
ls -l /etc/grub.d

Additional remark:
There are two different kernel families, lowlatency and generic.. You better have only one of them installed. Which one do you want?
Depending on that decision, either /etc/grub.d/09_lowlatency or /etc/grub.d/10_linux should be active and the other one deactivated.

Do you want to have "Ubuntustudio 23.10" or "plain Ubuntu 23.10"?

Revision history for this message
Martin Schubert (schubi83) said :
#14

Thanks for the support so far, Manfred. I figured, that the issue is related to some conflicting kernel files, but I don't know how to solve the issue ... maybe a change in /etc/grub.d/09_lowlatency will fix it?
Since I am recording music on my computer, I prefer the lowlatency kernel over the standard kernel.

apt policy grub-common:
grub-common:
  Installiert: 2.12~rc1-10ubuntu4
  Installationskandidat: 2.12~rc1-10ubuntu4
  Versionstabelle:
 *** 2.12~rc1-10ubuntu4 500
        500 http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages
        100 /var/lib/dpkg/status

ls -l /etc/grub.d:
insgesamt 168
-rwxr-xr-x 1 root root 10661 Okt 2 16:23 00_header
-rwxr-xr-x 1 root root 6260 Sep 19 2022 05_debian_theme
-rwxr-xr-x 1 root root 15845 Mär 19 2022 09_lowlatency
-rw-r--r-- 1 root root 18228 Okt 2 16:23 10_linux
-rwxr-xr-x 1 root root 43202 Okt 2 16:23 10_linux_zfs
-rwxr-xr-x 1 root root 14459 Okt 2 16:23 20_linux_xen
-rwxr-xr-x 1 root root 4228 Aug 19 12:40 20_memtest86+
-rwxr-xr-x 1 root root 786 Okt 2 16:23 25_bli
-rwxr-xr-x 1 root root 13120 Okt 2 16:23 30_os-prober
-rwxr-xr-x 1 root root 1174 Okt 2 16:23 30_uefi-firmware
-rwxr-xr-x 1 root root 722 Feb 26 2023 35_fwupd
-rwxr-xr-x 1 root root 214 Sep 19 2022 40_custom
-rwxr-xr-x 1 root root 215 Sep 19 2022 41_custom
-rw-r--r-- 1 root root 483 Sep 19 2022 README
-rw-r--r-- 1 root root 260 Mär 19 2022 README.lowlatency

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#15

It seems to me to be the following:

You had ubuntustudio 23.04 installed, which installed the ubuntustudio-lowlatency-settings package with the 09_lowlatency script.
After the upgrade to Ubuntu 23.10 ubuntustudio-lowlatency-settings is not installed any more, but the 09_lowlatency script is still there.
The version of the 09_lowlatency script that is installed on your system, apparently is incompatible with the grub version that you have installed now (as part of Ubuntu 23.10), the ubuntustudio-lowlatency-settings package on Ubuntu 23.10 does not even provide a 09_lowlatency script any more.

Compare
https://packages.ubuntu.com/lunar/all/ubuntustudio-lowlatency-settings/filelist
and
https://packages.ubuntu.com/mantic/all/ubuntustudio-lowlatency-settings/filelist

What I do not understand is why the 09_lowlatency script is still there, but the package 09_lowlatency is not installed.

I assume that the following action will bring the package management system back into a working condition:

sudo rm /etc/grub.d/09_lowlatency
sudo rm /etc/grub.d/README.lowlatency
sudo chmod a+x /etc/grub.d/10_linux
sudo dpkg --configure -a

And after that you can decide how to proceed further.
If you are interested in Ubuntustudio and the lowlatency kernel, then you might try installing the package ubuntustudio-desktop
(Note: I cannot promise that this installs a 6.5-lowlatency kernel as desired)

Revision history for this message
Martin Schubert (schubi83) said :
#16

Thanks Manfred Hampl, that solved my question.

Revision history for this message
Martin Schubert (schubi83) said :
#17

Vielen Dank :)