Anyway to force restart into recovery partition?

Bernard_Huang
Contributor III

Hi all,

I have a macOS running within a VM. I would like to get to the recovery partition of this, however it doesn't respond to holding down Command+R, or Option key during start up. I think the VM session doesn't know it's a macOS yet.

So, does anyone if it is possible to ask the macOS to boot onto recovery partition? Without the keyboard holding onto anything.

1 REPLY 1

ryanj
New Contributor III

This works on normal devices so I can only assume it will work in a VM, hope it helps.

#!/bin/sh

sudo nvram "recovery-boot-mode=unused"

# reboot via shell or gui
sudo reboot