Efi shell tips and tricks: Difference between revisions
Jump to navigation
Jump to search
(Created page with " == EFI shell commands == {| class="wikitable" |+ !Type !Command !Description !Notes |- |Boot Commands — EFI Shell. Commands related to nPartition booting |autoboot |Set/view autoboot timeout variable | |- | |bcfg |Display/modify the driver/boot configuration | |- | |boottest |Set/view BootTest bits | |- | |dbprofile |Display/modify direct boot profiles for use by lanboot | |- | |lanboot |Boot over the LAN | |- | |reconfigreset |Reset the system (nPartition) for recon...") |
|||
Line 1: | Line 1: | ||
== EFI shell commands == | == EFI shell commands<ref>https://www.intel.com/content/dam/support/us/en/documents/motherboards/server/sb/efi_instructions.pdf</ref> == | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
Line 8: | Line 8: | ||
!Notes | !Notes | ||
|- | |- | ||
|Boot Commands — EFI Shell. Commands related to nPartition booting | | rowspan="8" |Boot Commands — EFI Shell. Commands related to nPartition booting | ||
|autoboot | |autoboot | ||
|Set/view autoboot timeout variable | |Set/view autoboot timeout variable | ||
| | | | ||
|- | |- | ||
|bcfg | |bcfg | ||
|Display/modify the driver/boot configuration | |Display/modify the driver/boot configuration | ||
| | | | ||
|- | |- | ||
|boottest | |boottest | ||
|Set/view BootTest bits | |Set/view BootTest bits | ||
| | | | ||
|- | |- | ||
|dbprofile | |dbprofile | ||
|Display/modify direct boot profiles for use by lanboot | |Display/modify direct boot profiles for use by lanboot | ||
| | | | ||
|- | |- | ||
|lanboot | |lanboot | ||
|Boot over the LAN | |Boot over the LAN | ||
| | | | ||
|- | |- | ||
|reconfigreset | |reconfigreset | ||
|Reset the system (nPartition) for reconfiguration, the nPartition remains inactive, in the shutdown for reconfig state | |Reset the system (nPartition) for reconfiguration, the nPartition remains inactive, in the shutdown for reconfig state | ||
| | | | ||
|- | |- | ||
|reset | |reset | ||
|Reset the system (nPartition) | |Reset the system (nPartition) | ||
| | | | ||
|- | |- | ||
|search | |search | ||
|Connect drivers for bootables devices | |Connect drivers for bootables devices | ||
| | | | ||
|- | |- | ||
|Configuration Commands — EFI Shell. Commands for changing and retrieving system (nPartition) information | | rowspan="18" |Configuration Commands — EFI Shell. Commands for changing and retrieving system (nPartition) information | ||
|acpiconfig | |acpiconfig | ||
|Set/view ACPI configuration mode | |Set/view ACPI configuration mode | ||
| | | | ||
|- | |- | ||
|cellconfig | |cellconfig | ||
|Deconfigure/reconfigure cells. (Set cell use-on-next-boot values.) | |Deconfigure/reconfigure cells. (Set cell use-on-next-boot values.) | ||
| | | | ||
|- | |- | ||
|cpuconfig | |cpuconfig | ||
|Deconfigure/reconfigure processors and processor cores | |Deconfigure/reconfigure processors and processor cores | ||
| | | | ||
|- | |- | ||
|date | |date | ||
|Display the current date or set the date of the system (nPartition). | |Display the current date or set the date of the system (nPartition). | ||
| | | | ||
|- | |- | ||
|dimmconfig | |dimmconfig | ||
|Deconfigure/reconfigure memory (DIMMs). | |Deconfigure/reconfigure memory (DIMMs). | ||
| | | | ||
|- | |- | ||
|err | |err | ||
|Display/change the error level | |Display/change the error level | ||
| | | | ||
|- | |- | ||
|errdump | |errdump | ||
|View/clear logs | |View/clear logs | ||
| | | | ||
|- | |- | ||
|fru | |fru | ||
|View FRU data | |View FRU data | ||
| | | | ||
|- | |- | ||
|info | |info | ||
|Display hardware information | |Display hardware information | ||
| | | | ||
|- | |- | ||
|monarch | |monarch | ||
|Set/view a monarch processor | |Set/view a monarch processor | ||
| | | | ||
|- | |- | ||
|palproc | |palproc | ||
|Make a PAL call | |Make a PAL call | ||
| | | | ||
|- | |- | ||
|romdrivers | |romdrivers | ||
|Enable/disable PCI expansion ROM drivers | |Enable/disable PCI expansion ROM drivers | ||
| | | | ||
|- | |- | ||
|rootcell | |rootcell | ||
|Set/view preferred root cells (Set nPartition core cell choices.) | |Set/view preferred root cells (Set nPartition core cell choices.) | ||
| | | | ||
|- | |- | ||
|salproc | |salproc | ||
|Make a SAL call | |Make a SAL call | ||
| | | | ||
|- | |- | ||
|tftp | |tftp | ||
|Performs TFTP operation to a [[BOOTP|bootp]]/DHCP enabled Unix boot server | |Performs TFTP operation to a [[BOOTP|bootp]]/DHCP enabled Unix boot server | ||
| | | | ||
|- | |- | ||
|time | |time | ||
|Display the current time or set the time of the system (nPartition). EFI time is set and presented in GMT (Greenwich mean time). | |Display the current time or set the time of the system (nPartition). EFI time is set and presented in GMT (Greenwich mean time). | ||
| | | | ||
|- | |- | ||
|variable | |variable | ||
|Save/restore specific EFI variables | |Save/restore specific EFI variables | ||
| | | | ||
|- | |- | ||
|ver | |ver | ||
|Display the version information | |Display the version information | ||
| | | | ||
|- | |- | ||
|Device, Driver, and Handle Commands — EFI Shell. Commands for managing devices, drivers, and handles | | rowspan="18" |Device, Driver, and Handle Commands — EFI Shell. Commands for managing devices, drivers, and handles | ||
|baud | |||
|View serial port com settings | |||
| | | | ||
| | |- | ||
|connect | |||
|Bind a driver to a device | |||
| | | | ||
|- | |- | ||
|dblk | |||
|Hex dump of BlkIo devices | |||
| | | | ||
|- | |||
|devices | |||
|Display devices managed by EFI drivers | |||
| | | | ||
| | |- | ||
|devtree | |||
|Display tree of devices | |||
| | | | ||
|- | |- | ||
|dh | |||
|Dump handle info | |||
| | | | ||
|- | |||
|disconnect | |||
|Disconnect driver(s) from device(s). | |||
| | | | ||
| | |- | ||
|drivers | |||
|Display list of drivers | |||
| | | | ||
|- | |- | ||
|drvcfg | |||
|Invoke the Driver Config Protocol | |||
| | | | ||
|- | |||
|drvdiag | |||
|Invoke the Driver Diagnostics Protocol | |||
| | | | ||
| | |- | ||
|guid | |||
|Dump known GUID IDs | |||
| | | | ||
|- | |- | ||
|lanaddress | |||
|Display MAC address | |||
| | | | ||
|- | |||
|load | |||
|Load EFI drivers | |||
| | | | ||
| | |- | ||
|map | |||
|Map shortname to device path | |||
| | | | ||
|- | |- | ||
|openinfo | |||
|Display the open protocols for given handle | |||
| | | | ||
|- | |||
|pci | |||
|Display PCI devices or PCI function configuration space | |||
| | | | ||
| | |- | ||
|reconnect | |||
|Reconnect driver(s) from a device | |||
| | | | ||
|- | |- | ||
|unload | |||
|Unload a protocol image | |||
| | | | ||
|- | |||
| rowspan="14" |Filesystem Commands — EFI Shell. Commands for managing files, directories, and attributes | |||
|attrib | |||
|Display/change the attributes of files/directories | |||
| | | | ||
| | |- | ||
|cd | |||
|Update/view the current directory | |||
| | | | ||
|- | |- | ||
|ls | |||
|Display a list of files and subdirectories in a directory | |||
| | | | ||
|- | |||
|mkdir | |||
|Create one or more directories. mount Mount a filesystem on a block device | |||
| | | | ||
| | |- | ||
|rm | |||
|Delete one or more files/directories. setsize Set the size of a file | |||
| | | | ||
|- | |- | ||
|touch | |||
|Update time of file/directory with current time | |||
| | | | ||
|- | |||
|type | |||
|Display the contents of a file | |||
| | | | ||
| | |- | ||
|comp | |||
|Compare the contents of two files | |||
| | | | ||
|- | |- | ||
|cp | |||
|Copy one or more files/directories to another location | |||
| | | | ||
|- | |||
|edit | |||
|Edit an ASCII or UNICODE file in full screen | |||
| | | | ||
| | |- | ||
|eficompress | |||
|Compress infile and write to outfile | |||
| | | | ||
|- | |- | ||
|efidecompress | |||
|Decompress infile and write to outfile | |||
| | | | ||
|- | |||
|hexedit | |||
|Edit a file, block device, or memory region using hex | |||
| | | | ||
| | |- | ||
|vol | |||
|Display volume information of the file system | |||
| | | | ||
|- | |- | ||
| rowspan="4" |Memory Commands — EFI Shell. Commands for listing and managing memory, EFI variables, and NVRAM details. default Set the default NVRAM values | |||
|dmem | |||
|Dump memory or memory mapped IO | |||
| | | | ||
|- | |||
|dmpstore | |||
|Display all EFI variables. memmap Display the memory map | |||
| | | | ||
| | |- | ||
|mm | |||
|Display/modify MEM/IO/PCI. | |||
| | | | ||
|- | |- | ||
|pdt | |||
|View/clear nPartition or cell memory page deallocation table (PDT) | |||
| | | | ||
|- | |||
| rowspan="6" |Shell Navigation and Other Commands — EFI Shell Commands for basic EFI Shell navigation and customization | |||
|alias | |||
|Set/get alias settings. cls Clear the standard output with an optional background color | |||
| | | | ||
| | |- | ||
|exit | |||
|Exit EFI Shell environment. getmtc Display current monotonic counter value | |||
| | | | ||
|- | |- | ||
|help or ? | |||
|Display help. | |||
| | | | ||
|- | |||
|mode | |||
|Display the mode of the console output device | |||
| | | | ||
| | |- | ||
|set | |||
|Set/Get environment variable. | |||
| | | | ||
|- | |- | ||
| | |xchar | ||
| | |Turn on/off extended character features | ||
| | | | ||
|- | |- | ||
| | | rowspan="10" |Shell Script Commands / Programming Constructs — EFI Shell-script commands | ||
| | |echo | ||
| | |Echo message to stdout or toggle script echo | ||
| | | | ||
|- | |- | ||
| | |else | ||
| | |Script-only: Use with IF THEN | ||
| | | | ||
|- | |- | ||
| | |endfor | ||
| | |Script-only: Delimiter for FOR loop construct | ||
| | | | ||
|- | |- | ||
| | |endif | ||
| | |Script-only: Delimiter for IF THEN construct | ||
| | | | ||
|- | |- | ||
| | |for | ||
| | |Script-only: Loop construct | ||
| | | | ||
|- | |- | ||
| | |goto | ||
| | |Script-only: Jump to label location in script | ||
| | | | ||
|- | |- | ||
| | |if | ||
| | |Script-only: IF THEN construct. | ||
| | | | ||
|- | |- | ||
| | |input | ||
| | |Take user input and place in EFI variable | ||
| | | | ||
|- | |- | ||
| | |pause | ||
| | |Script-only: Prompt to quit or continue | ||
| | | | ||
|- | |- | ||
| | |stall | ||
| | |Stall the processor for some microseconds | ||
| | | | ||
|} | |} |
Revision as of 13:33, 27 August 2024
EFI shell commands[1]
Type | Command | Description | Notes |
---|---|---|---|
Boot Commands — EFI Shell. Commands related to nPartition booting | autoboot | Set/view autoboot timeout variable | |
bcfg | Display/modify the driver/boot configuration | ||
boottest | Set/view BootTest bits | ||
dbprofile | Display/modify direct boot profiles for use by lanboot | ||
lanboot | Boot over the LAN | ||
reconfigreset | Reset the system (nPartition) for reconfiguration, the nPartition remains inactive, in the shutdown for reconfig state | ||
reset | Reset the system (nPartition) | ||
search | Connect drivers for bootables devices | ||
Configuration Commands — EFI Shell. Commands for changing and retrieving system (nPartition) information | acpiconfig | Set/view ACPI configuration mode | |
cellconfig | Deconfigure/reconfigure cells. (Set cell use-on-next-boot values.) | ||
cpuconfig | Deconfigure/reconfigure processors and processor cores | ||
date | Display the current date or set the date of the system (nPartition). | ||
dimmconfig | Deconfigure/reconfigure memory (DIMMs). | ||
err | Display/change the error level | ||
errdump | View/clear logs | ||
fru | View FRU data | ||
info | Display hardware information | ||
monarch | Set/view a monarch processor | ||
palproc | Make a PAL call | ||
romdrivers | Enable/disable PCI expansion ROM drivers | ||
rootcell | Set/view preferred root cells (Set nPartition core cell choices.) | ||
salproc | Make a SAL call | ||
tftp | Performs TFTP operation to a bootp/DHCP enabled Unix boot server | ||
time | Display the current time or set the time of the system (nPartition). EFI time is set and presented in GMT (Greenwich mean time). | ||
variable | Save/restore specific EFI variables | ||
ver | Display the version information | ||
Device, Driver, and Handle Commands — EFI Shell. Commands for managing devices, drivers, and handles | baud | View serial port com settings | |
connect | Bind a driver to a device | ||
dblk | Hex dump of BlkIo devices | ||
devices | Display devices managed by EFI drivers | ||
devtree | Display tree of devices | ||
dh | Dump handle info | ||
disconnect | Disconnect driver(s) from device(s). | ||
drivers | Display list of drivers | ||
drvcfg | Invoke the Driver Config Protocol | ||
drvdiag | Invoke the Driver Diagnostics Protocol | ||
guid | Dump known GUID IDs | ||
lanaddress | Display MAC address | ||
load | Load EFI drivers | ||
map | Map shortname to device path | ||
openinfo | Display the open protocols for given handle | ||
pci | Display PCI devices or PCI function configuration space | ||
reconnect | Reconnect driver(s) from a device | ||
unload | Unload a protocol image | ||
Filesystem Commands — EFI Shell. Commands for managing files, directories, and attributes | attrib | Display/change the attributes of files/directories | |
cd | Update/view the current directory | ||
ls | Display a list of files and subdirectories in a directory | ||
mkdir | Create one or more directories. mount Mount a filesystem on a block device | ||
rm | Delete one or more files/directories. setsize Set the size of a file | ||
touch | Update time of file/directory with current time | ||
type | Display the contents of a file | ||
comp | Compare the contents of two files | ||
cp | Copy one or more files/directories to another location | ||
edit | Edit an ASCII or UNICODE file in full screen | ||
eficompress | Compress infile and write to outfile | ||
efidecompress | Decompress infile and write to outfile | ||
hexedit | Edit a file, block device, or memory region using hex | ||
vol | Display volume information of the file system | ||
Memory Commands — EFI Shell. Commands for listing and managing memory, EFI variables, and NVRAM details. default Set the default NVRAM values | dmem | Dump memory or memory mapped IO | |
dmpstore | Display all EFI variables. memmap Display the memory map | ||
mm | Display/modify MEM/IO/PCI. | ||
pdt | View/clear nPartition or cell memory page deallocation table (PDT) | ||
Shell Navigation and Other Commands — EFI Shell Commands for basic EFI Shell navigation and customization | alias | Set/get alias settings. cls Clear the standard output with an optional background color | |
exit | Exit EFI Shell environment. getmtc Display current monotonic counter value | ||
help or ? | Display help. | ||
mode | Display the mode of the console output device | ||
set | Set/Get environment variable. | ||
xchar | Turn on/off extended character features | ||
Shell Script Commands / Programming Constructs — EFI Shell-script commands | echo | Echo message to stdout or toggle script echo | |
else | Script-only: Use with IF THEN | ||
endfor | Script-only: Delimiter for FOR loop construct | ||
endif | Script-only: Delimiter for IF THEN construct | ||
for | Script-only: Loop construct | ||
goto | Script-only: Jump to label location in script | ||
if | Script-only: IF THEN construct. | ||
input | Take user input and place in EFI variable | ||
pause | Script-only: Prompt to quit or continue | ||
stall | Stall the processor for some microseconds |