Creating a Hackintosh macOS Installer on Debian without a Mac

Guide:

Step 1: Prerequisites

Before you start, ensure you have the following:

  • A USB flash drive with a capacity of at least 16GB.
  • A macOS installer image (downloaded from a trusted source).
  • Access to a Debian-based Linux system (e.g., Debian, Ubuntu).

Step 2: Install Dependencies

  1. Open a terminal on your Debian-based Linux system.

  2. Install the required dependencies for creating a macOS installer:

    bash
    sudo apt-get update sudo apt-get install giblib1 libgtk2.0-0 libudev1 libgcrypt20 libusb-1.0-0 libwebkitgtk-3.0-0 wget p7zip-full

Step 3: Format the USB Drive

  1. Insert your USB flash drive into your computer.

  2. Check the device name of your USB drive using the following command:

    bash
    lsblk

    Identify your USB drive, usually listed as something like "/dev/sdX" (X being a letter, e.g., /dev/sdb).

  3. Format the USB drive as HFS+:

    bash
    sudo parted /dev/sdX mklabel gpt sudo parted /dev/sdX mkpart primary fat32 1MiB 2MiB sudo parted /dev/sdX set 1 esp on sudo mkfs.fat -F32 /dev/sdX1

Step 4: Mount the macOS Installer Image

  1. Mount the macOS installer image you downloaded:

    bash
    mkdir ~/macOSInstaller sudo mount -o loop /path/to/macos_installer.dmg ~/macOSInstaller

Step 5: Restore macOS to the USB Drive

  1. Use the "dd" command to copy the macOS installer to the USB drive:

    Warning: Be absolutely sure to use the correct device name (e.g., /dev/sdX) for your USB drive. Using the wrong device can result in data loss.

    bash
    sudo dd if=~/macOSInstaller/BaseSystem.dmg of=/dev/sdX bs=1M

    This process may take some time.

Step 6: Set Up the EFI Partition

  1. Download and install "MountEFI" to mount the EFI partition on the USB drive:

    bash
    wget https://github.com/corpnewt/MountEFI/raw/master/MountEFI.command -O ~/MountEFI.command chmod +x ~/MountEFI.command
  2. Run MountEFI:

    bash
    ~/MountEFI.command
  3. Mount the EFI partition of your USB drive.

Step 7: Copy EFI Files

  1. Download the latest Clover EFI bootloader for macOS:

    bash
    wget https://github.com/CloverHackyColor/CloverBootloader/releases/download/5134/CloverISO-5134.tar.lzma -O ~/Clover.tar.lzma
  2. Extract the downloaded file:

    bash
    tar -xf ~/Clover.tar.lzma -C ~/
  3. Copy the EFI files to the EFI partition of your USB drive:

    bash
    cp -r ~/EFI/* /media/$USER/EFI/

Step 8: Unmount EFI Partition

  1. Safely unmount the EFI partition:

    bash
    ~/MountEFI.command

Step 9: Eject USB Drive

  1. Eject the USB drive:

    bash
    sudo eject /dev/sdX

Step 10: Install macOS on Mac Mini

  1. Insert the USB drive into your Mac Mini and boot from it.

  2. Follow the on-screen instructions to install macOS on your Mac Mini.x


Creating macOS installer on Debian

 I have a mac mini 2012 late and I wanted to try linux on it. Then I've decided to use it with mac os. But I don't have any other mac device.

So can I create bootable macos usb with debian?

submitted by /u/merdumgiriz95
[link] [comments]