Adapted from Mr Macintosh: https://ia601208.us.archive.org/18/items/sierraurl/sierra.txt
- Check date & time to make sure it is correct
date
- If the time is not correct, make sure you are connected to wifi or ethernet and run this command
ntpdate -u time.apple.com
- Change directory to Macintosh HD
cd /Volumes/Macintosh\ HD
- Download the macOS Sierra 10.12.6 InstallOS.dmg from Apple.com using curl. Note this is a 4.7GB file and might take a while or fail. If it fails run it again.
curl http://updates-http.cdn-apple.com/2019/cert/061-39476-20191023-48f365f4-0015-4c41-9f44-39d3d2aca067/InstallOS.dmg -o InstallOS.dmg
- Mount the InstallOS.dmg
hdiutil attach InstallOS.dmg
- Install the "Install macOS Sierra.app" from the InstallOS.dmg to Macintosh HD volume
installer -pkg /Volumes/Install\ macOS/InstallOS.pkg -target /Volumes/Macintosh\ HD
- The Install macOS Sierra.app is now in the /Volumes/Macintosh\ HD/Applications folder. We can now start the Sierra installer!
/Volumes/Macintosh\ HD/Applications/Install\ macOS\ Sierra.app/Contents/MacOS/Installassistant_springboard
In a few seconds the Sierra installer will start BEHIND the terminal window.
If you don't see it minimize or move the terminal window, but DON'T close it as it will stop the installer.
Now step through the installer and you are good to go!