Closed birdie-github closed 1 year ago
Have you tried loading it as tool?
Have you tried loading it as tool?
I'm not sure what you mean.
I'm not using any special options, the config file is untouched (default).
rEFInd (and RefindPlus) gives special treatment to the EFI/tools subdirectory, where it looks for system tools rather than boot loaders.
# The default setting is shell, memtest, gdisk, apple_recovery, windows_recovery, mok_tool, about, hidden_tags, shutdown, reboot, firmware, fwupdate
#
# Setting "showtools" alone, with no options, completely disables scanning for tools.
# Scans for default tools when commented out
#
#showtools shell,bootorder,gdisk,memtest,mok_tool,apple_recovery,windows_recovery,about,hidden_tags,reboot,exit
In theory if you place the memtest in EFI/tools it should show up in the tools menu.
These are the expected memtest efi names:
https://github.com/dakanji/rEFInd/blob/d5c0a48a01427ed7a3cb3eb324c59fb965358b1d/refind/scan.c#L88
The question is an OS could be named anything, right?
There's a valid BOOTX64.efi
- why is it being ignored?
"Classic" Refind sees it.
I mean isn't it crazy that memtest86p/bootx64.efi
is detected and found and memtest/BOOTX64.efi
is not? ;-)
As @startergo pointed out, MemTest
is a tool and if you want to use it, you should put it in an appropriate location and add the relevant flag to the showtools
list.
Tools (second row items) are not supposed to show up as loaders (first row items). The reason why it shows up in rEFInd is simply down to a bug which has been largely, but not yet completely, eliminated in RefindPlus.
The last vestiges of this bug will be eradicated in the next release of RefindPlus. I already have the code on my local machine and it will be pushed at some point later.
I mean isn't it crazy that memtest86p/bootx64.efi is detected and found and memtest/BOOTX64.efi is not
Not really if you know how things work. To RefindPlus, the former is a file related to some unknown item called memtest86p
that it therefore needs to show as a loader while the latter is a MemTest file that should only be shown in the second row (if the memtest
flag is set).
EDIT
memtest86p
appears to be a version of memtest that is not currently recognised as such by RefindPlus.
Will rectify this.
Here's what I think about all of that:
/boot/efi/EFI/fedora/mmx64.efi
. Now you're saying specifically for Refind Plus I should move this file elsewhere? Does that mean files duplication for no reasons or breaking my Linux package consistency?This all looks extremely dubious for me. Also:
There are seemingly 7 (seven) completely counter intuitive decisions in terms of dealing with specific arbitrary EFI applications.
You've given 0 (zero) reasons why this complexity should exist.
What I loved about Classic Refind is that it just works out of the box.
Now you ask me to learn
/boot/efi/EFI
?Sorry, this all looks like complete madness. What's even worse, there's nothing in the EFI standard ( https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf ) which even has the word "Tools" in it (aside from "EBC Tools" but that's not what you had in mind).
Nothing about tools here or here:
The "Tools" concept is extremely counter-intuitive, illogical and complicated for no reasons.
Oh, there's this:
UEFI Application
Modular code that may be loaded in the boot services environment to accomplish
platform specific tasks within that environment. Examples of possible applications
might include diagnostics or disaster recovery tools shipped with a platform that run
outside the OS environment. UEFI applications may be loaded in accordance with
policy implemented by the platform firmware to accomplish a specific task. Control is
then returned from the UEFI application to the platform firmware.
2.1.2 UEFI Applications
Applications written to this specification are loaded by the Boot Manager or by other UEFI applications.
To load a UEFI application the firmware allocates enough memory to hold the image, copies the sections
within the UEFI application image to the allocated memory, and applies the relocation fix-ups needed.
Once done, the allocated memory is set to be the proper type for code and data for the image. Control is
then transferred to the UEFI application’s entry point. When the application returns from its entry point,
or when it calls the Boot Service EFI_BOOT_SERVICES.Exit(), the UEFI application is unloaded from
memory and control is returned to the UEFI component that loaded the UEFI application.
When the Boot Manager loads a UEFI application, the image handle may be used to locate the “load
options” for the UEFI application. The load options are stored in nonvolatile storage and are associated
with the UEFI application being loaded and executed by the Boot Manager.
But again 0 indication that an "application" has to be put in a specific directory.
@dakanji @startergo
Please reply.
I hope that's going to be a thoughtful reasonable rational answer with solid arguments based in real life, common sense and logic, thank you very much.
Speaking of
#define MEMTEST_NAMES L"memtest86.efi,memtest86_x64.efi,memtest86x64.efi,bootx64.efi"
Yeah, you indeed imply MemTest is a single EFI binary when it's not.
MemTest86 (not memtest86+) consists of a dozen files plus an extra directory and it requires a dedicated directory for itself to function.
You heavily imply all the tools are simple single file EFI loaders.
Seemingly over 200 lines of code for a completely arbitrary artificial decision.
I understand Refind has built-in tools, it's fine, let them be in a second separate row. But these are simply application functions, not tools.
I do not understand why you mandate that some other external separate EFI loaders must be tools as well. That makes 0 sense.
Speaking of arbitrary tools, you have not considered other tools:
/boot/efi/EFI/fedora/grubx64.efi
/boot/efi/EFI/fedora/gcdx64.efi
/boot/efi/EFI/fedora/shimx64.efi
Again what I'm trying to say is that simply enumerating /boot/efi/*/*x64.efi
files is a whole lot easier than adding completely unneeded arbitrary chosen complexity.
Please direct your observations upstream (the rEFInd project). Changes made there will be adopted here.
You ask the user to know/learn about what constitutes an OS and what constitutes an utility, with no clear indication/distinction between them
On this however, what constitutes a tool is clearly spelt out in the documentation and in the config file:
rEFInd configuration guide (Works for RefindPlus) is here: https://www.rodsbooks.com/refind/configfile.html
Refind should have never had tools in the first place.
It has built-in EFI routines, e.g. "Boot into EFI configuration", Reboot, Power off - that's it.
There's no need to treat arbitrary EFI loaders as "Tools".
this all looks like complete madness
I have always found it interesting that a person that makes such an inflammatory statement can, with the next breath, turn around and claim they are looking for a thoughtful reasonable rational answer
Anyway, deep breath....
Let's pick the points made one by one:
You ask the user to know/learn about what constitutes an OS and what constitutes an utility, with no clear indication/distinction between them.
CleanNvram
, added to RefindPlusDivergence
in the readme on this repo's front pageYou ask the user to put utilities files into "Tools" (no idea where this directory should be and how files need to be placed in it). Never used in Classic Refind either.
As above and the Never Used
statement is false. You are clearly not as familiar with rEFInd as you think.
You ask the user to edit the configuration file in order for Tools to become visible.
RefindPlus does not ask such. It simply follows what rEFInd has established which is to show a default set of tools unless changed by a user.
Maybe I understood you wrong but it looks like Tools comprises of a single EFI loader when MemTest86 consists of a almost a dozen files and a directory
The rEFInd project has determined memtest
to be a "tool" and this, as with 90% of stuff, is followed by RefindPlus. If you think it should be changed, ask upstream.
Here's another counter example: Fedora Linux has its MOK manager in this file:
/boot/efi/EFI/fedora/mmx64.efi
. Now you're saying specifically for Refind Plus I should move this file elsewhere? Does that mean files duplication for no reasons or breaking my Linux package consistency?
RefindPlus does nothing differently to rEFInd on this and does not have any RefindPlus specific requirements on this. Please refer your concerns upstream.
This all looks extremely dubious for me.
Ask upstream please
Tools are shown as small icons in the second row. Why? There are equally important.
The rEFInd project thinks differently. Same with the rEFIt project it was based on. If you want that the rEFInd project changes the structure it has been using for well over a decade now, I suppose you can always ask.
The EFI file is not shown for tools. Why?
Ask upstream please
You've given 0 (zero) reasons why this complexity should exist.
Ignoring that I do not see what the big deal is, the important thing is that you are barking up the wrong tree as RefindPlus did not exist when the structure was created by rEFIt ages ago, before adopted by rEFInd fork and now in the RefindPlus.
What I loved about Classic Refind is that it just works out of the box.
It doesn't seem you actually understand how tools work in rEFInd.
The only difference in RefindPlus regarding tools (apart from having an extra one) is that RefindPlus tries to consistently enforce the PRINCIPLE (established upstream) of tools only appearing in the second row.
In rEFInd, memtest
will only appear in the second row under some circumstances and appear in both under other circumstances (random to a user). In RefindPlus, once the bug fix is completed, it will only appear in the second row under ALL circumstances unless given a non-standard name.
Now you ask me to learn XYZ list
There is nothing in RefindPlus that follows a different principle on the items in your list from what was established in rEFIt/rEFInd. Please educate yourself on those if you wish to make comparisons.
Sorry, this all looks like complete madness. What's even worse, there's nothing in the EFI standard
Keeping calm, please note this simple statement: REFINDPLUS DID NOT ESTABLISH THIS!!!
.
The "Tools" concept is extremely counter-intuitive, illogical and complicated for no reasons.
The rEFit developer clearly felt otherwise about 20 years ago, the rEFInd developer obviously agreed and maintained this. RefindPlus has no intention of deviating from rEFInd on this aspect (as with most).
Refind should have never had tools in the first place.
Please direct your views on the principles established by rEFit and adopted by rEFInd to the upstream project.
Thanks
Deal, I've already sent an email.
Sorry for the trouble and have a nice day!
Thank you for your answers anyways.
This thread is being locked.
Please use the Discussions Feature for follow-on discussion or raise a new issue if appropriate.
The EFI file is not shown for tools.
Buried within the rant, and consequently lost (as typical when communicating by ranting), was this apparent real issue. The MemTest Tool in RefindPlus did not pick up fallback loader files (bootx64.efi) and only explict memtest files (memtest_x64.efi, memtest.efi, memtet86.efi etc).
A HotFix build for v0.14.0.AA is planned to address a few issues that have cropped up post release. This feature will be included in that build; which will be added to the v0.14.0.AA release tag when completed. This is expected to happen sometime this week.
RefindPlus Version
v0.14.0.AA Release
Device Type
UEFI PC
Problem Description
Here's my
efi/memtest
:Problem Point
Other
Affected Items
Other Loader
Debug Log
RefindPlus completely ignores it for some reasons. Other EFI loaders are found and shown:
Additional Context
You can get it here:
https://www.memtest86.com/download.htm
This is reproducible on real HW and in a VirtualBox VM.
BTW, thanks a TON for the fork! Classic rEFInd doesn't show anything on my new laptop while RefindPlus works.