dakanji / RefindPlus

A Boot Manager for Mac and PC
GNU General Public License v3.0
295 stars 64 forks source link

NVRAM Boot Entries Are Shown As Shell Tools #184

Closed emperor06 closed 2 weeks ago

emperor06 commented 2 weeks ago

RefindPlus Version

v0.14.1.AA Release

Device Type

UEFI PC

Problem Description

My tool row is filled with many shell icons, corresponding to the various entries I have in nvram (like local HD, usb, optical, or OS boot entries). My config contains showtools shell

Problem Point

Before starting a loader or tool

Affected Items

One or More Tools (Second Row Items)

Debug Log

Debug logs are on the way, but I've been browsing scan.c and found 2 suspicious things. I don't know if that could help.

First, ScanForTools, case TAG_SHELL always calls ScanFirmwareDefined(), even if a shell has already been found. Maybe that's intended, I don't know, but I found it strange to search the firmware if we've already found the tool.

Second, in ScanFirmwareDefined(), if DontScanFirmware is empty, then every nvram entries are scanned and added, regardless of MatchThis (which, in this case, should contain L"shell"). I think that's why all the firmware entries become uefi shells in my toolbar.

Additional Context

No response

emperor06 commented 2 weeks ago

I've added a dummy dont_scan_firmware "hello world" to my config and the wrong shell tools are gone.

Here are the logs. 24k15s4428.log

dakanji commented 2 weeks ago

Thanks for the report and input. That aspect does need a revisit. Will get to it presently.

github-actions[bot] commented 2 weeks ago

This item was addressed by Commit 00dcb08eef8e6e0941db60f9f1ae81d59d252172.

Current RefindPlus Release: v0.14.1.AA. Refer to BUILDING.md to access functionality before the next release.

[!NOTE] Alternatively, the issue can be worked around pending the next release by setting the dont_scan_firmware configuration token to a random string.
For example, dont_scan_firmware ForgetMeNot

Thank you for taking the time to report a problem with RefindPlus.

github-actions[bot] commented 1 week ago

This thread is being locked.

Please use the Discussions Feature for follow-on discussion or raise a new issue if appropriate.