13 March 2017

Mac: Dual Boot With Windows 10

NB: This procedure has the potential to render your machine useless. Make sure you have external backups of your data and OSX install media before you begin.

Run Disk Utils Disk First Aid

You need to do this to check for errors. If there are any you'll have to fix them first.
In my case that meant:
  • Running at boot time via restart with Cmd R held down. 
  • Restoring from my Airport Extreme Time machine backup
  • Re-installing MAC OSX from the local backup as I'd excluded Applications from the TM backup.
Boring but still, after all that my machine was back up.

Free Up Space

You may want to split the drive halfway but find you don't have enough space due to 'Purgable' files. These are files that MacOS has marked as deletable if the space is needed. A reboot might free up sufficient space but in my case it didn't.

Essentially you need to create a fake file thats large enough to fill up the disk and then delete it:

  1. Install watch so you can watch the file you're creating's size:
    brew install watch
  2. Create a temp large file:
    dd if=/dev/random of=~/tempfile.tmp bs=20m
  3. Watch it's size:
    watch ls -alh ~/tempfile.tmp
  4. Once it gets to 20gb then duplicate it using Finder: Cmd d
  5. Once you get 'disk full' check the purgeable size in Disk Utility
    Repeat until the purgeable section is reduced sufficiently
  6. Turn off 'Optimize Mac Storage' in System Preferences/iCloud:
    1. Preferences, iCloud, Options next to iCloud Drive
    2. Turn off Optimize Mac Storage
  7. Delete the temp files:
    rm -f ~/*.tmp

Install Windows

  • Open Bootcamp and run through the procedure to 
    • Download and create a bootable Windows USB drive
    • Introduce a new Windows partition
  • Once that's done, you can boot from the USB (Power on with Alt/Option key held down)
  • Install Windows, delete the Bootcamp partition and create new partitions using Windows' Setup (create's two: Drive 0 Partition 4 and Drive 0 Unallocated Space). See the note below.
A note on partitions: After installing Windows I found the install failed with a message about being unable to write to the Boot partition. Some people online suggest doing the procedure twice: Bootcamp partition, install, fail to write, 2x PRAM reset, destroy the partition using Bootcamp, re partition. I can't be sure as I had to repeat the process anyway.

Sound

I had an issue whereby the Windows sound will play out of the headphone jack but not the speakers. In addition the headphone jack light was permanently on.
I installed Realtech Audio drivers to try and fix this.

You could also try an NVRAM reset:
restart whilst holding Command Option (alt) P R

Enable Virtualization in Windows

If you need HyperV then you might find you don't get it on the Windows side:
Hardware assisted virtualization and data execution protection must be enabled in the BIOS. See https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled

Ensure you have Virtualization is Enabled in Task Manager, Performance tab:


You can try one of these methods:

Restart in Windows

Mac OS Preferences, Startup Disk, Select Bootcamp and reboot. This seems to set it correctly.

Powershell

To enable Hyper-V that is disabled or Hypervisor agent not running:
  1. Using PowerShell as administrator
  2. Enable Hyper-V:
    dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
    or
    bcdedit /set hypervisorlaunchtype auto

Boot Loader

You may need to amend the boot loader.
To avoid: "Could not set boot device property: 0xe00002bc":
Back in OSX:
  • Download and extract rEFind
  • Edit the config: sudo vi refind/refind.conf-sample
    • Un-comment enable_and_lock_vmx and set to true
    • You might want to reduce the timeout
  • Install it: sudo ./refind-install
Re-enable SIP: csrutil enable

No comments:

Post a Comment