Customizing the Clover.iso Mojave loader

Short howto on how to build a custom Clover.iso for your VirtualBox Mojave emulation. You will need an existing macOS system either real or virtual (VirtualBox) for the script to prepare the clove.iso

Below is an example script that will produce a 1980×1080 resolution Clover.iso which you then need to use in the Virtual Box emulation to load Mojave.

Please read the previous howtos on how to do this here https://astr0baby.wordpress.com/2018/08/03/installing-mojave-10-14-beta-in-virtualbox-5-2-16-on-linux-x86_64/

Updated clover.sh script (chmod +x clover.sh)

#!/bin/bash

#curl -Lk https://raw.githubusercontent.com/AlexanderWillner/runMacOSinVirtualBox/master/config.plist -o config.plist
curl -Lk https://raw.githubusercontent.com/DoktorCranium/clover/master/clover/config.plist -o config.plist
# We will set a custom resolution here 1980x1080 
sed -i -e 's/1680x1050/1980x1080/g' config.plist

#### Please replace your path to the apfs.efi on your macOS installation #####
cp "/Volumes/Macintosh HD/usr/standalone/i386/apfs.efi" "./apfs.efi"
#### Please replace your path to the apfs.efi on your macOS installation #####


curl -Lk https://sourceforge.net/projects/cloverefiboot/files/Bootable_ISO/CloverISO-4533.tar.lzma/download -o clover.tar.lzma
sleep 1
xz -d clover.tar.lzma
tar xf clover.tar
hdiutil detach /Volumes/Clover-v2.4k-4533-X64/ 2>/dev/null || true
hdiutil attach Clover-v2.4k-4533-X64.iso
hdiutil create -megabytes 16 -fs MS-DOS -volname MojaveClover -o ./clover.dmg
hdiutil detach /Volumes/NO\ NAME/ 2>/dev/null || true
hdiutil attach ./clover.dmg
cp -r /Volumes/Clover-v2.4k-4533-X64/* /Volumes/NO\ NAME/
cp ./config.plist /Volumes/NO\ NAME/EFI/CLOVER/
cp ./apfs.efi /Volumes/NO\ NAME/EFI/CLOVER/drivers64UEFI/


hdiutil detach /Volumes/Clover-v2.4k-4533-X64/
hdiutil detach /Volumes/NO\ NAME/
hdiutil makehybrid -iso -joliet -o ./clover.iso ./clover.dmg

Also we could use the above example to modify other things (this I leave to the reader to experiment with) For example these SIP  security settings in the default clover – disabled completely.

CsrActiveConfig
0x67

We could change it to match what you want -> 0x0

csr-active-config 0x0 = SIP Enabled (Default)
csr-active-config 0x3 = SIP Partially Disabled (Loads unsigned kexts)
csr-active-config 0x67 = SIP Disabled completely

Here is the mandatory VirtualBox 1980×1080 script that needs to be executed prior to loading Mojave

#!/bin/bash
readonly VM_RES="1980x1080"
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

Once you have all in place – you will get the 1980×1080 resolution working in the VirtualBox Mojave emulation

Also with the SIP enabled in the Clover.iso  we can see the it is indeed true via csrutil status

Also for the hasty you can get the clove4k.iso here -> https://mega.nz/#!2912AaCa!jZoi5pQRd8quZ8gp5Y1l_16Lfmwtv6odO5zb1E_gV3M

 

Advertisement

About astr0baby

Please run Adblock or similar... we have been told to do so since Carl Sagan wrote the Contact .
This entry was posted in Uncategorized. Bookmark the permalink.

10 Responses to Customizing the Clover.iso Mojave loader

  1. Fantastic!
    I started from scratch and all is working beautifully, thank you very much for your time and work.
    If you are ever in Sydney, let me know, would love to buy you a beer! :)

  2. your clover.dvd gives me blank screen in virtualbox6 on windows 10. 1st stage installation worked reboot to clover.dvd leaves the screen black.

    • astr0baby says:

      This guide is not for 100% compatible with Windows, before running VirtualBox did you configure the VirtualBox accordingly ? You need to convert this bash script to Windows commands

      #!/bin/bash
      readonly VM_RES=”1980×1080″
      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

  3. TonyA says:

    The above script ran on my virtual Mojave with no errors, but finally I had to realize, that the file config.plist only had one line: “404: Not Found”

  4. UEFI says:

    For Clover v2.4k-4988 the updated directory path to place apfs efi is /Volumes/NO NAME/EFI/CLOVER/drivers/UEFI

  5. Pingback: 如何在VirtualBox中运行macOS Catalina Beta版本 – NEWS.ALL

  6. Pingback: 如何在VirtualBox中运行macOS Catalina Beta版本 - IcySun'Blog

  7. Adam says:

    Those who want to use a simpler method (for example, because they’re on Linux or Windows and can’t run this script) might be interested in the clover.vmdk I posted a while back on a previous thread. It’s an actual modifiable disk image that can be used in place over clover.iso, which is much harder to modify.

    The file host apparently deleted the upload, so I’ve rehosted it. https://cloudflare-ipfs.com/ipfs/QmaSfaKpQrme4ouK1MHZpMRmaZ7ZZ74w6hYwUQscqHv1aE/clover_efi.vmdk

    Cheers.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.