Last active
May 1, 2022 02:09
-
-
Save t3rmin4t0r/43dbc55b3bd540007c257cea62708b61 to your computer and use it in GitHub Desktop.
How to make an El Capitan usb bootable disk from an M1 Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# verbatim copied over from - https://apple.stackexchange.com/a/420325 | |
# Download install DMG for El Capitan | |
# https://support.apple.com/en-us/HT211683 | |
wget -c http://updates-http.cdn-apple.com/2019/cert/061-41424-20191024-218af9ec-cf50-4516-9011-228c78eda3d2/InstallMacOSX.dmg | |
# mount and unzip the packager | |
pkgutil --expand InstallMacOSX.pkg Installer | |
cd Installer/InstallMacOSX.pkg | |
tar -tvf Payload | |
tar -xvf Payload | |
cd ../../ | |
ls | |
# start making a disk | |
mkdir dmg | |
cd dmg | |
cp ../Installer/InstallMacOSX.pkg/InstallESD.dmg . | |
hdiutil attach InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Installer | |
hdiutil resize -size 8g /tmp/Installer.sparseimage | |
hdiutil attach /tmp/Installer.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build | |
hdiutil attach /tmp/Installer.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build | |
# copy files over | |
rm -r /Volumes/install_build/System/Installation/Packages | |
cp -av /Volumes/install_app/Packages /Volumes/install_build/System/Installation/ | |
cp -av /Volumes/install_app/BaseSystem.chunklist /Volumes/install_build | |
cp -av /Volumes/install_app/BaseSystem.dmg /Volumes/install_build | |
hdiutil detach /Volumes/install_app | |
hdiutil detach /Volumes/install_build | |
# resize to smallest possible | |
hdiutil resize -size `hdiutil resize -limits /tmp/Installer.sparseimage | tail -n 1 | awk '{print $ 1}' `b /tmp/Installer.sparseimage | |
hdiutil convert /tmp/Installer.sparseimage -format UDZO -o /tmp/Installer | |
# Got the disk in DMG form | |
cp /tmp/Installer.dmg ElCapitanInstaller.dmg | |
# flash onto USB drive (mine is a failed Monterey Install disk) | |
sudo asr restore --source ElCapitanInstaller.dmg --target /Volumes/Install\ macOS\ Monterey --noprompt --noverify --erase | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment