Issues with new Grub on old x86 hardware

I am using the x86 builds that boot using grub. For the 24.10 release, Grub 2.12 is used. This causes issues at my older hardware (that is still good enough for routing a gigabit) that can not boot with it - well it can when booting in legacy mode and not with EFI.

error: cannot load image.

    Failed to boot both default and fallback entries.

Press any key to continue

After picking the entry in the menu manually (just pressing Enter), the second error message appears:

error: cannot load image.

Press any key to continue ...

In OpenWrt 23.05, grub 2.06 is used which works perfectly fine. I can take the grub efi file from the old image and put it into the new image and then everything works again. One of the changes in the new grub version is that loading linux kernels is delegated to the EFI implementation. Another project solved this by patching grub so that they can use the new grub version but use the old loading routine.

The question is: How should/could this be handled with OpenWrt? I could imagine that I am not the only user of old hardware.

Can you elaborate on how you achieved this? I wouldn't mind giving this a try myself as well, as 24.10 is unbootable on my Qotom appliance, too (blank screen after GRUB boot menu, and loss of keyboard input that is never restored)

if loss of keyboard is in grub, remove all serial port settings from grub config.

Keyboard input in grub seems to be fine. The complete loss of input is right after I select a boot entry.

then try adding nomodeset as kernel param in grub.

Checked my grub setup on 23.05.5 and nomodeset isn't even there as a kernel param, interestingly. But if including that fixes my issue on 24.10 I will be able to test it later tonight then, hopefully

I extracted the old OpenWrt version image to a disk and mounted the first? partition. I copied the grub efi file (I would need to look up the exact path). Then I extracted the new version, mounted the partition again and overwrite the file there with the one from the old version.

However, it is very likely that this only helps with the error message that I got. In this case, grub can not start the kernel and grub itself shows the error message.

  • dd the combined working image to disk
  • replace the kernel bin in /boot with the one from the new release
  • dd the new release's rootfs (or sqashfs) to the 2nd partition.
  • update grub conf to use root=/dev/rootfs-partition instead of root=UUID=
  • reboot

you can keep upgrading this way, but skip the 1st step.
even have multiple installs on one drive, and alternate.

As I now have an older x86-64 device running as my backup router for the time being, I've finally been able to test this a little more. I juts flashed 24.10 over a perfectly-working 23.05.5 image. Rebooted, then in grub I added nomodeset, verifying that it was typed correctly and spaced separate from the other boot parameters, and then I pressed F10 to boot using this new set of parameters.

Immediately saw the screen change to "booting a command list" which I expect, however, keyboard input still diseppeared completely. I can still see that it's still displaying the message from above, so I can only presume the system is frozen completely.

:woman_shrugging:t2: