Update-grub not working

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | Update from DietPi v8.24.1 to v9.1.1
  • Distro version | bookworm
  • Kernel version |Linux DietPi 6.1.0-18-amd64
  • Architecture | Native PC (x86_64)
  • SBC model | Minisforum GK41
  • Power supply used | (EG: 5V 1A RAVpower)
  • SD card used | no SD card, running DietPi on SATA SSD

Additional Information (if applicable)

  • Software title | Grub
  • Was the software title installed freshly or updated/migrated? If Grub has been updated then during DietPi Update (root@dietpi:~# dietpi-update)
  • Can this issue be replicated on a fresh installation of DietPi? didn’t try

Steps to reproduce

  1. Running DietPi-Update as described above. After reboot DietPi didn’t startup because of kernel load failure (error: file /boot/vmlinuz-6.1.0-13-amd64 not found)
  2. Using Live-Debian showed that Kernel version /boot/vmlinuz-6.1.0-18-amd was installed
  3. Booting DietPi again. Pressed "any key to continue twice and booted into Grub bootscreen. There i pressed “e” to edit startup commands. Changed the kernel version manually from /boot/vmlinuz-6.1.0-13-amd64 to /boot/vmlinuz-6.1.0-18-amd64.
  4. DietPi startup without problems, login as root@dietpi
  5. Running root@dietpi:~# update-grub → Error message command not found
    Running root@dietpi:~# su root update-grub → No such file or directory

Expected behaviour

have Grub searching for installed kernel on startup (/boot/vmlinuz-6.1.0-18-amd) permanently

Actual behaviour

Grub is looking for wrong (old and removed) kernel /boot/vmlinuz-6.1.0-13-amd

Extra details

Researching on this issue i found many ways of making Grub work correctly again (updating Grub / reinstalling Grup / Grub-Boot-Repair-Disk / Rescue Mode on Debian-Live-CD and others).

I just don’t know how to fix this issue without maybe crashing my system even further. Never had to fix Grub in my last 8 years of Linux usage.

###Things i would need:

  1. Some recommendation on how to fix this problem best and easiest on my DietPi system to make it boot the correct/installed kernel (vmlinuz-6.1.0-18-amd instead of vmlinuz-6.1.0-13-amd)

  2. Information on why grub-update is not working and how to fix this issue.

Thanks for your help in advance.

@MichaIng can you have a look pls

Is this a UEFI/GPT image, or MBR/CSM?

dpkg -l | grep grub

Probably the GRUB package is missing completely, when the command is not available. Of course this explains pretty well why its config was not updated automatically to load the new kernel. In case the above command does not return anything:

df /boot/efi

If it is an EFI system:

apt install grub-efi-amd64 grub-efi-amd64-signed shim-signed

else

apt install grub-pc
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.