FeDeFrankfurt wrote:
Hello,
I'm sorry but your idea doesn't work.
I got this error message after typing in my password: nvram: Error setting variable - 'boot-args': (iokit/common) general error.
When I'm in single user mode and I type in "shutdown" and press enter my Mac does nothing. Am I doing it wrong?
I also tried some of the other possibilities like "shutdown -r" ,...
I have to press and hold down the power button for manually turn my Mac off.
Thank you for your answer.
It seems Apple left a little gem with System Integrity Protection in macOS Sierra. By default, NVRAM Protection is turned on meaning you can't edit NVRAM from the Terminal like in previous versions of OS X. This is why you get the iokit error and is fairly easy to rectify. Someone can correct me, but there's no reason for System Integrity Protection to be protecting NVRAM - it's reset like one's eating candy from a candy store (have a problem with a Mac: reset NVRAM!).
Anyways, in Terminal you need to run:
# sudo csrutil enable --without nvram
Then reboot. After that, you'll be able to modify the NVRAM through Terminal.
As for "shutdown" or "reboot" or "shutdown -r" not working in Single User Mode, that is my mistake. Unix and Linux based system (macOS is Unix) will wait 30 seconds before starting the shutdown process (type it from Terminal and you'll see). It might be 60 seconds with macOS. To overcome that you can type in Single User Mode:
# shutdown -r now
To reboot immediately. Or:
# shutdown now
To shutdown the system immediately (other alternatives include "shutdown -h now," "quit," and "halt" which have all worked over the years).
Again, the goal is to see what's your system is getting hung up on during the shutdown process.
Remember to disable Single User Mode once you are done or you'll keep booting to the shell rather than the desktop until you do.
And for verification, you have reset the SMC, NVRAM, and PRAM, correct? Sometimes people forget SMC which can be reset (at least in my Mac - it varies; I have a Mid-2010 Macbook Pro 13") by turning off the computer, plugging it in, and holding the power button down when turning it on until the white light flashes multiple times.