Last active
April 16, 2025 14:44
-
-
Save Diegus83/e493a30ac4d1c57e327fa181ce77294e to your computer and use it in GitHub Desktop.
Makes one Bootable USB Lion installer from Apple's provided PKG (2021)
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
# This is not intended to be guide, I just wrote it as a reminder to myself of the steps necessary. | |
# If you find it useful, that's great, but keep in mind the paths and device ID's will need | |
# to be adjusted to your case. And you may need sudo if you are not doing this while booted from recovery like I did. | |
Get the InstallMacOSX.dmg from https://support.apple.com/kb/DL2077?locale=en_US | |
Mount the image | |
hdiutil mount InstallMacOSX.dmg | |
cd /Volumes/Install\ Mac\ OS\ X | |
Copy to a tmp location | |
mktemp -d | |
/var/folders/v6/s_rd76bx78j5mpjxl1b0yn5m0000gn/T/tmp.plAsi6ls | |
cp InstallMacOSX.pkg /var/folders/v6/s_rd76bx78j5mpjxl1b0yn5m0000gn/T/tmp.plAsi6ls/ | |
cd /var/folders/v6/s_rd76bx78j5mpjxl1b0yn5m0000gn/T/tmp.plAsi6ls/ | |
Change extension to xar | |
mv InstallMacOSX.pkg InstallMacOSX.xar | |
Unarchive | |
xar -xf InstallMacOSX.xar | |
Get the install media from the extracted package | |
mv InstallMacOSX.pkg/InstallESD.dmg . | |
Restore the install media to a USB drive (in this case /dev/disk4) | |
asr restore --source InstallESD.dmg --target /dev/disk4 --erase | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @zhukovgreen