So a few months ago, I had an issue where my computer stopped booting properly. Here is the previous thread
Last week, my UPS totally failed, and caused the system to shut down abruptly. Today I got the replacement UPS and tried to reboot my system, and it was behaving like it was a few months ago, where I was getting the black screen with the big white blinking cursor. We determined previously that meant Grub got wrecked after the update, so I assumed that was what happened this time as well, and retraced my steps
This time however, the output from the terminal is very different…
When using the command “install-grub” it repeatedly says “EFI variables are not supported on this system” and I get the error “grub-install: error: efibootmgr failed to register the boot entry: no such file or directory.” and says “WARNING: Bootloader is not properly installed, system may not be bootable” This does not bode well…
So I am once again asking for your help. Searching these errors yielded a lot of irrelevant results or just no results at all in some cases. My system, as was noted in the previous thread, is rather idiosyncratic so I find myself inside a lot of edge cases like this.
If we assume that at that very moment of the power outage there was no update running (only you can say), and that the filesystem is not damaged (you can check from a live usb without mounting!) then there is one more possibility.
The power outage caused power surge (that’s what ups is for to prevent but seems yours wasn’t working), which in theory can wipe the bios settings and reset them to defaults. Enter the bios and check everything. Especially that you are in EFI mode and not legacy or CSM. And turn off secure boot.
After that you will be able to boot in EFI mode and reinstall the grub menu entry and it will probably be enough. The filesystem will replay the journal on next boot and you will be fine.
This suggests that your system is booting in legacy BIOS emulation mode (i.e. CSM). Trying to reinstall grub while booted in this mode will probably destroy the first partition, given that the MBR of a GPT-partitioned drive is too small to hold both the boot.img and core.img stages of grub.
This is why legacy boot on a GPT drive requires an extra unformatted partition of type bios_grub and about 2 MiB in size, marked with the boot flag. If you have such a partition, grub-install will write the core.img to that unformatted partition.
What you could try is the following…
Enter the UEFI firmware settings and disable CSM (legacy mode).
Boot up from a live USB and chroot into your system.
Inspect the contents of your EFI system partition — if you chroot’ed correctly, then it will be mounted at /boot/efi in your chroot environment.
Restore the boot loader with…
install-grub
Let’s hope your partition itself isn’t damaged, because that would be harder to fix.
Well I know there was no update going on, so I doubt it was that
That would make a lot of sense, because the bios screen has been different since I started up again, running some of the old graphics it ran when I first got it, and is generally much slower, but I just assumed at first that it just does that when it loses power.
Following these instructions now
It was indeed in CSM mode, but for some reason it won’t let me disable Secure Boot… the option is just grey’d out. It was set to some sort of windows compatibility mode that I remember having to switch to “other OS” when I first built this machine, further supporting the “power surge resetting stuff in the BIOS” theory.
Running install-grub looks a lot like it did in the first thread. this feels like a good sign… Will try rebooting now…
Yessss. That did it. We back in there.
Well I’m glad this time this wasn’t as much of an odyssey as the previous time this happened this year. I’ll try updating everything and shaking everything down and report back if theres any other problems.
Thank you so much both of you, this has already been a pretty stressful day and you guys made it much easier
More likely what he wrote about earlier, that the firmware has a weird menu where he has to choose “other os” and that will probably unlock the option.
Even if it loses power there is the CMOS battery (a small button battery) on your mainboard that keeps your uefi//bios settings. If it’s dead you get the issues you described. Change it.
I mean, I was talking about how theres a setting in the bios that says it slow boots when coming back from AC Power Loss. I don’t actually know the status of the cmos, it doesn’t seem like it has an issue, it looked like the clock was fine. But the motherboard is also approaching 10 years old, so like, I dunno