23-04-2021



Boot macOS # new shell boot script version! As of May 2020./OpenCore-Boot.sh # old tutorial, may fail./boot-macOS-NG.sh Boot and Installation Process. Hint: in QEMU, press Ctrl + Alt + G to gain control of your mouse again. At the CLOVER Boot Manager screen, select: Boot macOS Install from macOS Base System. MacOS Clover Boot Linux AMD OSX. In this article, I am going to show you how to dual boot Windows 10 and macOS Sierra on PC. Apple has already released the Macintosh operating system on 20 September of 2016, and if you want to give a try to this OS, then you are in the right place because here you will learn the complete process of how to dual boot Windows 10 and macOS Sierra 10.12, Hackintosh on PC.

UPDATE: Back in August 2020 I showed you how to install macOS Big Sur with OpenCore on Linux. Back then Big Sur was in beta and you had to take some extra steps to install it. Now, that Big Sur is out of beta, the installation process was simplified and I’ve decided to create a new tutorial instead of editing the old one, to avoid any confusion. Let’s get started…

If you’re running a Linux distro as your daily driver, you can still other distros and OS’. You can even enjoy macOS. You can run Catalina using the clover bootloader and you can even install macOS in a Docker container.

Today we’re going to take a look at how set up a simple macOS Big Sur VM in QEMU, accelerated by KVM.

ALSO READHOW TO: Dual Boot macOS and Linux

REQUIREMENTS

Macos Catalina Dual Boot Ubuntu

  • A modern Linux distribution
  • QEMU > 2.11.1
  • A CPU with Intel VT-x / AMD SVM support is required
  • A CPU with SSE4.1 support is required for >= macOS Sierra
  • A CPU with AVX2 support is required for >= macOS Mojave
  • Internet access for the installation process

INSTALL QEMU & OTHER REQUIRED PACKAGES

Open the terminal and run: sudo apt install qemu uml-utilities virt-manager dmg2img git wget libguestfs-tools p7zip

NOTE: Adjust install command and, possibly, packages names according to your distro.

INSTALL macOS Big Sur

1. Open the terminal and run git clone --depth 1 https://github.com/kholia/OSX-KVM.git macOS-Big-Sur. When you’re done cloning the git repo, cd into path with cd macOS-Big-Sur

2. Download macOS Big Sur installer from Apple with ./fetch-macOS.py.

NOTE: Here you can choose which macOS you want to install. We will install Big Sur.

Macos Catalina Dual Boot Inserts

When the download is done, you should have InstallAssistan.pkg in your folder.

3. Now we need to unpack the downloaded InstallAssistan.pkg. To do this run 7z e -txar InstallAssistant.pkg '*.dmg'

This should give you the SharedSupport.dmg file

Dual Boot Macos Catalina And Mojave

4. You’ll need to extract Basesystem.dmg from SharedSupport.dmg. First run 7z e -tdmg SharedSupport.dmg 5.hfs

Next create a folder called stuff with mkdir stuff and mount the hfs filesystem to the stuff folder with sudo mount -oloop *.hfs stuff

Inside the stuff/com_apple_MobileAsset_MacSoftwareUpdate folder, there’s a .zip file.

Run 7z l stuff/com_apple_MobileAsset_MacSoftwareUpdate/*.zip to list the contents of the .zip file with and you will see it contains the Basesystem.dmg that we need.

Macos Catalina Dual Boot Boots

5. Copy the .zip file to your Desktop with cp stuff/*MacSoftwareUpdate/*.zip ~/Desktop

Extract Basesystem.dmg located inside the zip file on your Desktop > AssetData > Restore

Now move the Basesystem.dmg back to your macOS Big Sur folder and you can unmount the stuff folder created earlier with sudo umount stuff.

Macos Catalina Dual Boot Sandals

6. Convert BaseSystem.dmg to BaseSystem.img with qemu-img convert BaseSystem.dmg -O raw BaseSystem.img

7. Create a virtual HDD image where macOS will be installed. Run qemu-img create -f qcow2 mac_hdd_ng.img 128G

NOTE: You can change the size of the virtual drive. 128 GB is just an example. Also if, for any reason, you want to change the name of the disk image from mac_hdd.img to something else, you’ll also have to update OpenCore-BS.sh to point to the new image name.

8. Now we can start the installation. But before we do, let’s edit the OpenCore-Boot.sh and add more RAM ( by default it’s set to use 3 gigs of RAM ). 8 gigs should be enough. At least Apple seems to think so.

You can do that with your favorite GUI text editor or from the terminal with nano, micro or vim.

Mac

9. Now you can start the installation process. Run ./OpenCore-BS.sh .

10. You’ll be greeted by this screen. Choose macOS Base System

10. First thing you’ll need to do is run Disk Utility and format your virtual drive.

11. Exit Disk Utility, choose Reinstall macOS and go through the usual installation steps.

12. During the installation process, your virtual machine will restart and will boot back up. When it does, choose macOS Installer to continue the installation.

13. After a loong time of installing, you will eventually be able to boot into your macOS installation.

You will be greeted with the welcome screen where you can set up your account and settings.

Don’t expect this to run just like a Mac. It’s a VM afterall. And it will feel sluggish mainly because there’s a lack of hardware acceleration. This can only be fixed by passing through a graphics card to the VM. To learn how to do that and other tips, and troubleshooting check out the official project on Github.