All Macs now come with a Recovery partition to reinstall macOS and do some common maintenance. In order to restart into recovery, there are a number of keyboard combinations that must be held when the Mac is first started up. There are times when it is useful to select the mode ahead of time and also it would be helpful to not have to remember all those key combinations and have to press at the right time.
Recovery Selector is a open source app for macOS to select the boot mode when the Mac is next restarted. It can be downloaded from the Bitbucket page. The app will set the correct mode by setting the correct NVRAM variables.
- Standard Boot: Sets the macOS to boot to the macOS
- Recovery: Boots the next time to the recovery partition associated with the macOS version on the local disk.
- Internet Recovery: Boot to internet recovery.
- Diagnostics: Boot to Hardware Diagnostics (Hardware Test Mode)
- Diagnostics: Boot to Internet Hardware Diagnostics (Internet Hardware Test Mode)
Get current macOS startup disk
sudo /usr/sbin/systemsetup -getstartupdisk
Set Current Startup Disk
sudo /usr/sbin/systemsetup -getstartupdisk /System/Library/CoreServices
Set to Recovery Mode
sudo /usr/sbin/nvram internet-recovery-mode=RecoveryModeDisk
Set Internet Recovery Mode
sudo usr/sbin/nvram internet-recovery-mode=RecoveryModeNetwork
Set Diagnostic Mode
sudo usr/sbin/nvram internet-recovery-mode=DiagsModeDisk
Set Internet Diagnostic Mode
sudo usr/sbin/nvram internet-recovery-mode=DiagsModeNetwork
sudo /usr/sbin/nvram -d internet-recovery-modeBuy me a coffee