Create macOS install usb using Linux

If you don’t have a spare Mac or your Mac is too old to download macOS from the Apple App Store then use the method below.

Create account on hackintosh.download

The download required macOS from https://www.hackintosh.download/category/3-macos/

Insert a usb (16GB+ recommended) into Linux PC usb port and run Terminal

Use fdisk to determine your usb dev name letter, e.g. /dev/sdc. double check the target device letter to avoid overwriting the wrong drive.

sudo fdisk -l

Use dm2img to copy macOS (OS X El Capitan in this example) to your usb device (sdc in this example). This completely overwrites whatever is on the usb drive already!

sudo apt install dmg2img  # install dmg2img if not installed

sudo dmg2img -v -i ./EL_Capitan.dmg  -o /dev/sdc
Output from dmg2img...
dmg2img v1.6.7 (c) vu1tur (to@vu1tur.eu.org)

./EL_Capitan.dmg --> /dev/sdc

reading property list, 361779 bytes from address 6237611619 ...
partition 0: begin=192, size=430, decoded=284
partition 1: begin=908, size=430, decoded=284
partition 2: begin=1611, size=356137, decoded=239844

decompressing:
opening partition 0 ...         [2] 100.00%  ok
opening partition 1 ...         [2] 100.00%  ok
opening partition 2 ...      [5991] 100.00%  ok

When complete eject the usb.

Insert usb in your Mac and when power-up holding down the Alt | Option key until the Install usb icon is displayed in the middle of the screen.

Select the install usb to install macOS

Once in Recovery mode select Disk Utility to erase disk (if new drive or clean install)

Exit Disk Utility

Select mac OS to install from main menu and install to your main HDD or SSD

Note: the download source above is not Apple approved. To be safe, once your Mac is up and running, download the mac OS again from the Apple Store and re-create the install usb and carry out a clean install again.

Alternative MacOS (English) Source

user:~$ cd Downloads/
mkdir macosdownload
git clone https://github.com/kholia/OSX-KVM.git macOS-Big-Sur
Cloning into 'macOS-Big-Sur'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 991 (delta 0), reused 1 (delta 0), pack-reused 986
Receiving objects: 100% (991/991), 223.56 MiB | 1.29 MiB/s, done.
Resolving deltas: 100% (501/501), done.
Checking out files: 100% (94/94), done.
user:~$ ~/Downloads/macosdownload$ cd macOS-Big-Sur/

user:~/Downloads/macosdownload/macOS-Big-Sur$ ./fetch-macOS.py
[+] Fetching https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
[+] Fetching http://swcdn.apple.com/content/downloads/41/23/061-26578-A_FF0C6M87LS/ylvl0phx6uy3i444qt9p57n8wz0xnylmd9/InstallAssistantAuto.smd
[+] Fetching https://swdist.apple.com/content/downloads/41/23/061-26578-A_FF0C6M87LS/ylvl0phx6uy3i444qt9p57n8wz0xnylmd9/061-26578.English.dist
.
. 
.                            
 #    ProductID    Version   Post Date  Title                                                                                                                               
 1    061-26578    10.14.5  2019-10-14  macOS Mojave
 2    061-26589    10.14.6  2019-10-14  macOS Mojave
 3    041-91758    10.13.6  2019-10-19  macOS High Sierra
 4    041-88800    10.14.4  2019-10-23  macOS Mojave
 5    041-90855    10.13.5  2019-10-23  Install macOS High Sierra Beta
 6    061-86291    10.15.3  2020-03-23  macOS Catalina
 7    001-04366    10.15.4  2020-05-04  macOS Catalina
 8    001-15219    10.15.5  2020-06-15  macOS Catalina
 9    001-36735    10.15.6  2020-08-06  macOS Catalina
10    001-36801    10.15.6  2020-08-12  macOS Catalina
11    001-51042    10.15.7  2020-09-24  macOS Catalina
12    001-57224    10.15.7  2020-10-27  macOS Catalina
13    001-68446    10.15.7  2020-11-11  macOS Catalina
14    001-79699     11.0.1  2020-11-12  macOS Big Sur

Choose a product to download (1-14):

This will download a .pkg file from which you can extract the .app require to create a bootable usb

  1. Right-click on the .pkg file > select “Show Package Contents”
  2. Open the Contents/SharedSupport folder and locate the file named InstallESD.dmg

For further information see:
how-to-install-macos-big-sur-with-opencore-on-linux

Note: to get install version of app file open dmg file to copy app file to Applications folder

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out comment
Enter name