If your Mac is out-of-order or you otherwise cannot download macOS from the App Store, you can still create a bootable OS X recovery USB, and you can use that to create an Installer USB.
The downloads used in this process are legal and freely avaliable - including disk images directly from Apple's IT support pages, and open source utilities for extracting and converting pkg, dmg, and HFS+.
No hackery. No hackintosh-ery.
This process works for
- macOS Catalina (10.15)
- macOS Mojave (10.14)
- macOS High Sierra (10.13)
- macOS Sierra (10.12)
- OS X El Capitan (10.11)
- OS X Yosemite (10.11)
In all cases you should first download the El Capitan Installer, as a direct download from Apple (no App Store).
The OS X Yosemite and macOS Sierra images should also work, but you might have trouble getting macOS Sierra to boot in VirtualBox.
This is a 3-step process:
- Create a Recovery ISO with Linux
- Create an El Capitan Installer ISO with VirtualBox from the Recovery image
- Create other Installer USBs from El Capitan in VirtualBox
The Apple download contains a recovery image called BaseSystem.dmg
which needs to be copied to a correctly partitions and formatted recovery USB or ISO.
- Download the OS X El Capitan installer
- Note for Windows users running Linux from VirtualBox:
- you already downloaded
InstallOSX.dmg
to your USB drive, so skip this step
- you already downloaded
- Visit Apple's official "How to upgrade to El Capitan" documentation
- Click "Download OS X El Capitan" in Step 4
InstallOSX.dmg
will be about 6GB in yourDownloads
folder
- Note for Windows users running Linux from VirtualBox:
- Install HFS+ tools for Linux
- See
install-mac-tools.sh
below - Note for Windows users running Linux from VirtualBox:
- choose to download to your USB drive, NOT
Downloads
- run the script from your USB drive, NOT
Downloads
- choose to download to your USB drive, NOT
- Right-Click on the view
Raw
link, chooseSave as
, and select theDownloads
folder - Open a
Terminal
and runbash install-mac-tools.sh
from theDownloads
folder
pushd ~/Downloads bash install-mac-tools.sh
- See
- Create
el-capitan-recue.iso
- See
linux-create-bootable-macos-recovery-image.sh
below - Note for Windows users running Linux from VirtualBox:
- choose to download to your USB drive, NOT
Downloads
- run the script from your USB drive, NOT
Downloads
- choose to download to your USB drive, NOT
- Right-Click on the view
Raw
link, chooseSave as
, and select theDownloads
folder - Open a
Terminal
and runbash linux-create-bootable-macos-recovery-image.sh
from theDownloads
folder
pushd ~/Downloads bash linux-create-bootable-macos-recovery-image.sh
- See
You can of course run each command of the scripts by hand, but since it's deeply nested (.dmg
containing a .pkg
containing another .dmg
with another .dmg
inside), and requires loopback mounts, it's a rather tedious and mundane process.
You will need a 32GB+ USB drive, ExFAT formatted.
You should copy ElCapitanInstallESD.dmg
from Downloads
to your USB drive.
Awesome!! First, thank you!
I had an error "xar command not found", for some reason the install-mac-tools.sh script didn't really installed.
I'm on Ubuntu 20.04.2 LTS x
I solved it by doing:
After that, I had another output: "512: failed to use device: No such device"
Then I realized that I needed the
empty*img.bz2
from bootableinstallerAfter that, I got another error: mac-fdisk: command not found which I solved by installing it. On the script it says: "not required" but in my case I wouldn't work without it (I think)
After all that, I deleted all the files, then I started again. It worked!
I just don't know yet why the dmg file is over 6Gig and the final iso is 2Gig.
I'll create a bootable USB and if it works I'll post here. Thanks
Edit I decided to describe a little bit about what I've done that could help
It did what it is soposed to do, but in my case, it didn'd worked because I had a wrong DMG file, that has a update, not a full base system.
I've been searching on the internet for a few days now, and the only and most simple was this:
https://www.addictivetips.com/ubuntu-linux-tips/create-a-macos-installation-disk-on-linux/
Convert the image to a ubuntu friendly image
and finally, the code bellow to flash the iso into the USB drive.
sudo dd if=/path/to/image_file.iso of=/dev/sdd
It took less than 10 minutes to convert and 30 minutes to flash it into the USB drive.
I booted on my macbook air 2011, and I installed Mac OS X Lion...
To, only then, update it to the El Capitan and I finally I gave up, because I've never seen a macbook that slow (taking abount 10 minutes to turn on every single time a normal shutdown). It probably has some isues with the RAM or the SSD..
But anyways. I've learned A LOT of new things! It was fun.