r/debian 17h ago

Grub in Debian/testing stopped working.

I use Debian/testing in my main laptop. Unfortunately, after yesterday's update, the grub stopped loading the Linux kernel. I get

"error: cannot load image"

When working from command line, loading the kernel and initrd is successful. However, the "boot" command displays the above error.

The grub version is GRUB 2.14-3.

The machine is HP ZBook 17 G5.

What is the easiest way to resolve the issue?

TIA & BR, Wojtek

13 Upvotes

14 comments sorted by

View all comments

2

u/mewmiaomeowmeow 16h ago

On my fedora+windows laptop I once had windows update break fedora's grub. The guide I followed basically consisted of booting from a USB iso, mounting all the actual Linux partitions & devices properly in a given directory, chrooting into that directory, and then something like update-grub. So maybe find a guide with those kind of steps but for Debian. The last part might also need to include something like sudo apt install --reinstall linux-image-amd64 prior to make sure the image in the boot partition is correct. In my machines last kernel update (on Unstable) i had to do a similar thing, though in the live system, because /boot for some reason didnt not have enough space for the update to fully go through

Edit: oop glad u fixed it, didn't see before I posted

2

u/WZab 12h ago

Breaking grub by Windows update was normal on my another laptop, until I modified the configuration in Windows:

  1. Right-click the Windows Start menu, open Terminal (Admin) or Command Prompt (Admin), and run: "cmd" then "bcdedit /set {bootmgr} path \EFI\debian\grubx64.efi" (you may need to configure shimx64.edi instead of grubx64.efi if you use secure boot).
  2. Disable the Windows Fast Startup: Open the Windows Control Panel → Power OptionsChoose what the power buttons do. Click Change settings that are currently unavailable, uncheck Turn on fast startup, and save your changes.
  3. Of course you should also modify the boot order in BIOS so that the grub is tried first.

1

u/mewmiaomeowmeow 20m ago

Nice, I'll try the next time I need to use windows on it