For some reason, my Mac won't let me reset my PRAM in the usual way (by holding the relevant keys down when restarting), simply nothing happens when I try it and my Mac just boots up normally every time.

I'm suspecting this may be due to the fact I'm using a PC keyboard after I broke my Apple one a while back.

I read that I can reset my PRAM through Terminal with the following command:

sudo nvram boot-args=”-p -r”

But all I get is this error:

nvram: Error setting variable - 'boot-args': (iokit/common) general error

I'm running High Sierra on a late 2009 iMac if that helps


Solution 1:

According to an Apple Support page called "Prepare your institution for iOS 10 and macOS Sierra":

...you must use the nvram command to properly set boot-args NVRAM variable. Starting with macOS Sierra, you must be booted to the recovery partition to run this command.

But now you can clear the NVRAM with

sudo nvram -c

Then restart for the reset to take effect.

I also have a PC keyboard that doesn't seem able to reset the NVRAM on startup, but I think the real problem is that it's wireless. But this command is easier and more reliable anyway.

Solution 2:

Sounds like a SIP restriction rather than a keyboard issue. Read through the linked article to get an idea of what SIP is, and then try this:

  • Ensure you have an up-to-date backup, in case of emergency.
  • Power off your Map as normal.
  • Hold down Cmd-R and press the Power button. Windows keyboard should be Win-R instead. Keep holding the keys down until the Apple logo appears, then release.
  • Wait for macOS to boot into the recovery utilities window.
  • From the Utilities menu, choose Terminal. Then: csrutil disable, then exit, then reboot into High Sierra as normal.

I'm not sure where you're getting -p -r as boot args to reset NVRAM, but sudo nvram -c should do the trick on High Sierra, as Tetsujin states here.

When you're done, reboot into recovery mode once more, open Terminal and then re-enable SIP with csrutil enable, and reboot into High Sierra.