I have a MacBook Pro (Retina, 15-inch, Early 2013) and tested the following on it.
With my Wi-Fi network adapter turned on and connected, I shutdown my MacBook Pro. (This was to ensure the change I was about to make did indeed disable my Wi-Fi network adapter when rebooted.)
With the MacBook Pro shutdown, I then started it in single-user mode.
Start up in single-user mode or verbose mode
Use these steps to start up your Mac in single-user mode or verbose
mode:
- Shut down your Mac.
- Press the power button to start up your Mac.
Immediately hold down the following keys:
- Hold down Command-S for single-user mode.
- Hold down Command-V for verbose mode.
You've successfully entered single-user mode or verbose mode when you
see white text appear on the screen.
In single-user mode, run the following commands:
/sbin/fsck -fy
/sbin/mount -uw /
Once the filesystem has been checked and you've mounted the /
volume as writable, use the following command to disable the Wi-Fi network service, which will turn off the power to the Wi-Fi network adapter when rebooted into normal mode.
networksetup -setnetworkserviceenabled Wi-Fi off
Now reboot using the reboot
command, type reboot
and press enter.
Once rebooted and in normal mode you can reenable the Wi-Fi network service, thus restoring power to the Wi-Fi network adapter, by doing the following.
In Terminal, use the following command:
networksetup -setnetworkserviceenabled Wi-Fi on
You'll be prompted for your password, as shown in the image below.
Type in your password and click the Modify Configuration button, or press enter.
Note: While in single-user mode, if your wireless network service is not named "Wi-Fi" then use the following command to determine what network services you have.
networksetup -listallnetworkservices
On my system, after using networksetup -setnetworkserviceenabled Wi-Fi off
the output was:
An asterisk (*) denotes that a network service is disabled.
*Wi-Fi
Display Ethernet
USB Ethernet
Display FireWire
Bluetooth DUN
Thunderbolt Ethernet
Thunderbolt FireWire
iPhone USB
Bluetooth PAN
So, "Wi-Fi" was the right choice for me.
Note: I do not have FileVault enabled and if you do, you may have additional steps to take to access single-user mode.
Best Answer
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.