Reinstall (too) old macOS and with a static IP

The following tip can come handy if you to need to reinstall macOS from the recovery partition and 1) the version is on Apple’s endpoint(s) whose certificate has expired.

For t

# Set date to 2020-01-01T09:42
date 010109420

Another situation might be reinstalling with a static IP whereas Recovery Mode presumes a DHCP-leased IP address. In this case you have to change network settings. First, open Utilities > Terminal. Then run the following commands, step by step, in the Terminal.

# 2. Find the interface name - often it's `en0`.
ifconfig

# 3. Set the IP and subnet
# ifconfig InterfaceName IP netmask subnet
ifconfig en0 192.168.0.100 netmask 255.255.255.0

# 4. Set the gateway
route -n delete default
# route -n add default gateway -ifscope InterfaceName
route -n add default 192.168.0.1 -ifscope en0
  1. Finally, execute scutil and set the DNS with these scutil commands.

    open
    get State:/Network/Global/IPv4
    d.show (check the PrimaryService key)
    quit

Again, execute scutil.

open
d.init
# d.add ServerAddresses * DNS
d.add ServerAddresses * 192.168.0.1
set State:/Network/Service/PrimaryService/DNS
set State:/Network/Service/AAAAAAA-AAAAAA-AAAAAA/DNS
quit

At least this isn't a full screen popup

That'd be more annoying. Anyways, subscribe to my newsletter to get new posts by email! I write about AWS, Elixir, and more.


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.