Internet Recovery, Recovery Partition or HW Diag from macOS

MrMacintosh.com - Boot to Internet Recovery, Recovery Partition or Diagnostics from macOS using nvram or Recovery Selector.app
Boot to Internet Recovery, Recovery Partition or Diagnostics from macOS using nvram or Recovery Selector.app

How to Boot to Internet Recovery, Recovery Partition or Diagnostics from inside macOS.

UPDATE 01/25/21 – Martin Nobel @martinnobel_ – If you want to make an Intel Mac boot into the Startup Manager automatically, type into terminal: “Sudo nvram manufacturing-enter-picker=true”

This means that we can boot to almost every single recovery mode EXCEPT for Internet Recovery!

When an undocumented macOS command or option is discovered, the MacAdmin community gets pretty excited. This is one of those times, as a new nvram key and value was uncovered over the weekend.

If you need to boot to Internet Recovery, you first need to remember the Mac Boot Up Keyboard Combination. Can you remember all of them? I can’t and I work on this stuff every day! Below is the complete list Mac Startup Key Combinations. The second article adds two additional keyboard combinations bringing the total to twelve! The first one will “Reinstall the macOS that came with your Mac, or the closest version still available.” The second command will “Upgrade to the latest macOS that is compatible with your Mac.”

Apple Document – Mac startup key combinations https://support.apple.com/en-us/HT201255

Apple Document – macOS Recovery installs different versions of macOS https://support.apple.com/en-us/HT204904

Undocumented command found that allows you to boot almost all available recovery options from macOS.

Over the weekend Tim Perfitt (founder and CEO of Twocanoes Software, Inc) tweeted this out to his followers.

Tim, announcing the first version of Recovery Selector.app that could boot to the Recovery Partition from macOS.

Tim found an undocumented nvram command that you could use to boot your Mac to the Recovery Partition from macOS! From there, he had an idea to create an open source app that would allow you to boot to the Recovery Partition without knowing the exact command.

Someone found additional nvram keys and values!

I replied to Tim’s tweet letting him know that I put in an Apple Enterprise Support ticket to see if we could uncover if an Internet Recovery key existed. Before I could hear back from support, someone found and sent the new key internet-recovery-mode over to Tim. He then improved the app allowing you to boot into four different modes!

Nvram Keys and Values

The commands that we needed are set with two different keys and four different values.

The new values and keys are

  • recovery-boot-mode = Local Recovery Partition Value
  • unused Boot to Recovery Partition

  • internet-recovery-mode = Internet Recovery Value
  • RecoveryModeNetwork Internet Recovery (Shift-Option-⌘-R)
  • RecoveryModeDisk Recovery Partition (⌘- R)
  • DiagsModeDisk Boot to Local Apple Hardware Diagnostic (D)
  • DiagsModeNetwork Boot to Internet/AST Diagnostic (Option-D)

Let’s put it all together, keep in mind you must run the nvram as an administrator.

sudo nvram internet-recovery-mode=RecoveryModeNetwork

sudo reboot

MrMacintosh.com - All four different nvram internet-recovery-mode values and keys
All four different nvram internet-recovery-mode values and keys

Your Mac will immediately reboot and start up in Internet Recovery Mode.

Compatibility, Caveats and Requirements

UPDATE 01/27/20

I tested the above commands with the following hardware and OS versions.

  • 2018 T2 15″ MacBook Pro = 10.15.3 Beta 2
  • 2016 13″ MacBook Pro = 10.14.6
  • 2010 13″ MacBook Air = 10.13.6

This should confirm that the command works from 10.13.6-10.15.3 and on Mac Hardware from 2010-2019.

Network Requirements (For Internet Boot Options)

  • Wired Ethernet Connection
  • Wifi = Any WPA2 saved connection.
  • WPA2 Enterprise WIFI is NOT Supported

The WiFi network Internet Recovery will the Top “Preferred Network” listed to boot to Internet Recovery. If for some reason the Mac can’t connect to that network you will be prompted in firmware to connect to a different WiFi network or ethernet network.

Boot Security Requirements

  • Firmware Password Protection – can be ON or OFF. If ON then you will be required to enter in the firmware password.
  • Secure Boot – can enabled , the commands works fine.
  • FileVault – can be enabled, you do not have to enter in your FV2 password.

Restart Requirements

  • You do not have to reset the boot disk, clear out nvram commands or reset anything. When you restart the Mac, it will boot right back into macOS.

Twocanoes Recovery Selector.app = Easy Mode!!!

Are you going to remember all of the different nvram keys and values?

Probably not

Why not use one simple open source application to do this for you?

In comes the Recovery Selector.app

MrMacintosh.com - Recovery Selector.app
Recovery Selector.app menu = easy mode for your test Mac or VM!

Tim had the great idea to take all the above command options and put them into one application. Two clicks gets your Mac rebooted to the Recovery Partition, Internet Recovery, Local HW Diagnostics or Internet HW Diagnostics.

Note: Admin access to reboot is not required, the app uses a LaunchDaemon.

You can download and try Recovery Selector.App below.

https://bitbucket.org/twocanoes/recovery-selector/downloads/

UPDATE 01/27/20

Tim put together a nice youtube video showing the process.

https://www.youtube.com/watch?v=fS2s8TY1mrQ

We are only missing one critical nvram Internet Recovery Value.

We are only one nvram value away from perfect.

Option-⌘-R

Upgrade to the latest macOS that is compatible with your Mac.

I am going to change my Apple Enterprise Support ticket into an Enhancement Request. If this final value is added we will have all 5 boot modes available in macOS.

If you have any questions please comment below or Contact Me!

Liked it? Take a second to support Mr. Macintosh on Patreon!
Become a patron at Patreon!

16 thoughts on “Internet Recovery, Recovery Partition or HW Diag from macOS”

  1. Hello,

    I need to reboot to Recovery but not Internet Recovery. I didn’t have a clue about ‘nvram’ until this very hour but I knew about ‘bless’ and its 6 modes though had never used them. I assumed that I had to use either folder, mount or device mode: as far as I was able to get from reading the man page, I had to ‘properly’ bless one of these three entities and issue ‘reboot’: bless --device disk2s3 --setBoot --nextonly ; reboot or bless --folder /dev/disk2s3 --setBoot --nextonly ; reboot or bless --mount /dev/disk2s3 --setBoot --nextonly ; reboot.

    P.S. ‘disk2s3’ is Recovery partition. I’m on Mojave, MBP 2012 Corei7 9,1 non-Retina.

    Am I right? I have hard time making sense of it: for example do I need to supply the ‘setBoot’ option?
    Is it possible to do without ‘nvram’?

  2. sudo nvram internet-recovery-mode=DiagsModeDisk

    Results:
    Error: 0x8000000000000003, Cannot load ‘EFI/Drivers/TestSupport.efi’
    Status: 0x000000034

    Help-me

    1. Elton, I just ran this command on a 2019 MacBook Pro and it worked properly. Maybe try to reset your PRAM and try again? What kind of Mac are you trying this on?

      1. It’s because your Mac has 7 years of tech support (including out-of-warranty service) ahead. I gather that once an Apple device reaches the status of “vintage” (5 years since the date of manufacture) Apple ends tech support and so there’s no rationale behind providing users with access to their remote diagnostics infrastructure. I have mid2012 (2012+5=2017) and as of 2021 can’t run their AHD test via Internet Recovery: it was the only option I had had previously since no discs were supplied at the time of my purchase. Neither ⌥-D nor the nvram method worked.

  3. So, is this going to allow utilities such as BootPicker/BootRunner/etc. to give a nice UI to choosing which OS to boot on multi-boot systems again without having to mess with SIP? Because that has been annoying since Mojave… It would be great to get that functionality back because we really don’t like allowing the students access at the system boot selector screen (when you hold down Option on boot). We used to put firmware passwords on everything.

  4. No if we could also tell internet recovery to go ahead re-install macos we would have real “wipe device” workflow for macs.

      1. I think you are looking for this:

        ‘/Applications/Install macOS Catalina.app/Contents/Resources/startosinstall’ –eraseinstall –agreetolicense –forcequitapps –newvolumename ‘Macintosh HD’

  5. From my testing of the nvram options the one we are missing is Option-⌘-R, Upgrade to the latest version of macOS.

    1. Jharderson,

      You are correct, I got them mixed up when posting them! The one we are missing like you said is

      Option-⌘-R
      “Upgrade to the latest macOS that is compatible with your Mac.”

  6. I’m a little confused. Under “Nvram Keys and Values” you list “Internet Recovery (Shift-Option-⌘-R)” as one of the values but then go on to say under “One missing nvram Internet Recovery Value” that “We are only one nvram value away from perfect.
    Shift-Option-⌘-R”

    Please clarify.

    1. smayer97,

      Sorry for the misunderstanding, I mixed up the values. I have edited the “one missing nvram” part to say that we need

      Option-⌘-R
      Upgrade to the latest macOS that is compatible with your Mac.

      1. Hi,

        You have not edited it, it still says this which is incorrect:

        >Option-⌘-R
        >“Reinstall the macOS that came with your Mac, or the closest version still available.”

Comments are closed.