This guide is largely based off https://gist.github.com/gordonturner/2a2e5ecde5e7860b52e2, but adapted for a newer Clover, QEMU, etc.
- An Ubuntu Server running 16.04 LTS
- KVM Capabilities
- QEMU compiled/installed
- OVMF compiled (https://gist.github.com/gordonturner/85dcc321d2099d610e67) and
/Build/OvmfX64/DEBUG_GCC49/FV/OVMF.fdput in the base folder of your VM (
- A supported Mac that can download 10.11.6 from the Mac App Store
- A 8GB USB Drive
- Clover EFI Bootloader
Step 1, creating the install drive:
With your OS X installer app in /Applications/, run:
Make sure you substitute
/Volumes/Untitled for your thumb drive (must be formatted as HFS+, GPT). Wait for it to complete, it will take a decent amount of time.
Step 2, installing Clover:
After downloading the Clover package, open it, and slowly click through until you see the ‘Customize/Change Install Location’ screen. Change the install location to the flash drive we just created, then click ‘Continue’, and then ‘Customize’. You should have a list presented. Check the box beside ‘Install for UEFI Booting Only’, and open the triangle next to ‘Driver64UEFI’. Check the boxes for
DataHubDxe-64, then continue with the installation as normal. Now, the EFI partition should still be mounted (EFI in your sidebar). Download this file (HFSPlus.efi) and place it in /Volumes/EFI/EFI/CLOVER/drivers64UEFI/:
If you want to have verbose boot (recommended), add
-v to the BootFlags line in the
Step 3, getting the OSK value:
Please see https://gist.github.com/gordonturner/c33bcc935e32f9fa6695 to get the OSK value (must be run from an actual Apple computer). Save this string and keep it safe for later.
Step 4, writing the flash drive to an image:
Unmount and eject the flash drive from your machine, and plug it back in. Then, unmount the install El Capitan partition. Now, fire up terminal, and type
diskutil list, find your install drive. (Should have two partitions:
Install OS X El Capitan). Record the disk number (e.g.
cd into a comfortable folder
~/Desktop, and run:
Making sure you substitute
X for your disk number.
After a bit of waiting, you should have a large file on your desktop named
clover-usb-disk.dd, using your own methods, move this file into the root of your vm folder on your server.
Step 5, final setup:
Now, we absolutely have to be on the Linux machine. Either SSH in, or gain physical access. At the command line, use this command in your root VM folder:
200G for how many gigs you want, for 500Gb use
Now, something a bit different, in order for OS X to boot beyond the kernel, we have to disable something:
I didn’t do much research into why, but it is important to run that. It is reset every reboot, so putting
echo 1 > /sys/module/kvm/parameters/ignore_msrs into your
/etc/rc.local file might not be a bad idea.
Step 6, first boot:
Ok, brace yourself, this is my command to start my VM:
Overwhelmed? Probably. Ok, you need to change a couple of things. First, change the
$OSK$ with your OSK string you saved earlier. Second, change the
$VMROOT$ occurrences to whatever your VM root is.
networking is a bit of a beast, but I know you can get it working. I won’t be covering it, but the virtio-net driver will help.
After those edits, put it into the command line, and cross your fingers.
Step 7, connecting and installing:
Now you need to connect to the VNC server that QEMU is hosting for your VM. For OS X, I use Chicken of the VNC, because the Screen Sharing app doesn’t work with the server. Connect to your IP, and port
5901. You should see either the Apple boot screen, the Setup companion, or Clover, depending on how fast you setup your VNC client.
screen/mouse mapping is broken over the QEMU VNC, you can get through the installer using Tab, Space, and Enter. The same person who wrote the network driver is working on a fix here
Use Disk Utility in the installer to format the QEMU HDD, and then run through the installer as normal.
If you want to access the Clover drive to make some changes, follow this guide to do that.
If you are having issues, feel free to comment below: