I wanted to re-install El Capitan on my very old MacBook Pro. It had 2 disk partitions which I wanted to merge but couldn't do so via Disk Utility while in recovery mode. It won't start-up recovery mode via internet with Command + Option + R.
My scouring over the world wide web ended in me having to:
- Download the dmg file from Apple.
- Run below commands in Big Sur (or any macos which has higher version than El Capitan) to create the installation media (using a 32GB flash drive):
rm -rf /tmp/El\ Capitan
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
diskutil rename /Volumes/OS\ X\ Base\ System /Volumes/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 /Volumes/Install\ El\ Capitan
No comments:
Post a Comment