You are not logged in.

#1 2021-05-24 09:05:41

Wild Penguin
Member
Registered: 2015-03-19
Posts: 406

[SOLVED] Installing rEFInd in fallback bootx64.efi (forgetful BIOS)

Hi,

Has anyone tried and succesfully installed rEFInd as a fallback EFI entry as esp/EFI/BOOT/bootx64.efi?

According to wiki, one should:

# refind-install --usedefault /dev/sdXY

or even just copy the rEFInd binary to the bootx64 file. Both methods kind of work, however with copying rEFInd is in some kind of fallback text-mode (which is find in itself). By using --usedefault rEFInd does boot as more graphical, however in both modes rEFInd fails to actually boot any Linux Kernels - it just returns to it's boot menu - despite it seems to have parsed refind_linux.conf as the entries match what it should find; however it does not hide entries I've previously hidden in the "correct" rEFInd installation.

However, as a workaround this fallback rEFInd installation can boot any other entries in the ESP, such as grub, the working rEFInd installation or (I presume) systemd boot or kernels with an EFI stub (I don't have those installed at the moment). But I would prefer to have rEFInd working on itself as a fallback, since BIOSes can forget their EFI boot entries for various reasons.

I've tried to look at the rEFInd documentation or search vai Google for similar problems. The documentation is not helpful or I can not find the right place in the documentation - all I can find is to use the --usedefault option, and it is hinted it should just work, but it does not seem to be so. Seems like --usedefault does not install any drivers for rEFInd, and the fallback installation does not look in the same place as the regular installation.

Any ideas?

Last edited by Wild Penguin (2021-05-25 15:12:55)

Offline

#2 2021-05-25 15:12:44

Wild Penguin
Member
Registered: 2015-03-19
Posts: 406

Re: [SOLVED] Installing rEFInd in fallback bootx64.efi (forgetful BIOS)

Hi, replying to myself :-)

I was confused earlier by an old issue (design). Per default, rEFInd does not understand linux kernels with different names, and hence tries to load the wrong initramfs. It thinks all of the part after vmlinuz-linux* is the version string, and only takes the most recent file (by timestamp). Result: it tries to load vmlinuz-linux.img which will fail, if one has several Linux Kernels loaded (and plain "linux" is not the one with the newest timestamp). So what I'm seeing is intended behavior. rEFInd without any configuration file (which is what --usedefault is supposed to produce AFAIK) can not know/guess how to handle many Kernel image files and their corresponding initramfs's.

However, the fallback rEFInd can be handy to boot tools, or any other bootloader which might reside on the EFI. I'm fairly certain one could tweak the command line and load whatever Kernel it detects, without reverting to another bootloader (but didn't check it).

Cheers!

P.s. the fallback loader came in handy again while upgrading my MB ;-)

Offline

Board footer

Powered by FluxBB