I installed Windows 7 on my 2011 MacBook Pro (MacOS High Sierra) successfully. It was recognized at boot time by the computer and had no problems.
Then I used Disk Utility to create some free space on the hard drive shared by MacOS and Windows. Now I get this message on boot to windows: no bootable device – insert boot disk and press any key
Using Finder, I can see that my Windows 7 files are all intact, but I cannot boot from Bootcamp!
Below is the output from the command diskutil list
.
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage HARDISK 600.4 GB disk0s2
3: Apple_Boot Recovery HD 87.8 GB disk0s3
4: Microsoft Basic Data BOOTCAMP 120.0 GB disk0s4
Below is the output from fdisk /dev/disk0
in MacOS Recovery:
-bash-3.2# fdisk /dev/disk0
Disk: /dev/disk0 geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 1953525167] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
Below is the output of ls -d /Volumes/BOOTCAMP/Boot
in MacOS Recovery:
/Volumes/BOOTCAMP/Boot
Best Answer
With the release of High Sierra, Apple has forgotten about the needs of Windows 7 users. The right (or is it wrong) combination of commands causes eraser of the values stored in the Master Boot Record (MBR) table. Windows 7 uses these values to determine the partitioning of the drive. Fortunately, these values are duplicated in the GUID partition table (GPT). Unfortunately, you will have to preform the tedious task of reentering the missing values.
Unless you disable System Integrity Protection (SIP), the solutions given below requires booting to macOS Recovery via the internet, built-in recovery or an USB flash drive macOS installer. Once booted to macOS Recovery, open a Terminal application window.
Solution without Using Third Party Tools
The answer given below is based on my answer to the question How to convert a drive from the GPT format to the hybrid GPT/MBR format when using High Sierra (macOS 10.13.2). You should read this question and answer before proceeding. The command given below can be used to partially display the information contained in GUID partition table (GPT) stored on
disk0
. You will need this information when editing the Master Boot Record (MBR) table.Here are the steps involving in editing the MBR table to create a hybrid partitioning scheme. You will be preforming the same steps as given in this answer, except for the changes given below.
The interactive command to edit the MBR partition table is given below. All changes will be not be entered in CHS mode.
Entering this command produced the following output
The only entry, in the initial MBR table, defines a "Protective Partition". This partition needs to be truncated to the end of the first partition in the GPT with the GUID of
C12A7328-F81F-11D2-BA4B-00A0C93EC93B
. This means thestart
value should remain1
, but thesize
value should be reduced to the valuestart
+size
-1
. The values use in this equation should be taken from GPT. The computed value usually is409639
.Below are the correct values to enter into
fdisk
for the first partition of the MBR table. Replace<start + size - 1 of GPT partition with index=1>
with the computed integer value.Next, enter the correct values for second partition of the MBR table. The command is
edit
and theid
isAC
. Thestart
andsize
values are the same as shown in the GPT. Doing so, results in what is shown below.Repeat the previous step to update MBR table partitions 3 and 4. This is shown below. The
id
for partition 3 isAB
and for partition 4 is07
.The next command flags the fourth MBR partition as bootable. This partition was chosen because this is where the Windows resides.
The next command to enter is
print
. This command displays what the updated MBR table would look like. You can use the output to verify your changes.The final command
quit
writes the table back to the MBR, then quitfdisk
. This is shown below.As the above message suggests, it would be a good idea to restart the Mac.
Solution Using a Third Party Tool
The command
gdisk
is a third party tool that can be used to avoid having to manually enter the partition values from the GPT. You can downloadgdisk
from this SourceForge website. Once booted to macOS Recovery, you would need to enter the command given below.An example of your input to
gdisk
is given below.As the above message suggests, it would be a good idea to restart the Mac.
Final Thoughts
If you Mac still fail to boot to Windows, then you will need to rebuild your Windows boot code. For this you will need a flash drive you used to install Windows 7. Let me know if you need instructions.
If you read all the way down to this point, I might as well mention the other problem. Your
Recovery HD
partition is not suppose to be 87.8 GB in size. This has nothing to do with Windows, but I thought I should point it out.