Install macOS X on Mac Pro
Short instructions on how to install macOS X Lion onto a 2010 Mac Pro
using the official .dmg
file from Apple. It would be nice to install
Mountain Lion but for some reason that dmg is not available from the support
website.
Prereq
- macOS X Lion Installer dmg: Available from Apple
- Alpine Linux
- XAR Source Code
- 6GiB or greater USB Drive
Step 1: Compile XAR
XAR in the Alpine repo will not extract the files from the .pkg
so the
source must be compiled manually.
Source code for XAR from Github
Besides build-base
xar requires:
apk add openssl-dev musl-fts-dev
Generate the configure script:
autoreconf -i
./configure
This step will fail, the configure.ac
file requires that the OpenSSL check
be modified to work on a modern system (line 327):
dnl
dnl Configure libcrypto (part of OpenSSL).
dnl
have_libcrypto="1"
Run configure again and make:
./configure
make
The last step will fail... no problem just do it again and include the missing libraries at the end of the compile command:
gcc -Wall -g -O2 -o src/xar src/xar.o -Wl,-rpath,/home/user/Downloads/tmp/xar-master/xar/lib -Llib lib/libxar.a -llzma -lbz2 -lz -lxml2 -L/lib -lz -llzma -lm -lcrypto -lssl -lfts
Check it works by running the help command:
src/xar --help
Step 2: Extract the xar pkg file from the dmg
7z x InstallMacOSX.dmg
Step 3: Extract the dmg from the pkg
Find where the InstallMacOSX.pkg file is and extract it:
mkdir tmp
cd tmp
src/xar -t -f InstallMacOSX.pkg
Step 4: Use dmg2img to write the install dmg
Find the InstallESD.dmg
file and alter the command below to taste (/dev/sdc
is the USB drive)
dmg2img -v -i InstallESD.dmg -o /dev/sdc
Step 4: Boot from USB
Press Alt (or Option) whilst booting the machine to show the UEFI boot menu.