Ubuntu 24.04.1 server - grub did not update after update-upgrade....

Bo Berglund bo.berglund at gmail.com
Thu Dec 26 23:48:20 UTC 2024


On Thu, 26 Dec 2024 17:29:30 -0500, Jeffrey Walton <noloader at gmail.com> wrote:

>On Thu, Dec 26, 2024 at 1:43?PM Bo Berglund <bo.berglund at gmail.com> wrote:
>>
>> I return with yet a new problem concerning my ubuntu server and grub boot....
>>
>> I have run a do-release-upgrade twice on this machine to get from 20.04.6 to
>> 24.04.1 LTS. It seemed to work with sime minor issues concerning a couple of
>> applications.
>>
>> Now after Xmas I am back and I ran:
>>
>> $ sudo apt update && sudo apt full-upgrade -y
>>
>> This shows a message inside all that is written about the system needing to be
>> rebooted to get from kernel 5.15.0-126 to 6.8.0-51 so I did the reboot and
>> nothing changed:
>>
>>
>> $ uname -r
>> 5.15.0-126-generic
>>
>> and
>>
>> $ dpkg --list 'linux-image*' | grep ^ii
>> ii  linux-image-5.15.0-126-generic 5.15.0-126.136 amd64 Signed kernel image
>> generic
>> ii  linux-image-6.8.0-51-generic 6.8.0-51.52 amd64 Signed kernel image generic
>> ii  linux-image-generic  6.8.0-51.52  amd64 Generic Linux kernel image
>> ii  linux-image-generic-hwe-20.04  5.15.0.126.136~20.04.1 amd64 Generic Linux
>> kernel image
>>
>> I then ran:
>>
>> sudo update-grub
>> sudo reboot
>>
>> And now I stopped to look at the grub menu
>> (the server is on partition nvme0n1p6)
>>
>> Main menu:
>> ------------------------------------------------------------------------
>>  Ubuntu
>>  Advanced options for Ubuntu
>>  Windows Boot Manager (on /dev/nvme0n1p1)
>> *Ubuntu 20.04.6 LTS (20.04)  (on /dev/nvme0n1p6)
>>  Advanced options for Ubuntu 20.04.6 LTS (20.04) (on /dev/nvme0n1p6)
>>  UEFI Firmware Settings
>>  GParted Live
>>  Bootable ISO Image: gparted-live-1.3.1-1-amd64
>> -------------------------------------------------------------------------
>>
>> Advanced options:
>> -------------------------------------------------------------------------
>> Advanced options:
>> *Ubuntu (on /dev/nvme0n1p6)
>>  Ubuntu. with Linux 5.15.0-126-generic (on /dev/nvme0n1p6)
>>  Ubuntu. with Linux 5.15.0-126-generic (recovery mode) (on /dev/nvme0n1p6)
>>  Ubuntu. with Linux 5.4.0-200-generic (on /dev/nvme0n1p6)
>>  Ubuntu. with Linux 5.4.0-200-generic (recovery mode) (on /dev/nvme0n1p6)
>>  Ubuntu. with Linux 5.4.0-89-generic (on /dev/nvme0n1p6)
>>  Ubuntu. with Linux 5.4.0-89-generic (recovery mode) (on /dev/nvme0n1p6)
>> -------------------------------------------------------------------------
>>
>> As you can see there is no mention at all of the new kernel 6.8.0-51 on the grub
>> menu....
>> And the Ubuntu version is wrong on the menu.
>>
>> What can I do in order to fix this issue?
>
>Is OS Prober disabled?
>
># grep -IR PROBE /etc
>/etc/grub.d/99-prober:GRUB_DISABLE_OS_PROBER=true
>/etc/grub.d/30_os-prober:if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
>/etc/grub.d/30_os-prober:  grub_warn "$(gettext_printf "os-prober will not be ex
>ecuted to detect other bootable partitions.\nSystems on them will not be added t
>o the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry
>.")"
>...
>
>I've also seen folks report that multiple Linux installations result
>in incorrect grub menus because the wrong grub config file was read
>(since there were multiple grub config files for grub to choose from).
>
>Jeff

I don't know what to expect from this command but I did it anyway since grep
should not be a big problem...

But I got a lot more than you show (I don't know what will happen with "long"
lines when I add the response to the meessage) but here we go:
Can anything be gleaned from this?


$ sudo grep -IR PROBE /etc
grep: /etc/dnsmasq.d/lxd: No such file or directory
/etc/rc5.d/S04acpid:    unset MODPROBE_OPTIONS
/etc/udev/rules.d/70-snap.core.rules:DRIVERS=="atmel_usart",
ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"
/etc/rc3.d/S04acpid:    unset MODPROBE_OPTIONS
/etc/grub.d/30_os-prober:elif [ "x${GRUB_DISABLE_OS_PROBER}" = "xauto" ]; then
/etc/grub.d/30_os-prober:    grub_warn "$(gettext_printf "os-prober will not be
executed to detect other bootable partitions.\nSystems on them will not be added
to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation
entry.")"
/etc/grub.d/30_os-prober:if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
/etc/grub.d/30_os-prober:  grub_warn "$(gettext_printf "os-prober will not be
executed to detect other bootable partitions.\nSystems on them will not be added
to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation
entry.")"
/etc/grub.d/30_os-prober:OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
/etc/grub.d/30_os-prober:if [ -z "${OSPROBED}" ] ; then
/etc/grub.d/30_os-prober:if [ "x$GRUB_TOP_LEVEL_OS_PROBER" != x ]; then
/etc/grub.d/30_os-prober:  OSPROBED=$(grub_move_to_front
"$GRUB_TOP_LEVEL_OS_PROBER" ${OSPROBED})
/etc/grub.d/30_os-prober:for OS in ${OSPROBED} ; do
/etc/grub.d/30_os-prober:    if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" ] && [
"x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ;
then
/etc/grub.d/30_os-prober:         LINUXPROBED="`linux-boot-prober btrfs
${BTRFSuuid} ${BTRFSsubvol}  2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
/etc/grub.d/30_os-prober:         LINUXPROBED="`linux-boot-prober ${DEVICE} 2>
/dev/null | tr ' ' '^' | paste -s -d ' '`"
/etc/grub.d/30_os-prober:      for LINUX in ${LINUXPROBED} ; do
grep: /etc/apache2/sites-enabled/home.boberglund.com.conf: No such file or
directory
/etc/rc2.d/S04acpid:    unset MODPROBE_OPTIONS
/etc/rc4.d/S04acpid:    unset MODPROBE_OPTIONS
grep: /etc/alternatives/python: No such file or directory
grep:
/etc/systemd/system/systemd-resolved.service.wants/resolvconf-pull-resolved.path:
No such file or directory
grep:
/etc/systemd/system/systemd-resolved.service.wants/resolvconf-pull-resolved.service:
No such file or directory
grep: /etc/systemd/system/timers.target.wants/snapd.refresh.timer: No such file
or directory
grep: /etc/systemd/system/timers.target.wants/fwupd-refresh.timer: No such file
or directory
grep: /etc/systemd/system/default.target.wants/ureadahead.service: No such file
or directory
grep: /etc/systemd/system/graphical.target.wants/udisks2.service: No such file
or directory
grep: /etc/systemd/system/sysinit.target.wants/resolvconf.service: No such file
or directory
grep: /etc/systemd/system/multi-user.target.wants/ufw.service: No such file or
directory
grep:
/etc/systemd/system/multi-user.target.wants/snapd.aa-prompt-listener.service: No
such file or directory
grep: /etc/systemd/system/multi-user.target.wants/secureboot-db.service: No such
file or directory
grep: /etc/systemd/system/multi-user.target.wants/lxd-agent-9p.service: No such
file or directory
grep: /etc/systemd/system/paths.target.wants/tpm-udev.path: No such file or
directory
/etc/init.d/acpid:    unset MODPROBE_OPTIONS
/etc/default/grub.ucf-dist:#GRUB_DISABLE_OS_PROBER=false


I also have this:
$ ll grub.d/
total 160
drwxr-xr-x   2 root root  4096 2024-12-14 14:02 .
drwxr-xr-x 165 root root 12288 2024-12-26 15:18 ..
-rwxr-xr-x   1 root root 10661 2024-04-04 12:12 00_header
-rwxr-xr-x   1 root root  6260 2022-12-02 16:18 05_debian_theme
-rwxr-xr-x   1 root root 18133 2024-04-04 12:12 10_linux
-rwxr-xr-x   1 root root 43202 2024-04-04 12:12 10_linux_zfs
-rwxr-xr-x   1 root root 14513 2024-04-04 12:12 20_linux_xen
-rwxr-xr-x   1 root root   786 2024-04-04 12:12 25_bli
-rwxr-xr-x   1 root root 13120 2024-04-04 12:12 30_os-prober
-rwxr-xr-x   1 root root  1174 2024-04-04 12:12 30_uefi-firmware
-rwxr-xr-x   1 root root   700 2022-02-21 04:06 35_fwupd
-rwxr-xr-x   1 root root   214 2017-12-12 23:48 40_custom
-rwxr-xr-x   1 root root   215 2022-12-18 22:21 41_custom
-rwxr-xr-x   1 root root  2155 2011-12-23 00:36 60_grub-imageboot
-rw-r--r--   1 root root   483 2017-12-12 23:48 README

-------- and the active content of /etc/default/grub: -------

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

------------- 
Further, 
If I look inside /boot/grub/grub.cfg I found these items
(I clipped lines to fit ):

menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class  {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; 
        insmod part_gpt
        insmod ext2
        search --no-floppy --fs-uuid --set=root ec0e8708-8a6a-4bbf-93ba-
        linux   /boot/vmlinuz-6.8.0-51-generic root=UUID=ec0e8708-8a6a-4
        initrd  /boot/initrd.img-6.8.0-51-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnuli
        menuentry 'Ubuntu, with Linux 6.8.0-51-generic' --class u
                recordfail
                load_video
                gfxmode $linux_gfx_mode
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; 
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root ec0e8708-
                echo    'Loading Linux 6.8.0-51-generic ...'
                linux   /boot/vmlinuz-6.8.0-51-generic root=UUID=
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-6.8.0-51-generic
        }
        menuentry 'Ubuntu, with Linux 6.8.0-51-generic (recovery 
                recordfail
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; 
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root ec0e8708-
                echo    'Loading Linux 6.8.0-51-generic ...'
                linux   /boot/vmlinuz-6.8.0-51-generic root=UUID=
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-6.8.0-51-generic
        }        

Notice the items "6.8.0" that are NOT shown when the system boots up and the
menu is displayed!!!

>From where is the bogus menu coming?


-- 
Bo Berglund
Developer in Sweden




More information about the ubuntu-users mailing list