Strange thing had happened today. I wanted to check something with LVM on my root filesystem, so I flashed Debian Bookworm netinst on my USB stick and booted it in rescue mode. However, it seemed that LVM was not available on bare netinst image and I couldn’t install it from the internet, because netinst didn’t have a nonfree wifi driver for my wifi card1. I ended up doing nothing in rescue mode and just rebooted.
My system didn’t boot.
What the hell?
I saw some kind of useless memory test (“Dell SupportAssist”) which Dell apparently runs in case when system fails to boot, without telling what’s the real reason is. If you wait long enough, it tells you that “everything is fine”, reboots and runs this stupid test again. It took me some time to figure out the real reason of this test and how to disable it in BIOS.
But anyway, how is it possible that I made no modifications to my system and it suddenly stopped booting? To my relief, when running rescue mode I expected to remove my home volume so I have made a full system backup just before, so at least there would be no data loss. But still, what the hell?
I flashed live CD which is more comfortable for situations like this. My /boot and /boot/efi were intact, but I decided to reinstall grub anyway. So I mounted everything, chrooted, reinstalled grub, double checked everything, rebooted, and… nothing.
At this point I thought to check what’s inside this /boot/efi, which strangely enough is a simple FAT32 partition. Basically I have 2 directories here: Dell, with some logs and debian, with some *.efi files, including grubx64.efi. I am no expert, but it looked like a file which should be executed during the boot to start the bootloader. Then I thought: “how likely it is that BIOS developed by Dell knows that it has to search a directory named debian and take a file named grubx64.efi from it? Rather unlikely.”
At this point I’m furiously clicking through my BIOS (yes, I can click through BIOS menus, what a time to be alive!), searching if there is a way to set this path. And, lo and behold, there is one! On my Dell it’s under Boot Sequence → Boot List Options → UEFI → Add Boot Option. I clicked it, named the new option with a random string and chose grub’s efi file with an ordinary file browser. This way the bootloader path was hardcoded and system started booting again.
I admit my loss this time. I don’t know what was the root cause of the problem and I don’t intend to try to discover it. Did Debian Rescue Mode modify my BIOS settings? Unlikely. Were they hardcoded before? I don’t remember, I haven’t played with BIOS for some time. Is there a way to learn what happened? Maybe there is, but I don’t know it.
And I’m too lazy to just move my ass and plug in the Ethernet cable. ↩