Menu

Unable to remove erroneous Windows option

Paul
2017-08-16
2017-10-03
  • Paul

    Paul - 2017-08-16

    Before I ask this question, I just wanted to say thanks to Roderick W. Smith for such a great project! I'm having a small issue that I just can't seem to get to the bottom of and I would really appreciate some help. I'm using rEFInd on a MacBook Pro (mid 2010) with dual hard drives. I have MacOS Sierra on one drive and Windows 7 Pro on the other. I have both MacOS and Windows boot options in the menu, but there is a third Windows option. The text is exactly the same for both, Windows (legacy) boot on NTFS, and I can't seem to remove one without removing both (I tried disabling the hdbios option. They seem to be identical except that the second option only boots as far as a black scfeen that complains about a missing boot manager. It's not he end of the world because I can boot both OS but I'd be really grateful fir any suggestions...

     
  • Roderick W. Smith

    The new hiding feature piggybacks on the older dont_scan_volumes (for BIOS/CSM/legacy-mode OSes) and dont_scan_files (for EFI-mode OSes and tools) options. The former works on the descriptions shown in the rEFInd menu, so if the descriptions of two options are identical, there's no way to hide one but not the other with either dont_scan_volumes or the new hiding feature.

    That said, there are two ways you might be able to get it to work:

    • Install rEFInd's NTFS driver -- rEFInd provides an NTFS driver that will likely provide volume names for the BIOS-bootable Windows volume. This should enable them to be distinguished from one another, enabling you to hide the tag that's not working. In fact, installing the driver might be all that's needed, since rEFInd excludes non-bootable NTFS volumes if it can read the files on the volume to determine that those files don't include Windows boot files. There is, however, a caveat: The NTFS driver is not the most reliable of rEFInd's drivers. There's a chance that it will cause problems, perhaps even including a hang before rEFInd can display its menu. Thus, you should be 100% positive that you can bypass rEFInd to boot in some other way before you install this driver. Alternatively, you could use a secondary rEFInd installation with the NTFS driver, to be launched from the main rEFInd installation without the NTFS driver, to test it before adding the driver to the main rEFInd installation.
    • Alter the partition's boot record -- rEFInd is showing the useless boot entry because that partition includes what looks like boot loader code in its first sector; but the boot loader code is useless because the partition contains no follow-on boot loader. Thus, erasing the data that identifies the partition as bootable should make it disappear. To do this, you must edit the first sector of the partition (NOT of the entire disk!) with a hex editor. Change the final two bytes, which are 0x55AA, to anything else (say, 0x0000) and save the result back to disk. This should make the partition disappear from rEFInd's menu. The caveat is that I don't know how Windows tools might react. Although I was able to mount a USB flash drive that I modified in this way, in both Linux and Windows, it's conceivable that a Windows disk-check tool would interpret this change as filesystem damage and either repair it or refuse to operate on the disk.

    I think I'd try the NTFS driver first, but I'd do so carefully, in a way I was certain I could reverse even if it caused rEFInd to hang. If that fails or produces some unacceptable side effect, modifying the boot sector might be worth trying.

     

    Last edit: Roderick W. Smith 2017-08-18
  • Paul

    Paul - 2017-08-19

    Thank you so much, installing the ntfs driver fixed the problem straight away.
    Thanks again!

     
  • Assaf Berg

    Assaf Berg - 2017-10-03

    Thanks Roderick for this awesome project - long time user!

    I'm also having the problem with duplicate entries (grub-bios-gpt dual boot on a mac with a couple of disks). The suggestion to edit boot sectors is both complicated and dangerous (for non expert users). Wouldn't it be possible to make the labels unique somehow (ideally with adding something informative, but even a random -1, -2, -3 would be extremely helpful to get rid of entries if all else fails).

    BTW how would I get rid of duplicate "Whole disk" entries? Removing the 55AA at the end of the MBR makes it invalid and grub won't boot it any more. Is there a way to remove grub from the MBR so refind doesn't list it any more?

    Thanks!

     
  • Assaf Berg

    Assaf Berg - 2017-10-03

    It's a bit crude but zeroing out the MBR with dd and then recreating it with gdisk works...

     

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.