How do I install Windows 10 on MacBookPro5,1, with no optical drive (SSD+HDD)
The following steps explain how to install Windows 10 on a hard disk drive (HHD) which replaced the original optical drive. The primary drive is assume to be a solid state drive (SSD) with the disk identifier "disk0". The HDD is assumed to be the secondary drive with the disk identifier of "disk1".
Note: If your OS X is El Captain (10.11) then you need to temporarily disable System Integrity Protection (SIP). To do this, you will need to start up your Mac from the El Captain Recovery OS. Once started, open a Terminal application window and enter the command shown below.
csrutil disable
After installing Windows 10, you an enable SIP with the following command.
csrutil enable
With Windows 10 the default for Windows Update is to automatically download and install updates. You are allowed the option to select a time to restart the computer, but the default is for that to be automatic also. Evidently, with Windows 10 Home these are your only options. Other versions of Window 10 allow the user to "Configure Automatic Updates" with the same options offered by previous versions of Windows.
If you want to insure no Windows Updates are installed before before you manually "Configure Automatic Updates" or manually install the Boot Camp Support Software, you will need to boot in Audit mode during the installation of Windows 10. Watch for special instructions regarding Audit mode while implementing the following steps.
Note: Some of the steps, that do not involve VirtualBox, have images captured from a VirtualBox window. This was done when this was the easiest way to create an illustration. I suppose I could have cropped the images, but I chose not to.
(Hint: For a better view, click on an image or open an image in a new window.)
- Aquire the Boot Camp Support Software (the drivers). The software can either be downloaded using the Boot Camp Assistant, downloaded directly from the Web or copied off a OS X installation DVD. See System requirements to install Windows on your Mac via Boot Camp for details. Try to get the latest available drivers for your Mac. If you are employing this procedure, most likely, Apple did not release Windows 10 drives for you model Mac.
- Make sure your firmware is up to date. See EFI and SMC firmware updates for Intel-based Macs.
-
Create a temporary MS-DOS (FAT) formatted partition on the SSD. You can use the Bootcamp Assistant, the Disk Utility, or commands (
distutil
,gpt
and/orfdisk
) entered in a Terminal window. Other third party tools, such asgdisk
, can also be used. Give the label for this partition the name "FLASHDRIVE". Since Apple recommends using a 16 GB flash drive to install Windows 10, the partition should be at least 16 GB in size. (In practice, this partition usually can be much smaller.) After Windows 10 is installed, you can remove this partition and recover the space. This partition will contain the files from the Windows 10 iso and the Boot Camp Support Software.It is my understanding that this temporary partition must occur on the SSD (disk0). If you are able to use the HDD (disk1), please let me know and I will update these instructions.
- Download and install a free copy of VirtualBox from Oracle. I used VirtualBox, Version 5.0.0 r101573, Copyright © 2015.
- Inside your "Documents" folder, create a folder named "VirtualBox". This is where you will keep the files created in the rest of the steps.
-
Use the Disk Utility application to create a single MS-DOS (FAT) formatted partition on the HDD. Make sure you use the Master Boot Record (MBR) partitioning scheme. Name this partition "BOOTCAMP". This is where Windows 10 will be installed.
If you need to use the GUID Partition Table (GPT) for your partitioning scheme or need additional partitions on the HDD, let me know.
Quit the Disk Utility.
-
Set the variables
FILE0
andFILE1
to the absolute file names of the partitions named "FLASHDRIVE and "BOOTCAMP", respectively. To do this, open a Terminal application window and enter the following commands.diskutil list disk0; diskutil list disk1
Note: I assume you are using the default Bourne-Again Shell (bash).
The output from the commands should be similar to the following. The disk identifier for a given disk or partition can be read from the last column marked "IDENTIFIER". The absolute file name for a partition can be derived by prepending the string "/dev/" to the disk identifier.
/dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *256.0 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS OS X 239.7 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 4: Microsoft Basic Data FLASHDRIVE 15.5 GB disk0s4 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *1.0 TB disk1 1: DOS_FAT_32 BOOTCAMP 1.0 TB disk1s1
From the above output, one can deduce the the "FLASHDRIVE" and "BOOTCAMP" partitions have the disk identifiers "disk0s4" and "disk1s1", respectively. Using the same Terminal application window, enter the following assignment statements to set the variables. If your disk identifiers are different, make the appropriate substitutions.
FILE0=/dev/disk0s4 FILE1=/dev/disk1s1
-
Declare the other variables needed for the commands used in the subsequent steps. To do this, enter the following assignment statements in the same Terminal application window.
DISK0=$(sed -n 's/\(\/dev\/disk[0-9]*\).*/\1/p'<<<$FILE0) DISK1=$(sed -n 's/\(\/dev\/disk[0-9]*\).*/\1/p'<<<$FILE1) PARTITION0=$(sed -n 's/\/dev\/disk[0-9]*s\(.*\)/\1/p'<<<$FILE0) PARTITION1=$(sed -n 's/\/dev\/disk[0-9]*s\(.*\)/\1/p'<<<$FILE1)
Note: At this point, one should realize it would be easier to copy the statements from this document and paste them into the Terminal application window.
Enter the following command to view the values of these new variables. Record your value for the variable
DISK1
. You will need to enter it in a later step.echo -e "DISK0=$DISK0\nDISK1=$DISK1\nPARTITION0=$PARTITION0\nPARTITION1=$PARTITION1"
My computer generated the following output.
DISK0=/dev/disk0 DISK1=/dev/disk1 PARTITION0=4 PARTITION1=1
If the value of
PARTITION0
is greater than4
, you can not install Windows 10 on the "BOOTCAMP" partition. (Technically, this is not true. Sent me a comment and I will post how to usegdisk
to overcome this obstacle.) Using the Finder application, mount the Windows 10 iso file. Copy the entire contents to root of the partition labeled "FLASHDRIVE". Afterwards, you can unmount the iso file.
-
Using the Finder application, copy the Boot Camp Support Software (BCSS) folder to the root of the partition labeled "FLASHDRIVE".
NOTE: If you open your BCSS folder and find the following file and folders, then instead of coping the BCSS folder, you should copy these items to the root folder of the partition labeled "FLASHDRIVE".
$WinPEDriver
(folder)AutoUnattend.xml
BootCamp
(folder) -
Enter the following command in the same Terminal window.
dot_clean /Volumes/FLASHDRIVE
-
Mark the correct partition as active in each disk's MBR by entering the following in the same Terminal window. The input for the interactive command
fdisk
is taken from the variableINPUT
. If a login password is asked for, enter it.INPUT=$(printf "f $PARTITION0\nq\ny") sudo fdisk -e $DISK0 <<<"$INPUT";echo INPUT=$(printf "f $PARTITION1\nq\ny") sudo fdisk -e $DISK1 <<<"$INPUT";echo
Note: To display the value for the variable
INPUT
, use the commandecho "$INPUT"
. -
Allow VirtualBox read/write access to the physical "FLASHDRIVE" partition and the entire physical "disk1" by entering the following commands in the same Terminal application window. If a login password is asked for, enter it.
sudo chmod go+rw $FILE0 sudo chmod go+rw $DISK1*
This will allow VirtualBox to install Windows 10 in your physical "BOOTCAMP" partition.
Note: This access will only last until OS X is rebooted.
-
Create the files that map the virtual disk to the physical disk. In the same Terminal window, enter the following commands. If a login password is asked for, enter it.
cd ~/documents/virtualbox diskutil unmount $FILE0;diskutil unmountDisk $DISK1 sudo vboxmanage internalcommands createrawvmdk -filename $PWD/SSD.vmdk -rawdisk $DISK0 -partitions $PARTITION0 sudo chown $USER SSD*.vmdk sudo vboxmanage internalcommands createrawvmdk -filename $PWD/HDD.vmdk -rawdisk $DISK1 sudo chown $USER HDD.vmdk
Note: OS X prefers to automount file systems. This can be disabled for a particular partition by creating or modifying the "/etc/fstab" file. Instead of employing the "/etc/fstab" file, the user is asked to repeatedly enter the following commands.
diskutil unmount $FILE0;diskutil unmountDisk $DISK1
These commands unmount the "FLASHDRIVE" partition and the disk containing the "BOOTCAMP" partition.
-
Open the VirtualBox application and click on icon above the New label. Enter or select the values shown below, then click the "Continue" button.
Use the default settings except for the hard drive. Choose the "Use an existing virtual hard drive file" button. Navigate to the VirtualBox folder created in step 5. Highlight the "SSD.vmdk" file. Before clicking the "Open" button, enter the following commands in the same Terminal application window.
diskutil unmount $FILE0;diskutil unmountDisk $DISK1
Open the "SSD.vmdk" file. Your window should appear similar to what is shown below.
Click the "Create" button.
-
After returning to the VirtualBox application's "Oracle VM VirtualBox Manager" window and click on the icon above the "Settings" label. Next, click on the icon above the "Storage" label. In the "Storage Tree", "Controller: SATA" should be highlighted. Right click on this highlighted area and select "Add Hard Disk". Choose the "Use an existing virtual hard drive file" button. Navigate to the VirtualBox folder created in step 5. Highlight the "HDD.vmdk" file. Before clicking the "Open" button, enter the following commands in the same Terminal application window.
diskutil unmount $FILE0;diskutil unmountDisk $DISK1
Open the "HDD.vmdk" file. Your window should appear similar to what is shown below.
-
Highlight the Empty CD/DVD and select "Choose Virtual Optical Disk File..." to attach your Windows 10 iso file. (Hint: Look for the CD/DVD icons)
Click OK to close the window. Your "Oracle VM VirtualBox Manager" window should appear similar to what is shown below.
-
Enter the following command in the same Terminal application window.
diskutil unmount $FILE0;diskutil unmountDisk $DISK1
Next, click on the icon above the "Start" label to boot from the Windows 10 iso file. Press the space bar when prompted to "Press any key to boot from CD or DVD."
Note: The mouse pointer must be over the virtual machine screen window before you press the space bar.
-
Open a Command Prompt window by clicking on the following sequence.
Next
Repair your computer
Troubleshoot
Advanced options
Command PromptThe "FLASHDRIVE" partition is drive C:. The "BOOTCAMP" partition is drive D: and the Optical Drive (DVD) containing the Windows 10 iso file is drive E:.
-
Enter the following commands in the Command Prompt window. When prompted by the command below, enter the volume label "FLASHDRIVE". This will convert the FAT32 partition to a NTFS partition.
convert c: /fs:ntfs
When prompted by the command below, enter the volume label "BOOTCAMP". This will NTFS format the partition.
format d: /q /v:BOOTCAMP
-
Enter the following command in the Command Prompt window.
bootsect /nt60 c: bootsect /nt60 d: /mbr
This adds the Bootstrap code to the "FLASHDRIVE" and "BOOTCAMP" partitions and the MBR of the HDD.
Close the Command Prompt window and click on "Turn off your PC".
-
After the "BootCamp" virtual machine has "Powered Off", return to the VirtualBox application's "Oracle VM Virtual Manager" window. Click on the icon above the "Settings" label. Next, click on the icon above the "Storage" label. In the "Storage Tree", right click on the label "SSD.vmd" and select "Remove Attachment". Your window should appear similar to what is shown below.
Click the "OK" button to close the window.
-
From the menu bar select "File→Virtual Media Manager". In the Virtual Media Manager window, right click on hard disk entry with the name "SSD.vmdk" and select "Remove". If prompted with confirmation pop up, click the "Remove" button. In the pop with with the choices "Cancel", "Keep" and "Delete", choose "Keep". Your window should appear similar to what is shown below.
Click the "Close" button to close the window, and then quit the VirtualBox application.
-
Enter the following command in the same Terminal application window. If prompted, enter your login password. This command copies the Bootstrap code from the MBR of the HDD to the MBR of the SSD.
sudo fdisk -u -y -f $DISK1 $DISK0
-
Enter the following in the same Terminal application window. This will enter the correct partition type in the MBR partition table for the FLASHDRIVE partition.
INPUT=$(printf "s $PARTITION0\n7\nq\ny") fdisk -e $DISK0 <<<"$INPUT";echo
-
Enter the following command in the same Terminal application window. If a login password is asked for, enter it.
sudo bless --device $DISK0 --setBoot --legacy
This instructs the computer that subsequent boots should be performed in legacy BIOS mode from the internal SSD.
Close all applications and windows. If you intend to use Audit mode during the installation of Windows and the computer is hardwired to the internet, then disconnect the computer from the internet now. Restart the computer and start installing Windows 10 into the BOOTCAMP partition.
-
When you reach the window shown below, select "Custom (advanced)".
-
When you reach the window show below, select the "BOOTCAMP" partition. Do not format the "BOOTCAMP" partition. Click the "Next" button.
-
If do not intend to use Audit mode, the you can skip this step. To use Audit mode, follow the steps given in my answer to the question: How to prevent Windows 10 from downloading and installing updates before the Boot Camp Support Software is installed? While in Audit mode, if you need to access the Boot Camp Support Software (BCSS) stored in the "FLASHDRIVE" partition, then follow the instructions given in the rest of this step.
First, make sure you are in Audit mode as explained in the above hyperlink. Next, right click on the Start button on the taskbar and select "Disk Management", as shown below.
Right click on the "FLASHDRIVE" partition and select "Change Drive Letter and Paths...", as shown below. Assign the partition the drive letter S:. When finished, close the "Disk Management" window.
You now have access to the Boot Camp Support Software on drive S:. Before exiting the Audit mode, remove drive letter S: from the "FLASHDRIVE" partition. When removing, ignore the warning messages.
-
Finish installing Windows 10. Once finished, locate the "Boot Camp" icon on the system tray in the Windows taskbar. Right click on the "Boot Camp" icon and select "Restart in Mac OS X", as shown below. Note: This may appear sightly different if you installed a different version of the Boot Camp Support Software (BCSS) than I did.
-
Once finished restarting in OS X, assign the variable
DISK1
the value recorded in an earlier step. To do this, first open the Terminal application and enter the following assignment statement in the new window. If you recorded a different value, make the appropriate substitution.DISK1=/dev/disk1
-
Allow VirtualBox read/write access to the entire physical "disk1" by entering the following command in the same Terminal application window. If a login password is asked for, enter it.
sudo chmod go+rw $DISK1*
This will allow VirtualBox to create Boot Configuration Data (BCD) store in your physical "BOOTCAMP" partition.
Note: This access will only last until OS X is rebooted.
-
Enter the following command in the same Terminal application window.
diskutil unmountDisk $DISK1
Next, open the VirtualBox application to view the "Oracle VM VirtualBox Manager" window.
-
Enter the following command in the same Terminal application window.
diskutil unmountDisk $DISK1
Next, click on the icon above the "Start" label to boot from the Windows 10 iso file. Press the space bar when prompted to "Press any key to boot from CD or DVD."
Note: The mouse pointer must be over the virtual machine screen window before you press the space bar.
-
Open a Command Prompt window by clicking on the following sequence.
Next
Repair your computer
Troubleshoot
Advanced options
Command PromptThe "BOOTCAMP" partition is drive C: and the Optical Drive (DVD) containing the Windows 10 iso file is drive D:.
-
Enter the following commands in the Command Prompt window to build a Boot Configuration Data (BCD) store in the "BOOTCAMP" partition. When prompted enter the letter "y". This will create the file "C:\Boot\BCD".
cd /d c:\ bootrec /rebuildbcd
Note: The directory "\Boot" has the file attributes "Hidden" and "System".
The results from entering the above two commands is shown below.
Close the Command Prompt window and click on "Turn off your PC".
- After the "BootCamp" virtual machine has "Powered Off", quit the VirtualBox application. Close all applications and windows, then restart OS X.
Clean up
Once Windows 10 is installed on the HDD, you can delete the following.
- The "FLASHDRIVE" partition on the SSD. In the example above, the Disk Utility application could be used to delete the "FLASHDRIVE" partition. The "OS X" partition could then be enlarged to reuse this space.
- The "BootCamp" virtual machine. Open the VirtualBox application. From the "Oracle VM VirtualBox Manager" window, right click on the icon labeled "BootCamp" and select "Remove...". In the popup window, click "Delete all files" button. If you get an error message, ignore it. Confirm the "BootCamp" virtual machine is deleted by check for the folder "~/VirtualBox VMS/BootCamp". If this folder still exists, delete it.
- The folder "~/Documents/VirtualBox".
- The Windows 10 iso file, but only if you have a backup copy.
- The Boot Camp Support Software (BCSS). Be warned: In the future Apple may change the BCSS you used, so do not assume you can download the same files in the future. It would be best to save a backup copy.
I managed to use David Anderson's guide (answer below) to install windows 8.1 on a Late 2011 Macbook pro 15", with a 500GB SSD (OSX 10.13.6 High Sierra installed, APFS partition on the entire disk), and the original 500GB HDD on the superDrive Slot.
There are a few things to consider before making this work:
- If your SSD has a APFS Filesystem, when you create the FLASHDRIVE partition, you must choose to partition the disk, and not create a partition inside the container;
- You must have a hybrid GPT/MBR set up on the SSD Before step 07, or else you won't be able to access the FLASHDRIVE partition on step 20. To set it up, I basically downloaded gdisk and followed the Creating a Hybryd MBR guide, With only exception that I chose "no" on the last step "Use one to protect more partitions? (Y/N):"
- I tried to create the FLASHDRIVE partition while on a regular boot, and weird partitions showed up, moving the FLASHDRIVE partition to number 5, which MBR's can't see. So I couldn't proceed until I rebooted on recovery mode (hold cmd+R during boot) and ran the repair tool on disk utility. So I recommend doing step 06 on a recovery mode.
- If you reboot for some reason, You should repeat steps 7 through 14 to safely pick up from where you left, because the filesystem randomly changes disk0 with disk1 after boot. I don't know if it is a particular bug on my machine, but better safe than sorry.
- After you create the FLASHDRIVE partition on the SSD, the "diskutil list" will show 3 disks: your HDD, your SSD with a GUID partition scheme, and a third one with a APFS container Scheme. This third disk is just the container from the second one expanded. You should consider this GUID partitioned disk as your DISK0 for the purposes of this tutorial.
- When marking the active MBR partition on either disks, you will see an error: "fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory". You can just ignore it.
- If there are errors while starting the VirtualBox VM, check the box "Use host I/O cache" as described on the picture of step 16.
Hope that helps, cheers.