Short entry here, since it was covered in the early article how to setup the Mojave-Beta in VirtualBox and Apple released the stable Mojave yesterday. Maybe somebody will find it useful.
We will download the Mojave dmg via AppleStore from the Mojave-Beta VBox guest that we installed earlier ( you can download the ready made ISO from here https://drop.me/oj2GJl )
Without actually installing it, after download is finished we run the following sets of commands to create the Mojave.iso
hdiutil create -o /tmp/Mojave.cdr -size 6000m -layout SPUD -fs HFS+J attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build mv /tmp/Mojave.cdr.dmg ~/Desktop/ hdiutil detach /Volumes/Install\ macOS\ Mojave/ hdiutil convert ~/Desktop/Mojave.cdr.dmg -format UDTO -o ~/Desktop/Mojave.iso
Next we upload the Mojave.iso to our Linux host and continue with the standard macOS VirtualBox setup (In the first stage attach Mojave.iso – clover.iso will be in the second one)
You can download the macOS Mojave from here https://drop.me/oj2GJl
Before we run the VM make sure you execute the following script to setup VirtualBox for macOS – replace the NAME variable with the name of the VirtualBox guest name.
#!/bin/bash readonly VM_RES="1680x1050" readonly NAME="Mojave" VBoxManage modifyvm "$NAME" --usbxhci on --firmware efi --chipset ich9 --mouse usbtablet --keyboard usb VBoxManage setextradata "$NAME" "CustomVideoMode1" "${VM_RES}x32" VBoxManage setextradata "$NAME" VBoxInternal2/EfiGraphicsResolution "$VM_RES" VBoxManage modifyvm "$NAME" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3" VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple" VBoxManage setextradata "$NAME" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" VBoxManage setextradata "$NAME" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
Also the following networking script is used (adjust accordingly) for the following network config in VirtualBox
If you don’t care about virtual VLANs you can just use the default NAT and choose DHCP in macOS install
#Setup tap and bridge tunctl -t tap0 -u user ifconfig tap0 up brctl addbr br0 brctl addif br0 enp0s25 vboxnet0 brctl setfd br0 0 ifconfig enp0s25 10.0.2.1 up ifconfig br0 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255 up brctl addif br0 tap0 vboxnet0 ifconfig tap0 0.0.0.0 sysctl net.ipv4.ip_forward=1 iptables -A FORWARD --in-interface enp0s25 -j ACCEPT iptables --table nat -A POSTROUTING --out-interface wlp9s0 -j MASQUERADE
Next we go on with the normal Mojave.iso boot
Once we get to the first setup screen “erase” disk with APFS and start the installation – don’t worry that VirtualBox does not understand APFS partitions in UEFI, we have the custom Clover.iso loader for that during 2nd stage install.
Once the 1st stage installer finishes, it will reboot and you will endup yet again in the same setup window, since we did not switch the ISO, so just terminate the macOS guest and swap the Mojave.iso with Clover.iso
you can download Clover.iso with APFS support here https://drop.me/MRqW76
Boot again the guest VM and in Clover menu choose the Boot macOS Install from Mojave (Name of the disk I have chosen during 1st stage setup) (move the arrow keys to navigate Clover menu)
Next we continue with the standard setup
After it finishes, it will reboot but will get stuck in the following screen, so just hard reset here no problem
Boot again with the Clover.iso still attached (we will use Clover to load macOS) and choose Boot macOS from Mojave (use the arrow keys to navigate Clover menu)
Next we configure network (adjust accordingly)