4

I want to restart a MacMini with macOS Sierra in safe mode, but I have only remote access.

You can do this with this:

sudo nvram boot-args="-x"

(source: https://support.apple.com/en-sg/HT201262).

But for macOS Sierra this gives an error:

nvram: Error setting variable - 'boot-args': (iokit/common) not permitted

You have to start in RecoveryMode to be able to do this.

Is there a way to restart in Safe Mode remotely?

1
  • That's weird, it works for me on Sierra. Do you have anymore info about the Mac you can provide us? Commented Mar 18, 2017 at 20:34

2 Answers 2

1

This is similar to Trying to set boot-args with nvram gets "general error" on Sierra. I have the same situation - you must be in Recovery mode to set nvram variables, so you cannot start in Safe Mode remotely, unless you have disabled SIP.

I've been able to set nvram variables remotely after disabling SIP (csrutil disable), but disabling SIP requires you to boot to Recovery mode.

However, if you have something like DeployStudio in your environment, you can:
1. Create a DeployStudio workflow that runs a simple bash script to disable csrutil
2. Configure your NetBoot set to auto-run that workflow for that machine
3. Configure the machine to reboot to that NetBoot set and reboot to kick things off.

0

Updating this for macOS Ventura...

The OP asked about accomplishing this in Sierra.

TLDR It's likely the only boot-arg permitted (even with SIP disabled) is boot-arg="-v" for verbose boot.

I booted a MacMini2 2023 into recovery mode and turned off SIP:

[-bash-3.2# crutil enable --without nvram
crutil: Requesting an unsupported configuration. This is likely to break in the future and leave your machine in an unknown state.
Turning off System Integrity Protection requires modifying system security.
Allow booting unsigned operating systems and any kernel extensions for OS "MacMini HD"? [y/n]:n
csrutil: aborted

[-bash-3.2# csrutil disable
Turning off System Integrity Protection requires modifying system security.
Allow booting unsigned operating systems and any kernel extensions for OS "MacMini HD"? (y/n]:y

Then shutdown...

shutdown -h now

and booted back into Recovery Mode and tried to supply 3 different boot-args

[-bash-3.2# csrutil status
System Integrity Protection status: disabled.
[-bash-3.2# whoami
root
[-bash-3.2# nvram -d boot-args
[-bash-3.2# nvram boot-args
nvram: Error getting variable - 'boot-args': (iokit/common) data was not found
[-bash-3.2# nvram boot-args="-v"
[-bash-3.2# nvram boot-args="-x"
Error setting variable - 'boot-args': (lokit/common) not permitted.
[-bash-3.2# nvram boot-args
boot-args     -v
[-bash-3.24 nvram boot-args='-x'
Error setting variable - 'boot-args': (iokit/common) not permitted.
[-bash-3.2# nvram boot-args="-s"
Error setting variable - 'boot-args': (lokit/common) not permitted.
[-bash-3.2# nvram boot-args
boot-args     -v
-bash-3.2#

Unless someone has another idea looks like we've hit a roadblock.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .