Windows and TB work fine without the netstor, but I need it as well. For now I removed Thunderbolt.
Also, I actually don’t know exactly what the following terms mean :/
EFI - booting
UEFI - booting
BIOS - booting
What is the model of the Netstor? What is in the Netstor?
Windows can boot using two methods:
1)
BIOS: This is a compatibility mode - your Mac GPT partitioned disk may be a hybrid containing both a GPT and MBR partition map. The MBR partition map includes the Windows partition which is set as the active partition. The MBR is the first block of the disk. The MBR contains boot code which will execute more boot code from the first block of the active partition. This mode is used when you hold option at startup and select "Windows". There is one "Windows" option per disk that contains an MBR with boot code. Selecting a Windows partition in Startup Disk preferences panel sets an nvram parameter that points to the disk. Multiple Windows partitions may exist on a disk, but the MBR only boots the partition that is marked as active in the MBR. The rEFInd boot loader has code that will set the active partition if you select a partition that is not active.
BIOS mode on my Mac Pro only understands USB drives, the built-in DVD drives, and the built-in four hard drive bays. Other drives may confuse it.
2)
EFI: This is the method of booting used by macOS and also works with Ubuntu. For macOS, a file is blessed (a field in the HFS or APFS format). An nvram parameter points to the default blessed hard drive/file. The file is an EFI executable - boot loader. The file is executed by EFI firmware. Windows requires a certain version of EFI called UEFI. On older Macs, the EFI contains parts of UEFI but not enough to make Windows work correctly. Newer Macs have UEFI that allows booting Windows. The EFI firmware loads a file called bootx64.efi in the boot folder of the EFI folder of the EFI partition (usually the first partition of a GPT partitioned disk). There will also be a Microsoft folder containing a Boot folder containing the BCD which contains the boot options for Windows.
If you have multiple EFI boot loaders, then there will be a folder for each (Microsoft and Ubuntu) and the BootX64.efi file will be a copy of one of the efi files in one of those folders.
When you hold option during startup, you may see "EFI Boot" which refers to the BootX64.efi file.
EFI understands and works with any drives that have a EFI driver. EFI drivers can be easily added.
Use the following command to list all your disks:
Use the following command to examine the MBR partition map of a disk:
A GPT partitioned disk will only have one EE type partition that covers the entire disk. This is a protective partition map so that old disk partitioning programs that think your disk is MBR will think that there are no free blocks.
A hybrid MBR/GPT disk will have an EE partition in the MBR that only covers everything up to the end of the EFI partition. Up to three other partitions can exist in the MBR. Extended partitions (a method to have more than 4 partitions) is usually not used with hybrid disks. One of the three other partitions will correspond to your Windows partition (or whatever OS that boots using BIOS) and will be marked as active (has an * next to the partition number).
Use the following commands to examine the GPT partition map of a disk:
Code:
sudo gpt -r show -l /dev/disk0
sudo gpt -r show /dev/disk0
The -l option shows the partition names (stored in the GPT). These may differ from the volume names (stored on the volume).
Without the -l option, it shows the partition type GUID. The MBR is shown as PMBR which is the protective MBR partition map. The GPT table has two copies on the disk in case one gets corrupted.
A hybrid MBR/GPT disk will show MBR for the first block. the gpt command will say "suspicious MBR at sector 0".
Use the following command to examine the boot code in the MBR:
Code:
sudo dd if=/dev/rdisk0 count=1 | xxd
An MBR that doesn't have boot code will be mostly zeros. The partition map is the part near the end that is not all zeros. An MBR has bytes "55AA" at the end of the block.
Use the following commands to examine the VBR of a partition:
Code:
sudo dd if=/dev/rdisk0s1 count=1 | xxd
The VBR is the first block of a partition. It may help identify the type of partition (for example, NTFS partitions have NTFS near the top. A VBR containing boot code usually starts with "EB" which is a jump instruction. An EFI partition has BIOS boot code that explains that the partition is "Non-system disk. Press any key to reboot".
There is a program called EasyBCD that can be used to edit the BCD. The BCD uses GUIDs to identify partitions. EasyBCD translates these to drive letters to make it easier to understand. If Windows boots using BIOS, then your Windows partition has a Boot folder containing the BCD. Press Command-Shift-Period to view hidden files folders in macOS. Windows also has an option to show hidden system files and folders in the View options.
The /EFI/Microsoft folder for EFI booting in the EFI partition should contain the same files plus some efi files. The BOOTX64.EFI file in /EFI/BOOT/ is a copy of the bootmgfw.efi file.
It may be enough to copy the BCD to the EFI folder, and place the missing *.EFI files but I don't know. You may need to boot the Windows installer, go to the command line, use diskpart to mount the EFI and Windows partions, then use the repair commands to remake the bcd in the EFI partition.
bootrec is used to rebuild the bcd:
https://neosmart.net/wiki/winman/bootrec/
Rebuild the BCD on the EFI partition for EFI booting. Rebuild the BCD on the Windows partition for BIOS booting.
bootsect is used to fix the boot code of the MBR and VBR (for BIOS booting):
https://neosmart.net/wiki/winman/bootsect/