;
Next: acpi, Up: Command-line and menu entry commands [Contents][Index]
[
expression ]
Alias for test expression
(see test).
Next: authenticate, Previous: [, Up: Command-line and menu entry commands [Contents][Index]
Modern BIOS systems normally implement the Advanced Configuration and Power Interface (ACPI), and define various tables that describe the interface between an ACPI-compliant operating system and the firmware. In some cases, the tables provided by default only work well with certain operating systems, and it may be necessary to replace some of them.
Normally, this command will replace the Root System Description Pointer (RSDP) in the Extended BIOS Data Area to point to the new tables. If the --no-ebda option is used, the new tables will be known only to GRUB, but may be used by GRUB’s EFI emulation.
Next: background_color, Previous: acpi, Up: Command-line and menu entry commands [Contents][Index]
Check whether user is in userlist or listed in the value of variable ‘superusers’. See see superusers for valid user list format. If ‘superusers’ is empty, this command returns true. See Security.
Next: background_image, Previous: authenticate, Up: Command-line and menu entry commands [Contents][Index]
Set background color for active terminal. For valid color specifications see see Colors. Background color can be changed only when using ‘gfxterm’ for terminal output.
This command sets color of empty areas without text. Text background color is controlled by environment variables color_normal, color_highlight, menu_color_normal, menu_color_highlight. See Special environment variables.
Next: badram, Previous: background_color, Up: Command-line and menu entry commands [Contents][Index]
Load background image for active terminal from file. Image is stretched to fill up entire screen unless option --mode ‘normal’ is given. Without arguments remove currently loaded background image. Background image can be changed only when using ‘gfxterm’ for terminal output.
Next: blocklist, Previous: background_image, Up: Command-line and menu entry commands [Contents][Index]
Filter out bad RAM.
This command notifies the memory manager that specified regions of RAM ought to be filtered out (usually, because they’re damaged). This remains in effect after a payload kernel has been loaded by GRUB, as long as the loaded kernel obtains its memory map from GRUB. Kernels that support this include Linux, GNU Mach, the kernel of FreeBSD and Multiboot kernels in general.
Syntax is the same as provided by the Memtest86+ utility: a list of address/mask pairs. Given a page-aligned address and a base address / mask pair, if all the bits of the page-aligned address that are enabled by the mask match with the base address, it means this page is to be filtered. This syntax makes it easy to represent patterns that are often result of memory damage, due to physical distribution of memory cells.
Next: boot, Previous: badram, Up: Command-line and menu entry commands [Contents][Index]
Print a block list (see Block list syntax) for file.
Next: cat, Previous: blocklist, Up: Command-line and menu entry commands [Contents][Index]
Boot the OS or chain-loader which has been loaded. Only necessary if running the fully interactive command-line (it is implicit at the end of a menu entry).
Next: chainloader, Previous: boot, Up: Command-line and menu entry commands [Contents][Index]
Display the contents of the file file. This command may be useful to remind you of your OS’s root partition:
grub> cat /etc/fstab
If the --dos option is used, then carriage return / new line pairs will be displayed as a simple new line. Otherwise, the carriage return will be displayed as a control character (‘<d>’) to make it easier to see when boot problems are caused by a file formatted using DOS-style line endings.
Next: clear, Previous: cat, Up: Command-line and menu entry commands [Contents][Index]
Load file as a chain-loader. Like any other file loaded by the filesystem code, it can use the blocklist notation (see Block list syntax) to grab the first sector of the current partition with ‘+1’. If you specify the option --force, then load file forcibly, whether it has a correct signature or not. This is required when you want to load a defective boot loader, such as SCO UnixWare 7.1.
Next: cmosclean, Previous: chainloader, Up: Command-line and menu entry commands [Contents][Index]
Clear the screen.
Next: cmosdump, Previous: clear, Up: Command-line and menu entry commands [Contents][Index]
Clear value of bit in CMOS at location byte:bit. This command is available only on platforms that support CMOS.
Next: cmostest, Previous: cmosclean, Up: Command-line and menu entry commands [Contents][Index]
Dump full CMOS contents as hexadecimal values. This command is available only on platforms that support CMOS.
Next: cmp, Previous: cmosdump, Up: Command-line and menu entry commands [Contents][Index]
Test value of bit in CMOS at location byte:bit. Exit status is zero if bit is set, non zero otherwise. This command is available only on platforms that support CMOS.
Next: configfile, Previous: cmostest, Up: Command-line and menu entry commands [Contents][Index]
Compare the file file1 with the file file2. If they differ in size, print the sizes like this:
Differ in size: 0x1234 [foo], 0x4321 [bar]
If the sizes are equal but the bytes at an offset differ, then print the bytes like this:
Differ at the offset 777: 0xbe [foo], 0xef [bar]
If they are completely identical, nothing will be printed.
Next: cpuid, Previous: cmp, Up: Command-line and menu entry commands [Contents][Index]
Load file as a configuration file. If file defines any menu
entries, then show a menu containing them immediately. Any environment
variable changes made by the commands in file will not be preserved
after configfile
returns.
Next: crc, Previous: configfile, Up: Command-line and menu entry commands [Contents][Index]
Check for CPU features. This command is only available on x86 systems.
With the -l option, return true if the CPU supports long mode (64-bit).
If invoked without options, this command currently behaves as if it had been invoked with -l. This may change in the future.
Next: cryptomount, Previous: cpuid, Up: Command-line and menu entry commands [Contents][Index]
Alias for hashsum --hash crc32 arg …
. See command hashsum
(see hashsum) for full description.
Next: date, Previous: crc, Up: Command-line and menu entry commands [Contents][Index]
Setup access to encrypted device. If necessary, passphrase is requested interactively. Option device configures specific grub device (see Naming convention); option -u uuid configures device with specified uuid; option -a configures all detected encrypted devices; option -b configures all geli containers that have boot flag set.
GRUB suports devices encrypted using LUKS and geli. Note that necessary modules (luks and geli) have to be loaded manually before this command can be used.
Next: devicetree, Previous: cryptomount, Up: Command-line and menu entry commands [Contents][Index]
With no arguments, print the current date and time.
Otherwise, take the current date and time, change any elements specified as arguments, and set the result as the new date and time. For example, ‘date 01-01’ will set the current month and day to January 1, but leave the year, hour, minute, and second unchanged.
Next: distrust, Previous: date, Up: Command-line and menu entry commands [Contents][Index]
Load a device tree blob (.dtb) from a filesystem, for later use by a Linux kernel. Does not perform merging with any device tree supplied by firmware, but rather replaces it completely. GNU/Linux.
Next: drivemap, Previous: devicetree, Up: Command-line and menu entry commands [Contents][Index]
Remove public key pubkey_id from GRUB’s keyring of trusted keys.
pubkey_id is the last four bytes (eight hexadecimal digits) of
the GPG v4 key id, which is also the output of list_trusted
(see list_trusted). Outside of GRUB, the key id can be obtained
using gpg --fingerprint
).
These keys are used to validate signatures when environment variable
check_signatures
is set to enforce
(see check_signatures), and by some invocations of
verify_detached
(see verify_detached). See Using digital signatures, for more information.
Next: echo, Previous: distrust, Up: Command-line and menu entry commands [Contents][Index]
Without options, map the drive from_drive to the drive to_drive. This is necessary when you chain-load some operating systems, such as DOS, if such an OS resides at a non-first drive. For convenience, any partition suffix on the drive is ignored, so you can safely use ${root} as a drive specification.
With the -s option, perform the reverse mapping as well, swapping the two drives.
With the -l option, list the current mappings.
With the -r option, reset all mappings to the default values.
For example:
drivemap -s (hd0) (hd1)
Next: eval, Previous: drivemap, Up: Command-line and menu entry commands [Contents][Index]
Display the requested text and, unless the -n option is used, a trailing new line. If there is more than one string, they are separated by spaces in the output. As usual in GRUB commands, variables may be substituted using ‘${var}’.
The -e option enables interpretation of backslash escapes. The following sequences are recognised:
\\
backslash
\a
alert (BEL)
\c
suppress trailing new line
\f
form feed
\n
new line
\r
carriage return
\t
horizontal tab
\v
vertical tab
When interpreting backslash escapes, backslash followed by any other character will print that character.
Next: export, Previous: echo, Up: Command-line and menu entry commands [Contents][Index]
Concatenate arguments together using single space as separator and evaluate result as sequence of GRUB commands.
Next: false, Previous: eval, Up: Command-line and menu entry commands [Contents][Index]
Export the environment variable envvar. Exported variables are visible
to subsidiary configuration files loaded using configfile
.
Next: gettext, Previous: export, Up: Command-line and menu entry commands [Contents][Index]
Do nothing, unsuccessfully. This is mainly useful in control constructs
such as if
and while
(see Shell-like scripting).
Next: gptsync, Previous: false, Up: Command-line and menu entry commands [Contents][Index]