Grub has crashed and failed to load

I get this screen when I tried to boot my system normally. I tried sudo grub2-mkconfig -o /boot/grub2/grub.cfg multiple times while editing /etc/default/grub and /boot/loader/entries/* at the same time( by comparing my system’s with the live usb’s). The problem still persist after running sudo dnf update. I’m only able to boot from a live usb.

What might be causing this? Any viable fixes, pls ?

Thanks

Here are the instructions to repair grub:

So now it is safe again, to rely on Fedora Docs, regarding grub-install, or in a case of needing to re-install grub?

Since when have the Docs been fixed?

Asking this, seriously, since I ran in to some deep ends before with that documentation, regarding grub, a month or two ago… and only an intervention by @computersavvy helped me to rescue my system by pointing out, that Fedora:Docs were hopelessly overaged and faulty then, providing me the correct way on this forum…

I still thank him, but the question still remains:
Are the Fedora:Docs reliable now, regarding grub-install / re-install?

Once bitten, twice shy I am.

I am curious about why you are once again having problems with grub.

What has happened to cause this particular issue?
New install?
New machine?
Wiped out and reinstalling?
Upgrade that failed?
Something else?

Please give us details as to what has led up to the problem, and what the current system config is so we know where to start.

As far as the docs are concerned, some are up to date and some aren’t so I suggest reading, then ask if the info is correct before you jump in. If you ask about the docs then please link to exactly what the question concerns so we can tell what you are reading and asking about.

1 Like

There is a link to Docs regarding re-installation of grub, further up in this thread.

What happened to me? Nothing, except a few addittional Fedora installs on various computers (excluding the daily BS that happens to many folks). Momentarily testing Rawhide in a VM. But nothing critical occured, as of yet.

I was just interested to learn if that thread (being linked) up above is now up-to-date, or if it isn’t. That’s still my question. And it was that exact same thread you pointed out to me as being wrong and outdated, and provided me with the right solution, when I had to re-install, due to having relied on the friggin’ (outdated and wrong) docs in the first place. Remember?

If I have to re-install grub on Fedora I still go by my personal notes.

You know what I mean @computersavvy ?

The only thing i remember trying was to remove a kernel from the grub entries using

sudo grubby --remove=/boot/vmlinuz-5.18.17-200.fc36.x86_64
sudo grubby --remove-kernel=/boot/vmlinuz-5.18.17-200.fc36.x86_64;

followed by

sudo grubby --set-default=/boot/vmlinuz-5.18.17-200.fc36.x86_64
sudo grubby --add-kernel=/boot/vmlinuz-5.18.17-200.fc36.x86_64
sudo grubby --add-kernel=/boot/vmlinuz-5.18.17-200.fc36.x86_64 --title="Fedora 36 kernel 5.18.17-200"

But I din’t run grub2-mkconfig -o /boot/grub2/grub.cfg which is probably the fault. Do you perchance have a viable solution to this 'cause I’m going to try @vmbusguy suggestion.

As for the system configs, which will be relevant?

Thanks for your time.

https://discussion.fedoraproject.org/t/error-when-trying-to-update-grub-sudo-grub2-mkconfig-o-boot-grub2-grub-cfg/62249/5

1 Like

What do you mean by pointer file? Pls enlighten me. While I’ve managed to circumvent that screen (at the cost of losing the grub menu), I can only go as far as the grub cmdline then booting the system from there.
Do you have an idea as to how I can get back the grub menu?

Much thanks.

Why so cynical?

I was trying to answer your question up above, how to repair grub:

sudo rm /boot/grub2/grub.cfg /boot/efi/EFI/fedora/grub.cfg
sudo dnf reinstall grub2-efi* grub2-common
sudo reboot

You’ve misunderstood me🤷‍♂️. I was asking what a pointer file is with respect to grub2. At any rate, I’ve tried the above commands( and some variations of them); the most recent ones:

sudo mv /boot/efi/EFI /boot/efi/olds
sudo mv /boot/grub2 /boot/grub2.old
sudo mv /boot/grub /boot/grub.old
sudo mv /etc/default/grub /etc/default/grub.old
sudo mv /etc/grub.d /etc/grub.d.old
sudo dnf reinstall grub2* shim*

At this point I’d like to ask, is this what I’m suppose to get from grub2-mkconfig -o /boot/grub2/grub.cfg assuming only Fedora is installed?

Finally,

reboot

I only end up in the grub cmdline, no menu

Well, those commands are very different from the ones I gave you in my last post. Fedora has drastically changed their policy regarding how grub is installed, starting with F34… you took the old road, perhaps from the Docs… (see my comments on that, further up). It is why I linked the post by @computersavvy to show you the correct way.

A pointer-file is not a “real file” but only a stub (link) to a file by the same name residing on a different path. So this way (the old way from Docs) messes up your system by overwriting files with pointer-files…
Lessons learned, don’t “ever” rely on Fedora Docs! They’re more than untrustworthy, as it still seems. Yet Fedora seems not intent on changing this, nor give any damn about such issues as their own docs?! Anyway, they’re pretty ‘spiffy’ in most all other areas, and way ahead of most Linux distros (except for their point-and-click adventure which to me is draggingly relying on Gnome only), and that is only my very personal point of view. - Enough critique, though…
:wink:

Here’s a solution for you: :mega:

If you can chroot into your system from a USB Live-Iso or a different Linux system on your computer, you should do that and from within the chroot-environment execute these commands in this order:

rm /boot/efi/EFI/fedora/grub.cfg
rm /boot/grub2/grub.cfg
dnf reinstall shim-* grub2-efi* grub2-common
exit

Then sutdown your system from the Live-Iso, and reboot your computer normally (without Live Iso).

EDIT:
Please, take a look at this, before you follow the steps I gave you, at least the parts regarding how to re-install grub on Fedora 36:
https://fedoraproject.org/wiki/GRUB_2#Reinstalling_GRUB

Hope this helps!!!

:star_struck:

Can you turn your screen shot so we can read it?

From the Grub shell, it is not so difficult to boot, see for example how to rescue a non booting grub. After rebooting, you will run grub-mkconfig -o /boot/grub/grub.cfg so you can reboot again. You can also update the system to get any kernel that you accidently erased.