Convert mac-os-el-capitan-pkg-to-iso.sh
from using hdiutil
and asr
to using Linux utilities.
Important: You will need about 30GB of free disk space.
- Download OS X 1.11 El Capitan
InstallMacOSX.dmg
from Apple (7GB) - Install
hfsprogs
,hfsplus
, &hfsutils
- Install
xar
dmg2img
andmount
can be used to to mountInstallMacOSX.dmg
xar
can be used to extractInstallMacOSX.pkg
(another 7GB)InstallMacOSX.pkg/InstallESD.dmg
must be mounted to findBaseSystem.dmg
BaseSystem.dmg
must be copied to a larger read/write AFPS file system (another 8GB)- Certain install files must be copied (see script).
- The new image must be converted to ISO. (another 8GB)
apt install -y hfsprogs hfsplus hfsutils dmg2img build-essential libxml2-dev libssl1.0-dev zlib1g-dev
dmg2img InstallMacOSX.dmg #image is compressed, need to decompress
losetup -P -f InstallMacOSX.img #make block devices for each partition
mkdir -p /mnt/loop
mount /dev/loop0p2 /mnt/loop
sudo apt install -y build-essential autoconf
sudo apt install -y libxml2-dev libssl1.0-dev
Method 1
git clone [email protected]/mackyle/xar.git
pushd xar/xar
./autogen.sh
make -j
sudo make install
Method 2
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xar/xar-1.5.2.tar.gz
tar -zxvf xar-1.5.2.tar.gz
pushd xar-1.5.2
./configure
make -j
sudo make install
Method 3:
See mackyle/xar#18
Here's what you need to do: In configure.ac, line 332 is:
AC_CHECK_LIB([crypto], [OpenSSL_add_all_ciphers], , [have_libcrypto="0"])
Replace it with:
AC_CHECK_LIB([crypto], [OPENSSL_init_crypto], , [have_libcrypto="0"])
mkdir ./MacOSX && cd ./MacOSX
xar -xvf /mnt/loop/InstallMacOSX.pkg
Well then stop once you get an ISO and don't follow any of the extra steps to burn the ISO to a USB.
https://gist.github.com/coolaj86/22d08c4b582779485e0df11c5d84063a#file-mac-os-el-capitan-pkg-to-iso-sh-L60