HP UEFI Shell User Guide for HP ProLiant Gen9 Servers

HP UEFI Shell User Guide for HP ProLiant Gen9 Servers
HP UEFI Shell User Guide for HP ProLiant
Gen9 Servers
Abstract
This document details how to access and use the Unified Extensible Firmware Interface (UEFI) Shell that is embedded in the
system ROM of all UEFI-based HP ProLiant Gen9 servers. It is for the person who installs, administers, and troubleshoots servers
and storage systems.
HP Part Number: 794198-001a
Published: September 2014
Edition: 2
© Copyright 2014 Hewlett-Packard Development Company, L.P.
Notices
Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial
Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under
vendor’s standard commercial license.
The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express
warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall
not be liable for technical or editorial errors or omissions contained herein.
Acknowledgments
Intel®, Itanium®, Pentium®, Intel Inside®, and the Intel Inside logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries
in the United States and other countries.
Microsoft®, Windows®, and Windows Server® are U.S. registered trademarks of the Microsoft group of companies.
® is a registered trademark of the UEFI Forum, Inc.
UNIX® is a registered trademark of The Open Group.
Contents
1 Introduction...............................................................................................5
Commands and capabilities.......................................................................................................5
Accessing the UEFI Shell............................................................................................................5
Accessing the HP UEFI System Utilities....................................................................................5
Before booting to the UEFI Shell.............................................................................................6
Enabling the Embedded UEFI Shell....................................................................................6
Configuring the UEFI Shell....................................................................................................7
Adding Embedded UEFI Shell to the Boot Order list.............................................................7
Changing the UEFI boot order..........................................................................................7
Booting to the UEFI Shell.......................................................................................................7
Accessing the UEFI Shell from a serial console connection.........................................................8
2 UEFI Shell command reference.....................................................................9
Command line syntax................................................................................................................9
Command line completion....................................................................................................9
Getting started ........................................................................................................................9
Controlling command output...............................................................................................10
Limiting output to one screen at a time.............................................................................10
Displaying detailed output..............................................................................................11
Displaying summary output.............................................................................................12
Suppressing the confirmation prompt...............................................................................12
Displaying command help...................................................................................................13
Displaying all command help.........................................................................................13
Displaying help for a specific command...........................................................................13
Displaying all help for commands beginning with a specific character.................................14
Accessing a file system from the Shell...................................................................................16
UEFI Shell Commands.............................................................................................................16
alias.....................................................................................................................................16
attrib.....................................................................................................................................17
boot.....................................................................................................................................18
cd........................................................................................................................................19
cls........................................................................................................................................20
comp....................................................................................................................................21
connect.................................................................................................................................21
cp........................................................................................................................................22
date......................................................................................................................................24
dblk......................................................................................................................................25
devices..................................................................................................................................25
devtree..................................................................................................................................26
dh........................................................................................................................................27
disconnect.............................................................................................................................29
dmem...................................................................................................................................29
drivers...................................................................................................................................30
echo.....................................................................................................................................31
edit.......................................................................................................................................32
eficompress............................................................................................................................32
efidecompress........................................................................................................................33
exit.......................................................................................................................................33
fwupdate...............................................................................................................................33
getmtc...................................................................................................................................34
goto.....................................................................................................................................34
help......................................................................................................................................34
Contents
3
ifconfig.................................................................................................................................35
imlview.................................................................................................................................36
load.....................................................................................................................................37
ls/dir....................................................................................................................................37
map......................................................................................................................................40
memmap...............................................................................................................................41
mkdir....................................................................................................................................43
mode....................................................................................................................................43
mv........................................................................................................................................44
openinfo...............................................................................................................................45
parse....................................................................................................................................45
pause...................................................................................................................................46
pci........................................................................................................................................46
ping.....................................................................................................................................47
ramdisk.................................................................................................................................48
reset.....................................................................................................................................48
rm/del..................................................................................................................................49
set........................................................................................................................................50
setsize...................................................................................................................................51
shift......................................................................................................................................51
smbiosview............................................................................................................................52
stall......................................................................................................................................52
sysconfig...............................................................................................................................53
sysconfig attributes.............................................................................................................54
sysinfo...................................................................................................................................62
time......................................................................................................................................62
timezone...............................................................................................................................63
touch....................................................................................................................................64
type......................................................................................................................................64
unload..................................................................................................................................65
ver........................................................................................................................................65
vol........................................................................................................................................66
3 Running and editing UEFI Shell scripts.........................................................67
UEFI Shell script commands.....................................................................................................67
Invoking scripts.......................................................................................................................67
Enabling the UEFI Shell Script Auto Start...............................................................................67
Manually invoking a Shell script...........................................................................................67
Editing Shell scripts.................................................................................................................67
Sample UEFI Shell application source code................................................................................67
4 Using the UEFI Programming Model............................................................69
Sample Shell scripts................................................................................................................70
5 UEFI Shell command status codes...............................................................73
6 Support and other resources......................................................................74
Contacting HP........................................................................................................................74
Subscription Service...........................................................................................................74
Related information.................................................................................................................74
Websites..........................................................................................................................74
Typographic conventions.........................................................................................................74
HP Insight Remote Support.......................................................................................................75
7 Documentation feedback...........................................................................77
Glossary....................................................................................................78
Index.........................................................................................................79
4
Contents
1 Introduction
The system BIOS in all HP ProLiant Gen9 servers includes an embedded UEFI Shell in the ROM.
Based on the UEFI Shell Specification, the Shell environment provides an API, and command line
interfaces (CLI) that allow scripting, file manipulation, and obtaining system information. The Shell
also runs other UEFI applications. These features enhance the capabilities of the UEFI System
Utilities. Access to the UEFI Shell is enabled by default.
For more information, see HP UEFI System Utilities User Guide for HP ProLiant Gen9 Servers.
Commands and capabilities
The following capabilities are available in the UEFI Shell:
•
Scripting:
◦
nsh files with standard scripting constructs, including if, else, endif, shift, and
for/endfor
◦
An echo command
◦
A startup.nsh auto start file similar to Autoexec.bat
◦
Standard Format Output (-sfo argument) for most commands
–
•
•
Comma-separated output that can be parsed using a parse command
File manipulation:
◦
The ability to read any FAT16 and FAT32 file
◦
Standard file operations commands, such as md, cd, cp/copy, del, dir/ls, atrib,
alias, and touch
◦
File editing (edit) and viewing (type)
◦
Input/output redirection from and to consoles and files
Configuration commands:
◦
BIOS configuration (sysconfig)
◦
ROM firmware updates (fwupdate)
Accessing the UEFI Shell
You can access the UEFI Shell in one of the following ways:
•
During server POST, press F11 (Boot Menu) in the HP ProLiant POST screen. See “Booting to
the UEFI Shell” (page 7).
•
Using a serial console connection. See “Accessing the UEFI Shell from a serial console
connection” (page 8).
•
Using a serial port on the server. See the HP UEFI System Utilities User Guide for HP ProLiant
Gen9 Servers.
Accessing the HP UEFI System Utilities
To access the HP UEFI System Utilities:
1. Power on the server.
The HP ProLiant POST screen appears.
Commands and capabilities
5
2.
Press F9.
The System Utilities screen appears.
3.
To navigate through and modify settings in the menu-driven interface, use the keys defined in
the following table.
Key
Action
Up or down arrow
Press to change a selection.
Enter
Press to select an entry.
ESC
Press to go back to the previous screen.
F1
Press to view online help about a selected option.
F7
Press to load default RBSU configuration settings. You need to reboot
the system for changes to take effect. Press Enter to apply defaults.
Press ESC if you want to cancel.
F10
Press to save your changes.
POST screen keys
4.
F9
Press during server POST or system reboot to display the System
Utilities screen.
F11
Press during server POST to boot to the One-Time Boot Menu screen.
To exit the System Utilities screen and restart the server, press Esc until the main menu is
displayed. Exit the utility by selecting Exit and Resume Boot in the main menu.
Before booting to the UEFI Shell
Before booting to the UEFI Shell, follow these steps:
1. Ensure that the embedded UEFI Shell is enabled. The default setting is enabled. See “Enabling
the Embedded UEFI Shell” (page 6).
2. Optionally, add the Embedded UEFI Shell to the boot order list. See “Adding Embedded UEFI
Shell to the Boot Order list” (page 7).
3. Optionally, enable UEFI Shell script auto execution. See “Enabling the UEFI Shell Script Auto
Start” (page 67).
4. Change the Embedded UEFI Shell entry in the UEFI Boot order list. See “Changing the UEFI
boot order” (page 7).
Enabling the Embedded UEFI Shell
You can enable or disable the Embedded UEFI Shell. The UEFI Shell is a pre-boot command line
environment for scripting and running UEFI applications, including UEFI boot loaders. The UEFI
Shell also provides CLI-based commands to obtain system information and configure and update
the system BIOS. Enabling this option adds the Embedded UEFI Shell to the UEFI boot options. You
can only configure this option if Boot Mode is set to UEFI. See ???.
To set the Embedded UEFI Shell:
1. From the System Utilities screen, select System Configuration→BIOS/Platform Configuration
(RBSU)→Embedded UEFI Shell and press Enter.
2. Select one of the following options:
3.
6
•
Enabled (default)
•
Disabled
Press F10 to save your selection.
Introduction
Configuring the UEFI Shell
The following sections explain how to add the Embedded UEFI Shell to the boot order list and
change the location in the boot order list if needed. You can set the UEFI Shell as the last entry if
you want to troubleshoot a failed boot.
Adding Embedded UEFI Shell to the Boot Order list
Adding the Embedded UEFI Shell as an entry in the Boot Order list is only applicable when the
Embedded UEFI Shell is enabled and Boot Mode is set as UEFI. Otherwise, this option is unavailable.
NOTE: When enabling this option, the Embedded UEFI Shell does not appear in the UEFI Boot
Order list until the next system reboot.
To add the Embedded UEFI Shell to the boot order list:
1. From the System Utilities screen, select System Configuration→BIOS/Platform Configuration
(RBSU)→Embedded UEFI Shell→Add Embedded UEFI Shell to Boot Order and press Enter.
2. Select one of the following options:
3.
•
Enabled (default)—Adds the embedded UEFI Shell to the boot order.
•
Disabled
Press F10 to save your selection.
Changing the UEFI boot order
To change the order of the UEFI Boot Order list:
1. From the System Utilities screen, select System Configuration→BIOS/Platform Configuration
(RBSU)→Boot Options→UEFI Boot Order and press Enter.
The UEFI Boot Order screen appears.
2.
3.
4.
5.
6.
7.
Use the arrow keys to navigate within the boot list.
Press the + key (plus) to move an entry higher in the boot list.
Press the - key (minus) to move an entry lower in the boot list.
Press F10 to save your selection.
From the System Utilities screen, select Exit and Resume Boot.
Reboot the server for the change to take effect.
Booting to the UEFI Shell
You can select the UEFI Shell for a one-time boot override whenever necessary. This option does
not modify your predefined boot order settings.
To boot to the UEFI Shell:
1. Reboot the server.
2. During the reboot, press F11 Boot Menu in the HP ProLiant POST screen.
The Boot Menu screen appears.
3.
4.
Select Embedded UEFI Shell, and press Enter.
Press any key to acknowledge that you are physically present.
This step ensures that certain features, such as disabling Secure Boot or managing the Secure
Boot certificates using third-party UEFI tools, are not restricted.
5.
If an admin password is set, enter it at the prompt. For information on setting the admin
password, see the HP UEFI System Utilities User Guide for HP ProLiant Gen9 Servers.
The Shell> prompt appears.
6.
7.
Enter commands as explained in “UEFI Shell command reference” (page 9).
Enter the exit command to exit the Shell.
Accessing the UEFI Shell
7
Accessing the UEFI Shell from a serial console connection
NOTE: When accessing the Shell from a serial console, English is the only available language
for input and output. Ensure your terminal software is using Unicode character set (for example:
UTF-8).
To access the UEFI Shell from a serial console connection:
1. Boot the server as explained in “Booting to the UEFI Shell” (page 7).
2. Open a connection in an SSH client application using the server’s IP address.
3. Leave the SSH port as 22.
4. At the login prompt, enter your user name and password.
The hpiLO-> prompt appears.
5.
Enter vsp, and press Enter to open the virtual serial port.
The UEFI Shell> prompt appears.
6.
7.
Enter commands as explained in “UEFI Shell command reference” (page 9).
Enter exit to exit the Shell.
Example 1 (page 8) shows an example of logging into the UEFI Shell from a serial console
connection.
Example 1 Logging in from a serial console connection
login as: username
@<ip address>'s password: password
User: logged-in to <server path> / <server MAC address>
iLO 4 Standard 1.30 at January 16 2014
Server Name:
Server Power: On
hpiLO-> vsp
Virtual Serial Port Active: COM2
Starting virtual serial port.
Press 'ESC (' to return to the CLI Session.
Shell>
8
Introduction
2 UEFI Shell command reference
Command line syntax
Table 1 (page 9) lists examples of how to interpret command syntax.
Table 1 Syntax examples
Syntax example
Usage
exit
Enter exit.
date [mm/dd/ { yy | yyyy }] [-sfo] To display the current date, do one of the following:
• Enter date with no optional parameters.
• Enter date followed by -sfo to specify standard-format output.
NOTE: To set a specific date on the system, enter date followed by
the date parameters in one of the following formats:
◦
mm/dd/yy
◦
mm/dd/yyyy
This syntax indicates that the month (mm) and day (dd) parameters are
optional, but either a two-digit year (yy) or four-digit year (yyyy)
parameter is required for setting a date.
eficompress infile outfile
Enter eficompress followed by the filename for the uncompressed input
file as the infile parameter, and the compressed output file as the
outfile parameter.
Command line completion
The command line completion feature simplifies entering and repeating commands. Table 2 (page
9) describes the command line completion keystrokes.
Table 2 Command line completion keys
Key
Effect
up arrow key
Scrolls backward through the list of previously entered commands.
down arrow
key
Scrolls forward through the list of previously entered commands.
TAB
Completes file names in the command line. Type at least one character, and press the TAB key to
complete the file name. If more than one possibility exists, press the TAB key again to view all
possibilities.
PgUp
Page up.
PgDown
Page down.
Getting started
This section describes how to use some basic UEFI Shell commands for:
•
“Controlling command output” (page 10)
•
“Displaying command help” (page 13)
•
“Accessing a file system from the Shell” (page 16)
•
Using sysconfig options.
•
Using the reset command.
Command line syntax
9
Controlling command output
Many UEFI Shell commands support optional parameters for controlling how the output displays
on the screen. The following sections explain these options and provides examples on how to use
them.
Limiting output to one screen at a time
Use the –b option to limit the display output of certain commands to one screen at a time. Shell
commands supporting this option include:
•
comp
•
devices
•
devtree
•
dh
•
dmem
•
help
•
memmap
Example 2 (page 11) shows how to limit devtree output to one screen at a time. After displaying
the first screen, the Shell prompts for either of the following:
10
•
Press Enter to continue to the next screen.
•
Press Q to quit the display.
UEFI Shell command reference
Example 2 Using -b to display output one screen at a time
Shell> devtree -b
Ctrl[03] Fv(6522280D-28F9-4131-ADC4-F40EBFA45864)
Ctrl[04] Fv(770BF9B6-8AFE-4F4C-85E5-893FC3D2606C)
Ctrl[05] Fv(27A72E80-3118-4C0C-8673-AA5B4EFA9613)
Ctrl[06] MemoryMapped(0xB,0xFFD40000,0xFFD6FFFF)
Ctrl[07] Fv(5A515240-D1F1-4C58-9590-27B1F0E86827)
Ctrl[08] Fv(5E2363B4-3E9E-4203-B873-BB40DF46C8E6)
Ctrl[09] Fv(CDBB7B35-6833-4ED6-9AB2-57D2ACDDF6F0)
Ctrl[5F] PciRoot(0x0)
Ctrl[195] PciRoot(0x0)/Pci(0x0,0x0)
Ctrl[196] PciRoot(0x0)/Pci(0x2,0x0)
Ctrl[197] PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)
Ctrl[198] PciRoot(0x0)/Pci(0x2,0x1)
Ctrl[199] PciRoot(0x0)/Pci(0x2,0x2)
Ctrl[19A] PciRoot(0x0)/Pci(0x2,0x3)
Ctrl[19B] PciRoot(0x0)/Pci(0x3,0x0)
Ctrl[19C] PciRoot(0x0)/Pci(0x3,0x1)
Ctrl[19D] PciRoot(0x0)/Pci(0x3,0x2)
Ctrl[19E] PciRoot(0x0)/Pci(0x3,0x3)
Ctrl[19F] PciRoot(0x0)/Pci(0x4,0x0)
Ctrl[1A0] PciRoot(0x0)/Pci(0x4,0x1)
Ctrl[1A1] PciRoot(0x0)/Pci(0x4,0x2)
Ctrl[1A2] PciRoot(0x0)/Pci(0x4,0x3)
Ctrl[1A3] PciRoot(0x0)/Pci(0x4,0x4)
Ctrl[1A4] PciRoot(0x0)/Pci(0x4,0x5)
Ctrl[1A5] PciRoot(0x0)/Pci(0x4,0x6)
Ctrl[1A6] PciRoot(0x0)/Pci(0x4,0x7)
Ctrl[1A7] PciRoot(0x0)/Pci(0x5,0x0)
Ctrl[1A8] PciRoot(0x0)/Pci(0x5,0x1)
Ctrl[1A9] PciRoot(0x0)/Pci(0x5,0x2)
Ctrl[1AA] PciRoot(0x0)/Pci(0x5,0x4)
Press ENTER to continue or 'Q' break:
For an example of how to use this option with the help command, see Example 7 (page 13).
Example 3 Enabling global page breaks
Use the pagebreak flag to enable global output pagination.
Example
To enable global output page breaks:
fs0:\> set -v pagebreak 1
This command creates a UEFI environmental variable that is retained until a server reboot.
To disable global output page breaks:
fs0:\> set -v pagebreak 0
Displaying detailed output
Use the –v option to display detailed (verbose) output of certain commands. Shell commands
supporting this option include:
•
dh
•
help
•
map
Example 4 (page 12) shows how to display detailed dh (device handle) output one screen at a
time.
Getting started
11
Example 4 Using -v to display detailed output
Shell> dh -v -b
01: LoadedImage
02: Decompress
03: UnknownDevice DevicePath Fv(6522280D-28F9-4131-ADC4-F40EBFA45864) UnknownDevice
04: UnknownDevice DevicePath Fv(770BF9B6-8AFE-4F4C-85E5-893FC3D2606C) UnknownDevice
05: UnknownDevice DevicePath Fv(27A72E80-3118-4C0C-8673-AA5B4EFA9613) UnknownDevice
06: UnknownDevice DevicePath Fv(29A72E80-7BFE-4101-8459-AB5B3EFA4271) UnknownDevice
07: UnknownDevice DevicePath Fv(5A515240-D1F1-4C58-9590-27B1F0E86827) UnknownDevice
08: UnknownDevice DevicePath Fv(5E2363B4-3E9E-4203-B873-BB40DF46C8E6) UnknownDevice
09: UnknownDevice DevicePath Fv(CDBB7B35-6833-4ED6-9AB2-57D2ACDDF6F0) UnknownDevice
0A: UnknownDevice UnknownDevice
0B: ImageDevicePath LoadedImage
0C: UnknownDevice Pcd
0D: ImageDevicePath LoadedImage
0E: UnknownDevice UnknownDevice
0F: ImageDevicePath LoadedImage
10: UnknownDevice ImageDevicePath LoadedImage
11: UnknownDevice UnknownDevice UnknownDevice ImageDevicePath LoadedImage
12: ImageDevicePath LoadedImage
13: UnknownDevice
14: UnknownDevice ImageDevicePath LoadedImage
15: UnknownDevice
16: UnknownDevice
17: ImageDevicePath LoadedImage
18: ImageDevicePath LoadedImage
19: UnknownDevice ImageDevicePath LoadedImage
1A: ImageDevicePath LoadedImage
1B: UnknownDevice
1C: ImageDevicePath LoadedImage
1D: UnknownDevice
Press ENTER to continue or 'Q' break:
Displaying summary output
Use the –t option to display summary (terse) output of certain commands. Shell commands
supporting this option include:
•
ver
Example 5 (page 12) shows how to use the ver command to display detailed UEFI version
information, and how to use the -t option to display a summary.
Example 5 Using -t to display summary output
Shell> ver
UEFI Interactive Shell v2.0
Copyright 1982 - 2014 Hewlett-Packard Development Company, L.P.
UEFI v2.40 (HP, 0x00011400)
ProLiant System BIOS - P06 (07/29/2014)
Shell> ver -t
UEFI Interactive Shell v2.0
Suppressing the confirmation prompt
Use the –q option to execute certain commands in quiet mode—without a confirmation prompt.
Shell commands supporting this option include:
•
cp
•
rm/del
Example 6 (page 13) shows how to use this option with the rm command to remove all temp
directories without displaying a prompt.
12
UEFI Shell command reference
Example 6 Using -q to suppress the confirmation prompt
fs0:\> rm -q test\temp*
removing fs0:\test\temp1\temp1.txt
- [ok]
removing fs0:\test\temp1\boot\nshell.efi
- [ok]
removing fs0:\test\temp1\boot
- [ok]
removing fs0:\test\temp1
- [ok]
removing fs0:\test\temp2\temp2.txt
- [ok]
removing fs0:\test\temp2
- [ok]
Displaying command help
There are a variety of command options to display detailed and summarized help for one or more
commands.
Displaying all command help
Example 7 (page 13) shows how to display help for all commands one screen at a time:
Example 7 Displaying all command help
Shell> help –b
alias
- Displays, creates, or deletes UEFI Shell aliases.
attrib
- Displays or changes the attributes of files or directories.
cd
- Displays or changes the current directory.
cls
- Clears standard output and optionally changes background color.
comp
- Compares the contents of two files on a byte for byte basis.
cp
- Copies one or more files or directories to another location.
date
- Displays and sets the current date for the system.
devices
- Displays the list of devices managed by UEFI drivers.
devtree
- Displays the UEFI Driver Model compliant device tree.
dh
- Displays the device handles in the UEFI environment.
dmem
- Displays the contents of system or device memory.
drivers
- Displays the UEFI driver list.
echo
- Controls script file command echoing or displays a message.
edit
- Full screen editor for ASCII or UCS-2 files.
eficompress
- Compresses a file using UEFI Compression Algorithm.
efidecompress - Decompresses a file using UEFI Decompression Algorithm.
else
- Identifies the code executed when 'if' is FALSE.
endfor
- Ends a 'for' loop.
endif
- Ends the block of a script controlled by an 'if' statement.
exit
- Exits the UEFI Shell or the current script.
for
- Starts a loop based on 'for' syntax.
fwupdate
- Invokes an HP UEFI Shell utility used to update System BIOS firmware.
getmtc
- Gets the MTC from BootServices and displays it.
Press ENTER to continue or 'Q' break:
Displaying help for a specific command
Use any of the following syntax options to display specific command help:
•
help commandname
•
? commandname
•
commandname -?
Example 8 (page 14) shows one way to display help for the ls command (one screen at a time).
Getting started
13
Example 8 Displaying help for the ls command
Shell> help ls -b
Lists a directory's contents or file information.
LS [-r] [-a[attrib]][-sfo][file]format:
-r
- Displays recursively (including subdirectories)
-a
- Display only those files with the attributes of type attrib. If no
attributes are listed, all files will be listed. If -a is not
specified, all non-system and non-hidden files will be listed.
-sfo
- Display information in Standard-Format Output.
attrib - File attribute list:
a - Archive
s - System
h - Hidden
r - Read-only
d - Directory
file
- Name of file or directory (wildcards are permitted)
NOTES:
1. This command lists directory contents or file information. If no file
name or directory name is specified, the current working directory
is assumed.
2. The contents of a directory are listed if all of the following are true:
- If option -r is not specified
- If no wildcard characters are specified in the file parameter
- If file represents an existing directory
3. In all other cases, the command functions as follows:
- All files/directories that match the specified name are displayed.
- The -r flag determines whether a recursive search is performed.
- The option flag -a[attrib] tells the command to display only those
files with the attributes that are specified by [attrib].
For more usage details for the help command, see “help” (page 34).
Displaying all help for commands beginning with a specific character
Use a wildcard (*) to display help for all commands beginning with a specific character. Example 9
(page 15) shows how to do this for all commands beginning with the character a.
14
UEFI Shell command reference
Example 9 Displaying help for commands beginning with a
Shell> help a*
Displays, creates, or deletes UEFI Shell aliases.
ALIAS [-d|-v] [alias-name] [command-name]m all files with extension '.inf':
fs0:\> attrib -r *.inf
-d
- Delete an alias. command-name must not be specified.
-v
- Make the alias volatile.
alias-name
- Alias name
command-name - Original command's name or path.
NOTES:
1. This command displays, creates, or deletes aliases in the UEFI Shell
environment.
2. An alias provides a new name for an existing UEFI Shell
command or UEFI application. Once the alias is created, it can be used
to run the command or launch the UEFI application.
3. There are some aliases that are predefined in the UEFI Shell environment.
These aliases provide the MS-DOS and UNIX equivalent names for the file
manipulation commands.
4. Aliases will be retained even after exiting the shell unless the -v option
is specified. If -v is specified the alias will not be valid after
leaving the shell.
EXAMPLES:
* To display all aliases in the UEFI Shell environment:
Shell> alias
* To create an alias in the UEFI Shell environment:
Shell> alias shutdown "reset -s"
* To delete an alias in the UEFI Shell environment:
Shell> alias -d shutdown
* To add a volatile alias in the current UEFI environment, which has a star *
at the line head. This volatile alias will disappear at next boot.
Shell> alias -v fs0 floppy
Displays or changes the attributes of files or directories.
ATTRIB [+a|-a] [+s|-s] [+h|-h] [+r|-r] [file...] [directory...]
+a|-a
+s|-s
+h|-h
+r|-r
file
directory
-
Set or clear the 'archive' attribute
Set or clear the 'system' attribute
Set or clear the 'hidden' attribute
Set or clear the 'read-only' attribute
File name (wild cards are permitted)
Directory name (wildcards are permitted)
NOTES:
1. Four attribute types are supported in the UEFI file system:
- Archive [A]
- System [S]
- Hidden [H]
- Read only [R]
2. If a file (in general meaning) is a directory, it is also shown
to have the attribute [D].
3. If any file in the file list that is specified in the command line
does not exist, attrib will continue processing the remaining files
while reporting the error.
4. If no attributes parameters are specified, the current attributes of
the specified files or directories will be displayed.
5. If no files or directories are specified, the command applies to
all files and sub-directories within the current directory.
EXAMPLES:
* To display the attributes of a directory:
Shell> :\> attrib fs0:\
* To display the attributes of all files and sub-directories in the current
Getting started
15
directory:
fs0:\> attrib *
* To add the system attribute to all files with extension '.efi':
fs0:\> attrib +s *.efi
* To remove the read only attribute from all files with extension '.inf':
fs0:\> attrib -r *.inf
Accessing a file system from the Shell
Switch from the Shell to a file system before executing commands requiring file input or output.
To switch to a file system:
1. Using HDD, USB, or iLO virtual USB, attach a FAT16 or FAT32 formatted file system.
2. Use the map –r command to refresh file system mappings. See “map” (page 40).
3. Enter one of the fsx file systems available, such as fs0 or fs1, and press Enter.
The prompt changes to fsx>, where x is the number of the file system selected.
Files can now be accessed and written to any writable files in the specified file system.
Example 10 (page 16) shows how to access the fs0 file system from the Shell.
Example 10 Accessing the fs0 file system from the Shell
Shell> map -r
Shell>fs0:
fs0:\>
NOTE: Output examples in this guide use the fs0:\> prompt to show where a file system would
be accessed from the Shell.
UEFI Shell Commands
This section lists the UEFI Shell commands in alphabetical order. Table 3 (page 16) details the
components of each command listing.
NOTE:
All commands require BIOS administrator authority.
For information on setting the administrator password, see the HP UEFI System Utilities User Guide
for HP ProLiant Gen9 Servers.
Table 3 Shell command listing components
Section
Description
Command name and summary line Command name followed by a brief description of how it’s used
Syntax
Command syntax, including required and optional parameters
Options
Description of syntax parameters and variables
Description
Detailed description of command usage
Examples
One or more examples of command usage
NOTE:
Output details
User input is indicated in bold in command usage examples.
Descriptions of the command display fields, when applicable.
alias
Displays, creates, or deletes aliases in the UEFI Shell environment.
16
UEFI Shell command reference
Syntax
alias [ -d | -v ] [alias-name] [command-name]
Description
This command displays, creates, or deletes aliases in the UEFI Shell environment. An alias provides
a new name for an existing UEFI Shell command or UEFI application. Once the alias is created,
it can be used to run the command or launch the UEFI application.
There are some aliases that are predefined in the UEFI Shell environment. These aliases provide
the MS-DOS and UNIX equivalent names for the file manipulation commands.
Aliases are retained even after exiting the Shell unless the –v option is specified. If-v is specified,
the alias is not valid after leaving the shell.
Examples
To display all aliases in the UEFI Shell environment:
Shell> alias
md : mkdir
rd : rm
myguid : guid
To create an alias in the UEFI Shell environment:
Shell> alias myguid guid
Shell> alias
md : mkdir
rd : rm
myguid : guid
To delete an alias in the UEFI Shell environment:
Shell> alias -d myguid
Shell> alias
md : mkdir
rd : rm
To add a volatile alias in the current UEFI environment, which has a star * at the line head. This
volatile alias disappears at the next boot.
Shell> alias -v fs0 floppy
Shell> alias
md : mkdir
rd : rm
* fs0 : floppy
attrib
Displays or changes the attributes of files or directories.
Syntax
attrib [ +a | -a ] [ +s | -s ] [ +h | -h ] [ +r | -r ] [file...] [directory...]
Options
[ +a | -a ]
Sets or clears the archive attribute.
[ +s | -s ]
Sets or clears the system attribute.
[ +h | -h ]
Sets or clears the hidden attribute.
[ +r | -r ]
Sets or clears the read-only attribute.
file...
Specifies the file name. Wild cards are permitted.
directory...
Specifies the directory name. Wild cards are permitted.
attrib
17
Description
This command displays and sets the attributes of files or directories. The following four attribute
types are supported in the UEFI file system:
•
Archive—A
•
System—S
•
Hidden—H
•
Read only—R
If a file is a directory, it is also shown to have the attribute D.
If any file in the file list that is specified in the command line does not exist, attrib continues
processing the remaining files while reporting the error.
If no file or directory is specified, all of the files in the current directory are displayed.
If no attribute is specified, the attributes of the files are displayed.
Examples
To display the attributes of a directory:
fs0:\> attrib fs0:\
attrib: D fs0:\
To display the attributes of all files and subdirectories in the current directory:
fs0:\> attrib *
\attrib: AS fs0:\serial.efi
attrib: DA fs0:\test1
attrib: A HR fs0:\bios.inf
attrib: A fs0:\VerboseHelp.txt
attrib: AS fs0:\IsaBus.efi
To add the system attribute to all files with extension .efi:
fs0:\> attrib +s *.efi
To remove the read-only attribute from all files with extension .inf:
fs0:\> attrib -r *.inf
\attrib: A H fs0:\bios.inf
boot
Boots or displays UEFI boot options.
Syntax
boot [-d]
boot [-n num]
boot [ -all | -pxe ]
Options
18
-d
Displays UEFI boot options in order.
-n
Attempts booting a specific UEFI boot option.
num
Specifies the boot option number to attempt. This is a four-digit hex value for each option.
-all
Attempts booting all UEFI boot options in order.
-pxe
Attempts booting all UEFI PXE boot options in order.
UEFI Shell command reference
Description
This command only applies to UEFI boot options. It cannot be used to display or boot Legacy BIOS
boot options.
Examples
To display all UEFI boot options in order:
Shell> boot -d
To attempt booting all UEFI boot options in order:
Shell> boot -all
To attempt booting all UEFI PXE boot options in order:
Shell> boot -pxe
To attempt booting the UEFI boot option with option number 0004:
Shell> boot -n 0004
cd
Displays or changes the current directory.
Syntax
cd [path]
Options
path
Specifies the relative or absolute directory path.
Description
This command changes the current working directory that is used by the UEFI Shell environment.
If a file system mapping is specified, the current working directory is changed for that device.
Otherwise, the current working directory is changed for the current device.
If path is not present, the current working directory (including file system mapping) is displayed
to standard output.
Table 4 (page 19) describes the conventions that are used to refer to the directory, its parent, and
the root directory in the UEFI Shell environment.
Table 4 Directory name conventions
Convention
Refers to the...
.
Current directory.
. .
Parent of the current directory.
\
Root of the current file system.
The current working directory is maintained in the environment variable %cwd%.
Examples
To change the current file system to the mapped fs0 file system:
Shell> fs0:
To change the current directory to subdirectory efi:
fs0:\> cd efi
To change the current directory to the parent directory (fs0:\):
fs0:\efi\> cd ..
cd
19
To change the current directory to fs0:\efi\tools:
fs0:\> cd efi\tools
To change the current directory to the root of the current fs (fs0):
fs0:\efi\tools\> cd \
fs0:\>
NOTE:
Changing volumes with cd does not work. For example:
fs0:\efi\tools\> cd fs1:\
First enter fs1:, and then cd to the directory you want.
To move between volumes and maintain the current path:
fs0:\> cd \efi\tools
fs0:\efi\tools\> fs1:
fs1:\> cd tmp
fs1:\tmp> cp fs0:*.* .
This copies all of files in fs0:\efi\tools into the fs1:\tmp directory.
cls
Clears the standard output and changes the background color.
Syntax
cls [color]
Options
color
Specifies a new background color from the following options:
0—Black
1—Blue
2—Green
3—Cyan
4—Red
5—Magenta
6—Yellow
7—Light gray
Description
This command clears the standard output device with an optional background color attribute. If
color is not specified, the background color does not change.
Examples
To clear the standard output without changing the background color:
fs0:\> cls
To clear the standard output and change the background color to cyan:
fs0:\> cls 3
To clear the standard output and change the background to the default color:
fs0:\> cls 0
20
UEFI Shell command reference
comp
Compares the contents of two files on a byte for byte basis.
Syntax
comp [-b] file1 file2
Options
-b
Displays one screen at a time.
file1
Specifies the first file name. Directory names or wild cards are not permitted.
file2
Specifies the second file name. Directory names or wild cards are not permitted.
Description
This command compares the contents of two files in binary mode. It displays up to 10 differences
between the two files. For each difference, up to 32 bytes from the location where the difference
starts are dumped. The UEFI Shell exits immediately if the lengths of the compared files are different.
Examples
To compare two files with different lengths:
fs0:\> comp bios.inf legacy.inf
Compare fs0:\bios.inf to fs0:\legacy.inf
Difference #1: File sizes mismatch
[difference(s) encountered]
To compare two files with the same contents:
fs0:\> comp bios.inf rafter.inf
Compare fs0:\bios.inf to fs0:\rafter.inf
[no difference encountered]
To compare two files with the same length but different contents:
fs0:\> comp bios.inf bios2.inf
Compare fs0:\bios.inf to fs0:\bios2.inf
Difference #1:
File1: fs0:\bios.inf
00000000: 5F
*_*
File2: fs0:\bios2.inf
00000000: 33
*3*
Difference #2:
File1: fs0:\bios.inf
0000000C: 00 00 00 00
*....*
File2: fs0:\bios2.inf
0000000C: 25 32 03 03
*%2..*
[difference(s) encountered]
connect
Binds a driver to a specific device and starts the driver.
Syntax
connect [[devicehandle] [driverhandle] | [-c] | [-r] ]
Options
devicehandle
Specifies a device handle in hexidecimal format.
driverhandle
Specifies a driver handle in hexidecimal format.
-c
Connects only the console devices described in UEFI Shell environment
variables and related devices.
comp
21
Connects console devices recursively.
-r
Description
If a devicehandle is not specified, all device handles in the current system are the default. If
driverhandle is not specified, all matched drivers are bound to the specified device.
If driverhandle is specified, it is given highest priority on connecting the specified devices. If
the –r option is specified, all handles are recursively scanned to see if any loaded or embedded
driver matches the specified device. Additionally, if more device handles are created during the
binding, these handles are also checked to see if a matching driver can bind to the specified
devices. This process is repeated until no more drivers are able to connect to any devices.
If the –r option is not specified, newly-created device handles are not further bound to any drivers.
If only a single handle is specified and the handle has an EFI_DRIVER_BINDING_PROTOCOL,
the handle is assumed to be a driver handle. Otherwise, it is assumed to be a device handle.
If no parameters are specified, the command attempts to bind all proper drivers to all devices
without recursion and each connection status is displayed. Output redirection is not supported for
connect –r usage.
Examples
To connect all drivers to all devices recursively:
Shell>connect -r
To display all connections:
Shell>connect
To connect drivers with 0x17 as highest priority to all the devices they can manage:
Shell>connect 17
To connect all possible drivers to device 0x19:
Shell>connect 19
To connect drivers with 0x17 as highest priority to device 0x19:
Shell>connect 19 17
To connect console devices described in the UEFI Shell environment variables:
Shell>connect -c
cp
Copies one or more source files or directories to a destination.
Syntax
cp [-r] [-q] src src... [dst]
Options
22
-r
Creates a recursive copy.
-q
Creates a quiet copy (with no prompt).
src src...
Specifies a source file or directory name. Wild cards are permitted.
dst
Specifies a destination file or directory name. Wild cards are not permitted. If
not specified, the current working directory is assumed to be the destination. If
more than one directory is specified, the last is always assumed to be the
destination.
UEFI Shell command reference
Description
This command copies one or more source files or directories to a destination. If the source is a
directory, the -r flag must be specified. If -r is specified, the source directory is recursively copied
to the destination (which means that all subdirectories are copied). If a destination is not specified,
the current working directory is assumed to be the destination.
If any target file (not directory) already exists, a prompt appears asking you to confirm replacing
the file. The following four choices are available:
•
Yes—Replaces the file.
•
No—Does not replace the file.
•
All—Replaces the existing files in all subsequent cases.
•
Cancel—Does not replace any existing files in all subsequent cases.
If there are multiple source files/directories, the destination must be a directory.
If an error occurs, the copying process stops immediately.
When executing in a script, the default is –q.
When copying to another directory, the directory must already exist.
Examples
To display the contents of the current directory:
fs0:\> ls
Directory of: fs0:\
06/18/01 01:02p <DIR> 512
06/18/01 01:02p <DIR> 512
test1
06/18/01 01:02p <DIR> 512
test2
06/13/01 10:00a 28,739
IsaBus.efi
06/13/01 10:00a 32,838
IsaSerial.efi
06/18/01 08:04p 29
temp.txt
06/18/01 08:05p <DIR> 512
test
3 File(s) 61,606 bytes
4 Dir(s)
efi
To copy a file in the same directory and change the file name :
fs0:\> cp temp.txt readme.txt
copying fs0:\temp.txt -> fs0:\readme.txt
- [ok]
To copy multiple files to another directory:
fs0:\> cp temp.txt isaBus.efi \test
copying fs0:\temp.txt -> fs0:\test\temp.txt
- [ok]
copying fs0:\isaBus.efi -> fs0:\test\IsaBus.efi
- [ok]
To copy multiple directories recursively to another directory:
fs0:\> cp -r test1 test2 boot \test
copying fs0:\test1 -> fs0:\test\test1
copying fs0:\test1\test1.txt -> fs0:\test\test1\test1.txt
- [ok]
copying fs0:\test2 -> fs0:\test\test2
copying fs0:\test2\test2.txt -> fs0:\test\test2\test2.txt
- [ok]
copying fs0:\boot -> fs0:\test\boot
copying fs0:\boot\shell.efi -> fs0:\test\boot\shell.efi
- [ok]
To see the results of the above operations:
fs0:\> ls \test
Directory of: fs0:\test
06/18/01 01:01p <DIR>
06/18/01 01:01p <DIR>
0
..
512
.
cp
23
01/28/01 08:21p <DIR>
512
test1
01/28/01 08:21p <DIR>
512
test2
01/28/01 08:21p <DIR>
512
boot
01/28/01 08:23p
29
temp.txt
01/28/01 08:23p
28,739
IsaBus.efi
2 File(s)
28,828 bytes
5 Dir(s)
Shell>
date
Displays and sets the current date for the system.
Syntax
date [mm/dd/ { yy | yyyy }] [-sfo]
Options
mm
Specifies the month of the date to be set (1-12).
dd
Specifies the day of the date to be set (1-31).
yy
Specifies a two-digit year date.
yyyy
Specifies a four-digit year date.
-sfo
Specifies a standard-format output display.
Description
This command displays or sets the current date for the system. If no parameters are used, it shows
the current date. If a valid month, day, and year are provided, the system's date is updated. Rules
are:
•
Except for numeric characters and /, all other characters in the argument are invalid. The
Shell reports an error if the number is in the wrong month/date/year range.
•
A space before or after the numeric character is not allowed. Inserting a space into the number
is invalid.
•
The year range is greater than or equal to 1998. Two numeric characters indicate the year.
Numbers below 98 are regarded as 20xx, and numbers equal to or above 98 are regarded
as 19xx. 00 means 2000. For example:
Shell> date 8/4/97
Shell> date
8/04/2097
Shell>
Shell> date 8/4/98
Shell> date
08/04/1998
Shell>
The range of valid years is 1998–2099.
Examples
To display the current date in the system:
fs0:\> date
06/18/2001
To set the date with a long year format and display it:
fs0:\> date 01/01/2050
fs0:\> date
01/01/2050
24
UEFI Shell command reference
To set the date with a short year format and display it:
fs0:\> date 06/18/01
fs0:\> date
06/18/2001
dblk
Displays one or more blocks from a block device.
Syntax
dblk device [lba] [blocks] [-b]
Options
-b
Display one screen at a time.
device
Block device name.
lba
Index of the first block to be displayed (a hexadecimal number).
blocks
Number of blocks to be displayed (a hexadecimal number). The default is 1. If larger
than 0x10, only 0x10 are displayed.
Examples
To display one block of blk0, beginning from block 0:
fs0:\> dblk blk0
To display one block of fs0, beginning from block 0x2:
fs0:\> dblk fs0 2
To display 0x5 blocks of fs0, beginning from block 0x12:
fs0:\> dblk fs0 12 5
devices
Displays a list of devices managed by UEFI drivers.
Syntax
devices [-b] [-lxxx] [-sfo]
Options
-b
Displays one screen at a time.
-lxxx
Displays devices in a specific language. For a list of possible code options see the UEFI
Specification.
-sfo
Displays information in standard-format output.
Description
This command prints a list of devices that are being managed by drivers that follow the UEFI Driver
Model.
Example
To display all devices compliant with the EFI Driver Model:
Shell>
C
T
T
Y
R
P
L
E
== =
devices
D
C I
F A
G G #P
= = ==
#D #C
== ==
Device Name
=============================================================
dblk
25
20
3D
3E
64
65
66
67
68
69
6E
6F
70
71
72
R
D
D
B
B
B
B
B
D
D
D
D
D
D
-
-
3
3
1
1
1
1
1
1
1
1
1
1
1
1
6
6
1
1
4
-
13
2
2
1
1
2
-
VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)
Primary Console Input Device
Primary Console Output Device
"UGA Window 1
UGA Window 2"
EFI_WIN_NT_SERIAL_PORT=COM1
COM1
PC-ANSI Serial Console
EFI_WIN_NT_SERIAL_PORT=COM2
EFI_WIN_NT_PHYSICAL_DISKS=e:RW;262144;512
EFI_WIN_NT_CPU_MODEL=Intel(R) Processor Model
EFI_WIN_NT_CPU_SPEED=3000
EFI_MEMORY_SIZE=64
EFI_MEMORY_SIZE=64
Output details
Table 5 (page 26) describes the possible output for this command.
Table 5 Output details—devices command
Column
Displays the...
CTRL
Handle number of the device
TYPE
Device type. Options are:
• R—Root controller
• B—Bus controller
• D—Device controller
Configuration Protocol support status:
CFG
• Y—Yes
• N—No
Diagnostics Protocol support status:
DIAG
• Y—Yes
• N—No
#P
Number of parent controllers for this device
#D
Number of this type of devices
#C
Number of child controllers produced by this device
Device Name
Name of the device from the Component Name Protocol
devtree
Displays the tree of devices compliant with the UEFI Driver Model.
Syntax
devtree [-b] [-d] [-lxxx] [devicehandle]
Options
26
-b
Displays one screen at a time.
-d
Displays the device tree using device paths.
-lxxx
Displays the device tree in a specific language. For a list of possible code
options see the UEFI Specification.
devicehandle
Displays the device tree below a specified handle.
UEFI Shell command reference
Description
This command prints a tree of devices being managed by drivers that follow the UEFI Driver Model.
By default, the devices are printed in device names that are retrieved from the Component Name
Protocol. If the option –d is specified, the device paths are printed instead.
Example
To display the tree of all devices compliant with the UEFI Driver Model one screen at a time:
Shell> devtree -b
devtree -b fs0:\
Ctrl[04] Fv(770BF9B6-8AFE-4F4C-85E5-893FC3D2606C)
Ctrl[05] Fv(27A72E80-3118-4C0C-8673-AA5B4EFA9613)-directories in the current
Ctrl[06] MemoryMapped(0xB,0xFFD40000,0xFFD6FFFF)
Ctrl[07] Fv(5A515240-D1F1-4C58-9590-27B1F0E86827)
Ctrl[08] Fv(5E2363B4-3E9E-4203-B873-BB40DF46C8E6)
Ctrl[09] Fv(CDBB7B35-6833-4ED6-9AB2-57D2ACDDF6F0)extension '.efi':
Ctrl[5F] PciRoot(0x0).efi
Ctrl[195] PciRoot(0x0)/Pci(0x0,0x0)
Ctrl[196] PciRoot(0x0)/Pci(0x2,0x0)from all files with extension '.inf':
Ctrl[197] PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)
Ctrl[198] PciRoot(0x0)/Pci(0x2,0x1)
Ctrl[199] PciRoot(0x0)/Pci(0x2,0x2)
Ctrl[19A] PciRoot(0x0)/Pci(0x2,0x3)
Ctrl[19B] PciRoot(0x0)/Pci(0x3,0x0)
Ctrl[19C] PciRoot(0x0)/Pci(0x3,0x1)
Ctrl[19D] PciRoot(0x0)/Pci(0x3,0x2)
Ctrl[19E] PciRoot(0x0)/Pci(0x3,0x3)
Ctrl[19F] PciRoot(0x0)/Pci(0x4,0x0)
Ctrl[1A0] PciRoot(0x0)/Pci(0x4,0x1)
Ctrl[1A1] PciRoot(0x0)/Pci(0x4,0x2)
Ctrl[1A2] PciRoot(0x0)/Pci(0x4,0x3)
Ctrl[1A3] PciRoot(0x0)/Pci(0x4,0x4)
Ctrl[1A4] PciRoot(0x0)/Pci(0x4,0x5)
Ctrl[1A5] PciRoot(0x0)/Pci(0x4,0x6)
Ctrl[1A6] PciRoot(0x0)/Pci(0x4,0x7)
Ctrl[1A7] PciRoot(0x0)/Pci(0x5,0x0)
Ctrl[1A8] PciRoot(0x0)/Pci(0x5,0x1)
Ctrl[1A9] PciRoot(0x0)/Pci(0x5,0x2)
Ctrl[1AA] PciRoot(0x0)/Pci(0x5,0x4)
Ctrl[1AB] PciRoot(0x0)/Pci(0x6,0x7)
Press ENTER to continue or 'Q' break:
dh
Displays the device handles in the UEFI environment.
Syntax
dh [-lxxx] [ handle | -p prot_id ] [-d] [-b] [-v] [-sfo]
Options
-lxxx
Displays device handles in a specific language. For a list of possible code options
see the UEFI Specification.
handle
Displays the handle for a specific device.
-p prot_id
Displays protocol information associated to handles. If not specified, all protocols
are displayed.
-d
Displays UEFI driver model-related information.
-b
Displays one screen at a time.
-v
Displays verbose information.
-sfo
Displays information in standard-format output. See Table 8 (page 39)).
dh
27
Description
This command displays the device handles in the EFI environment. If used with a specific handle
number, the details of all the protocols that are associated with that device handle are displayed.
Otherwise, the -p option can be used to list the device handles that contain a specific protocol.
If neither -pprot_idor handle is specified, all handles are displayed.
Examples
To display all handles one screen at a time:
Shell> dh -b
Handle dump
1: Image(DXE Core)
2: FwVol FwFileSys FwVolBlk DevPath(MemMap(11:1B500001D4FFC8))
3: Image(Ebc)
4: DevPath(MemMap(11:1CA0000-1CB0000))
5: Image(WinNtThunk)
6: WinNtThunk DevPath(..76F3-11D4-BCEA-0080C73C8881))
7: Image(WinNtBusDriver) DriverBinding
...
To display detailed information about handle 0x30:
Shell> dh 30 -v
Handle 30 (01AF5308)
IsaIo
ROM Size......: 00000000
ROM Location..: 00000000
ISA Resource List :
IO : 000003F8-000003FF Attr : 00000000
INT : 00000004-00000000 Attr : 00000000
dpath
PNP Device Path for PnP
HID A0341D0, UID 0x0
Hardware Device Path for PCI
PNP Device Path for PnP
HID 50141D0, UID 0
AsStr: 'Acpi(PNP0A03,0)/Pci(1F|0)/Acpi(PNP0501,0)'
To display all handles associated with the diskio protocol:
Shell> dh -p diskio
Handle dump by protocol 'Diskio'
15: DiskIo BlkIo DevPath(..i(3|1)/Ata(Secondary,Master))
16: DiskIo BlkIo DevPath(..,1)/PCI(0|0)/Scsi(Pun0,Lun0))
44: DiskIo BlkIo Fs DevPath(..ABD0-01C0-507B-9E5F8078F531)
ESP
45: DiskIo BlkIo Fs DevPath(..i(Pun0,Lun0)/HD(Part4,SigG0))
ESP
17: DiskIo BlkIo DevPath(..PCI(3|1)/Ata(Primary,Master))
To display all handles associated with the Image protocol and break when the screen is full:
Shell> dh -p Image -b
Handle dump by protocol 'image'
1: Image(DXE Core)
5: Image(WinNtThunk)
7: Image(WinNtBusDriver) DriverBinding
8: Image(Metronome)
A: Image(IsaBus) DriverBinding
B: Image(WinNtConsole) DriverBinding
...
28
UEFI Shell command reference
Output details
Table 6 (page 29) describes the possible output for this command.
Table 6 Output details — dh command
Column
Displays the...
Driver Name
Name of driver producing the handle
Controller Name
Name of controller producing the handle
Handle number
Integer number of the handle
Device Path
Device path associated with the handle.
Protocol
Identifiers
Semicolon-delimited list of protocol identifiers or GUIDs
disconnect
Disconnects one or more drivers from the specified devices.
Syntax
disconnect devicehandle [driverhandle [childhandle]] [-r]
Options
devicehandle
Specifies a device handle in hexidecimal format.
driverhandle
Specifies a driver handle in hexidecimal format. If not specified, the device
specified by devicehandle is disconnected.
childhandle
Specifies a child handle of a device in hexidecimal format. If not specified,
all child handles of the device specified by devicehandle are disconnected.
-r
Disconnects all drivers from all devices.
Description
This command dsconnects one or more drivers from the specified devices. It does not support output
redirection.
Examples
To disconnect all drivers from all devices:
Shell>disconnect -r
To disconnect all drivers from device 0x28:
Shell>disconnect 28
To disconnect driver 0x17 from device 0x28:
Shell>disconnect 28 17
To disconnect driver 0x17 from controlling the child 0x32 of device 0x28:
Shell>disconnect 28 17 32
dmem
Displays the contents of system or device memory.
Syntax
dmem [-b] [address] [size] [-MMIO]
disconnect
29
Options
-b
Displays one screen at a time.
address
Displays memory contents from a specific starting address (in hexadecimal format).
size
Displays memory contents of a specific size (in hexadecimal format).
-MMIO
Displays memory mapped contents using the
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL .
Description
This command displays the contents of system memory or device memory. If address is not
specified, the contents of the EFI System Table are displayed. Otherwise, memory starting at the
address is displayed. If size is not specified, the display defaults to 512 bytes. If -MMIO is not
specified, main system memory is displayed. Otherwise, device memory is displayed through the
use of the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
Example
To display memory contents from 1af3088 with a size of 16 bytes:
Shell> dmem 1af3088 16
Memory Address 0000000001AF3088 16 Bytes
01AF3088: 49 42 49 20 53 59 53 54-00 00 02 00 18 00 00 00 *IBI SYST........*
01AF3098: FF 9E D7 9B 00 00
*......*
drivers
Displays a list of information for drivers that follow the UEFI Driver Model in the UEFI environment.
Syntax
drivers [-lxxx] [-sfo]
Options
-lxxx
Displays drivers in a specific language. For a list of possible code options see the UEFI
Specification.
-sfo
Displays in a standard-format output table. See Table 7 (page 31)).
Description
This command displays a list of information for drivers that follow the UEFI Driver Model in the
UEFI environment. For a description of what is listed, see Table 7 (page 31).
Example
To display the driver list:
Shell> drivers
T
D
Y C
R
P F
V
VERSION E G
=== ======= = =
39 00000010 D 3A 00000010 D 3B 00000010 B 3C 00000010 ? 3D 00000010 B 3E 00000010 ? 42 00000010 D 43 00000010 ? 44 00000010 D 45 00000010 D 30
D
I
A
G
=
-
#D
==
1
1
1
1
1
1
1
UEFI Shell command reference
#C
==
1
1
-
DRIVER NAME
=====================================
Platform Console Management Driver
Platform Console Management Driver
Console Splitter Driver
Console Splitter Driver
Console Splitter Driver
Console Splitter Driver
UGA Console Driver
Serial Terminal Driver
Generic Disk I/O Driver
FAT File System Driver
IMAGE NAME
==========
ConPlatform
ConPlatform
ConSplitter
ConSplitter
ConSplitter
ConSplitter
GraphicsConsole
Terminal
DiskIo
Fat
48
49
4C
55
56
57
58
59
5F
00000010
00000010
00000010
00000010
00000010
00000010
00000010
00000010
00000010
?
?
B
D
?
?
D
B
D
X
-
X
-
1
1
1
1
1
1
3
-
ISA Bus Driver
ISA Serial Driver
PCI Bus Driver
Windows Block I/O Driver
Windows Text Console Driver
Windows Serial I/O Driver
Windows Simple File System Driver
Windows Bus Driver
Windows Universal Graphics Adapter
IsaBus
IsaSerial
PciBus
WinNtBlockIo
WinNtConsole
WinNtSerialIo
WinNtSimpleFileSystem
WinNtBusDriver
WinNtUga
Output details
Table 7 (page 31) describes possible output for this command.
Table 7 Output details—drivers command
Column
Displays the...
DRV
Integer handle of the driver.
VERSION
Version number of the driver.
TYPE
Driver type. Possible values are:
• B—Bus driver
• D—Device driver
Configuration Protocol Support status:
CFG
• Y—Yes
• N—No
Driver Protocol support status:
DIAG
• Y—Yes
• N—No
#D
Number of devices this driver is managing.
#C
Number of child devices this driver has produced.
DRIVER NAME
Name of the driver from the Component Name Protocol.
IMAGE NAME
Device path from which the driver was loaded
echo
Controls whether or not script commands are displayed as they are read from the script file, and
prints the given message to the display.
Syntax
echo [ -on | -off ]
echo message
Options
-on
Enables the display when reading commands from script files.
-off
Disables the display when reading commands from script files.
message
Specifies a message to display.
Description
The first form of this command controls whether or not script commands display as they are read
from the script file. If no argument is given, the current on or off status displays. The second form
prints the specified message to the display.
echo
31
NOTE:
This command does not change the value of the environment variable lasterror.
Examples
To display a message string of Hello World:
fs0:\> echo Hello World
Hello World
To turn command echoing on:
fs0:\> echo -on
To execute HelloWorld.nsh, and display when reading lines from the script file:
fs0:\> HelloWorld.nsh
+HelloWorld.nsh> echo Hello World
Hello World
To turn command echoing off:
fs0:\> echo -off
To display the current echo setting:
fs0:\> echo
Echo is off
edit
Edits an ASCII or UCS-2 file in full screen mode.
Syntax
edit [file]
Options
file
Specifies the name of file to be edited. If none is specified, an empty file is created with
a default file name.
Description
This command allows a file to be edited using a full screen editor. The editor supports both UCS-2
and ASCII file types.
Example
To edit the shell.log file:
fs0:\> edit shell.log
eficompress
Compresses a file using the EFI Compression Algorithm.
Syntax
eficompress infile outfile
Options
32
infile
Specifies the filename for the uncompressed input file
outfile
Specifies the filename for the compressed output file
UEFI Shell command reference
Description
This command compresses a file using the EFI Compression Algorithm, and writes the compressed
form out to a new file.
Example
To compress a file named uncompressed to file named compressed:
fs0:\> eficompress uncompressed compressed
efidecompress
Decompresses a file using the EFI Decompression Algorithm.
Syntax
efidecompress infile outfile
Options
infile
Specifies the filename for the compressed input file
outfile
Specifies the filename for the decompressed output file
Description
This command decompresses a file using the EFI Decompression Algorithm, and writes the
decompressed form out to a new file.
Example
To decompress a file named compressed to file named uncompressed:
fs0:\> eficompress compressed uncompressed
exit
Exits the UEFI Shell or the current script.
Syntax
exit [/b] [exit-code]
Options
/b
Indicates that only the current UEFI Shell script should be terminated. Ignored if not
used within a script.
exit-code
If exiting a UEFI Shell script, specifies the value placed into the environment variable
lasterror. If exiting an instance of the UEFI Shell, specifies the value returned
to the caller. If not specified, 0 is returned.
Description
This command exits the UEFI Shell or, if /b is specified, the current script.
Example
To exit the UEFI Shell:
fs0:\> exit
fwupdate
Updates the system BIOS firmware.
efidecompress
33
Syntax
fwupdate -l
fwupdate -d device [-i image] -f file
Options
—l
Lists the devices with firmware update capability and their revisions.
-d device
Specifies a device name.
—i image
Specifies the image to update.
-f file
Specifies a firmware image file to update.
Description
This command updates the firmware images of the devices on the system. Some devices, such as
network adapters, have more than one firmware image. In such cases, you can update images
separately.
Examples
To list devices and their firmware revisions:
fs0:\> fwupdate -l
To update the system BIOS firmware:
fs0:\> fwupdate -d BIOS -f P92_1.00_03_22_2014.signed.full
getmtc
Gets the MTC from BootServices and displays it.
Syntax
getmtc
This command displays the current monotonic counter value. The lower 32 bits increment every
time this command is executed. Every time the system is reset, the upper 32 bits is incremented
and the lower 32 bits is reset to 0.
goto
Goes to a label in a script.
Syntax
goto label
help
Displays the list of commands that are built into the UEFI Shell.
Syntax
help [ cmd | pattern | special ] [-usage] [-v] [-section sectionname] [-b]
Options
34
cmd
Specifies the command for which to display help.
pattern
Specifies the pattern to use for displaying command help.
special
Displays a list of the special characters used in the shell command
line.
UEFI Shell command reference
-usage
Displays usage information for the command. This results in the
same display as specifying –section:NAME and
–section:SYNOPSIS .
-v
Displays verbose information.
-section sectionname
Displays the specified section of the help information.
-b
Displays the help output one screen at a time.
Description
This command displays information about one or more shell commands.
If no other options are specified, each command is displayed along with a brief description of its
function. If–v is specified, all help information for the specified commands appears. If –section
is specified, only the help section specified appears (see below). If –usage is specified, the
command, a brief description and the usage appears.
The help text is gathered from UCS-2 text files found in the directory where the shell or shell
command executable is located. The files have the name command-name.man where
command-name is the name of the shell command. The files follow a subset of the MAN page
format, as described below.
If no option is specified, only the NAME section of the page appears.
Example
To display the list of commands in the UEFI Shell and break after one screen:
Shell> help –b
alias
- Displays, creates, or deletes UEFI Shell aliases.
attrib
- Displays or changes the attributes of files or directories.
cd
- Displays or changes the current directory.
cls
- Clears standard output and optionally changes background color.
comp
- Compares the contents of two files on a byte for byte basis.
To display help information about the shell command ls (use any of the following syntax options):
Shell> help ls
Shell> ? ls
Shell> ls -?
To display the list of commands starting with the character p:
Shell> help p*
pause – Prints a message and suspends for keyboard input
ifconfig
Modifies the default IP address of the UEFI IPv4 network stack.
Syntax
ifconfig [-c [name]] [-l[name]]
ifconfig [-s name dhcp | [static IPaddress mask gateway] | [permanent]
]
Options
-c
Clears the configuration.
-l
Lists the configuration.
-s
Sets the configuration.
name
Specifies an adapter name. For example, eth0.
dhcp
Specifies that DHCP4 is to dynamically request IPv4 addresses for all
or a specific interface.
ifconfig
35
static IPaddress
Specifies a static IPv4 address in four integer values, each between 0
and 255, separated by periods.
mask
Specifies a subnet mask in four integer values, each between 0 and
255, separated by periods.
gateway
Specifies a default gateway in four integer values, each between 0 and
255, separated by periods.
permanent
Specifies that the configuration is permanent (not one-time only).
Description
This command modifies the default IP address of the UEFI 1Pv4 network stack. The –c option clears
the configuration for all or a specified interface, causing the network stack for related interfaces
to default back to DHCP. If permanent is not specified, the configuration is one-time only. If
permanent is specified, the configuration survives a network stack reload.
Examples
To list the configuration for the eth0 interface:
fso:\>ifconfig -l eth0
To use DHCP4 to dynamically request the IPv4 address configuration for the eth0 interface:
fso:\>ifconfig -s eth0 dhcp
To use the static IPv4 address configuration for the eth0 interface, and to set this configuration to
survive a network reload:
fso:\>ifconfig -s eth0 static 192.168.0.5 255.255.255.0 192.168.0.1 permanent
imlview
Displays the Integrated Management Log (IML).
Syntax
imlview -export filename -sfo -b -c
Options
-sfo
Displays information in Standard Format Output.
-b
Displays the IML log one page at a time.
-c
Clears IML log entries.
-export filename
Exports the IML log to a specified file.
Description
The IML provides a record of historical events that have occurred on the server. Entries in the IML
can help you diagnose issues or identify potential issues.
Examples
To change the current file system to the mapped FS0 file system:
Shell> fs0:
To display the current IML log:
FS0:\>imlview
To export the IML log to a file named output.txt:
FS0:\>imlview -export output.txt
36
UEFI Shell command reference
load
Loads a UEFI driver into memory.
Syntax
load [-nc] file [file...]
Options
-nc
Loads the driver, but does not connect the driver.
file
Specifies the image file containing the UEFI driver to load. Wildcards are permitted.
Description
This command loads a UEFI driver into memory. You can use it to load multiple files at one time
and can use wildcards when specifying files. If -nc is not specified, the system attempts to connect
the driver to a proper device. It can also cause previously loaded drivers to connect to corresponding
devices.
Examples
To load the driver contained in the Isabus.efi file:
FS0:\>load Isabus.efi
To load the drivers contained in the Isabus.efi and IsaSerial.efi files:
FS0:\>load Isabus.efi IsaSerial.efi
To load drivers contained in multiple files with Isa in the file names:
FS0:\>load Isa*.efi
To load the driver contained in the Isabus.efi file without connecting:
FS0:\>load -nc Isabus.efi
ls/dir
Lists the contents of a directory or file information.
Syntax
ls [-r] [-a[attrib]] [-sfo] [file]
Options
-r
Displays recursively (including subdirectories)
-a attrib
Displays only those files with the attributes specified. If no attributes are specified,
all files are listed. If –a is not specified, all non-system and non-hidden files are
listed. The attributes (attrib) can be one or more of the following:
•
a—Archive
•
s—System
•
h—Hidden
•
r—Read-only
•
d—Directory
-sfo
Displays in standard-format output. See “Output details—ls command (volume
information)” (page 39), and “Output details—ls command (file information)”
(page 39).
file
Specifies the name of a file or directory. Wild cards are permitted.
load
37
Description
This command lists directory contents or file information. If no file name or directory name is
specified, the current working directory is assumed. The contents of a directory are listed if all of
the following are true:
•
Option -r is not specified
•
No wild card characters are specified in the file parameter
•
The file specified represents an existing directory
In all other cases, the command functions as follows:
◦
All files or directories that match the specified name are displayed.
◦
The-r flag determines whether a recursive search is performed.
◦
The option flag -a attrib displays only those files with the attributes specified. If more
than one attribute is specified, only the files that have all those attributes are listed. If -a
is not followed by a file or directory, all files or directories are displayed, regardless of
their attributes. If -a itself is not specified, all files except system and hidden files are
displayed.
Examples
To hide files by adding the hidden or system attribute to them:
fs0:\> attrib +s +h *.efi
ASH fs0:\IsaBus.efi
ASH fs0:\IsaSerial.efi
To display all, except the files or directories with the h or the s attribute:
fs0:\> ls
Directory of: fs0:\
06/18/01
09:32p
06/18/01
01:02p
06/18/01
01:02p
06/18/01
01:02p
06/18/01
08:04p
06/18/01
08:05p
01/28/01
08:24p
3 File(s)
4 Dir(s)
153
for.nsh
512 efi
512 test1
512 test2
29 temp.txt
<DIR>
512 test
r
29 readme.txt
211 bytes
<DIR>
<DIR>
<DIR>
To display files with all attributes in the current directory:
fs0:\> ls -a
Directory of: fs0:\
06/18/01
09:32p
06/18/01
01:02p
06/18/01
01:02p
06/18/01
01:02p
06/18/01
10:59p
06/18/01
10:59p
06/18/01
08:04p
06/18/01
08:05p
01/28/01
08:24p
5 File(s)
4 Dir(s)
153
for.nsh
512
efi
512
test1
512
test2
28,739
IsaBus.efi
32,838
IsaSerial.efi
29
temp.txt
<DIR>
512
test
r
29
readme.txt
61,788 bytes
<DIR>
<DIR>
<DIR>
To display files with read-only attributes in the current directory:
fs0:\> ls -ar
Directory of: fs0:\
06/18/01 11:14p
38
UEFI Shell command reference
r
29
readme.txt
1 File(s)
0 Dir(s)
29 bytes
To display files with an attribute of s:
fs0:\> ls -as isabus.efi
Directory of: fs0:\
06/18/01 10:59p
1 File(s)
0 Dir(s)
28,739 IsaBus.efi
28,739 bytes
To display all in the fs0:\efi directory recursively:
fs0:\> ls -r -a efi
To search for files with the specified type in the current directory recursively:
fs0:\> ls -r -a *.efi –b
Output details
Table 8 (page 39) describes possible volume (directory) information output from this command.
Table 9 (page 39) describes possible file information output from this command
Table 8 Output details—ls command (volume information)
Column
Displays the...
Name
Standard volume label
Total Size
Total number of bytes in the volume.
Read Only status
Read-only status as:
• True
• False
Free Space
Total number of free bytes in the volume.
Block Size
Nominal block size by which files are typically grown, in bytes.
Table 9 Output details—ls command (file information)
Column
Displays the...
Name
Complete file name and directory, including the mapped name of the file system.
Logical Size
Size of the file, in bytes.
Physical Size
Size of the file in the volume, including any padding, in bytes.
Attributes
List of file attributes. Possible values are:
• a—Archive
• d–Directory
• h–Hidden
• r–Read-Only
• s–System
File Creation Time
Time when the file was created, in the format: hh:mm:ss
File Creation Date
Date when the file was created, in the format: dd:mm:yyyy
File Access Time
Time when the file was accessed, in the format: hh:mm:ss
File Access Date
Date when the file was accessed, in the format: dd:mm:yyyy
ls/dir
39
Table 9 Output details—ls command (file information) (continued)
Column
Displays the...
File Modification
Time
Time when the file was modified, in the format: hh:mm:ss
File Modification
Date
Date when the file was modified, in the format: dd:mm:yyyy
map
Displays or configures a mapping between a user-defined name and a device handle.
Syntax
map [-d mappedname]
map [ -r | -v | -c | -f | -u | -t type [,type...] | mappedname ] [-sfo]
map [ mappedname | mapping ]
Options
-d
Deletes a mapping.
mappedname
Specifies a mapping name.
-r
Resets a mapping.
-v
Displays verbose information about all mappings.
-c
Shows the consistent mapping.
-f
Shows the normal mapping.
-t
Shows the device mappings, filtered according to the device type. Supported
types are:
•
fp—floppy
•
hd—hard disk
•
cd—CD-ROM
Types can be combined by putting a comma between two types. Spaces are not
allowed between types.
-sfo
Displays in standard-format output. SeeTable 10 (page 41).
-u
Adds mappings for newly-installed devices and removes mappings for uninstalled
devices, but does not change the mappings of existing devices. Preserves
user-defined mappings.
handle
Specifies the number of the handle.
mapping
Specifies a new mapped name to assign to a device. The mapping must end
with a colon (:).
Description
This command creates a mapping between a user-defined name and a device. The most common
use of this command is to create a mapped name for devices that support a file system protocol.
Once these mappings are created, the names can be used with all the file manipulation commands.
The UEFI Shell environment creates default mappings for all of the devices that support a recognized
file system.
This command can be used to create additional mappings, or it can be used to delete an existing
mapping with the -d option. If the command is used without any parameters, all of the current
40
UEFI Shell command reference
mappings are listed. If the -v option is used, the mappings are shown with additional information
about each device.
The -r option resets all the default mappings in a system. This is useful if the system configuration
has changed since the last boot.
The –u option adds mappings for newly installed devices and remove mappings for uninstalled
devices, but does not change the mappings of existing devices. The user-defined mappings are
also preserved. A mapping history is saved so that the original mapping name is used for a device
with a specific device path if that mapping name was used for that device path last time. The
current directory is also preserved if the current device is not changed.
Each device in the system has a consistent mapping. If the hardware configuration has not changed,
the device’s consistent mappings do not change. If two or more machines have the same hardware
configurations, the device’s consistent mapping is the same. Use the -c option to list all the
consistent mappings in the system.
The mapping consists of digits and characters. Other characters are not allowed.
This command supports wild cards to delete or show mappings. However, when assigning the
mapping, wild cards are not permitted.
Example
To delete a mapping:
Shell> map -d devicename
Output details
Table 10 (page 41) describes possible output for this command.
Table 10 Output details—map command
Column Number
Displays the...
1
The name of the table. The name is Mappings.
2
Mapped name. The mapped device name.
3
Device Path. The device path that corresponds to the mapped device name.
4
Consistent Name. The consistent mapped name (if any) that is equivalent to mappedname.
If mappedname is already a consistent mapped name, this column is empty.
memmap
Displays the system memory map.
Syntax
memmap [-b] [-sfo]
Options
-b
Displays one screen at a time.
-sfo
Displays standard-format output in a detailed and a summary table. See “Output
details—memmap command” (page 42)
Description
This command displays the memory map that is maintained by the EFI environment, which keeps
track of all the physical memory in the system and how it is currently being used.
memmap
41
Example
To display the system memory map:
fs0:\> memmap
Type
Start
End
# Pages
available
0000000000750000-0000000001841FFF
LoaderCode 0000000001842000-00000000018A3FFF
available
00000000018A4000-00000000018C1FFF
LoaderData 00000000018C2000-00000000018CAFFF
BS_code
00000000018CB000-0000000001905FFF
BS_data
0000000001906000-00000000019C9FFF
...
RT_data
0000000001B2B000-0000000001B2BFFF
BS_data
0000000001B2C000-0000000001B4FFFF
reserved
0000000001B50000-0000000001D4FFFF
reserved :
LoaderCode:
LoaderData:
BS_code
:
BS_data
:
RT_data
:
available :
Total Memory:
Attributes
00000000000010F2
0000000000000062
000000000000001E
0000000000000009
000000000000003B
00000000000000C4
0000000000000001 8000000000000009
0000000000000024 0000000000000009
0000000000000200 0000000000000009
512 Pages (2,097,152)
98 Pages (401,408)
32 Pages (131,072)
335 Pages (1,372,160)
267 Pages (1,093,632)
19 Pages (77,824)
4,369 Pages (17,895,424)
20 MB (20,971,520) Bytes
Output details
Table 11 (page 42) describes the possible output for this command.
Table 11 Output details—memmap command
Column
Displays the...
Type
Type of memory. Options are:
• Available
• LoaderCode
• LoaderData
• BootServiceCode
• BootServiceData
• RuntimeCode
• RuntimeData
• Reserved
• MemoryMappedIO
• MemoryMappedIOPortSpace
• UnusableMemory
• ACPIReclaimMemory
• ACPIMemoryNVS
• PalCode
42
Start
Staring address
End
Ending address
# Pages
Number of 4KB pages
reserved
Reserved memory total size in bytes
LoaderCode
Loader code total size in bytes
LoaderData
Loader data total size in bytes
BS_code
Boot service code total size in bytes
UEFI Shell command reference
0000000000000009
0000000000000009
0000000000000009
0000000000000009
0000000000000009
0000000000000009
Table 11 Output details—memmap command (continued)
Column
Displays the...
BS_data
Boot service data total size in bytes
RT_data
Runtime data total size in bytes
available
Available memory in bytes
Total Memory
Total memory size in bytes
mkdir
Creates one or more new directories.
Syntax
mkdir dir [dir...]
Option
dir
Specifies one or more names for directories. Wild cards are not permitted.
Description
This command creates one or more new directories. If dir includes nested directories, parent
directories are created before child directories. If the directory already exists, the command exits
with an error.
Examples
To create a new directory and display its contents:
fs0:\> mkdir rafter
fs0:\> ls
Directory of: fs0:\
06/18/01 08:05p <DIR>
512
06/18/01 11:14p r
29
06/18/01 11:50p <DIR>
512
1 File(s)
211 bytes
2 Dir(s)
test
readme.txt
rafter
To create and display multiple directories:
fs0:\> mkdir temp1 temp 2
fs0:\> ls
Directory of: fs0:\
06/18/01 08:05p <DIR>
512
06/18/01 11:14p r
29
06/18/01 11:50p <DIR>
512
06/18/01 11:52p <DIR>
512
06/18/01 11:52p <DIR>
512
1 File(s)
211 bytes
4 Dir(s)
test
readme.txt
rafter
temp1
temp2
mode
Displays or changes the console output device mode.
Syntax
mode [col row]
mkdir
43
Options
col
Specifies the number of columns.
row
Specifies the number of rows.
Description
This command changes the display mode for the console output device. When used without any
parameters, it shows the list of modes that the standard output device currently supports. The
command can then be used with the row and col parameter to change the number of rows and
columns on the standard output device.
NOTE:
The display is cleared every time the mode command is used to change the currently
selected display mode.
Examples
To display all available modes on standard output and the current selected mode (indicated by
an *):
Shell> mode
Available modes on standard output
col 80 row 25 *
col 80 row 50
col 80 row 43
col 100 row 100
To change the current mode setting to an 80 X 50 text mode display:
Shell> mode 80 50
Available modes on standard output
col 80 row 25
col 80 row 50 *
col 80 row 43
col 100 row 100
mv
Moves one or more files to a destination within a file system.
Syntax
mv src... [dst]
Options
src...
Specifies a source file or directory name. Wild cards are permitted.
dst
Specifies a destination file or directory name Wild cards are permitted. If not specified,
the current working directory is assumed to be the destination. If there is more than one
argument in the command line, the last one is always considered the destination.
Description
This command moves one or more files to a destination within a file system. Moving between file
system volumes is not supported. If the destination is an existing directory, the sources are moved
into that directory. Otherwise, the sources are moved to the destination as if the directory has been
renamed. If a destination is not specified, the current directory is assumed to be the destination.
Attempting to move a read-only file or directory results in an error. Moving a directory that contains
read-only files is allowed. You cannot move a directory into itself or its subdirectories. You cannot
move a directory if the current working directory is itself or its subdirectories.
If an error occurs, the remaining files or directories are still moved.
44
UEFI Shell command reference
Example
To rename a file:
fs0:\> mv IsaBus.efi Bus.efi
moving fs0:\IsaBus.efi -> \Bus.efi
- [ok]
openinfo
Displays the protocols and agents associated with a handle.
Syntax
openinfo Handle [-b]
Options
-b
Display one screen at a time.
Handle
Display open protocol information for specified handle.
parse
Retrieves a value from a specified record that was output in a standard formatted output.
Syntax
parse filename tablename column [-i instance] [-s instance]
Options
filename
Specifies a source file name.
tablename
Specifies a table name to be parsed.
column
Specifies a one-based column index to use to determine which value from a
particular record to parse.
-i instance
Starts parsing with the nth instance of the specified tablename, after the
specified instance of ShellCommand. If not present, all instances are returned.
-s instance
Starts parsing with the nth instance of the specified ShellCommand table. If
not present, 1 is assumed.
Description
This command enables the parsing of data from a file containing data output from a command
having using the –sfo parameter. Because the standard formatted output has a well-known means
of parsing, this command is intended to be used as a simplified means of having scripts consume
such constructed output files and use this retrieved data in the logic of the scripts being written for
the UEFI Shell.
Examples
The following data is contained in a temporary file (temp.txt):
ShellCommand, "LS"
VolumeInfo, "MikesVolume","400000000","32000000","16000000"
FileInfo, "fs0:/efi/boot/winloader.efi","45670","arsh"
FileInfo, "fs0:/efi/boot/mikesfile.txt","1250","a"
FileInfo, "fs0:/efi/boot/readme.txt","795","a"
To use the index parameter to parse the temp.txt file:
fs0:\> parse temp.txt FileInfo 3 –i 3
795
openinfo
45
pause
Pauses the script file execution.
Syntax
pause [-q]
Description
This command is available only in scripts. It prints a message to the display, and suspends script
file execution and waits for keyboard input. Pressing any key resumes execution, except for q or
Q. If q or Q is pressed, script processing terminates. Otherwise execution continues with the next
line after the pause command.
Option
–q
Hides the display message.
Examples
This script is a sample of the pause command:
fs0:\> type pause.nsh
#
# Example script for 'pause' command
#
echo pause.nsh begin..
date
time
pause
echo pause.nsh done.
To execute the script with echo on:
fs0:\> pause.nsh
+pause.nsh> echo pause.nsh begin..
pause.nsh begin..
+pause.nsh> date
06/19/2001
+pause.nsh> time
00:51:45
+pause.nsh> pause
Enter 'q' to quit, any other key to continue:
+pause.nsh> echo pause.nsh done.
pause.nsh done.
To execute the script with echo off:
fs0:\> echo —off
fs0:\> pause.nsh
pause.nsh begin..
pause.nsh begin..
06/19/2001
00:52:50
Enter 'q' to quit, any other key to continue: q
fs0:\>
pci
Displays a PCI device list or PCI function configuration space information.
Syntax
pci [Bus Dev [Func] [-s Seg] [-i]]
46
UEFI Shell command reference
Options
-s
Optional segment number Seg specified
mappedname
Specifies a mapping name.
-i
Information interpreted.
-Bus
Bus number
Dev
Device number
Func
Function number
Description
This command displays all the PCI devices in the system. It can also display the configuration space
of a PCI device according to the specified bus (Bus), device (Dev), and function (Func) addresses.
If the function address is not specified, it defaults to 0.
The -i option displays verbose information for the specified PCI device. The PCI configuration
space for the device is dumped with a detail interpretation.
If no parameters are specified all PCI devices are dumped with a detailed interpretation.
If the Bus and Device number parameters are specified while the Func or Seg parameters are not,
Function or Seg are set as default value 0.
Example
To display all PCI devices in the system:
fs0:\> pci
To display the configuration space of Bus 0, Device 0, Function 0:
fs0:\> pci 00 00 00 -1
ping
Pings the target host with an IPv4 stack.
Syntax
ping [-s_ SourceIP] [-n count] [-l size] TargetIP
Options
-s_
Specifies that the source adapter is an IPv4 address.
SourceIP
Specifies the IPv4 address of the source machine.
-n count
Specifies the number of echo request datagrams to be sent.
-l size
Specifies the size of the data buffer in the echo request datagram.
TargetIP
Specifies the IPv4 address of the target machine.
Description
This command uses the ICMPv4 ECHO_REGUEST datagram to elicit an ECHO_REPLY from a host.
Examples
To ping the target host at 192.168.0.1 with 64 bytes of data:
FS0:\>ping -1 64 192.168.0.1
To ping the target host at 202.120.120.100 by sending a 20 byte echo request datagram:
FS0:\>ping -n 20 202.120.120.100
ping
47
ramdisk
Creates and deletes RAM disks.
Syntax
ramdisk -c [-s size] [-v volumelabel]
ramdisk -d [ fs | all ]
ramdisk -l [-sfo]
Options
-c
Creates a RAM disk.
-s size
Specifies RAM disk size in MB. Valid values are from 4 MB to 512 MB.
-v volumelabel
Specifies a volume label name for the RAM disk. Valid values are up to
11 characters, without spaces or the following characters: % ^ * + = [
] | : ; \ < > ? /.
-d
Deletes a RAM disk.
fs
Specifies the FAT16 file system drive for RAM disk deletion.
all
Deletes all RAM disks.
-l
Lists all RAM disks.
-sfo
Displays information in Standard Format Output.
Description
This command manages RAM disk drives.
Examples
To create a 512 MB FAT16 RAM disk:
Shell>ramdisk -c -s 512
To create a 512 MB FAT16 RAM disk with a volume label of RAMDISK1:
Shell>ramdisk -c -s 512 -v RAMDISK1
To list all RAM disks mapping information:
Shell>ramdisk -l
To delete RAM disk fs0:
Shell>ramdisk -d fs0
reset
Resets the system.
Syntax
reset [ -w | [-s] | -c ] [string]
Options
48
-w
Performs a warm boot.
-s
Performs a shutdown.
-c
Performs a cold boot.
string
Specifies a string to be passed to reset service.
UEFI Shell command reference
Description
This command resets the system. The default performs a cold reset. If string is specified, it is
passed into the SystemTable ResetSystem()function, informing the system of the reason for
the system reset.
Example
To reset the system:
Shell> reset
rm/del
Deletes one or more files or directories. The del command is an internal alias for rm.
Syntax
rm [-q] file/directory [file/directory...]
Options
-q
Deletes in quiet mode, without displaying a confirmation prompt.
file
Specifies the file name to be deleted. Wild cards are permitted.
directory
Specifies the directory to be deleted. Wild cards are permitted.
Description
This command deletes one or more files or directories. If the target is a directory, it deletes the
directory, including all its subdirectories. It is not allowed to redirect a file whose parent directory
(or the file itself) is being deleted.
Removing a read-only file or directory results in a failure. Removing a directory containing one or
more read-only files results in a failure. If an error occurs, rm exits immediately, and later files or
directories are not removed.
You cannot remove a directory when the current directory is itself or its subdirectory. If the file
specified for deletion contains wild cards, you are not prompted for confirmation.
You cannot remove the root directory. You cannot remove the current directory or its ancestor.
Examples
Attempting to remove multiple directories at one time when directories cannot be found (causing
the command to exit):
fs0:\> ls test
Directory of: fs0:\test
06/18/01 01:01p <DIR>
06/18/01 01:01p <DIR>
06/19/01 12:59a <DIR>
06/19/01 12:59a <DIR>
0 File(s) 0 bytes
4 Dir(s)
512 .
0 ..
512 temp1
512 temp2
fs0:\> rm test\temp11 temp2
rm/del: Cannot find 'fs0:\test\temp11' - Not Found
To remove multiple directories with wild cards:
fs0:\> rm test\temp*
rm/del: Remove subtree 'fs0:\test\temp1' [y/n]? y
removing fs0:\test\temp1\temp1.txt
- [ok]
removing fs0:\test\temp1\boot\nshell.efi
rm/del
49
- [ok]
removing fs0:\test\temp1\boot
- [ok]
removing fs0:\test\temp1
- [ok]
rm/del: Remove subtree 'fs0:\test\temp2' [y/n]? y
removing fs0:\test\temp2\temp2.txt
- [ok]
removing fs0:\test\temp2
- [ok]
Attempting to remove a directory containing a read-only file, causing an error prompt:
fs0:\> attrib +r test\temp1\readme.txt
A R fs0:\test\temp1\readme.txt
fs0:\> rm test\temp1
rm/del: Cannot open 'readme.txt' under 'fs0:\test\temp1' in
writable mode
- [error] - Access Denied
Exit status code: Access Denied
set
Displays, changes, or deletes a UEFI Shell environment variable.
Syntax
set [-v] [sname [value]]
set [-d sname]
Options
-v
Sets a volatile variable that disappears at the next boot.
-d
Deletes a variable.
sname
Specifies a variable name.
value
Specifies a variable value.
Description
This command maintains the UEFI Shell environment variables. It can be used to:
•
Display environment variables.
•
Create new environment variables.
•
Change the value of existing environment variables.
•
Delete environment variables.
This command sets the environment variable specified by sname to the optional value parameters.
If used without any parameters, all the environment variables are displayed. If used with the -d
option, the environment variable that is specified bysname is deleted.
NOTE:
This command does not change the value of the environment variable lasterror.
Examples
To add an environment variable:
Shell> set DiagnosticPath fs0:\efi\diag;fs1:\efi\diag
To display environment variables:
Shell> set
* path
: .
diagnosticPath
: fs0:\efi1.1\diag;fs1:\efi1.1\diag
50
UEFI Shell command reference
To delete an environment variable:
Shell> set -d diagnosticpath
Shell> set
* path
: .
“
To change an environment variable:
fs0:\> set src efi
fs0:\> set
]* path
: .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
src : efi
fs0:\> set src efi1.1
fs0:\> set
* path
: .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
src : efi1.1
To append an environment variable:
Shell> set
* path
: .
Shell> set path %path%;fs0:\efi\tools;fs0:\efi\boot;fs0:\
Shell> set
* path
: .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
To set a volatile variable that disappears at the next boot:
Shell> set -v EFI_SOURCE c:\project\EFI1.1
Shell> set
* path
: .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
* EFI_SOURCE
: c:\project\EFI1.1
setsize
Adjusts the size of a file.
Syntax
setsize size [-d] file [file...]
Options
size
The size of the file once it is adjusted.
-d
Deletes a variable.
file
The file that is adjusted in size.
Description
This command adjusts the size of a target file. When adjusting the size of a file, it automatically
truncates or extends the size of the file based on the passed in parameters. If the file does not exist,
it is created. Setting the size smaller than the actual data contained in the file truncates the data.
Example
To set the size of a file:
fs0:\> setsize size file [file...]
shift
Shifts the contents of a UEFI Shell script’s positional parameters, allowing scripts to process them
from left to right.
Syntax
shift
setsize
51
Description
This command shifts the contents of a UEFI Shell script’s parameters so that %1 is discarded, %2
is copied to %1, %3 is copied to %2, %4 is copied to %3 and so on. This allows UEFI Shell scripts
to process script parameters from left to right.
NOTE:
This command does not change the UEFI shell environment variable lasterror.
Example
To execute the script with echo on:
fs0:\> shift.nsh welcome EFI world
shift.nsh> echo welcome EFI world
welcome EFI world
shift
echo EFI world
EFI world
To execute the script with echo off:
fs0:\> echo -off
shift.nsh> shift.nsh welcome EFI world
welcome EFI world
EFI world
smbiosview
Displays SMBIOS information.
Syntax
smbiosview [-t SmbiosType] | [-h SmbiosHandle] | [-s] | [-a]
Options
-t
Displays all structures of the SmbiosType.
SmbiosType
Specifies a SMBIOS structure type. This is a number from 0 to 42. To view
supported values and their descriptions, use the help simbios command.
-h
Displays structures of the SmbiosHandle.
SmbiosHandle
Specifies a unique 16–bit handle of a SMBIOS structure.
-s
Displays a statistics table.
—a
Displays all information.
Example
To display all structures for SmbiosType 7 (cache information):
fs0:\> smbiosview -t 7
stall
Stalls the processor for a specified number of microseconds.
Syntax
stall time
Option
time
52
Specifies the number of microseconds for the processor to stall.
UEFI Shell command reference
Description
This command sets a timed stall of operations during a script.
Example
To stall the processor for 20 microseconds:
Shell> stall 20
sysconfig
Configures HP System BIOS settings.
Syntax
sysconfig
sysconfig
sysconfig
sysconfig
sysconfig
sysconfig
-i [ all | settingname ]
-g [ all | settingname ] [settingname...]
-s [settingname=settingvalue ...]
-s AdminPassword=settingvalue OldAdminPassword=settingvalue
-s PowerOnPassword=settingvalue OldPowerOnPassword=settingvalue
[ -import | export ] filename.txt
Options
-b
Displays one screen at a time.
-i
Shows information for the specified settings or all settings, including
possible values.
settingname
Specifies a setting name about which to display information. See
sysconfig attributes (page 54).
all
Displays all information for all settings.
-g
Displays the current values of the selected settings or all settings.
—s
Sets the value of the specified setting.
settingvalue
Specifies a setting value. See sysconfig attributes (page 54).
AdminPassword
Specifies a new administrator password.
OldAdminPassword
Specifies the administrator password to be reset.
PowerOnPassword
Specifies a new password for powering on the server.
OldPowerOnPassword
Specifies the power on password to be reset.
–d
Gets (lists) or sets the default value for a specified DefaultType or
for all default type settings.
DefaultType
Specifies a default type setting to get (list) or set.
-import
Imports all settings from a script file.
-export
Exports all settings to a script file.
filename
Specifies the script file target for importing or exporting.
Description
This command displays or configures system BIOS settings.
sysconfig
53
NOTE:
•
To display or set string-type settings, use double-quotes for any settingvalue that contains
spaces or the characters '='.". For example: "sysconfig -s AdminName="Joe Smith".
•
The \ character is allowed in string-type settings.
Examples
To view all possible sysconfig attributes existing in system and their current configured values:
Shell> sysconfig -g all
For a description of output values, see sysconfig attributes (page 54).
To show all information about the ProcHyperthreading setting:
Shell> sysconfig -i ProcHyperthreading
To get the current value for the ProcHyperthreading setting:
Shell> sysconfig -g ProcHyperthreading
To set the ProcHyperthreading setting to disabled:
Shell> sysconfig -s ProcHyperthreading=Disabled
To list all default type settings:
Shell> sysconfig -d get
To list all default settings from SystemDefaults:
Shell> sysconfig -d get SystemDefaults all
To list default settings for NicBoot1 from SystemDefaults:
Shell> sysconfig -d get SystemDefaults NicBoot1
To set all defaults from SystemDefaults:
Shell> sysconfig -d set SystemDefaults all
To set default settings for NicBoot1 from SystemDefaults:
Shell> sysconfig -d set SystemDefaults NicBoot1
To set 123 as a new administrator password:
Shell> sysconfig -s AdminPassword=123 OldAdminPassword=""
To remove Joe Smith as a power on password:
Shell> sysconfig -s PowerOnPassword="" OldPowerOnPassword="Joe Smith"
sysconfig attributes
You can view all possible sysconfig attribute names, descriptions, current values, possible
values, and Enum setting types as shown in the following example.
For more information about each attribute, see HP UEFI System Utilities User Guide for HP ProLiant
Gen9 Servers.
NOTE:
54
Output for the sysconfig command varies depending on your server model.
Setting Name
= EmbeddedSerialPort
Current Value
= Com1Irq4
Possible Values = Com1Irq4
Com2Irq3
Disabled
Setting Type
= Enum
[Embedded Serial Port]
[COM 1; IRQ4; I/O: 3F8h-3FFh]
[COM 1; IRQ4; I/O: 3F8h-3FFh]
[COM 2; IRQ3; I/O: 2F8h-2FFh]
[Disabled]
Setting Name
= VirtualSerialPort
Current Value
= Com2Irq3
Possible Values = Com1Irq4
Com2Irq3
Disabled
Setting Type
= Enum
[Virtual Serial Port]
[COM 2; IRQ3; I/O: 2F8h-2FFh]
[COM 1; IRQ4; I/O: 3F8h-3FFh]
[COM 2; IRQ3; I/O: 2F8h-2FFh]
[Disabled]
Setting Name
[DHCPv4]
= Dhcpv4
UEFI Shell command reference
Current Value
= Enabled
Possible Values = Disabled
Enabled
Setting Type
= Enum
[Enabled]
[Disabled]
[Enabled]
Setting Name
Current Value
Setting Type
= Ipv4Address
= 0.0.0.0
= String
[IPv4 Address]
Setting Name
Current Value
Setting Type
= Ipv4SubnetMask
= 0.0.0.0
= String
[IPv4 Subnet Mask]
Setting Name
Current Value
Setting Type
= Ipv4Gateway
= 0.0.0.0
= String
[IPv4 Gateway]
Setting Name
= AdvancedMemProtection
Current Value
= AdvancedEcc
Possible Values = AdvancedEcc
OnlineSpareAdvancedEcc
MirroredAdvancedEcc
LockstepDddc
Setting Type
= Enum
[Advanced Memory Protection]
[Advanced ECC Support]
[Advanced ECC Support]
[Online Spare with Advanced ECC Support]
[Mirrored Memory with Advanced ECC Support]
[Lockstep Mode with DDDC Support]
Setting Name
= UsbControl
Current Value
= UsbEnabled
Possible Values = UsbEnabled
ExternalUsbDisabled
Setting Type
= Enum
[USB Control]
[USB Enabled]
[USB Enabled]
[External USB Ports Disabled]
Setting Name
= UsbBoot
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[USB Boot Support]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= RemovableFlashBootSeq
Current Value
= ExternalKeysFirst
Possible Values = InternalSdCardFirst
InternalKeysFirst
ExternalKeysFirst
Setting Type
= Enum
[Removable Flash Media Boot Sequence]
[External DriveKeys First]
[Internal SD Card First]
[Internal DriveKeys First]
[External DriveKeys First]
Setting Name
= ProcNoExecute
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[No-Execute Protection]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= ProcVirtualization
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Virtualization Technology]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= ProcHyperthreading
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Intel(R) Hyperthreading Options]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= ProcTurbo
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Intel(R) Turbo Boost Technology]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= IntelProcVtd
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Intel(R) VT-d]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= EmbeddedUefiShell
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Embedded UEFI Shell]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= UefiShellBootOrder
Current Value
= Disabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Add Embedded UEFI Shell to Boot Order]
[Disabled]
[Enabled]
[Disabled]
Setting Name
= UefiShellStartup
Current Value
= Disabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[UEFI Shell Script Auto-Start]
[Disabled]
[Enabled]
[Disabled]
Setting Name
[HP Power Profile]
= PowerProfile
sysconfig
55
Current Value
= BalancedPowerPerf
Possible Values = BalancedPowerPerf
MinPower
MaxPerf
Custom
Setting Type
= Enum
[Balanced Power and Performance]
[Balanced Power and Performance]
[Minimum Power Usage]
[Maximum Performance]
[Custom]
Setting Name
= PowerRegulator
Current Value
= DynamicPowerSavings
Possible Values = DynamicPowerSavings
StaticLowPower
StaticHighPerf
OsControl
Setting Type
= Enum
[HP
[HP
[HP
[HP
[HP
[OS
Power Regulator]
Dynamic Power Savings Mode]
Dynamic Power Savings Mode]
Static Low Power Mode]
Static High Performance Mode]
Control Mode]
Setting Name
= RedundantPowerSupply
[Redundant Power
Current Value
= BalancedMode
[Balanced Mode]
Possible Values = BalancedMode
[Balanced Mode]
HighEfficiencyAuto
[High Efficiency
HighEfficiencyOddStandby [High Efficiency
HighEfficiencyEvenStandby[High Efficiency
Setting Type
= Enum
56
Supply Mode]
Mode (Auto)]
Mode (Odd Supply Standby)]
Mode (Even Supply Standby)]
Setting Name
= IntelQpiPowerManagement
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Intel QPI Link Power Management]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= IntelQpiFreq
Current Value
= Auto
Possible Values = Auto
MinQpiSpeed
Setting Type
= Enum
[Intel QPI Link Frequency]
[Auto]
[Auto]
[Min QPI Speed]
Setting Name
= QpiBandwidthOpt
Current Value
= Balanced
Possible Values = Balanced
OptimizedForIo
Setting Type
= Enum
[QPI Bandwidth Optimization (RTID)]
[Balanced]
[Balanced]
[Optimized for I/O (Alternate RTID)]
Setting Name
= MinProcIdlePower
Current Value
= C6
Possible Values = C6
C3
C1E
NoCStates
Setting Type
= Enum
[Minimum Processor Idle Power Core C-State]
[C6 State]
[C6 State]
[C3 State]
[C1E State]
[No C-states]
Setting Name
= MinProcIdlePkgState
Current Value
= C6NonRetention
Possible Values = C6Retention
C6NonRetention
NoState
Setting Type
= Enum
[Minimum Processor Idle Power Package C-State]
[Package C6 (non-retention) State]
[Package C6 (retention) State]
[Package C6 (non-retention) State]
[No Package State]
Setting Name
= EnergyPerfBias
Current Value
= MaxPerf
Possible Values = MaxPerf
BalancedPerf
BalancedPower
PowerSavingsMode
Setting Type
= Enum
[Energy/Performance Bias]
[Maximum Performance]
[Maximum Performance]
[Balanced Performance]
[Balanced Power]
[Power Savings Mode]
Setting Name
= MaxMemBusFreqMHz
Current Value
= Auto
Possible Values = Auto
1600
1333
1066
Setting Type
= Enum
[Maximum Memory Bus Frequency]
[Auto]
[Auto]
[1600 MHz]
[1333 MHz]
[1066 MHz]
Setting Name
= ChannelInterleaving
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Channel Interleaving]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= MaxPcieSpeed
Current Value
= MaxSupported
Possible Values = MaxSupported
PcieGen1
Setting Type
= Enum
[Maximum PCI Express Speed]
[Maximum Supported]
[Maximum Supported]
[PCIe Generation 1.0]
Setting Name
= DynamicPowerResponse
Current Value
= Fast
Possible Values = Fast
Slow
Setting Type
= Enum
[Dynamic Power Savings Mode Response]
[Fast]
[Fast]
[Slow]
Setting Name
= CollabPowerControl
Current Value
= Enabled
Possible Values = Enabled
[Collaborative Power Control]
[Enabled]
[Enabled]
UEFI Shell command reference
Setting Type
Disabled
= Enum
[Disabled]
Setting Name
= DynamicPowerCapping
Current Value
= Auto
Possible Values = Auto
Enabled
Disabled
Setting Type
= Enum
[Dynamic Power Capping Functionality]
[Auto]
[Auto]
[Enabled]
[Disabled]
Setting Name
= AcpiSlit
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[ACPI SLIT Preferences]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= EmbSasEnable
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Embedded RAID : Smart Array P830i Controller]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= AsrStatus
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[ASR Status]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= AsrTimeoutMinutes
Current Value
= 10
Possible Values = 10
15
20
30
5
Setting Type
= Enum
[ASR Timeout]
[10 Minutes]
[10 Minutes]
[15 Minutes]
[20 Minutes]
[30 Minutes]
[5 Minutes]
Setting Name
= WakeOnLan
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Wake-On LAN]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= PostF1Prompt
Current Value
= Delayed20Sec
Possible Values = Disabled
Delayed2Sec
Delayed20Sec
Setting Type
= Enum
[POST F1 Prompt]
[Delayed 20 seconds]
[Disabled]
[Delayed 2 seconds]
[Delayed 20 seconds]
Setting Name
= PowerButton
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Power Button Mode]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= AutoPowerOn
Current Value
= RestoreLastState
Possible Values = AlwaysPowerOn
AlwaysPowerOff
RestoreLastState
Setting Type
= Enum
[Automatic Power-On]
[Restore Last Power State]
[Always Power on]
[Always Power Off]
[Restore Last Power State]
Setting Name
= PowerOnDelay
Current Value
= None
Possible Values = None
Random
15Sec
30Sec
45Sec
60Sec
Setting Type
= Enum
[Power-On Delay]
[No Delay]
[No Delay]
[Random Delay]
[15 Second Delay]
[30 Second Delay]
[45 Second Delay]
[60 Second Delay]
Setting Name
= IntelligentProvisioning
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Intelligent Provisioning (F10 Prompt)]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= EmbeddedDiagnostics
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Embedded Diagnostics]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= EmbeddedDiagsMode
Current Value
= Auto
Possible Values = Auto
TextConsole
Setting Type
= Enum
[Embedded Diagnostics Mode]
[Auto]
[Auto]
[Text Console]
Setting Name
Current Value
[Current TPM Type]
[No TPM]
= TpmType
= NoTpm
sysconfig
57
58
Possible Values = NoTpm
Tpm12
Tpm20
Setting Type
= Enum
[No TPM]
[TPM 1.2]
[TPM 2.0]
Setting Name
= TpmState
Current Value
= NotPresent
Possible Values = NotPresent
PresentDisabled
PresentEnabled
Setting Type
= Enum
[Current TPM State]
[Not Present]
[Not Present]
[Present and Disabled]
[Present and Enabled]
Setting Name
= TpmOperation
Current Value
= Disable
Possible Values = Enable
Disable
Clear
NoAction
Setting Type
= Enum
[TPM 1.2 Operation]
[Disable]
[Enable]
[Disable]
[Clear]
[No Action]
Setting Name
= TpmVisibility
Current Value
= Visible
Possible Values = Hidden
Visible
Setting Type
= Enum
[TPM 1.2 Visibility]
[Visible]
[Hidden]
[Visible]
Setting Name
= TpmBinding
Current Value
= Disabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[TPM Binding]
[Disabled]
[Enabled]
[Disabled]
Setting Name
= SerialConsolePort
Current Value
= Auto
Possible Values = Auto
Disabled
Physical
Virtual
Setting Type
= Enum
[BIOS Serial Console Port]
[Auto]
[Auto]
[Disabled]
[Physical Serial Port]
[Virtual Serial Port]
Setting Name
= SerialConsoleEmulation
Current Value
= Vt100Plus
Possible Values = Vt100
Ansi
Vt100Plus
Setting Type
= Enum
[BIOS Serial Console Emulation Mode]
[VT100+]
[VT100]
[ANSI]
[VT100+]
Setting Name
= SerialConsoleBaudRate
Current Value
= 115200
Possible Values = 9600
19200
57600
115200
Setting Type
= Enum
[BIOS Serial Console Baud Rate]
[115200]
[9600]
[19200]
[57600]
[115200]
Setting Name
= EmsConsole
Current Value
= Disabled
Possible Values = Disabled
Com1Irq4
Com2Irq3
Setting Type
= Enum
[EMS Console]
[Disabled]
[Disabled]
[COM 1; IRQ4; I/O: 3F8h-3FFh]
[COM 2; IRQ3; I/O: 2F8h-2FFh]
Setting Name
= RomSelection
Current Value
= CurrentRom
Possible Values = CurrentRom
BackupRom
Setting Type
= Enum
[ROM Selection]
[Use Current ROM]
[Use Current ROM]
[Switch to Backup ROM]
Setting Name
= NmiDebugButton
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[NMI Debug Button]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= VirtualInstallDisk
Current Value
= Disabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Virtual Install Disk]
[Disabled]
[Enabled]
[Disabled]
Setting Name
= EmbeddedUserPartition
Current Value
= Disabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Embedded User Partition]
[Disabled]
[Enabled]
[Disabled]
Setting Name
= PciBusPadding
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[PCI Bus Padding Options]
[Enabled]
[Enabled]
[Disabled]
Setting Name
[Power-On Logo]
= PowerOnLogo
UEFI Shell command reference
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Enabled]
[Enabled]
[Disabled]
Setting Name
= F11BootMenu
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[One-Time Boot Menu (F11 Prompt)]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= Sriov
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[SR-IOV]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= ConsistentDevNaming
Current Value
= LomsOnly
Possible Values = LomsOnly
Disabled
Setting Type
= Enum
[Consistent Device Naming]
[CDN Support for LOMs Only]
[CDN Support for LOMs Only]
[Disabled]
Setting Name
= VideoOptions
Current Value
= BothVideoEnabled
Possible Values = OptionalVideoOnly
BothVideoEnabled
Setting Type
= Enum
[Video Options]
[Both Add-in and Embedded Video Enabled]
[Add-in Video Enabled, Embedded Video Disabled]
[Both Add-in and Embedded Video Enabled]
Setting Name
= UefiPxeBoot
Current Value
= Auto
Possible Values = Auto
IPv4ThenIPv6
IPv4
IPv6
IPv6ThenIPv4
Setting Type
= Enum
[UEFI PXE Boot Policy]
[Auto]
[Auto]
[IPv4 then IPv6]
[IPv4]
[IPv6]
[IPv6 then IPv4]
Setting Name
= EmbVideoConnection
Current Value
= Auto
Possible Values = Auto
AlwaysDisabled
AlwaysEnabled
Setting Type
= Enum
[Embedded Video Connection]
[Auto]
[Auto]
[Always Disabled]
[Always Enabled]
Setting Name
= PwrSupplyReqOverride
Current Value
= Default
Possible Values = Default
1Min2Redundant
2Min3Redundant
2Min4Redundant
3Min4Redundant
4MinNoneRedundant
Setting Type
= Enum
[Power Supply Requirements Override]
[Default Power Supply Requirements]
[Default Power Supply Requirements]
[Configure for 1 minimum required, 2 required for
[Configure for 2 minimum required, 3 required for
[Configure for 2 minimum required, 4 required for
[Configure for 3 minimum required, 4 required for
[Configure for 4 minimum required, no redundancy]
Setting Name
= ThermalConfig
Current Value
= OptimalCooling
Possible Values = OptimalCooling
IncreasedCooling
MaxCooling
Setting Type
= Enum
[Thermal Configuration]
[Optimal Cooling]
[Optimal Cooling]
[Increased Cooling]
[Maximum Cooling]
Setting Name
= ThermalShutdown
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Thermal Shutdown]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= HwPrefetcher
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[HW Prefetcher]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= AdjSecPrefetch
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Adjacent Sector Prefetch]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= DcuStreamPrefetcher
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[DCU Stream Prefetcher]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= DcuIpPrefetcher
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[DCU IP Prefetcher]
[Enabled]
[Enabled]
[Disabled]
Setting Name
[Node Interleaving]
= NodeInterleaving
redundancy]
redundancy]
redundancy]
redundancy]
sysconfig
59
Current Value
= Disabled
Possible Values = Disabled
Enabled
Setting Type
= Enum
[Disabled]
[Disabled]
[Enabled]
Setting Name
= RestoreDefaults
Current Value
= No
Possible Values = No
Yes
Setting Type
= Enum
[Restore Default System Settings]
[No, cancel the restore procedure.]
[No, cancel the restore procedure.]
[Yes, restore the default settings.]
Setting Name
= RestoreManufacturingDefaults[Restore Default Manufacturing Settings]
Current Value
= No
[No, cancel restore procedure.]
Possible Values = No
[No, cancel restore procedure.]
Yes
[Yes, restore the default settings.]
Setting Type
= Enum
Setting Name
= SaveUserDefaults
Current Value
= No
Possible Values = No
Yes
Setting Type
= Enum
[Save User Defaults]
[No, Cancel]
[No, Cancel]
[Yes, Save]
Setting Name
= EraseUserDefaults
Current Value
= No
Possible Values = No
Yes
Setting Type
= Enum
[Erase User Defaults]
[No, Cancel]
[No, Cancel]
[Yes, erase the current settings.]
Setting Name
= UtilityLang
Current Value
= English
Possible Values = English
Japanese
Chinese
Setting Type
= Enum
[Utility Language]
[English]
[English]
[Japanese]
[Chinese]
Setting Name
= IntelPerfMonitoring
Current Value
= Disabled
Possible Values = Disabled
Enabled
Setting Type
= Enum
[Intel Performance Monitoring Support]
[Disabled]
[Disabled]
[Enabled]
Setting Name
= BootMode
Current Value
= Uefi
Possible Values = Uefi
LegacyBios
Setting Type
= Enum
[Boot Mode]
[UEFI Mode]
[UEFI Mode]
[Legacy BIOS Mode]
Setting Name
= UefiOptimizedBoot
Current Value
= Enabled
Possible Values = Disabled
Enabled
Setting Type
= Enum
[UEFI Optimized Boot]
[Enabled]
[Disabled]
[Enabled]
Setting Name
= ProcX2Apic
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Processor x2APIC Support]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= AcpiRootBridgePxm
Current Value
= Enabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Memory Proximity Reporting for I/O]
[Enabled]
[Enabled]
[Disabled]
Setting Name
= ExtendedMemTest
Current Value
= Disabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Extended Memory Test]
[Disabled]
[Enabled]
[Disabled]
Setting Name
= MixedPowerSupplyReporting[Mixed Power Supply Reporting]
Current Value
= Enabled
[Enabled]
Possible Values = Enabled
[Enabled]
Disabled
[Disabled]
Setting Type
= Enum
60
Setting Name
= AcpiRtcSupport
Current Value
= Disabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[ACPI RTC Support]
[Disabled]
[Enabled]
[Disabled]
Setting Name
Current Value
Setting Type
= ServerName
=
= String
[Server Name]
Setting Name
Current Value
Setting Type
= ServerPrimaryOs
=
= String
[Server Primary OS]
Setting Name
= ServerOtherInfo
[Server Other Information]
UEFI Shell command reference
Current Value
Setting Type
=
= String
Setting Name
Current Value
Setting Type
= AdminName
=
= String
[Administrator Name]
Setting Name
Current Value
Setting Type
= AdminPhone
=
= String
[Administrator Phone Number]
Setting Name
Current Value
Setting Type
= AdminEmail
=
= String
[Administrator E-mail Address]
Setting Name
Current Value
Setting Type
= AdminOtherInfo
=
= String
[Administrator Other Information]
Setting Name
Current Value
Setting Type
= ServiceName
=
= String
[Service Contact Name]
Setting Name
Current Value
Setting Type
= ServicePhone
=
= String
[Service Contact Phone Number]
Setting Name
Current Value
Setting Type
= ServiceEmail
=
= String
[Service Contact E-mail Address]
Setting Name
Current Value
Setting Type
= ServiceOtherInfo
=
= String
[Service Contact Other Information]
Setting Name
Current Value
Setting Type
= CustomPostMessage
=
= String
[Custom POST Message]
Setting Name
Current Value
Setting Type
= ProcCoreDisable
= 0
= Numeric
[Processor Core Disable]
Setting Name
Current Value
Setting Type
= ProductId
=
= String
[Product ID]
Setting Name
Current Value
Setting Type
= ServerAssetTag
=
= String
[Server Asset Tag]
Setting Name
Current Value
Setting Type
= SerialNumber
=
= String
[Serial Number]
Setting Name
= AssetTagProtection
Current Value
= Unlocked
Possible Values = Locked
Unlocked
Setting Type
= Enum
[Asset Tag Protection]
[Unlocked]
[Locked]
[Unlocked]
Setting Name
= SecureBoot
Current Value
= Disabled
Possible Values = Enabled
Disabled
Setting Type
= Enum
[Secure Boot]
[Disabled]
[Enabled]
[Disabled]
Setting Name
= TimeZone
Current Value
= Utc0
Possible Values = UtcM12
UtcM11
UtcM10
UtcM9
UtcM8
UtcM7
UtcM6
UtcM5
UtcM430
UtcM4
UtcM330
UtcM3
UtcM2
UtcM1
Utc0
UtcP1
UtcP2
UtcP3
UtcP330
UtcP4
UtcP430
UtcP5
UtcP530
UtcP545
[Time Zone]
[UTC-00:00,
[UTC-12:00,
[UTC-11:00,
[UTC-10:00,
[UTC-09:00,
[UTC-08:00,
[UTC-07:00,
[UTC-06:00,
[UTC-05:00,
[UTC-04:30,
[UTC-04:00,
[UTC-03:30,
[UTC-03:00,
[UTC-02:00,
[UTC-01:00,
[UTC-00:00,
[UTC+01:00,
[UTC+02:00,
[UTC+03:00,
[UTC+03:30,
[UTC+04:00,
[UTC+04:30,
[UTC+05:00,
[UTC+05:30,
[UTC+05:45,
Greenwich Mean Time, Dublin, London]
International Date Line West]
Midway Island, Samoa]
Hawaii]
Alaska]
Pacific Time(US & Canada)]
Mountain Time (US & Canada)]
Central America, Central Time(US & Canada)]
Eastern Time(US & Canada)]
Caracas]
Atlantic Time(Canada), Caracas, Santiago]
Newfoundland]
Brasilia, Buenos Aires, Georgetown, Greenland]
Mid-Atlantic]
Azores, Cape Verde Is.]
Greenwich Mean Time, Dublin, London]
Amsterdam, Berlin, Rome, Paris, West Central Africa]
Athens, Istanbul, Cairo, Jerusalem]
Baghdad, Kuwait, Riyadh, Moscow, Nairobi]
Tehran]
Abu Dhabi, Muscat, Baku, Tbilisi, Yerevan]
Kabul]
Ekaterinburg, Islamabad, Karachi, Tashkent]
Chennai, Kolkata, Mumbai, New Delhi]
Kathmandu]
sysconfig
61
UtcP6
UtcP630
UtcP7
UtcP8
UtcP9
UtcP930
UtcP10
Setting Type
UtcP11
UtcP12
UtcP13
UtcP14
Unspecified
= Enum
[UTC+06:00,
[UTC+06:30,
[UTC+07:00,
[UTC+08:00,
[UTC+09:00,
[UTC+09:30,
[UTC+10:00,
Almaty, Novosibirsk, Astana, Dhaka]
Rangoon]
Bangkok, Hanio, Jakarta, Krasnoyarsk]
Taipei, Beijing, Chongqing, Hong Kong, Urumqi]
Osaka, Sapporo, Tokyo, Seoul, Yakutsk]
Adelaide, Darwin]
Canberra, Melbourne, Sydney, Guam, Hobart, Vladivostok]
[UTC+11:00, Magadan, Solomon Is., New Caledonia]
[UTC+12:00, Auckland, Wellington, Fiji, Kamchatka, Marshall Is.]
[UTC+13:00, Nuku'alofa]
[UTC+14:00, Line Islands]
[Unspecified Time Zone]
sysinfo
Displays system information.
Syntax
sysinfo
Description
This command displays the same information that is listed on the System Information screen in the
UEFI System Utilities.
Example
To display system information:
Shell>sysinfo
time
Displays or sets the current time for the system.
Syntax
time [hh:mm [:ss]] [-tz tz] [-d dl]
Options
hh
Sets a new hour value (0–23)
mm
Sets a new minute value (0–59)
ss
Sets a new second value (0–59). If not specified, zero is used.
-tztz
Sets a time zone adjustment, in minutes, offset from GMT. Valid values can be between
-1440 and 1440 or 2047. If not present or set to 2047, time is interpreted as local time.
-d dl
Sets a daylight savings time value. Valid values are:
•
0—Time is not affected by daylight savings time.
•
1—Time is affected by daylight savings time but has not been adjusted.
•
3—Time is affected by daylight savings time and has been adjusted.
If no value follows –d, the current daylight savings time is displayed.
Description
This command displays or sets the current time for the system. If no parameters are used, it shows
the current time. If valid hours, minutes, and seconds are provided, the system's time is updated.
62
UEFI Shell command reference
NOTE:
•
Except for numeric characters and the : (colon) character, all other characters in the argument
are invalid. The Shell reports an error if the number is in the wrong hour/minute/second
range.
•
Spaces before or after the numeric character are not allowed. Spaces inserted into the number
are not allowed either.
•
The seconds parameter is optional. If not specified, seconds are set to zero by default.
Examples
To display the current system time:
fs0:\> time
16:51:03 (GMT+08:00)
To set the current system time:
fs0:\> time 9:51:30
fs0:\> time
09:51:31 (GMT+08:00)
To set the system time, and display the daylight savings time setting:
fs0:\> time 9:51:30
fs0:\> time —d
09:51:31 (GMT+08:00) DST: Not Affected
timezone
Displays or sets time zone information.
Syntax
timezone [-s:hh:mm] [-l-b-f]
Options
-s
Set time zone associated with hh:mm offset from UTC.
-l
Display list of all time zones.
-b
Displays one screen at a time.
—f
Displays full information for specified time zone.
Description
This command displays or sets the current time zone for the system. If no parameters are used, it
shows the current time zone. If a valid hh:mm parameter is provided, the system’s time zone
information in updated.
Examples
To display all available time zones:
fs0:\> timezone -l
To set the time zone:
fs0:\> timezone -s 7:00
To display detailed information for the current time zone:
fs0:\> timezone -f
timezone
63
touch
Updates the time and date on a file to the current time and date.
Syntax
touch [-r] file [file...]
Options
-r
Makes the update recursive into subdirectories.
file
Specifies the name or pattern of the file or directory to be updated. Multiple files can be
updated at once.
Description
This command updates the time and date on the file specified by the file parameter to the current
time and date.
If multiple files are specified, the system continues processing. It processes the files one by one and
errors are ignored.
This command cannot change the time and date of read-only files and directories.
Example
To update the time and date on a file:
fs0:\> touch myfile.txt
type
Sends the contents of a file to the standard output device.
Syntax
type file [file...]
Option
file
Specifies a file name to display.
Description
This command sends the contents of a file to the standard output device. If no options are used,
the command attempts to detect the file type. If it fails, UCS-2 is presumed.
Examples
To display a file in format:
fs0:\> type pause.nsh
#
# Example script for 'pause' command
#
echo pause.nsh begin..
\date
time
pause
echo pause.nsh done.
To display multiple files:
fs0:\> type test.*
How to Install?
time
64
UEFI Shell command reference
stall 3000000
time
unload
Unloads a UEFI driver image from memory.
Syntax
unload [-n] [ -v | verbose ] handle
Options
-n
Skips all prompts during unloading so that the output can be used in a script file.
-v
Displays verbose image information before unloading.
verbose
Dumps verbose image information before unloading.
handle
Specifies the handle of the driver to unload in hexadecimal format.
Description
This command unloads a UEFI driver image from memory. Only drivers that support unloading
can be unloaded.
Examples
To find the handle for the UEFI driver image to unload:
Shell>dh -b
To unload the UEFI driver image with handle 27:
Shell>unload 27
ver
Displays version information for the UEFI Shell and the underlying UEFI firmware.
Syntax
ver [ -s | -t ]
Options
-s
Displays only the UEFI Shell version.
-t
Displays summary (terse) content.
Description
This command displays the version information for the UEFI firmware or the version information
for the UEFI Shell itself. The information is retrieved through the UEFI System Table or the Shell
image.
Example
To display only the UEFI Shell version.
fs0:\> ver —s
2.0
To display all information about the UEFI Shell firmware version.
fs0:\> ver
UEFI Interactive Shell v2.0
Copyright 1982, 2014 Hewlett-Packard Development Company, L.P.
unload
65
UEFI v2.31 (HP, 0x00010000)
ProLiant System BIOS - P79 (01/14/2014)
vol
Displays volume information for a file system.
Syntax
vol [fs] [-n volumelabel]
vol [fs] [-d]
Options
fs
Specifies the name of the file system to display.
-n volumelabel
Specifies a name for the volume label. The following characters cannot be
used: % ^ * + = [ ] | : ; " < > ? / . No spaces are allowed
in the volume label.
-d
Specifies an empty volume label.
Description
This command displays the volume information for a file system. If fs is not specified, the current
file system is assumed. If -n is specified, the volume label for fs is set to the volumelabel
parameter. The maximum length for volumelabel is 11 characters.
Examples
To display the volume of the current file system:
fs0:\> vol
Volume has no label (rw)
1,457,664 bytes total disk space
1,149,440 bytes available on disk
512 bytes in each allocation unit
To change the label of fs0:
shell> vol fs0 –n help_test
Volume HELP_TEST (rw)
1,457,664 bytes total disk space
1,149,440 bytes available on disk
512 bytes in each allocation unit
To delete the volume label of fs0:
fs0:\> vol fs0 -d
Volume has no label (rw)
1,457,664 bytes total disk space
220,160 bytes available on disk
512 bytes in each allocation unit
66
UEFI Shell command reference
3 Running and editing UEFI Shell scripts
The following information describes the scripting functions provided by the UEFI Shell.
UEFI Shell script commands
Examples
To export all settings to a file:
fs0:\> Sysconfig –export filename.txt
To import all settings to a file:
fs0:\> Sysconfig –import filename.txt
Invoking scripts
You can invoke UEFI Shell scripts using either of these two methods:
•
“Enabling the UEFI Shell Script Auto Start” (page 67)
•
“Manually invoking a Shell script” (page 67)
Enabling the UEFI Shell Script Auto Start
You can enable or disable automatic execution of the default UEFI Shell script during shell start
up. When enabled, the shell looks for the startup.nsh file in any of the FAT16 or FAT32 file
systems available. HP recommends having only one startup.nsh file on one file system.
To enable the UEFI Shell script auto start:
1. Access the System Utilities menu. See “Accessing the HP UEFI System Utilities” (page 5).
2. From the System Utilities screen, select System Configuration→BIOS/Platform Configuration
(RBSU)→Embedded UEFI Shell→UEFI Shell Script Auto-Start and press Enter.
3. Press F10 to save your selection.
4. Reboot the server for the change to take effect.
Manually invoking a Shell script
To manually invoke a Shell script:
1. Navigate to the location of the .nsh Script file.
2. Double-click the file, or right-click it, and select Open.
Editing Shell scripts
You can edit script files offline or in the Shell using the edit command. You can also use the type
command to output the script to the screen.
Sample UEFI Shell application source code
The following sample source code shows how to implement the UEFI Shell application to print
"Hello World" on the screen, and display the UEFI Shell version and Environment variables.
Export example:
fs0:\>
@echo -off
cls
set -v myfs 0
if exist FS0:\* then
FS0:
echo "FS0:\ Found!"
UEFI Shell script commands
67
goto FSFOUND
endif
echo "FS0:\ not found in system"
echo "Going to search first available file system from FS1, FS2,..., FS100"
pause
for %a run (1 100)
set -v myfs %a
if exist FS%myfs%:\* then
FS%myfs%:
echo "FS%myfs%:\ Found!"
goto FSFOUND
endif
endfor
## No valid FS found in system, so exit now
echo "No valid File System (FS0, FS1,..., FS100) found in system"
goto END
:FSFOUND
if exist sysconfig_backup.txt then
echo ===========================================================================
echo "%cwd%sysconfig_backup.txt already exists! Continuing the execution of the"
echo "script will remove existing sysconfig_backup.txt file and create a new"
echo "latest system configuration sysconfig_backup.txt file."
echo ===========================================================================
pause
rm sysconfig_backup.txt
endif
echo "Saving latest system configuration in sysconfig_backup.txt file."
sysconfig -export sysconfig_backup.txt
:END
set -d myfs
Import example:
fs0:\>
@echo -off
cls
set -v myfs 0
if exist FS0:\sysconfig_backup.txt then
FS0:
echo "FS0:\sysconfig_backup.txt Found!"
goto FSFOUND
endif
echo ===========================================================================
echo "FS0:\sysconfig_backup.txt not found in system"
echo "Going to search sysconfig_backup.txt from all available file system"
echo "from FS1, FS2,..., FS100"
echo ===========================================================================
pause
for %a run (1 100)
set -v myfs %a
if exist FS%myfs%:\sysconfig_backup.txt then
FS%myfs%:
echo "FS%myfs%:\sysconfig_backup.txt Found!"
goto FSFOUND
endif
endfor
## No valid sysconfig_backup.txt found in system, so exit now
echo "No valid sysconfig_backup.txt found from File System (FS0, FS1,..., FS100)"
goto END
:FSFOUND
if exist sysconfig_backup.txt then
echo ===========================================================================
echo "%cwd%sysconfig_backup.txt Found! Continuing the execution of the script"
echo "will cause system to override previous configuration and use the"
echo "configuration settings stored in sysconfig_backup.txt file."
echo ===========================================================================
pause
sysconfig -import sysconfig_backup.txt
endif
:END
set -d myfs
68
Running and editing UEFI Shell scripts
4 Using the UEFI Programming Model
The UEFI Shell provides a programming API. You can use it to write your own UEFI applications
for calling some of the Shell programmatic APIs or protocols. For more information, see the UEFI
Shell Specification and EDK2. The UEFI Shell provides a programming API as listed in Table 12
(page 69). EFI_SHELL_PROTOCOL provides shell services to UEFI applications. It provides UEFI
shell applications access to the low-level shell functions, including: files, pipes, environment variables,
the current working directory, mappings, help text, aliases, and launching shell applications and
scripts.
Table 12 UEFI Application APIs
Function Type
Function Name
Description
EFI_SHELL_EXECUTE
Execute
Causes the shell to parse and execute the
command line.
EFI_SHELL_GET_ENV
GetEnv
Gets the environment variable.
EFI_SHELL_SET_ENV
SetEnv
Changes a specific environment variable.
EFI_SHELL_GET_ALIAS
GetAlias
Retrieves the alias for a specific shell
command.
EFI_SHELL_SET_ALIAS
SetAlias
Adds or removes the alias for a specific shell
command.
EFI_SHELL_GET_HELP_TEXT
GetHelpText
Return help information about a specific
command.
EFI_SHELL_GET_DEVICE_PATH_FROM_MAP GetDevicePathFromMap Returns the device path that corresponds to
a mapping.
EFI_SHELL_GET_MAP_FROM_DEVICE_PATH GetMapFromDevicePath Returns the mapping that corresponds to a
particular device path.
EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH GetDevicePathFromFilePath Converts a file path to a device path, where
all mappings have been replaced with the
corresponding device paths.
EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH GetFilePathFromDevicePath Converts a device path to a file path, where
the portion of the device path corresponding
to one of the mappings is replaced with that
mapping.
EFI_SHELL_SET_MAP
SetMap
It creates/updates/deletes a mapping
between a device and a device path.
EFI_SHELL_GET_CUR_DIR
GetCurDir
Returns the current directory on a device.
EFI_SHELL_SET_CUR_DIR
SetCurDir
Changes the current directory on a device.
EFI_SHELL_OPEN_FILE_LIST
OpenFileList
Opens the files that match the path pattern
specified.
EFI_SHELL_FREE_FILE_LIST
FreeFileList
Frees the file list that created by OpenFileList().
EFI_SHELL_REMOVE_DUP_IN_FILE_LIST
RemoveDupInFileList
Deletes the duplicate files in the given file list.
EFI_SHELL_BATCH_IS_ACTIVE
BatchIsActive
Returns whether any script files are currently
being processed.
EFI_SHELL_IS_ROOT_SHELL
IsRootShell
Judges whether the active Shell is the root
shell.
EFI_SHELL_ENABLE_PAGE_BREAK
EnablePageBreak
Enables the page break output mode.
EFI_SHELL_DISABLE_PAGE_BREAK
DisablePageBreak
Disables the page break output mode.
69
Table 12 UEFI Application APIs (continued)
Function Type
Function Name
Description
EFI_SHELL_GET_PAGE_BREAK
GetPageBreak
Gets the enable status of the page break
output mode.
EFI_SHELL_GET_DEVICE_NAME
GetDeviceName
Gets the name of the device specified by the
device handle.
EFI_SHELL_GET_FILE_INFO
GetFileInfo
Return information about a specific file
handle.
EFI_SHELL_SET_FILE_INFO
SetFileInfo
Change information about a specific file
handle.
EFI_SHELL_OPEN_FILE_BY_NAME
OpenFileByName
Given a file name, open a file and return a
file handle.
EFI_SHELL_CLOSE_FILE
CloseFile
Close an open file.
EFI_SHELL_CREATE_FILE
CreateFile
Create a new file.
EFI_SHELL_READ_FILE
ReadFile
Read data from a file.
EFI_SHELL_WRITE_FILE
WriteFile
Write data to a file.
EFI_SHELL_DELETE_FILE
DeleteFile
Delete a file.
EFI_SHELL_DELETE_FILE_BY_NAME
DeleteFileByName
Delete a file by name.
EFI_SHELL_GET_FILE_POSITION
GetFilePosition
Return the current read/write position within
a file.
EFI_SHELL_SET_FILE_POSITION
SetFilePosition
Change the current read/write position within
a file.
EFI_SHELL_FLUSH_FILE
FlushFile
Write all buffered data to a file.
EFI_SHELL_FIND_FILES
FindFiles
Return all files that match a pattern in a file
list.
EFI_SHELL_FIND_FILES_IN_DIR
FindFilesInDir
Return all files in a specified directory in a
file list.
EFI_SHELL_GET_FILE_SIZE
GetFileSize
Return the size of a file.
EFI_SHELL_OPEN_ROOT
OpenRoot
Return the root directory of a file system.
EFI_SHELL_OPEN_ROOT_BY_HANDLE
OpenRootByHandle
Return the root directory of a file system on a
particular handle.
EFI_EVENT
ExecutionBreak
Event signaled by the UEFI Shell when the
user presses CTRL-C to indicate that the current
UEFI Shell command execution should be
interrupted.
UINT32
MajorVersion
The major version of the shell environment.
UINT32
MinorVersion
The minor version of the shell environment.
Sample Shell scripts
Examples
The following sample scripts how to capture an configuration (export) and replicate it (import) from
startup.nsh mounted on an iLO virtual media..
fs0:\>
/** @file
This is an example Shell Application. Note that there are
other ways to add a command to the shell. This example
70
Using the UEFI Programming Model
demonstrates just one.
Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
This software contains information confidential and proprietary to
Hewlett-Packard Company. It shall not be reproduced in whole or in part,
or transferred to other documents, or disclosed to third parties, or used
for any purpose other than that for which it was obtained without the prior
written consent of Hewlett-Packard Company.
**/
#include <Protocol/EfiShell.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
/**
Implements simple shell HelloWorld Application that prints out
the string "Hello World" to the screen and then display UEFI
Shell revision and registered environment variables in system.
This example demonstrates how a new UEFI Shell Application can
be created to run at UEFI Shell Prompt.
@param ImageHandle
@param SystemTable
@retval EFI_SUCCESS
**/
EFI_STATUS
EFIAPI
UefiMain (
IN EFI_HANDLE
IN EFI_SYSTEM_TABLE
)
{
EFI_SHELL_PROTOCOL
CONST CHAR16
CONST CHAR16
EFI_STATUS
Handle to the Image
Pointer to the System Table
In all cases
ImageHandle,
*SystemTable
*UefiShellProtocol;
*ConstEnvNameList;
*Value;
Status;
Print (L"Hello World!\n");
//
// Locate UEFI Shell Protocol
//
Status = gBS->OpenProtocol (
ImageHandle,
&gEfiShellProtocolGuid,
(VOID **)&UefiShellProtocol,
ImageHandle,
NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
if (EFI_ERROR(Status)) {
//
// Search for the shell protocol
//
Status = gBS->LocateProtocol (
&gEfiShellProtocolGuid,
NULL,
(VOID **)&UefiShellProtocol
);
if (EFI_ERROR(Status)) {
UefiShellProtocol = NULL;
return EFI_SUCCESS;
}
}
if (UefiShellProtocol != NULL) {
//
// Sample to read UEFI Shell Major and Minor Version Variables
//
Print (L"UEFI Shell Revision: %d.%d\n", UefiShellProtocol->MajorVersion, UefiShellProtocol->MinorVersion);
//
// Sample to get list of all environment variables
//
ConstEnvNameList = UefiShellProtocol->GetEnv (NULL);
if (ConstEnvNameList == NULL) {
return EFI_SUCCESS;
}
Print (L"\n");
Print (L"ENVIRONMENT VARIABLES:\n");
Print (L"\n");
//
// Sample to get and display all environment variables
//
while (*ConstEnvNameList != CHAR_NULL){
Value = UefiShellProtocol->GetEnv (ConstEnvNameList);
Sample Shell scripts
71
Print (L"%8s = %s\n", ConstEnvNameList, Value);
ConstEnvNameList += StrLen (ConstEnvNameList)+1;
}
}
return EFI_SUCCESS;
}
72
Using the UEFI Programming Model
5 UEFI Shell command status codes
Table 13 (page 73) lists the possible status codes displayed by the UEFI Shell when you issue a
command. Codes vary depending on the command.
Table 13 UEFI Shell command status codes
Code
Meaning
SHELL_SUCCESS
The action is completed as requested.
SHELL_NOT_FOUND
The target file or set of files cannot be found.
SHELL_SECURITY_VIOLATION
The function cannot be performed due to a security violation. When Secure
Boot is enabled, any UEFI application that is not digitally signed using
one of the embedded Secure Boot certificates cannot run and returns a
SECURITY_VIOLATION status code instead.
SHELL_INVALID_PARAMETER
One of the passed in parameters is incorrectly formatted or its value is out
of bounds.
SHELL_OUT_OF_RESOURCES
A request to set a variable in a non-volatile fashion cannot be completed.
The resulting non-volatile request is converted into a volatile request.
SHELL_WRITE_PROTECTED
The media on which the action takes place is write-protected.
SHELL_DEVICE_ERROR
There is a hardware error preventing the completion of this command.
73
6 Support and other resources
Contacting HP
For worldwide technical support information, see the HP Support Center:
http://www.hp.com/go/hpsc
Before contacting HP, collect the following information:
•
Product model names and numbers
•
Technical support registration number (if applicable)
•
Product serial numbers
•
Error messages
•
Operating system type and revision level
•
Detailed questions
Subscription Service
HP strongly recommends that customers register online using the Subscriber's choice web site:
http://www.hp.com/go/e-updates.
Subscribing to this service provides you with e-mail updates on the latest product enhancements,
newest driver versions, and firmware documentation updates as well as instant access to numerous
other product resources.
Related information
The following documents provide related information:
•
HP UEFI System Utilities User Guide for HP ProLiant Gen9 Servers
•
HP UEFI System Utilities and Shell Release Notes for HP ProLiant Gen9 Servers
•
HP UEFI Shell Quick Reference Card for HP ProLiant Gen9 Servers
•
HP UEFI System Utilities and Shell Command Mobile Help for HP ProLiant Gen9 Servers
You can find these documents at the following website:
http://www.hp.com/go/ProLiantUEFI/docs
Websites
•
UEFI Specification: http://www.uefi.org/specifications
•
UEFI Learning Resources: http://www.uefi.org/learning_center
•
UEFI EDK2 project on SourceForge (download specifications and code): http://sourceforge.net/
apps/mediawiki/tianocore
Typographic conventions
Table 14 Document conventions
Convention
Element
Blue text: Table 14 (page 74)
• Cross-reference links and e-mail addresses
• A cross reference to the glossary definition of the term
in blue text
Blue, bold, underlined text
74
Support and other resources
email addresses
Table 14 Document conventions (continued)
Convention
Element
Blue, underlined text: http://www.hp.com
Website addresses
Bold text
• Keys that are pressed
• Text typed into a GUI element, such as a box
• GUI elements that are clicked or selected, such as menu
and list items, buttons, tabs, and check boxes
Italic text
Text emphasis
Monospace text
• File and directory names
• System output
• Code
• Commands, their arguments, and argument values
Monospace, italic text
• Code variables
• Command variables
Monospace, bold text
NOTE:
Emphasized monospace text
Provides additional information.
HP Insight Remote Support
HP strongly recommends that you register your device for remote support to enable enhanced
delivery of your HP Warranty, HP Care Pack Service, or HP contractual support agreement. HP
Insight Remote Support supplements your monitoring continuously to ensure maximum system
availability by providing intelligent event diagnosis, and automatic, secure submission of hardware
event notifications to HP, which will initiate a fast and accurate resolution, based on your product’s
service level. Notifications can be sent to your authorized HP Channel Partner for onsite service,
if configured and available in your country.
For more information, see HP Insight Remote Support and Insight Online Setup Guide for ProLiant
Servers and BladeSystem c-Class Enclosures on the HP website (http://www.hp.com/go/enterprise/
docs). HP Insight Remote Support is available as part of HP Warranty, HP Care Pack Service, or
HP contractual support agreement.
HP Insight Online direct connect
When you use the embedded Remote Support functionality with an HP ProLiant Gen8 or Gen9
server or HP BladeSystem c-Class enclosure, you can register a server or enclosure to communicate
directly to HP Insight Online without the need to set up an HP Insight Remote Support centralized
Hosting Device in your local environment. HP Insight Online will be your primary interface for
remote support information.
The Insight Online direct connect configuration is available in iLO 4 1.40 and later, Intelligent
Provisioning 1.60 and later, and Onboard Administrator 4.11 and later.
For more information, see the product documentation on the HP website: http://www.hp.com/
go/insightremotesupportdocs.
HP Insight Remote Support central connect
When you use the embedded Remote Support functionality with an HP ProLiant Gen8 or Gen9
server or HP BladeSystem c-Class enclosure, you can register a server or enclosure to communicate
to HP through an HP Insight Remote Support centralized Hosting Device in your local environment.
All configuration and service event information is routed through the Hosting Device. This information
HP Insight Remote Support
75
can be viewed by using the local HP Insight RS user interface or the web-based view in HP Insight
Online.
The Insight Remote Support central connect configuration is available in iLO 4 1.10 and later,
Intelligent Provisioning 1.20 and later, and Onboard Administrator 3.60 and later.
For more information, see the product documentation on the HP website: http://www.hp.com/
go/insightremotesupportdocs.
76
Support and other resources
7 Documentation feedback
HP is committed to providing documentation that meets your needs. To help us improve the
documentation, send any errors, suggestions, or comments to Documentation Feedback
([email protected]). Include the document title and part number, version number, or the URL
when submitting your feedback.
77
Glossary
ACR
Array Configuration Replication Utility
ASR
Automatic Server Recovery
BIOS
Basic Input/Output System
CLI
Command Line Interface
CNA
Converged Network Adapter
CONREP
Configuration Replication utility
ECC
Error Checking and Correcting
ECP
Extended Capabilities Port Mode
EMS
Emergency Management Services
EPP
Enhanced Parallel Port Mode
IDE
Integrated Device Electronics
iLO
Integrated Lights-Out
IMD
Integrated Management Display
IOMMU
I/O Memory Management Unit
IPL
Initial Program Load
IRQ
interrupt Request
LPT
Local Port
MEMBIST
Memory Built-in Self Test
MPS
Multi-Processor Specification
NIC
Network Interface Controller
NMI
Non-Maskable Interrupt
NUMA
Non-Uniform Memory Architecture
NVRAM
Non-Volatile Memory
ORCA
Option ROM Configuration for Arrays
PCC
Processor Clocking Control
PCI
Peripheral Component Interface
PCI-X
Peripheral Component Interconnect Extended
PCIe
Peripheral Component Interconnect Express
POST
Power-On Self-Test
PXE
Pre-Boot Execution Environment
RAID
Redundant Array of Inexpensive (or Independent) Disks
RBSU
ROM-Based Setup Utility
ROM
Read-Only Memory
RTC
Real-Time Clock
SPP
Standard Parallel Port Mode
TPM
Trusted Platform Module
UEFI
Unified Extensible Firmware Interface
VGA
Video Graphics Array
VSP
Virtual Serial Port
78
Glossary
Index
A
accessing a file system, 16
accessing the UEFI Shell, 5
accessing the UEFI shell from a serial console connection,
8
application APIs, 69
HP
Subscriber's choice web site, 74
technical support, 74
HP ProLiant POST screen, 5
I
invoking scripts, 67
B
M
boot order list, 7
booting to the UEFI Shell, 7
manually invoking a Shell script, 67
C
nsh files, 5
changing the UEFI boot order, 7
command line completion, 9
key, 9
command line help, 13
command line syntax, 9
commands and capabilities, 5
confirmation prompt, 12
contacting HP, 74
controlling command output, 10
conventions
document, 74
D
displaying command help, 13
for all command help, 13
for commands beginning with a specific character, 14
for the ls command, 14
displaying help for a specific command, 13
document
conventions, 74
related information, 74
documentation
HP website, 74
providing feedback on, 77
E
editing Shell scripts, 67
Embedded UEFI Shell
adding to boot order list, 7
enabling, 6
F
File
Accessing the fs0 file system from the shell, 16
file system, 16
G
getting started, 9
global page breaks, 11
H
help, 13
obtaining, 74
N
O
One-Time Boot menu, 7
P
passwords, 53
R
related documentation, 74
S
sample Shell scripts, 67, 70
script commands, 67
serial console connection, 8
Shell command reference
command syntax examples, 9
Shell script auto start
startup.nsh, 67
Shell script manual invocation, 67
Shell scripts
editing, 67
manually invoking, 67
samples, 67, 70
Subscriber's choice, HP, 74
suppressing the confirmation prompt, 12
sysconfig attributes, 54
System Utilities
accessing, 5
T
technical support, 74
HP, 74
typographic conventions, 74
U
UEFI Application APIs, 69
UEFI boot order, 7
UEFI Programming Model, 69
UEFI Shell command reference
command line syntax, 9
UEFI Shell command status
Status code meanings, 73
UEFI Shell command status codes
79
status codes, 73
UEFI Shell commands, 16
alias, 16
attrib, 17
boot, 18
cd, 19
cls, 20
comp, 21
connect, 21
cp, 22
date, 24
dblk, 25
devices, 25
devtree, 26
dh, 27
dh details, 29
disconnect, 29
dmem, 29
drivers, 30
eco, 31
edit, 32
eficompress, 32
efidecompress, 33
exit, 33
fwupdate, 33
getmtc, 34
goto, 34
help, 34
ifconfig, 35
imlview, 36
load, 37
ls file information, 40
ls volume information, 39
ls/dir, 37
map, 40
map details, 41
memmap, 41
mkdir, 43
mode, 43
mv, 44
openinfo, 45
parse, 45
pause, 46
pci, 46
ping, 47
ramdisk, 48
reset, 48
rm/del, 49
set, 50
setsize, 51
shift, 51
smbiosview, 52
stall, 52
sysconfig, 53
sysconfig attributes, 54
sysinfo, 62
time, 62
timezone, 63
80
Index
touch, 64
type, 64
unload, 65
ver, 65
vol, 66
UEFI Shell prompt, 7
UEFI Shell Script Auto Start, 67
UEFI Shell script commands, 67
W
web sites
HP Subscriber's choice, 74
websites, 74
product manuals, 74
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement