I am using the current free version of VMware Fusion Player (Version 12.1.0). I have created a Big Sur virtual machine to do some testing, which involves modifying NVRAM variables. This version of VMware Fusion Player has a built-in EFI Shell (v1.0), which does not include the setvar
command. This command would be useful for my testing. Currently, an UEFI Shell (v2.2) is available as a standalone download or as part of a package. This shell does contain the setvar
command.
For example,
archlinux-2021.03.01-x86_64.iso
file can be downloaded from Arch Linux to the host Mac. If this ISO file is placed in the virtual optical drive of the client virtual machine, then the UEFI Shell (v2.2) file namedshellx64.efi
can be copied from the virtual optical drive.
I have been coping the shell file to the EFI volume created during the Big Sur install. I intended to involve the shell by using the built-in VMware Fusion Player Boot Manager by either adding a boot option or directly booting from the shell file. The problem is, when the shell is involved, no output is displayed. I know the shell is executing, because I can enter the exit
command to terminate the shell. Also, I can have the shell execute a script where the output is redirect to a file. By viewing the contents of the file, I can verify the shell had executed.
Originally, I thought the problem was with the shell file. However, if I create a Linux virtual machine, then output is displayed when VMware Fusion Player Boot Manager invokes the shell by either adding a boot option or directly booting from the shell file. So I feel the problem lies in how VMware Fusion Player handles virtual machines built from the Install macOS Big Sur
application.
My primary question is how to get the output to be displayed? I would also accept alternate methods to invoke the shell with output being displayed. Also, I desire for the invocation have zero delay and not execute the map –terse
command.
Note: VMware Fusion Player currently reports the UEFI version as 2.31.
Host Stats | Guest Stats |
---|---|
iMac (21.5-inch, Late 2013) | Mac |
macOS Catalina version 10.15.7 | macOS Big Sur version 11.2 |
Memory: 16 GB | Memory: 4 GB |
Quad-Core Intel Core i5 | 2 processor cores |
2.9 GHz | 2.76 GHz |
USB 3 (5 Gb/s) Samsung T7 SSD | SATA HDD |
Best Answer
I tested the following UEFI Shell v2.2 binaries. Many of these were suggested on Arch Linux wiki website "Unified Extensible Firmware Interface" under the section "Obtaining UEFI Shell". Some binaries required extra effort to extract from the downloaded file.
Arch Linux: The
shellx64.efi
file in the root directory of the mountedarchlinux-2021.03.01-x86_64.iso
file. See here for a list of websites where the ISO file can be downloaded.TianoCore EDK2 package: The
Shell.efi
file.EDK2 package from Arch Linux: The
Shell_Full.efi
andShell.efi
files in theusr/share/edk2-shell
folder of the expandededk2-shell-202011-1-any.pkg.tar.zst
file, which can be downloaded from this website.rEFInd CD-R image: The
shellx64.efi
file in theEFI/tools
folder of the mountedrefind-cd-0.12.0.iso
file. This ISO can be created by expanding therefind-cd-0.12.0.zip
file, which can be downloaded from this website.OpenCore package: The
OpenShell.efi
file in theX64/EFI/OC/Tools
folder of the expandedOpenCore-0.6.7-RELEASE.zip
file, which can be downloaded from this website.All of the above shell binaries, except for OpenCore, either had an faulty
edit
command or failed to display output when boot directly from the client firmware Boot Manager.The steps to install the new UEFI shell are given below.
Download an OpenCore package: Open the webpage containing this answer on the client. From this GitHub website, download the current release of the OpenCore package. Currently this is
OpenCore-0.6.7-RELEASE.zip
, which by default will become theOpenCore-0
folder in yourDownloads
folder on the client.Mount the
EFI
volume: On the client, open a Terminal application window and enter the command given below.Put the shell in the
EFI
volume: On the client, copy the~/Downloads/OpenCore-0/X64/EFI/OC/Tools/OpenShell.efi
file to the root folder on theEFI
volume. Rename this file toshellx64.efi
.Put the startup script in the
EFI
volume: This step is optional, however the script does create useful aliases and environment variables. Also, the display mode is set so the shell uses the entire console window.Open this webpage on the client, then save the script given below as an ASCII text file named
startup.nsh
in the root folder on theEFI
volume.Restart to firmware: Shutdown the client. On the host, open the
Startup Disk
pane ofSettings
for the client. Hold down the option key and select theRestart to firmware…
button.Add boot option: From the client firmware menus, select
Enter setup
>Configure boot options
>Add boot option
, then select theEFI
volume, as shown in the example below.Next, select the
shellx64.efi
file. For a description enterUEFI Shell
. and for options data enter-nomap -delay 0
. The results should appear as shown below.Next, select
Commit changes and exit
>Exit the Boot Maintenance Manager
. The window should appear as shown below.Test the shell: Select
UEFI Shell
to boot to the UEFI shell. When finished, enterexit
to return to the Boot Manager. If desired, selectShut down the system
.