Can rEFInd be forced to replace boot code in a MBR?

0

Is there a way to force rEFInd to replace the boot code in the MBR before preforming a BIOS boot of the Windows operating system on a Mac computer?

I understand that if the first 440 bytes in the MBR are zero, rEFInd will place boot code in the MBR before performing a BIOS boot of Windows.

If the code in the MBR is corrupt, then Windows (or in my case the windows installation files) will not boot. In such cases, I would like to find a way to replace the corrupt code in the MBR without having to use the original Windows installation iso or DVD.

I suppose one could enter commands in a OS X terminal window to zero the first 440 bytes, but with OS X 10.11 this require turning of SIP. I would prefer not having to do that.

David Anderson

Posted 2016-02-09T23:05:30.723

Reputation: 728

I don't think rEFInd cares about the MBR boot code at all? From what I read on the official website, it appears to be purely a (U)EFI boot manager, which means it only works with EFI binaries on the ESP. – Tom Yan – 2016-02-10T17:48:48.943

@Tom: This is a follow up question to my original question: Does rEFInd need code in the MBR to boot windows on a Mac?. From Ron Smith's answer, one can see rEFInd can modify the MBR on older Mac computers.

– David Anderson – 2016-02-10T17:58:56.133

I'm rEFInd's maintainer. No, you can't force it to write new BIOS boot code to the MBR. Your best bet is probably to boot to a Linux emergency disk (an Ubuntu "live" disk should do fine) and then use it to erase or re-write the MBR. Be careful, though! You should adjust only the first 440 bytes of the MBR. If you erase the whole thing, the partition table will be damaged, which will cause more problems! – Rod Smith – 2016-02-15T01:47:25.227

No answers