Why I bothered

I finally got tired of Windows 10's own special kind of performance tuning. Chrome would stop responding in the middle of work, WebStorm would crash, and Task Manager would show nothing obviously wrong. I backed up my data and decided to try a Hackintosh. I knew just enough about it to be dangerous, and I had never actually studied the subject. That turned out to be the start of a long detour. Even if I did not end up using it, I learned a fair amount about how the system boots. This is not a complete guide; it is a record of my first attempt, mostly so I can look back at it the next time I decide to do something like this. Unless your machine matches mine, you will still have to work out the details yourself.

The hardware

  • Motherboard: MSI Z370-OC-Pro MS-7B48. This board is not great, and it caused several Hackintosh problems.
  • CPU: Intel Core i7-8700K @ 3.70GHz
  • GPU: NVIDIA GeForce GTX 1070 Ti. That choice came with its own regrets.
  • Disks: WDC WDS240G2G0A-00JH30 (240GB) / NVMe Asgard AN3 1TB / ST2000DM006-2DM164 (2TB)
  • RAM: Asgard 16GB
  • Onboard Ethernet: Realtek PCIe GbE Family Controller
  • Wi-Fi: Killer Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW)
  • Audio: Realtek High Definition Audio
  • Displays: one Philips flat 1080p panel and two Samsung curved 1080p panels

At the end, everything worked except the wireless card. Its Wi-Fi and Bluetooth were unsupported, so I could not use either. The photos below are from the working setup.

Hackintosh setup photo 1 Hackintosh setup photo 2 Hackintosh setup photo 3 Hackintosh setup photo 4 Hackintosh setup photo 5

Making the installer

Download the macOS Mojave image from Apple. Prepare a USB drive larger than 16GB. I used a USB 2.0 drive because it seemed to improve the chances of booting. Format the drive as RAW, then, from macOS, format it as Mac OS Extended (Journaled) with a GUID partition scheme.

The installer command was:

sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install\ macOS --applicationpath /Applications/Install\ macOS\ Mojave.app --nointeraction # install macOS is the name of the USB drive

After a few minutes, the installer is ready. Next, use Clover to add a bootloader to the USB drive, roughly like a PE environment on Windows. Download the package, open it, and choose the USB drive as the install location. The first time, I installed it to the system disk by mistake. Then customize the options; the defaults were enough for the basics.

The files live on the USB drive's EFI partition, which macOS hides unless you mount it with Clover Configurator. That tool is also useful for tweaking the Clover configuration.

BIOS first

Before booting, adjust the BIOS. A few notes first:

  • Most MSI boards need drivers64UEFI/OsxAptioFix2Drv-free2000.efi; otherwise macOS will not start.
  • Because the onboard NVRAM is missing, OsxAptioFix3Drv-freexxxx.efi is not available, so EmuVariableUefi-64.efi is needed to drive Nvidia or AMD graphics.

Settings:

  • Save & Exit → Restore Defaults: Yes
  • Settings → Advanced → Integrated Peripherals → Network Stack: [Disabled]
  • Settings → Advanced → Integrated Peripherals → Intel Serial IO: [Disabled]
  • Settings → Advanced → Integrated Graphics Configuration → DVMT Pre-Allocated: 128MB+ (or 64MB if that is the highest you can go)
  • Settings → Advanced → USB Configuration → XHCI Hand-off: [Enabled]
  • Settings → Advanced → USB Configuration → Legacy USB Support: [Auto]
  • Settings → Advanced → Windows OS Configuration → MSI Fast Boot: [Disabled]
  • Settings → Advanced → Windows OS Configuration → Fast Boot: [Disabled]
  • Overclocking → Extreme Memory Profile (X.M.P): [Enabled]
  • Overclocking → CPU Features → Intel Virtualization Tech: [Enabled]
  • Overclocking → CPU Features → Intel VT-D Tech: [Disabled]
  • Settings → Boot → Boot mode select: [LEGACY+UEFI]
  • Settings → Boot → Boot Option #1: UEFI: the macOS installer USB

If you are using discrete graphics: Settings → Advanced → Integrated Graphics Configuration → Initiate Graphic Adapter: PEG.

If you are using integrated graphics: Settings → Advanced → Integrated Graphics Configuration → Initiate Graphic Adapter: IGD.

To wake the Hackintosh from USB: Advanced → Wake Up Event Setup → Resume By USB Device: [Enabled].

Installing Mojave

Set the USB drive as the first boot option, plug it in, press F11, and select the USB drive. Clover appears with a menu. Choose the entry containing mojave installer. Turn on -v verbose mode. I had four or five failed attempts, and the log plus Google searches were how I found what was wrong. If things go well, the installer starts. Open Disk Utility, format the target disk as APFS, quit Disk Utility, and run the system installer, continuing through the steps.

The first reboot needs attention. Two similar boot entries appear; choose the one that boots from your target disk, not the USB drive. Installation takes longer this time; on an SSD, it should finish within 20 minutes.

After the next reboot, booting with the USB drive should get you into the system. What remains is Ethernet, audio, graphics, wake, CPU power management, and so on.

Moving Clover to the disk

After a while, you notice that you still need the USB drive to reach the real system. Clover can add boot files to the disk. The idea is the same as before, but do not use the default EFI files. Copy the EFI folder from the USB drive to the disk. Then you can finally boot without the USB drive.

Graphics

My card is a GTX 1070 Ti. Nvidia stopped updating its drivers, and the third-party Web Drivers stopped along with them. I found a workaround after reading around. It had a few small issues, but they were not deal-breakers; I suspected my low monitor resolution was part of the problem. The steps were:

  • Download Web Drivers.
  • Download nvidia-drivers.
  • Open Web Drivers and choose the local driver, since installing online from mainland China was too slow.
  • Install them, enter the password, open Web Drivers again, choose Existing Webdriver Patching, and confirm.
  • Run these commands in Terminal:
sudo chmod -R 755 /Library/Extensions/NVDAStartupWeb.kext
sudo chown -R root:wheel /Library/Extensions/NVDAStartupWeb.kext
sudo touch /System/Library/Extensions/ && sudo kextcache -u /
sudo touch /Library/Extensions && sudo kextcache -u /

Then choose nvidia web drivers in Clover and reboot.

Audio

Find your audio model first. Searching the motherboard model online usually reveals it; I used Baidu. Then search AppleALC for that model. You will see a series of layout-xx entries, where xx is the ID. Inject the ID with Clover. If nothing changes after a reboot, try another ID. If none of them match, compile one in Ubuntu following the documentation.

Ethernet and Wi-Fi

My Wi-Fi card is a Killer 1650x, and it has no working solution. To get perfect Wi-Fi, I would have to buy a replacement wireless card. I will not go into that here; a Taobao search turns up plenty of options. Wired Ethernet through the Realtek controller worked normally.

Aftermath

A few days of learning made it clear that the Hackintosh pit is not easy to fill. After using it for a few hours, I reinstalled my old setup. The real Apple experience is still the better one. If your hardware is close to mine, the EFI from this machine might be useful, but it is not a universal fix.