On my Lenovo ThinkPad 11e I first installed Linux (Mageia-6.1) to dual boot.
That worked fine, but now I have reformatted the Windows(10) partitions so as to make space for another Linux distribution.
But rEFInd is still showing a Windows icon in the boot menu!
rEFInd scans every partition it can read for EFI boot loaders in the partitions' root (/) and /boot directories, as well as most subdirectories of EFI. Windows is a slight special case, since its boot loader is in a sub-sub-directory (EFI/Microsoft/boot), so rEFInd looks for it there. It will normally exist on the EFI System Partition (ESP); however, some pre-installed systems have special vendor-specific partitions that hold recovery tools and the like, so you may see a Windows recovery icon that loads a tool from this partition, too.
If you've deleted Windows completely and you still see the icon, well, technically, you haven't deleted Windows completely, because you left its boot loader behind on the ESP. Deleting the boot loader will take care of the problem. (I'd delete the whole EFI/Microsoft directory tree, in fact.) Alternatively, you can hide the entry, but there's always a chance that something else will launch the Windows boot loader, which would then become confused when it couldn't find Windows. If you re-install Windows in the future, it will write a new boot loader to the ESP, whether or not one already exists.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
rEFInd does not scan for whole partitions (except for BIOS-mode boots on Macs); it scans for boot loader files. The ESP is a partition that's shared across OSes and that holds boot loader files. Deleting a Windows partition does not delete any files that Windows has stored on the ESP.
The description that rEFInd displays of a boot loader provides some clue about what it is, in the form of a name or description, such as "Boot {foo} from {bar}", where "{bar}" is a partition's name or description.
Also, as I stated in my earlier response, you can hide the entry in several ways:
Have re-checked /boot/EFI: Contains: /BOOT and /EFI [/BOOT contains just BOOT.SDI; renamed it - no effect]
/boot/EFI/EFI contains: /Boot /Microsoft /refind /tmp
of which I believe all but /refind are not scanned because of: dont_scan_dirs EFI/Boot EFI/Microsoft EFI/tmp
So I remain baffled that rEFInd's boot menu still includes Windows!
Is there no way to inhibit that, please?
Regards,
/\/\aurice
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
P.S.2
Interesting! I've just moved EFI/Boot and EFI/Microsoft into shelter inside EFI/refind and rebooted. Result:
The rEFInd boot menu no longer shows the 'arrow' icon substituted for the Windows icon. [Also the situation after restoring the "Windows" icon in
EFI/refind/icons]
Conclusion:
dont_scan_dirs EFI/Boot EFI/Microsoft are ignored by rEFInd when checking for Windows?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On my Lenovo ThinkPad 11e I first installed Linux (Mageia-6.1) to dual boot.
That worked fine, but now I have reformatted the Windows(10) partitions so as to make space for another Linux distribution.
But rEFInd is still showing a Windows icon in the boot menu!
N.B. My refind.conf includes :
dontscandirs EFI/tmp EFI/mageia EFI/Microsoft EFI/Boot
Where else does rEFInd look as a reason to include Windows in its boot menu?
rEFInd scans every partition it can read for EFI boot loaders in the partitions' root (
/
) and/boot
directories, as well as most subdirectories ofEFI
. Windows is a slight special case, since its boot loader is in a sub-sub-directory (EFI/Microsoft/boot
), so rEFInd looks for it there. It will normally exist on the EFI System Partition (ESP); however, some pre-installed systems have special vendor-specific partitions that hold recovery tools and the like, so you may see a Windows recovery icon that loads a tool from this partition, too.If you've deleted Windows completely and you still see the icon, well, technically, you haven't deleted Windows completely, because you left its boot loader behind on the ESP. Deleting the boot loader will take care of the problem. (I'd delete the whole
EFI/Microsoft
directory tree, in fact.) Alternatively, you can hide the entry, but there's always a chance that something else will launch the Windows boot loader, which would then become confused when it couldn't find Windows. If you re-install Windows in the future, it will write a new boot loader to the ESP, whether or not one already exists.Well ,i thought I had done that:
dontscandirs EFI/tmp EFI/mageia EFI/Microsoft EFI/Boot
Doesn't that hide the whole EFI/Microsoft directory tree?
Mmm.
P.S. Somehow lost the _ characters there ;
I do have them in refind.conf:
dont_scan_dirs EFI/tmp EFI/mageia EFI/Microsoft EFI/Boot
Windows still appearing in rEFInd boot menu!
The only partition I can see with Gparted that are is occupied by Linux (or the ESP (/dev/sda1)) is shown as /dev/sda2:
Could it be this partition that is causing rEFInd to include Windows?
(It seems to be unmountable.)
Any way to force rEFInd not to show Windows. please?
rEFInd does not scan for whole partitions (except for BIOS-mode boots on Macs); it scans for boot loader files. The ESP is a partition that's shared across OSes and that holds boot loader files. Deleting a Windows partition does not delete any files that Windows has stored on the ESP.
The description that rEFInd displays of a boot loader provides some clue about what it is, in the form of a name or description, such as "Boot {foo} from {bar}", where "{bar}" is a partition's name or description.
Also, as I stated in my earlier response, you can hide the entry in several ways:
https://www.rodsbooks.com/refind/configfile.html#hiding
P.S. The text on the 'Windows' icon in the rEFInd boot menu says:
"Boot Microsoft EFI boot from SYSTEM".
All other bootloaders in the ESP appear to be covered by the dontscandirs command in refind-conf.
Any loisting I can provide that would gelp?
Many thanks!
Regards, /\/\aurice
Have re-checked /boot/EFI: Contains: /BOOT and /EFI
[/BOOT contains just BOOT.SDI; renamed it - no effect]
/boot/EFI/EFI contains: /Boot /Microsoft /refind /tmp
of which I believe all but /refind are not scanned because of:
dont_scan_dirs EFI/Boot EFI/Microsoft EFI/tmp
So I remain baffled that rEFInd's boot menu still includes Windows!
Is there no way to inhibit that, please?
Regards,
/\/\aurice
P.S. As a stop-gap, I've replaced the 'Windows' icon by the 'right arrow'.
(I could have used the 'transparent' icon to stop 'WIndows' appearing, but then I would never notice if/when rEFInd no longer shows 'Windows'.)
P.S.2
Interesting! I've just moved EFI/Boot and EFI/Microsoft into shelter inside EFI/refind and rebooted. Result:
The rEFInd boot menu no longer shows the 'arrow' icon substituted for the Windows icon.
[Also the situation after restoring the "Windows" icon in
EFI/refind/icons]
Conclusion:
dont_scan_dirs EFI/Boot EFI/Microsoft are ignored by rEFInd when checking for Windows?