Menu

How to omit defunct Windows from rEFInd boot menu

2019-04-11
2019-04-14
  • Maurice Batey

    Maurice Batey - 2019-04-11

    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?

     
  • Roderick W. Smith

    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.

     
  • Maurice Batey

    Maurice Batey - 2019-04-11

    Alternatively, you can hide the entry

    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.

     
  • Maurice Batey

    Maurice Batey - 2019-04-11

    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

     
  • Maurice Batey

    Maurice Batey - 2019-04-12

    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:

    Name= Microsoft reserved partition
    Filesystem = "unknown"
    Size = 16.00 MiB
    Flag = mfstres
    Status= Not mounted
    

    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?

     
  • Roderick W. Smith

    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

     
  • Maurice Batey

    Maurice Batey - 2019-04-12

    P.S. The text on the 'Windows' icon in the rEFInd boot menu says:

    "Boot Microsoft EFI boot from SYSTEM".

        Does that help solve the mystery?
    

    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

     
  • Maurice Batey

    Maurice Batey - 2019-04-13

    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

     
  • Maurice Batey

    Maurice Batey - 2019-04-14

    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'.)

     
  • Maurice Batey

    Maurice Batey - 2019-04-14

    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?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.