dakanji / RefindPlus

A Boot Manager for Mac and PC
GNU General Public License v3.0
295 stars 64 forks source link

Legacy BootCamp Windows does not appear #148

Closed supaklaw closed 1 year ago

supaklaw commented 1 year ago

RefindPlus Version

v0.13.3.AC Release

Device Type

Apple Mac

Problem Description

After successfully installing refindplus with MyBootMgr which shows my 2 mac drives, and a linux install disk, it does not show a legacy Bootcamp drive (running Win 7). Within Mac Os (El Capitan) he startup disk control panel does show the drive, although previously it had displayed a windows drive icon, now shows a windows folder. I can boot to it directly from that control panel but would like the option to see and boot into the Bootcamp drive from refindplus. I am still using soft bless at the moment, I didn't want to hard bless until the issue is resolved or more info is available.

MP 3,1. nVidia GTX 780, running 10.11.6

i dont know how to run the debugger efi via mybootmgr, but will with some instructions

Problem Point

Before starting a loader or tool

Affected Items

Win OS Loader

Debug Log

23d07c3447.log DebugLog_ConfigFactory.log

Additional Context

No response

github-actions[bot] commented 1 year ago

Similarity Analysis

[Score: 59%] #17 [Score: 55%] #119 [Score: 54%] #114 [Score: 54%] #18 [Score: 53%] #126 [Score: 50%] #100

supaklaw commented 1 year ago

also after looking at other tickets, adding Disk 1 is SSD with the sole Win 7/Bootcamp installed on it. Disk 2 is primary MacOs el capitan, Disk 3 is my backup carbon cloned MacOS el capitan, disk 4 currently empty and wanted to install Linux on it. But windows is on it's own dedicated drive.

startergo commented 1 year ago

Try gptsync.efi. I am not sure it comes with RP, but it comes with rEFInd so you can grab it from there. Once you load it from the boot menu if there is a misalignment in the partitions it will offer to sync partitions automatically.

supaklaw commented 1 year ago

I drop that in MyBootMgr > EFI > tools folder before running ConfigFactory?

startergo commented 1 year ago

It does not matter when you put it. As long it is there prior to booting.

dakanji commented 1 year ago

Let's complete the diagnosis by checking the RefindPlus log before you run anything.

dont know how to run the debugger efi

RefindPlus has two efi files: A DEBUG file for trouble shooting and a RELEASE file for day to day use. The DBG file always generates a log file when in use and the REL file does not.

MyBootMgr always sets things up with the DBG file active and unless you have done the step in the MyBootMgr guide to switch to the REL file via the SwtchRunMode app, the debug logs will be sitting in your ESP. So use the TweakESP app to mount the ESP you deployed to (on your Mac HD disk), grab the latest log file there and share that.

If you have already switched the run mode to use the REL file, use the SwtchRunMode app to change back to DBG and reboot to get the log. When everything is sorted, use it to go back to REL and delete the log files in the ESP etc as set out in the guide.

supaklaw commented 1 year ago

23d07c3447.log

dakanji commented 1 year ago

Thanks.

Please unzip the attached to your desktop, mount the ESP as before, rename the BOOTx64.efi file under the BOOT folder as xBOOTx64.efix, paste the downloaded BOOTx64.efi file into the same folder, restart the Mac, and share the log.

X269-BOOTx64.zip

supaklaw commented 1 year ago

23d09s4518.log

dakanji commented 1 year ago

Please replace the previous file with the attached and share the log. X270a-BOOTx64.zip

Note that this runs significantly slower as it outputs a detailed debug log.

Thanks

supaklaw commented 1 year ago

23d10s5419.log

dakanji commented 1 year ago

Thanks.

So it seems RefindPlus is unable to detect the MBR Table and/or the associated Legacy Boot Code for the BootCamp volume.

It may be that GptSync can solve this problem indeed. To run this, you can get a copy in the Other Binaries folder if you download the RefindPlus package here on GitHub (https://github.com/dakanji/RefindPlus/releases). You will need to mount your ESP, drop a copy into the EFI/BOOT/Tools folder, add it to the showtools list in the config file and reboot.

instead of GptSync, I'll get rid of BootCamp and the HybridMBR hack it uses all together and use a Bare Metal installation instead myself. The linked instructions are for Windows 10 but can be used for any other version as long as you have the ISO.

HybridMBR is a hack to allow running legacy and UEFI loaders on the same disk that Apple adopted to run Legacy Windows and Mac OS on the same disk. Given that you are not even running Windows on a disk with Mac OS, you don't need HybridMBR and its problems in the first place.

For instance, it is the reason why your eDrive volumes, a Windows volume, seems to have Apple's HFS+ filesystem; which seems odd. You need to make the call but going bare metal, either using that VM based process or a physical Windows unit, would be my suggestion. This is sure to be problem free on RefindPlus or anything else.

startergo commented 1 year ago

For instance, it is the reason why your eDrive volumes, a Windows volume, seems to have Apple's HFS+ filesystem; which seems odd.

Why does it seem odd? That is precisely how hybrid MBR works. Bootcamp creates an NTFS partition (in reality it creates FAT partition, which is converted to NTFS by the Windows installer) alongside an HFS+ GPT partition converting one bit in the EFI partition so the GPT drive appears as an MBR drive to the Windows OS.

supaklaw commented 1 year ago

The eDrive volume is an Apple Techtool recovery volume I don't use, but is HFS+ filesystem I believe. It was created in El Capitan, not in Windows.

supaklaw commented 1 year ago

I followed the instructions for inserting gptsync into the config file, and it is not working.

What is happening is the main screen is showing two "Restore Tags" buttons, (the gptsync_x64 line was inserted after restore tags in the config file) and upon selecting either it operates as the restore tag function, but the highlighted selection returns to the first. In other words both buttons function as restore tags, the gptsync option is not visible.

IMG_0427

dakanji commented 1 year ago

Why does it seem odd?

A Windows disk in HFS+ seems odd to me. Either way, all moot given the explanation given.

The eDrive volume is an Apple Techtool recovery volume I don't use, but is HFS+ filesystem I believe. It was created in El Capitan, not in Windows.

I see. I thought it was a Windows eDrive (for Encryption). I suppose the options have been laid out clearly for you to make a call on how to proceed. Recommendation, if you can, is to ditch the HybridMBR. You don't need it to start with since you only have Windows on that disk.

dakanji commented 1 year ago

I followed the instructions for inserting gptsync into the config file, and it is not working.

You need to go over the process again. Here it is on my unit: Screen Shot 2023-02-10 at 23 49 04

supaklaw commented 1 year ago

config.txt

here's the config file, take a look

dakanji commented 1 year ago

You need to use the tags listed in the section above the showtools line. That is, gptsync and not gptsync_x64.

The latter is one of several possible names the binary can have but what is written as what to use in the config file is what must be used there

startergo commented 1 year ago
showtools shell, bootorder, gdisk, gptsync, memtest, mok_tool, about, hidden_tags, reboot, exit, firmware, fwupdate

or whatever your showtools line includes plus gptsync. and drop gptsync.efi or gptsync_x64.efi in the tools folder.

dakanji commented 1 year ago

or whatever your showtools line includes plus gptsync.efi.

I already gave him what is actually to be used. It is simply gptsync. Not gptsync_x64 or gptsync.efi. What is required is written there in the config file. Please follow that.

gptsync_x64.efi is how the binary is named in the RefindPlus package. Drop that in the tools folder as was already told and which i believe you have already done.

startergo commented 1 year ago

I saw the error and corrected it gptsync in the showtools. Thanks.

dakanji commented 1 year ago

Noted, but it was just repeating stuff (momentarily wrongly) that had already been given.

dakanji commented 1 year ago

You need to use the tags listed in the section above the showtools line.

Leaving you to it and will check in later. Hope it works out. If it doesn't or even if it does. I still think ditching the HybridMBR is best but you may prefer to keep it of course.

supaklaw commented 1 year ago

I updated the config and the utility shows up.

Does this utility actually mount a drive? Because it looked to me like it was trying to reformat my Mac drive?

I don't want to build a HybridMBR, or re-install Windows. I'd like to simply mount the Win 7 SSD.

startergo commented 1 year ago

it is not reformatting anything just syncing the partitions so the NTFS boot loader can be recognized again.

supaklaw commented 1 year ago

ok, just being sure I'm not about to format something.

startergo commented 1 year ago

gptsync reads the GPT partition table on device and synchronises the legacy MBR partition table with the GPT partition table. The MBR partition table can hold only 4 partitions. Legacy bootloaders or operating systems that do not support GPT require an MBR partition table; this is typically the case when using GRUB or LILO on an Intel-based Apple machine.

supaklaw commented 1 year ago

ok so just go ahead and hit yes to it's attempt to sync. If it succeeds the drive will show up in main screen, if it fails it won't, correct?

supaklaw commented 1 year ago

Ok, gave it a try, and it didn't work. Now as per suggestions, I was unaware of terminology in describing the issue.

This is a bare metal Window 7 install on it's own disk. I installed directly from a Win7 disc onto the SSD drive, and then manually updated Bootcamp drivers within Windows. I've been booting back and forth from each OS with no issues, and have used refind in the past and it saw all the drives no problem.

My understanding of the suggestions is that this drive just cannot be seen by ReFindPlus as a bare metal install?

startergo commented 1 year ago

and have used refind in the past and it saw all the drives no problem.

Can you retest with rEFInd to see if it finds Windows 7?

startergo commented 1 year ago

All you need to do is to copy the rEFInd_x64.efi to the EFI folder and rename it to bootx64.efi.

startergo commented 1 year ago

You need to copy/paste config.conf and rename it to refind.conf.

supaklaw commented 1 year ago

ok. Will this still boot into my non-flashed PC graphics card?

supaklaw commented 1 year ago

renaming old bootx64.efix as before, saving a copy of config and renaming that refind.conf

startergo commented 1 year ago

Don’t you have an original Apple GPU?

supaklaw commented 1 year ago

I do if needed, the entire idea was to not use it. I prefer keeping my nVidia gtx780 usable throughout boot process, hence the reason I don't want to use regular refind.

Those steps didn't result in a refind launch, it just booted normally to my Mac OS login.

startergo commented 1 year ago

Those steps didn't result in a refind launch, it just booted normally to my Mac OS login.

Did you replace the original bootx64.efi from RefindPlus?

supaklaw commented 1 year ago

yes

supaklaw commented 1 year ago

renamed config file, and replaced the bootx64 file, bootblessed it and relaunched

startergo commented 1 year ago

renamed config file, and replaced the bootx64 file, bootblessed it and relaunched

Try with OPTION key pressed at boot.

startergo commented 1 year ago

You can bless from the boot screen: CNTRL+ENTER will bless the selection.

dakanji commented 1 year ago

This is a bare metal Window 7 install on it's own disk. I installed directly from a Win7 disc onto the SSD drive, and then manually updated Bootcamp drivers within Windows.

I see. Then it should ordinarily be expected to work although I haven't actually come across this install type (I assume you mean you installed on the Mac).

In this case, you might want to try on rEFInd again since if that works, it should do the same on RefindPlus. Note however, that you will need to use a different GPU as the one you are currently using will not work with rEFInd.

The eDrive volume is an Apple Techtool recovery volume I don't use, but is HFS+ filesystem I believe. It was created in El Capitan, not in Windows.

Going back to this. Interestingly, the tool (never used it myself) has created the partition, or the partition has along the line been changed to, a Basic Data Partition (BDP) or as it is fully known, a Microsoft Basic Data Partition. This is just as odd on a Mac OS Partition as HFS+ is on a Windows one. I don't think it is directly related to anything going on now, and I can see it is indeed on another disk, but odd all the same and interesting, given that it has an HFS+ filesystem.

Anyway, do the rEFind test and report back.

EDIT: Before the rEFInd test, run diskutil list in Terminal to get the ID for the disk with Windows, use this to get disk info and share: sudo gpt -r show /dev/disk#. (change # to match).

dakanji commented 1 year ago

the main screen is showing two "Restore Tags"

BTW, this has exposed a bug in the inherited showtools processing logic. It recognises an invalid item in the list but does not quite handle this. Will fix RefindPlus and push this upstream later.

supaklaw commented 1 year ago

The bootcamp drive was corrupted and went into infinite repair loop, but managed to pull it and get back into the Mac drive. Running the diskutil list shows a 'suspicious MBR header', not sure if that was from the merge attempt or what happened.
diskutil.txt

dakanji commented 1 year ago

Suspicious MBR is what the tool rightly calls HybridMBR which should perhaps be renamed as "DodgyMBR".

So nothing unusual in it showing that by itself but as previously advised, you do not want to be using DodgyMBR unless you absolutely must; which is not the case for you.

You should do your disk and yourself a favour and stick to using "TrustworthyMBR" ... unless under duress!

Anyway, as the issue appears to have been due to disk health issues, I will tag this accordingly.

supaklaw commented 1 year ago

Correct, the disk was damaged by a HybridMBR merge at a contributor's suggestion, and it was unwise to follow it.

I'll go back to Refind.

startergo commented 1 year ago

There is no HybridMBr merge the tool syncs partitions which are out of sync. It cannot damage the partitions. You can ask the creator of rEFInd if you don't trust me.

gptsync.efi A tool that synchronizes the legacy MBR partition table with the GPT partition table. This gives legacy operating systems and boot loaders access to hard disk partitions. Also available directly in the rEFIt menu.