- Erase USB drive with Disk Utility using format
Mac OS Extended (Journaled)andMaster Boot Recordand call itMyVolume - Use Finder to mount/open
InstallMacOSX.dmg. - Run following commands:
pkgutil --expand /Volumes/Install\ OS\ X/InstallMacOSX.pkg /tmp/El\ Capitan
diskutil eject Install\ OS\ X
cd /tmp/El\ Capitan
hdiutil attach InstallMacOSX.pkg/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/esd
sudo asr restore -source /Volumes/esd/BaseSystem.dmg -target /Volumes/MyVolume -noprompt -noverify -erase
- To finish and fix installation issues, run these commands:
diskutil rename OS\ X\ Base\ System Install\ El\ Capitan
rm /Volumes/Install\ El\ Capitan/System/Installation/Packages
cp -rp /Volumes/esd/Packages /Volumes/Install\ El\ Capitan/System/Installation
cp -rp /Volumes/esd/BaseSystem.chunklist /Volumes/Install\ El\ Capitan/
cp -rp /Volumes/esd/BaseSystem.dmg /Volumes/Install\ El\ Capitan/
hdiutil detach /Volumes/esd
sudo bless --folder /Volumes/Install\ El\ Capitan/System/Library/CoreServices --label Install\ El\ Capitan
cp /Volumes/Install\ El\ Capitan/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/InstallAssistant.icns /Volumes/Install\ El\ Capitan/.VolumeIcon.icns
cd "$HOME"
rm -r /tmp/El\ Capitan
diskutil eject Install\ El\ Capitan
- Insert the USB drive on Machine needed reinstall.
https://apple.stackexchange.com/a/389830
https://appstorrent.ru/602-os-x-el-capitan.html
Saved me on creating a usb drive for El Capitan on ARM based Mac.
Two hints - if the installation end with an error that no packages were available just change date by few years back, restart and try again.
Second, if you are using SSD drive please remember to run sudo trimforce enable