Recently, I installed rEFInd 0.14.2 on my Surface Pro 8, and I used XBOOTLDR partition, which was FAT32 format, to store kernels. Here is its blkid result:
It was weird that rEFInd could not find this volume. But if I load any filesystem driver or manually reload (press Esc) in main menu, it worked as expected.
And I modify the source code of efi_main function in refind/main.c like below:
The null result of FsName caused this problem, which indicates that it cannot read filesystem label at the time.
If I added ConnectAllDriversToAllControllers() before ScanVolumes(), I got correct result:
Cool. RefindPlus managed to find my XBOOTLDR partition. BTW, RefindPlus cannot boot after simply replacing grubx64.efi when boot with shim. I replaced shimx64.efi and successfully booted.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
RefindPlus follows a different logic path to rEFInd in that area as follows:
- Device handles are always reconnected and not only when drivers are found
- The second volume scan run is always done and not only when drivers are found
- The first volume scan is purely for setting the SelfVolume variable and halted once set
This was done to close a coverage gap in the RefindPlus implemention of a graphics handling improvement item developed by @joevt (https://github.com/joevt/joevtApps#reloadpcirom) but the root issue that device handles must be emunerated and reconnected to close a coverage gap was the same in your case. I had thought it was only needed for the GOP handling thing. Good to know closing the coverage gap serves other purposes and is a general improvement.
RefindPlus cannot boot after simply replacing grubx64.efi when boot with shim
Yes, RefindPlus binaries up to the current v0.14.1.AA release do not have SBAT sections and can therefore not be signed for UEFI Secure Boot. You have to disable secure boot, as you presumably did, or add the section yourself and then sign. The next release will have SBAT sections already added ready for signing.
PS: You should be able to get things working with rEFInd if you add at least one driver to be loaded so as to force ConnectAllDriversToAllControllers to be run.
Recently, I installed rEFInd 0.14.2 on my Surface Pro 8, and I used XBOOTLDR partition, which was FAT32 format, to store kernels. Here is its blkid result:
I added an OS stanza like below:
It was weird that rEFInd could not find this volume. But if I load any filesystem driver or manually reload (press Esc) in main menu, it worked as expected.
And I modify the source code of efi_main function in refind/main.c like below:
I got log like this:
The null result of FsName caused this problem, which indicates that it cannot read filesystem label at the time.
If I added ConnectAllDriversToAllControllers() before ScanVolumes(), I got correct result:
I'm not sure whether it is a general bug or device specific. Could anyone help me reproduce this bug on any other device? Thank you!
@chnex-dust
Temporarily replace the rEFInd efi file with RefindPlus and see if you get the same outcome.
See here for how to: https://sf.net/p/refind/discussion/general/thread/4d2754f090/#5d5f
Thanks
Cool. RefindPlus managed to find my XBOOTLDR partition. BTW, RefindPlus cannot boot after simply replacing grubx64.efi when boot with shim. I replaced shimx64.efi and successfully booted.
RefindPlus follows a different logic path to rEFInd in that area as follows:
- Device handles are always reconnected and not only when drivers are found
- The second volume scan run is always done and not only when drivers are found
- The first volume scan is purely for setting the
SelfVolume
variable and halted once setItem 1, always running
ConnectAllDriversToAllControllers
, is why things worked:https://github.com/dakanji/RefindPlus/blob/cd67424349ef3150aa5509bb5b4d11a6819578f3/BootMaster/driver_support.c#L895-L899
This was done to close a coverage gap in the RefindPlus implemention of a graphics handling improvement item developed by @joevt (https://github.com/joevt/joevtApps#reloadpcirom) but the root issue that device handles must be emunerated and reconnected to close a coverage gap was the same in your case. I had thought it was only needed for the GOP handling thing. Good to know closing the coverage gap serves other purposes and is a general improvement.
Yes, RefindPlus binaries up to the current v0.14.1.AA release do not have SBAT sections and can therefore not be signed for
UEFI Secure Boot
. You have to disable secure boot, as you presumably did, or add the section yourself and then sign. The next release will have SBAT sections already added ready for signing.PS: You should be able to get things working with rEFInd if you add at least one driver to be loaded so as to force
ConnectAllDriversToAllControllers
to be run.I created a driver that doesn't do anything as a work around for this once:
https://github.com/dakanji/RefindPlus/issues/17#issuecomment-765236639
You will presumably need to sign the driver before use in a secure boot setup.
Alternatively, you could try using "Extended Boot Loader Partition" in your stanza:
Last edit: dakanji 2024-08-22