HP UEFI Shell User Guide for HP ProLiant DL580 Gen8 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 DL580 Gen8 servers. It is for the person who installs, administers, and troubleshoots servers and storage systems.
© 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.
Contents 1 Introduction...............................................................................................5 Commands and capabilities.......................................................................................................5 Accessing the UEFI Shell............................................................................................................5 Accessing the HP UEFI System Utilities....................................................................................
memmap..........................................................................................................................41 mkdir...............................................................................................................................43 mode...............................................................................................................................43 mv..............................................................................................................
1 Introduction The system BIOS in all HP ProLiant DL580 Gen8 servers includes an embedded UEFI Shell in the ROM. Based on the UEFI Shell Specification the shell environment provides an API, command line interfaces (CLI) that allows scripting, file manipulation, obtaining system information, and 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.
Figure 1 HP ProLiant POST screen 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.
4. Key Action F9 Press during server POST or system reboot to display the System Utilities screen in the iLO 4 Remote Console. 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.
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.
To add the Embedded UEFI Shell to the boot order list: 1. From the System Utilities screen, select System Configuration→BIOS/Platform Configuration (RBSU)→System Options→UEFI Shell Options→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.
Figure 5 Boot Options — UEFI Boot Order screen 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. In a few minutes, the One-Time Boot menu screen appears. 3. Select Embedded UEFI Shell, and press Enter. 4. Press any key to acknowledge that you are physically present.
Figure 6 One-Time Boot menu screen Figure 7 UEFI Shell Prompt screen 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.
Procedure 1 1. 2. 3. 4. Boot the server as explained in “Booting to the UEFI Shell” (page 10). Open a connection in an SSH client application using the server’s IP address. Leave the SSH port as 22. At the login prompt, enter your user name and password. The hpiLO-> prompt appears. 5. Enter vsp, and then 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 13). Enter exit to exit the Shell.
2 UEFI Shell command reference Command line syntax Table 1 (page 13) 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.
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.
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(0x
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
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.
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, then all files will be listed. If -a is not specified, then all non-system and non-hidden files will be listed. -sfo - Display information in Standard-Format Output.
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.
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.
Syntax alias [ -d | -v ] [alias-name] [command-name] Options -d Deletes an alias. The command-name option should not be present. -v Makes the alias volatile. command-name Specifies the original name, filename, or directory of the command. alias-name Specifies the alias 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.
[ +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. Description This command displays and sets the attributes of files or directories.
Description This command changes the current working directory that is used by the UEFI Shell environment. If a file system mapping is specified, then 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, then the current working directory (including file system mapping) is displayed to standard output.
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, then the background color does not change.
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] cp Copies one or more source files or directories to a destination. Syntax cp [-r] [-q] src src... [dst] Options -r Creates a recursive copy. -q Creates a quiet copy (with no prompt). src src...
06/13/01 10:00a 32,838 06/18/01 08:04p 29 06/18/01 08:05p
512 3 File(s) 61,606 bytes 4 Dir(s) IsaSerial.efi temp.txt test 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.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, then 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.
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.
Table 5 Output details—devices command (continued) Column Displays the... CFG Configuration Protocol support status: • Y—Yes • N—No DIAG Diagnostics Protocol support status: • 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.
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 Di
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(..
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, then the contents of the EFI System Table are displayed.
49 4C 55 56 57 58 59 5F 00000010 00000010 00000010 00000010 00000010 00000010 00000010 00000010 ? B D ? ? D B D X - X - 1 1 1 1 1 1 3 - 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 IsaSerial PciBus WinNtBlockIo WinNtConsole WinNtSerialIo WinNtSimpleFileSystem WinNtBusDriver WinNtUga Output details Table 7 (page 33) describes possible output for t
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.
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 then writes the decompressed form out to a new file.
Description This command updates the system BIOS firmware. Optionally, specify an NVRAM reset, a reboot after the flash, or both. If no options are specified, none are assumed. Example To update the system BIOS, reset NVRAM to its default configuration, and execute a reboot: Shell> fwupdate YourFlashImage.BIN -r 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.
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, then 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.
Description This command lists directory contents or file information. If no file name or directory name is specified, then the current working directory is assumed.
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 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.
The -r option resets all the default mappings in a system. It 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.
Type Start End # Pages available 0000000000750000-0000000001841FFF LoaderCode 0000000001842000-00000000018A3FFF available 00000000018A4000-00000000018C1FFF LoaderData 00000000018C2000-00000000018CAFFF BS_code 00000000018CB000-0000000001905FFF BS_data 0000000001906000-00000000019C9FFF ...
Table 11 Output details—memmap command (continued) Column Displays the... 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, then parent directories are created before child directories.
Description This command is used to change 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.
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.
Syntax pause [-q] Description This command is available only in scripts. It prints a message to the display, and then 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.
-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 is used to display verbose information for the specified PCI device. The PCI configuration space for the device is dumped with a detail interpretation.
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.
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.
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.
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 Display all structures of SmbiosType. -h Display structures of SmbiosHandle. -s Display statistics table. —a Display all information. SmbiosType SMBIOS structure type. SmbiosHandle SMBIOS structure unique 16–bit handle. Example To set the size of a file: fs0:\> setsize size file [file...
Options -i Shows information for the specified settings or all settings, including possible values. settingname Specifies a setting name about which to display information. 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. -import Imports all settings from a script file. -export Exports all settings to a script file.
SerialConsoleBaudRate=115200 EmsConsole=Disabled RomSelection=CurrentRom NmiDebugButton=Enabled VirtualInstallDisk=Disabled PciBusPadding=Enabled PowerOnLogo=Enabled F11BootMenu=Enabled Sriov=Enabled ConsistentDevNaming=LomsOnly NetworkBootRetry=Enabled BootOrderPolicy=RetryIndefinitely VideoOptions=BothVideoEnabled UefiPxeBoot=Auto PwrSupplyReqOverride=Default ThermalConfig=OptimalCooling HwPrefetcher=Enabled AdjSecPrefetch=Enabled DcuStreamPrefetcher=Enabled DcuIpPrefetcher=Enabled NodeInterleaving=Disabl
Shell> sysconfig -s uefibootorder=11 Change UEFI boot order successfully! sysconfig attributes For more information, see HP UEFI System Utilities User Guide for additional details for each attribute.
Table 12 Sysconfig Settings (continued) Setting Name Description Possible Values EmbeddedUefiShell Embedded UEFI Shell Enabled Disabled nl UefiShellBootOrder Add Embedded UEFI Shell to Boot Order Enabled Disabled nl UefiShellStartupScript UEFI Shell Script Auto-Start Enabled Disabled nl PowerProfile HP Power Profile BalancedPowerPerf — [Balanced Power and Performance] MinPower — [Minimum Power Usage] MaxPerf — [Maximum Performance] Custom nl nl nl PowerRegulator HP Power Regulator Dynamic
Table 12 Sysconfig Settings (continued) Setting Name Description MaxPcieSpeed Maximum PCI Express Speed Possible Values MaxSupported [Maximum Supported PcieGen1 [PCIe Generation 1.
Table 12 Sysconfig Settings (continued) Setting Name Description Possible Values TpmVisibility TPM Visibility Hidden Visible nl SerialConsolePort BIOS Serial Console Port Auto Disabled Physical [Physical Serial Port] Virtual [Virtual Serial Port] nl nl nl SerialConsoleEmulation BIOS Serial Console Emulation Mode Vt100 Ansi Vt100Plus [VT100+] nl nl SerialConsoleBaudRate BIOS Serial Console Baud Rate 9600 19200 57600 115200 nl nl nl EmsConsole EMS Console Disabled Com1Irq4 [COM 1; IRQ4;
Table 12 Sysconfig Settings (continued) Setting Name Description Possible Values nl IPv6ThenIPv4 [IPv6 then IPv4] PwrSupplyReqOverride Power Supply Requirements Override Default [Default Power Supply Requirements] 1Min2Redundant [Configure for 1 minimum required, 2 required for redundancy] 2Min3Redundant [Configure for 2 minimum required, 3 required for redundancy] 2Min4Redundant [Configure for 2 minimum required, 4 required for redundancy] 3Min4Redundant [Configure for 3 minimum required, 4 required f
Table 12 Sysconfig Settings (continued) Setting Name Description Possible Values ProcessorX2ApicSupport Processor X2Apic Support Enabled Disabled nl AcpiRasfSupport ACPI RASF Table Support Enabled Disabled nl AcpiRootBridgePxmPreferences ACPI Root Bridge PXM Preferences Enabled Disabled nl AssetTagProtection Asset Tag Protection Locked Unlocked nl SecureBoot Secure Boot Enabled Disabled nl AdvancedMemProtection Advanced Memory Protection AdvancedEcc [Advanced ECC Support] OnlineSpareAdvan
Table 12 Sysconfig Settings (continued) Setting Name Description Possible Values nl UtcP430 [UTC+04:30, Kabul] UtcP5 [UTC+05:00, Ekaterinburg, Islamabad, Karachi, Tashkent] UtcP530[UTC+05:30, Chennai, Kolkata, Mumbai, New Delhi] UtcP545 [UTC+05:45, Kathmandu] UtcP6 [UTC+06:00, Almaty, Novosibirsk, Astana, Dhaka] UtcP630 [UTC+06:30, Rangoon] UtcP7 [UTC+07:00, Bangkok, Hanio, Jakarta, Krasnoyarsk] UtcP8 [UTC+08:00, Taipei, Beijing, Chongqing, Hong Kong, Urumqi] UtcP9 [UTC+09:00, Osaka, Sapporo, Tokyo, Seou
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.
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.
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.
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 64 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.
cls set -v myfs 0 if exist FS0:\* then FS0: echo "FS0:\ Found!" 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.
sysconfig -import sysconfig_backup.
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 13 (page 68). EFI_SHELL_PROTOCOL provides shell services to UEFI applications.
Table 13 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.
Example fs0:\> /** @file This is an example Shell Application. Note that there are other ways to add a command to the shell. This example demonstrates just one. Copyright (c) 2013 Hewlett-Packard Development Company, L.P. This software contains information confidential and proprietary to Hewlett-Packard Company.
Print (L"ENVIRONMENT VARIABLES:\n"); Print (L"\n"); // // Sample to get and display all environment variables // while (*ConstEnvNameList != CHAR_NULL){ Value = UefiShellProtocol->GetEnv (ConstEnvNameList); Print (L"%8s = %s\n", ConstEnvNameList, Value); ConstEnvNameList += StrLen (ConstEnvNameList)+1; } } return EFI_SUCCESS; } Sample Shell scripts 71
5 UEFI Shell command status codes Table 14 (page 72) lists the possible status codes displayed by the UEFI Shell when you issue a command. Codes vary depending on the command. Table 14 UEFI Shell command status codes 72 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.
6 Support and other resources Contacting HP For worldwide technical support information, see the HP Support Center: http://www.hp.
Table 15 Document conventions (continued) Convention Element Blue, underlined text: http://www.hp.
from you, an authorized HP Channel Partner can also view your IT environment remotely by using HP Insight Online. For more information, see the following documents on the HP website (http://www.hp.
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 (docsfeedback@hp.com). Include the document title and part number, version number, or the URL when submitting your feedback.
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 Init
Index A accessing a file system, 20 accessing the UEFI Shell, 5 accessing the UEFI shell from a serial console connection, 11 application APIs, 68 B I invoking scripts, 65 boot order list, 8 booting to the UEFI Shell, 10 M manually invoking a Shell script, 65 C changing the UEFI boot order, 9 command line completion, 13 key, 13 command line help, 17 command line syntax, 13 commands and capabilities, 5 confirmation prompt, 16 contacting HP, 73 controlling command output, 14 conventions document, 73 text
Status code meanings, 72 UEFI Shell command status codes status codes, 72 UEFI Shell commands, 20 alias, 20 attrib, 21 cd, 22 cls, 23 comp, 24 cp, 25 date, 26 dblk, 27 devices, 28 devtree, 29 dh, 30 dh details, 31 dmem, 31 drivers, 32 eco, 33 edit, 34 eficompress, 34 efidecompress, 35 exit, 35 fwupdate, 35 getmtc, 36 goto, 36 help, 36 ls file information, 40 ls volume information, 39 ls/dir, 37 map, 40 map details, 41 memmap, 41 memmap details, 43 mkdir, 43 mode, 43 mv, 44 openinfo, 45 parse, 45 pause, 45 p