Mini Shell

Direktori : /usr/share/doc/grub2-common/
Upload File :
Current File : //usr/share/doc/grub2-common/grub.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This manual is for GNU GRUB (version 2.06,
2 October 2024).

Copyright (C) 1999,2000,2001,2002,2004,2006,2008,2009,2010,2011,2012,2013 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections. -->
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>GNU GRUB Manual 2.06</title>

<meta name="description" content="GNU GRUB Manual 2.06">
<meta name="keywords" content="GNU GRUB Manual 2.06">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="#Top" rel="start" title="Top">
<link href="#Index" rel="index" title="Index">
<link href="#SEC_Contents" rel="contents" title="Table of Contents">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<h1 class="settitle" align="center">GNU GRUB Manual 2.06</h1>






<span id="SEC_Contents"></span>
<h2 class="contents-heading">Table of Contents</h2>

<div class="contents">

<ul class="no-bullet">
  <li><a id="toc-Introduction-to-GRUB" href="#Introduction">1 Introduction to GRUB</a>
  <ul class="no-bullet">
    <li><a id="toc-Overview-1" href="#Overview">1.1 Overview</a></li>
    <li><a id="toc-History-of-GRUB" href="#History">1.2 History of GRUB</a></li>
    <li><a id="toc-Differences-from-previous-versions" href="#Changes-from-GRUB-Legacy">1.3 Differences from previous versions</a></li>
    <li><a id="toc-GRUB-features" href="#Features">1.4 GRUB features</a></li>
    <li><a id="toc-The-role-of-a-boot-loader" href="#Role-of-a-boot-loader">1.5 The role of a boot loader</a></li>
  </ul></li>
  <li><a id="toc-Naming-convention-1" href="#Naming-convention">2 Naming convention</a></li>
  <li><a id="toc-OS_002dspecific-notes-about-grub-tools-1" href="#OS_002dspecific-notes-about-grub-tools">3 OS-specific notes about grub tools</a></li>
  <li><a id="toc-Installation-1" href="#Installation">4 Installation</a>
  <ul class="no-bullet">
    <li><a id="toc-Installing-GRUB-using-grub2_002dinstall-1" href="#Installing-GRUB-using-grub2_002dinstall">4.1 Installing GRUB using grub2-install</a></li>
    <li><a id="toc-Making-a-GRUB-bootable-CD_002dROM-1" href="#Making-a-GRUB-bootable-CD_002dROM">4.2 Making a GRUB bootable CD-ROM</a></li>
    <li><a id="toc-The-map-between-BIOS-drives-and-OS-devices" href="#Device-map">4.3 The map between BIOS drives and OS devices</a></li>
    <li><a id="toc-BIOS-installation-1" href="#BIOS-installation">4.4 BIOS installation</a></li>
  </ul></li>
  <li><a id="toc-Booting-1" href="#Booting">5 Booting</a>
  <ul class="no-bullet">
    <li><a id="toc-How-to-boot-operating-systems" href="#General-boot-methods">5.1 How to boot operating systems</a>
    <ul class="no-bullet">
      <li><a id="toc-How-to-boot-an-OS-directly-with-GRUB" href="#Loading-an-operating-system-directly">5.1.1 How to boot an OS directly with GRUB</a></li>
      <li><a id="toc-Kexec-with-grub2_002demu" href="#Kexec">5.1.2 Kexec with grub2-emu</a></li>
      <li><a id="toc-Chain_002dloading-an-OS" href="#Chain_002dloading">5.1.3 Chain-loading an OS</a></li>
    </ul></li>
    <li><a id="toc-Loopback-booting-1" href="#Loopback-booting">5.2 Loopback booting</a></li>
    <li><a id="toc-Booting-from-LVM-cache-logical-volume" href="#LVM-cache-booting">5.3 Booting from LVM cache logical volume</a></li>
    <li><a id="toc-Some-caveats-on-OS_002dspecific-issues" href="#OS_002dspecific-notes">5.4 Some caveats on OS-specific issues</a>
    <ul class="no-bullet">
      <li><a id="toc-GNU_002fHurd-1" href="#GNU_002fHurd">5.4.1 GNU/Hurd</a></li>
      <li><a id="toc-GNU_002fLinux-1" href="#GNU_002fLinux">5.4.2 GNU/Linux</a></li>
      <li><a id="toc-NetBSD-1" href="#NetBSD">5.4.3 NetBSD</a></li>
      <li><a id="toc-DOS_002fWindows-1" href="#DOS_002fWindows">5.4.4 DOS/Windows</a></li>
    </ul></li>
  </ul></li>
  <li><a id="toc-Writing-your-own-configuration-file" href="#Configuration">6 Writing your own configuration file</a>
  <ul class="no-bullet">
    <li><a id="toc-Simple-configuration-handling" href="#Simple-configuration">6.1 Simple configuration handling</a></li>
    <li><a id="toc-Root-Identifcation-Heuristics-1" href="#Root-Identifcation-Heuristics">6.2 Root Identifcation Heuristics</a></li>
    <li><a id="toc-Writing-full-configuration-files-directly" href="#Shell_002dlike-scripting">6.3 Writing full configuration files directly</a></li>
    <li><a id="toc-Multi_002dboot-manual-config-1" href="#Multi_002dboot-manual-config">6.4 Multi-boot manual config</a></li>
    <li><a id="toc-Embedding-a-configuration-file-into-GRUB" href="#Embedded-configuration">6.5 Embedding a configuration file into GRUB</a></li>
  </ul></li>
  <li><a id="toc-Theme-file-format-1" href="#Theme-file-format">7 Theme file format</a>
  <ul class="no-bullet">
    <li><a id="toc-Introduction-1" href="#Introduction-1">7.1 Introduction</a></li>
    <li><a id="toc-Theme-Elements" href="#Theme-Elements">7.2 Theme Elements</a>
    <ul class="no-bullet">
      <li><a id="toc-Colors" href="#Colors">7.2.1 Colors</a></li>
      <li><a id="toc-Fonts" href="#Fonts">7.2.2 Fonts</a></li>
      <li><a id="toc-Progress-Bar" href="#Progress-Bar">7.2.3 Progress Bar</a></li>
      <li><a id="toc-Circular-Progress-Indicator" href="#Circular-Progress-Indicator">7.2.4 Circular Progress Indicator</a></li>
      <li><a id="toc-Labels" href="#Labels">7.2.5 Labels</a></li>
      <li><a id="toc-Boot-Menu" href="#Boot-Menu">7.2.6 Boot Menu</a></li>
      <li><a id="toc-Styled-Boxes" href="#Styled-Boxes">7.2.7 Styled Boxes</a></li>
      <li><a id="toc-Creating-Styled-Box-Images" href="#Creating-Styled-Box-Images">7.2.8 Creating Styled Box Images</a></li>
    </ul></li>
    <li><a id="toc-Theme-File-Manual" href="#Theme-File-Manual">7.3 Theme File Manual</a>
    <ul class="no-bullet">
      <li><a id="toc-Global-Properties" href="#Global-Properties">7.3.1 Global Properties</a></li>
      <li><a id="toc-Format" href="#Format">7.3.2 Format</a></li>
      <li><a id="toc-Global-Property-List" href="#Global-Property-List">7.3.3 Global Property List</a></li>
      <li><a id="toc-Component-Construction" href="#Component-Construction">7.3.4 Component Construction</a></li>
      <li><a id="toc-Component-List" href="#Component-List">7.3.5 Component List</a></li>
      <li><a id="toc-Common-properties" href="#Common-properties">7.3.6 Common properties</a></li>
    </ul></li>
  </ul></li>
  <li><a id="toc-Booting-GRUB-from-the-network" href="#Network">8 Booting GRUB from the network</a></li>
  <li><a id="toc-Using-GRUB-via-a-serial-line" href="#Serial-terminal">9 Using GRUB via a serial line</a></li>
  <li><a id="toc-Using-GRUB-with-vendor-power_002don-keys" href="#Vendor-power_002don-keys">10 Using GRUB with vendor power-on keys</a></li>
  <li><a id="toc-GRUB-image-files" href="#Images">11 GRUB image files</a></li>
  <li><a id="toc-Core-image-size-limitation-1" href="#Core-image-size-limitation">12 Core image size limitation</a></li>
  <li><a id="toc-Filesystem-syntax-and-semantics" href="#Filesystem">13 Filesystem syntax and semantics</a>
  <ul class="no-bullet">
    <li><a id="toc-How-to-specify-devices" href="#Device-syntax">13.1 How to specify devices</a></li>
    <li><a id="toc-How-to-specify-files" href="#File-name-syntax">13.2 How to specify files</a></li>
    <li><a id="toc-How-to-specify-block-lists" href="#Block-list-syntax">13.3 How to specify block lists</a></li>
  </ul></li>
  <li><a id="toc-GRUB_0027s-user-interface" href="#Interface">14 GRUB&rsquo;s user interface</a>
  <ul class="no-bullet">
    <li><a id="toc-The-flexible-command_002dline-interface" href="#Command_002dline-interface">14.1 The flexible command-line interface</a></li>
    <li><a id="toc-The-simple-menu-interface" href="#Menu-interface">14.2 The simple menu interface</a></li>
    <li><a id="toc-Editing-a-menu-entry" href="#Menu-entry-editor">14.3 Editing a menu entry</a></li>
  </ul></li>
  <li><a id="toc-GRUB-environment-variables" href="#Environment">15 GRUB environment variables</a>
  <ul class="no-bullet">
    <li><a id="toc-Special-environment-variables-1" href="#Special-environment-variables">15.1 Special environment variables</a>
    <ul class="no-bullet">
      <li><a id="toc-biosnum-1" href="#biosnum">15.1.1 biosnum</a></li>
      <li><a id="toc-check_005fappended_005fsignatures-1" href="#check_005fappended_005fsignatures">15.1.2 check_appended_signatures</a></li>
      <li><a id="toc-check_005fsignatures-1" href="#check_005fsignatures">15.1.3 check_signatures</a></li>
      <li><a id="toc-chosen-1" href="#chosen">15.1.4 chosen</a></li>
      <li><a id="toc-cmdpath-1" href="#cmdpath">15.1.5 cmdpath</a></li>
      <li><a id="toc-color_005fhighlight-1" href="#color_005fhighlight">15.1.6 color_highlight</a></li>
      <li><a id="toc-color_005fnormal-1" href="#color_005fnormal">15.1.7 color_normal</a></li>
      <li><a id="toc-config_005fdirectory-1" href="#config_005fdirectory">15.1.8 config_directory</a></li>
      <li><a id="toc-config_005ffile-1" href="#config_005ffile">15.1.9 config_file</a></li>
      <li><a id="toc-debug-1" href="#debug">15.1.10 debug</a></li>
      <li><a id="toc-default-1" href="#default">15.1.11 default</a></li>
      <li><a id="toc-fallback-1" href="#fallback">15.1.12 fallback</a></li>
      <li><a id="toc-gfxmode-1" href="#gfxmode">15.1.13 gfxmode</a></li>
      <li><a id="toc-gfxpayload-1" href="#gfxpayload">15.1.14 gfxpayload</a></li>
      <li><a id="toc-gfxterm_005ffont-1" href="#gfxterm_005ffont">15.1.15 gfxterm_font</a></li>
      <li><a id="toc-grub_005fcpu-1" href="#grub_005fcpu">15.1.16 grub_cpu</a></li>
      <li><a id="toc-grub_005fplatform-1" href="#grub_005fplatform">15.1.17 grub_platform</a></li>
      <li><a id="toc-icondir-1" href="#icondir">15.1.18 icondir</a></li>
      <li><a id="toc-lang-1" href="#lang">15.1.19 lang</a></li>
      <li><a id="toc-locale_005fdir-1" href="#locale_005fdir">15.1.20 locale_dir</a></li>
      <li><a id="toc-menu_005fcolor_005fhighlight-1" href="#menu_005fcolor_005fhighlight">15.1.21 menu_color_highlight</a></li>
      <li><a id="toc-menu_005fcolor_005fnormal-1" href="#menu_005fcolor_005fnormal">15.1.22 menu_color_normal</a></li>
      <li><a id="toc-net_005f_003cinterface_003e_005fboot_005ffile-1" href="#net_005f_003cinterface_003e_005fboot_005ffile">15.1.23 net_<var>&lt;interface&gt;</var>_boot_file</a></li>
      <li><a id="toc-net_005f_003cinterface_003e_005fdhcp_005fserver_005fname-1" href="#net_005f_003cinterface_003e_005fdhcp_005fserver_005fname">15.1.24 net_<var>&lt;interface&gt;</var>_dhcp_server_name</a></li>
      <li><a id="toc-net_005f_003cinterface_003e_005fdomain-1" href="#net_005f_003cinterface_003e_005fdomain">15.1.25 net_<var>&lt;interface&gt;</var>_domain</a></li>
      <li><a id="toc-net_005f_003cinterface_003e_005fextensionspath-1" href="#net_005f_003cinterface_003e_005fextensionspath">15.1.26 net_<var>&lt;interface&gt;</var>_extensionspath</a></li>
      <li><a id="toc-net_005f_003cinterface_003e_005fhostname-1" href="#net_005f_003cinterface_003e_005fhostname">15.1.27 net_<var>&lt;interface&gt;</var>_hostname</a></li>
      <li><a id="toc-net_005f_003cinterface_003e_005fip-1" href="#net_005f_003cinterface_003e_005fip">15.1.28 net_<var>&lt;interface&gt;</var>_ip</a></li>
      <li><a id="toc-net_005f_003cinterface_003e_005fmac-1" href="#net_005f_003cinterface_003e_005fmac">15.1.29 net_<var>&lt;interface&gt;</var>_mac</a></li>
      <li><a id="toc-net_005f_003cinterface_003e_005fnext_005fserver-1" href="#net_005f_003cinterface_003e_005fnext_005fserver">15.1.30 net_<var>&lt;interface&gt;</var>_next_server</a></li>
      <li><a id="toc-net_005f_003cinterface_003e_005frootpath-1" href="#net_005f_003cinterface_003e_005frootpath">15.1.31 net_<var>&lt;interface&gt;</var>_rootpath</a></li>
      <li><a id="toc-net_005fdefault_005finterface-1" href="#net_005fdefault_005finterface">15.1.32 net_default_interface</a></li>
      <li><a id="toc-net_005fdefault_005fip-1" href="#net_005fdefault_005fip">15.1.33 net_default_ip</a></li>
      <li><a id="toc-net_005fdefault_005fmac-1" href="#net_005fdefault_005fmac">15.1.34 net_default_mac</a></li>
      <li><a id="toc-net_005fdefault_005fserver-1" href="#net_005fdefault_005fserver">15.1.35 net_default_server</a></li>
      <li><a id="toc-pager-1" href="#pager">15.1.36 pager</a></li>
      <li><a id="toc-prefix-1" href="#prefix">15.1.37 prefix</a></li>
      <li><a id="toc-pxe_005fblksize-1" href="#pxe_005fblksize">15.1.38 pxe_blksize</a></li>
      <li><a id="toc-pxe_005fdefault_005fgateway-1" href="#pxe_005fdefault_005fgateway">15.1.39 pxe_default_gateway</a></li>
      <li><a id="toc-pxe_005fdefault_005fserver-1" href="#pxe_005fdefault_005fserver">15.1.40 pxe_default_server</a></li>
      <li><a id="toc-root-1" href="#root">15.1.41 root</a></li>
      <li><a id="toc-superusers-1" href="#superusers">15.1.42 superusers</a></li>
      <li><a id="toc-theme-1" href="#theme">15.1.43 theme</a></li>
      <li><a id="toc-timeout-1" href="#timeout">15.1.44 timeout</a></li>
      <li><a id="toc-timeout_005fstyle-1" href="#timeout_005fstyle">15.1.45 timeout_style</a></li>
    </ul></li>
    <li><a id="toc-The-GRUB-environment-block" href="#Environment-block">15.2 The GRUB environment block</a></li>
  </ul></li>
  <li><a id="toc-The-list-of-available-commands" href="#Commands">16 The list of available commands</a>
  <ul class="no-bullet">
    <li><a id="toc-The-list-of-commands-for-the-menu-only" href="#Menu_002dspecific-commands">16.1 The list of commands for the menu only</a>
    <ul class="no-bullet">
      <li><a id="toc-menuentry-1" href="#menuentry">16.1.1 menuentry</a></li>
      <li><a id="toc-submenu-1" href="#submenu">16.1.2 submenu</a></li>
    </ul></li>
    <li><a id="toc-The-list-of-general-commands" href="#General-commands">16.2 The list of general commands</a>
    <ul class="no-bullet">
      <li><a id="toc-serial-1" href="#serial">16.2.1 serial</a></li>
      <li><a id="toc-terminal_005finput-1" href="#terminal_005finput">16.2.2 terminal_input</a></li>
      <li><a id="toc-terminal_005foutput-1" href="#terminal_005foutput">16.2.3 terminal_output</a></li>
      <li><a id="toc-terminfo-1" href="#terminfo">16.2.4 terminfo</a></li>
    </ul></li>
    <li><a id="toc-The-list-of-command_002dline-and-menu-entry-commands" href="#Command_002dline-and-menu-entry-commands">16.3 The list of command-line and menu entry commands</a>
    <ul class="no-bullet">
      <li><a id="toc-_005b-1" href="#g_t_005b">16.3.1 [</a></li>
      <li><a id="toc-acpi-1" href="#acpi">16.3.2 acpi</a></li>
      <li><a id="toc-authenticate-1" href="#authenticate">16.3.3 authenticate</a></li>
      <li><a id="toc-background_005fcolor-1" href="#background_005fcolor">16.3.4 background_color</a></li>
      <li><a id="toc-background_005fimage-1" href="#background_005fimage">16.3.5 background_image</a></li>
      <li><a id="toc-badram-1" href="#badram">16.3.6 badram</a></li>
      <li><a id="toc-blocklist-1" href="#blocklist">16.3.7 blocklist</a></li>
      <li><a id="toc-boot-1" href="#boot">16.3.8 boot</a></li>
      <li><a id="toc-cat-1" href="#cat">16.3.9 cat</a></li>
      <li><a id="toc-chainloader-1" href="#chainloader">16.3.10 chainloader</a></li>
      <li><a id="toc-clear-1" href="#clear">16.3.11 clear</a></li>
      <li><a id="toc-cmosclean-1" href="#cmosclean">16.3.12 cmosclean</a></li>
      <li><a id="toc-cmosdump-1" href="#cmosdump">16.3.13 cmosdump</a></li>
      <li><a id="toc-cmostest-1" href="#cmostest">16.3.14 cmostest</a></li>
      <li><a id="toc-cmp-1" href="#cmp">16.3.15 cmp</a></li>
      <li><a id="toc-configfile-1" href="#configfile">16.3.16 configfile</a></li>
      <li><a id="toc-cpuid-1" href="#cpuid">16.3.17 cpuid</a></li>
      <li><a id="toc-crc-1" href="#crc">16.3.18 crc</a></li>
      <li><a id="toc-cryptomount-1" href="#cryptomount">16.3.19 cryptomount</a></li>
      <li><a id="toc-cutmem-1" href="#cutmem">16.3.20 cutmem</a></li>
      <li><a id="toc-date-1" href="#date">16.3.21 date</a></li>
      <li><a id="toc-devicetree-1" href="#devicetree">16.3.22 devicetree</a></li>
      <li><a id="toc-distrust-1" href="#distrust">16.3.23 distrust</a></li>
      <li><a id="toc-distrust_005fcertificate-1" href="#distrust_005fcertificate">16.3.24 distrust_certificate</a></li>
      <li><a id="toc-drivemap-1" href="#drivemap">16.3.25 drivemap</a></li>
      <li><a id="toc-echo-1" href="#echo">16.3.26 echo</a></li>
      <li><a id="toc-eval-1" href="#eval">16.3.27 eval</a></li>
      <li><a id="toc-export-1" href="#export">16.3.28 export</a></li>
      <li><a id="toc-false-1" href="#false">16.3.29 false</a></li>
      <li><a id="toc-gettext-1" href="#gettext">16.3.30 gettext</a></li>
      <li><a id="toc-gptsync-1" href="#gptsync">16.3.31 gptsync</a></li>
      <li><a id="toc-halt-1" href="#halt">16.3.32 halt</a></li>
      <li><a id="toc-hashsum-1" href="#hashsum">16.3.33 hashsum</a></li>
      <li><a id="toc-help-1" href="#help">16.3.34 help</a></li>
      <li><a id="toc-initrd-1" href="#initrd">16.3.35 initrd</a></li>
      <li><a id="toc-initrd16-1" href="#initrd16">16.3.36 initrd16</a></li>
      <li><a id="toc-insmod-1" href="#insmod">16.3.37 insmod</a></li>
      <li><a id="toc-keystatus-1" href="#keystatus">16.3.38 keystatus</a></li>
      <li><a id="toc-linux-1" href="#linux">16.3.39 linux</a></li>
      <li><a id="toc-linux16-1" href="#linux16">16.3.40 linux16</a></li>
      <li><a id="toc-list_005fcertificates-1" href="#list_005fcertificates">16.3.41 list_certificates</a></li>
      <li><a id="toc-list_005fenv-1" href="#list_005fenv">16.3.42 list_env</a></li>
      <li><a id="toc-list_005ftrusted-1" href="#list_005ftrusted">16.3.43 list_trusted</a></li>
      <li><a id="toc-load_005fenv-1" href="#load_005fenv">16.3.44 load_env</a></li>
      <li><a id="toc-loadfont-1" href="#loadfont">16.3.45 loadfont</a></li>
      <li><a id="toc-loopback-1" href="#loopback">16.3.46 loopback</a></li>
      <li><a id="toc-ls-1" href="#ls">16.3.47 ls</a></li>
      <li><a id="toc-lsfonts-1" href="#lsfonts">16.3.48 lsfonts</a></li>
      <li><a id="toc-lsmod-1" href="#lsmod">16.3.49 lsmod</a></li>
      <li><a id="toc-md5sum-1" href="#md5sum">16.3.50 md5sum</a></li>
      <li><a id="toc-module-1" href="#module">16.3.51 module</a></li>
      <li><a id="toc-multiboot-1" href="#multiboot">16.3.52 multiboot</a></li>
      <li><a id="toc-nativedisk-1" href="#nativedisk">16.3.53 nativedisk</a></li>
      <li><a id="toc-normal-1" href="#normal">16.3.54 normal</a></li>
      <li><a id="toc-normal_005fexit-1" href="#normal_005fexit">16.3.55 normal_exit</a></li>
      <li><a id="toc-parttool-1" href="#parttool">16.3.56 parttool</a></li>
      <li><a id="toc-password-1" href="#password">16.3.57 password</a></li>
      <li><a id="toc-password_005fpbkdf2-1" href="#password_005fpbkdf2">16.3.58 password_pbkdf2</a></li>
      <li><a id="toc-play-1" href="#play">16.3.59 play</a></li>
      <li><a id="toc-probe-1" href="#probe">16.3.60 probe</a></li>
      <li><a id="toc-rdmsr-1" href="#rdmsr">16.3.61 rdmsr</a></li>
      <li><a id="toc-read-1" href="#read">16.3.62 read</a></li>
      <li><a id="toc-reboot-1" href="#reboot">16.3.63 reboot</a></li>
      <li><a id="toc-regexp-1" href="#regexp">16.3.64 regexp</a></li>
      <li><a id="toc-rmmod-1" href="#rmmod">16.3.65 rmmod</a></li>
      <li><a id="toc-save_005fenv-1" href="#save_005fenv">16.3.66 save_env</a></li>
      <li><a id="toc-search-1" href="#search">16.3.67 search</a></li>
      <li><a id="toc-sendkey-1" href="#sendkey">16.3.68 sendkey</a></li>
      <li><a id="toc-set-1" href="#set">16.3.69 set</a></li>
      <li><a id="toc-sha1sum-1" href="#sha1sum">16.3.70 sha1sum</a></li>
      <li><a id="toc-sha256sum-1" href="#sha256sum">16.3.71 sha256sum</a></li>
      <li><a id="toc-sha512sum-1" href="#sha512sum">16.3.72 sha512sum</a></li>
      <li><a id="toc-sleep-1" href="#sleep">16.3.73 sleep</a></li>
      <li><a id="toc-smbios-1" href="#smbios">16.3.74 smbios</a></li>
      <li><a id="toc-source-1" href="#source">16.3.75 source</a></li>
      <li><a id="toc-test-1" href="#test">16.3.76 test</a></li>
      <li><a id="toc-true-1" href="#true">16.3.77 true</a></li>
      <li><a id="toc-trust-1" href="#trust">16.3.78 trust</a></li>
      <li><a id="toc-trust_005fcertificate-1" href="#trust_005fcertificate">16.3.79 trust_certificate</a></li>
      <li><a id="toc-unset-1" href="#unset">16.3.80 unset</a></li>
      <li><a id="toc-verify_005fappended-1" href="#verify_005fappended">16.3.81 verify_appended</a></li>
      <li><a id="toc-verify_005fdetached-1" href="#verify_005fdetached">16.3.82 verify_detached</a></li>
      <li><a id="toc-videoinfo-1" href="#videoinfo">16.3.83 videoinfo</a></li>
      <li><a id="toc-wrmsr-1" href="#wrmsr">16.3.84 wrmsr</a></li>
      <li><a id="toc-xen_005fhypervisor-1" href="#xen_005fhypervisor">16.3.85 xen_hypervisor</a></li>
      <li><a id="toc-xen_005fmodule-1" href="#xen_005fmodule">16.3.86 xen_module</a></li>
    </ul></li>
    <li><a id="toc-The-list-of-networking-commands" href="#Networking-commands">16.4 The list of networking commands</a>
    <ul class="no-bullet">
      <li><a id="toc-net_005fadd_005faddr-1" href="#net_005fadd_005faddr">16.4.1 net_add_addr</a></li>
      <li><a id="toc-net_005fadd_005fdns-1" href="#net_005fadd_005fdns">16.4.2 net_add_dns</a></li>
      <li><a id="toc-net_005fadd_005froute-1" href="#net_005fadd_005froute">16.4.3 net_add_route</a></li>
      <li><a id="toc-net_005fbootp-1" href="#net_005fbootp">16.4.4 net_bootp</a></li>
      <li><a id="toc-net_005fdel_005faddr-1" href="#net_005fdel_005faddr">16.4.5 net_del_addr</a></li>
      <li><a id="toc-net_005fdel_005fdns-1" href="#net_005fdel_005fdns">16.4.6 net_del_dns</a></li>
      <li><a id="toc-net_005fdel_005froute-1" href="#net_005fdel_005froute">16.4.7 net_del_route</a></li>
      <li><a id="toc-net_005fdhcp-1" href="#net_005fdhcp">16.4.8 net_dhcp</a></li>
      <li><a id="toc-net_005fbootp6-1" href="#net_005fbootp6">16.4.9 net_bootp6</a></li>
      <li><a id="toc-net_005fget_005fdhcp_005foption-1" href="#net_005fget_005fdhcp_005foption">16.4.10 net_get_dhcp_option</a></li>
      <li><a id="toc-net_005fipv6_005fautoconf-1" href="#net_005fipv6_005fautoconf">16.4.11 net_ipv6_autoconf</a></li>
      <li><a id="toc-net_005fls_005faddr-1" href="#net_005fls_005faddr">16.4.12 net_ls_addr</a></li>
      <li><a id="toc-net_005fls_005fcards-1" href="#net_005fls_005fcards">16.4.13 net_ls_cards</a></li>
      <li><a id="toc-net_005fls_005fdns-1" href="#net_005fls_005fdns">16.4.14 net_ls_dns</a></li>
      <li><a id="toc-net_005fls_005froutes-1" href="#net_005fls_005froutes">16.4.15 net_ls_routes</a></li>
      <li><a id="toc-net_005fnslookup-1" href="#net_005fnslookup">16.4.16 net_nslookup</a></li>
    </ul></li>
  </ul></li>
  <li><a id="toc-Internationalisation-1" href="#Internationalisation">17 Internationalisation</a>
  <ul class="no-bullet">
    <li><a id="toc-Charset" href="#Charset">17.1 Charset</a></li>
    <li><a id="toc-Filesystems" href="#Filesystems">17.2 Filesystems</a></li>
    <li><a id="toc-Output-terminal" href="#Output-terminal">17.3 Output terminal</a></li>
    <li><a id="toc-Input-terminal" href="#Input-terminal">17.4 Input terminal</a></li>
    <li><a id="toc-Gettext" href="#Gettext">17.5 Gettext</a></li>
    <li><a id="toc-Regexp" href="#Regexp">17.6 Regexp</a></li>
    <li><a id="toc-Other" href="#Other">17.7 Other</a></li>
  </ul></li>
  <li><a id="toc-Security-1" href="#Security">18 Security</a>
  <ul class="no-bullet">
    <li><a id="toc-Authentication-and-authorisation-in-GRUB" href="#Authentication-and-authorisation">18.1 Authentication and authorisation in GRUB</a></li>
    <li><a id="toc-Using-GPG_002dstyle-digital-signatures-in-GRUB" href="#Using-GPG_002dstyle-digital-signatures">18.2 Using GPG-style digital signatures in GRUB</a></li>
    <li><a id="toc-Using-appended-signatures-in-GRUB" href="#Using-appended-signatures">18.3 Using appended signatures in GRUB</a></li>
    <li><a id="toc-UEFI-secure-boot-and-shim-support" href="#UEFI-secure-boot-and-shim">18.4 UEFI secure boot and shim support</a></li>
    <li><a id="toc-Embedded-information-for-generation-number-based-revocation" href="#Secure-Boot-Advanced-Targeting">18.5 Embedded information for generation number based revocation</a></li>
    <li><a id="toc-Measuring-boot-components" href="#Measured-Boot">18.6 Measuring boot components</a></li>
    <li><a id="toc-Lockdown-when-booting-on-a-secure-setup" href="#Lockdown">18.7 Lockdown when booting on a secure setup</a></li>
    <li><a id="toc-Signing-GRUB-itself-1" href="#Signing-GRUB-itself">18.8 Signing GRUB itself</a></li>
    <li><a id="toc-Signing-GRUB-for-UEFI-secure-boot" href="#Signing-GRUB-for-UEFI-secure-boot">18.9 Signing GRUB for UEFI secure boot</a></li>
    <li><a id="toc-Signing-GRUB-with-an-appended-signature" href="#Signing-GRUB-with-an-appended-signature">18.10 Signing GRUB with an appended signature</a></li>
  </ul></li>
  <li><a id="toc-Platform-limitations-1" href="#Platform-limitations">19 Platform limitations</a></li>
  <li><a id="toc-Outline" href="#Platform_002dspecific-operations">20 Outline</a></li>
  <li><a id="toc-Supported-boot-targets" href="#Supported-kernels">21 Supported boot targets</a>
  <ul class="no-bullet">
    <li><a id="toc-Boot-tests" href="#Boot-tests">21.1 Boot tests</a></li>
  </ul></li>
  <li><a id="toc-Error-messages-produced-by-GRUB" href="#Troubleshooting">22 Error messages produced by GRUB</a>
  <ul class="no-bullet">
    <li><a id="toc-GRUB-only-offers-a-rescue-shell-1" href="#GRUB-only-offers-a-rescue-shell">22.1 GRUB only offers a rescue shell</a></li>
    <li><a id="toc-Firmware-stalls-instead-of-booting-GRUB-1" href="#Firmware-stalls-instead-of-booting-GRUB">22.2 Firmware stalls instead of booting GRUB</a></li>
  </ul></li>
  <li><a id="toc-Invoking-grub2_002dinstall-1" href="#Invoking-grub2_002dinstall">23 Invoking grub2-install</a></li>
  <li><a id="toc-Invoking-grub2_002dmkconfig-1" href="#Invoking-grub2_002dmkconfig">24 Invoking grub2-mkconfig</a></li>
  <li><a id="toc-Invoking-grub2_002dmkpasswd_002dpbkdf2-1" href="#Invoking-grub2_002dmkpasswd_002dpbkdf2">25 Invoking grub2-mkpasswd-pbkdf2</a></li>
  <li><a id="toc-Invoking-grub2_002dmkrelpath-1" href="#Invoking-grub2_002dmkrelpath">26 Invoking grub2-mkrelpath</a></li>
  <li><a id="toc-Invoking-grub2_002dmkrescue-1" href="#Invoking-grub2_002dmkrescue">27 Invoking grub2-mkrescue</a></li>
  <li><a id="toc-Invoking-grub2_002dmount-1" href="#Invoking-grub2_002dmount">28 Invoking grub2-mount</a></li>
  <li><a id="toc-Invoking-grub2_002dprobe-1" href="#Invoking-grub2_002dprobe">29 Invoking grub2-probe</a></li>
  <li><a id="toc-Invoking-grub2_002dscript_002dcheck-1" href="#Invoking-grub2_002dscript_002dcheck">30 Invoking grub2-script-check</a></li>
  <li><a id="toc-How-to-obtain-and-build-GRUB" href="#Obtaining-and-Building-GRUB">Appendix A How to obtain and build GRUB</a></li>
  <li><a id="toc-Reporting-bugs-1" href="#Reporting-bugs">Appendix B Reporting bugs</a></li>
  <li><a id="toc-Where-GRUB-will-go" href="#Future">Appendix C Where GRUB will go</a></li>
  <li><a id="toc-Copying-This-Manual-1" href="#Copying-This-Manual">Appendix D Copying This Manual</a>
  <ul class="no-bullet">
    <li><a id="toc-GNU-Free-Documentation-License-1" href="#GNU-Free-Documentation-License">D.1 GNU Free Documentation License</a>
    <ul class="no-bullet">
      <li><a id="toc-ADDENDUM_003a-How-to-use-this-License-for-your-documents" href="#ADDENDUM_003a-How-to-use-this-License-for-your-documents">D.1.1 ADDENDUM: How to use this License for your documents</a></li>
    </ul></li>
  </ul></li>
  <li><a id="toc-Index-1" href="#Index" rel="index">Index</a></li>
</ul>
</div>



<span id="Top"></span><div class="header">
<p>
Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="GNU-GRUB-manual"></span><h1 class="top">GNU GRUB manual</h1>

<p>This is the documentation of GNU GRUB, the GRand Unified Bootloader,
a flexible and powerful boot loader program for a wide range of
architectures.
</p>
<p>This edition documents version 2.06.
</p>
<p>This manual is for GNU GRUB (version 2.06,
2 October 2024).
</p>
<p>Copyright &copy; 1999,2000,2001,2002,2004,2006,2008,2009,2010,2011,2012,2013 Free Software Foundation, Inc.
</p>
<blockquote>
<p>Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections.
</p></blockquote>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Introduction" accesskey="1">Introduction</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Capturing the spirit of GRUB
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Naming-convention" accesskey="2">Naming convention</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Names of your drives in GRUB
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#OS_002dspecific-notes-about-grub-tools" accesskey="3">OS-specific notes about grub tools</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
                                Some notes about OS-specific behaviour of GRUB
                                tools
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Installation" accesskey="4">Installation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Installing GRUB on your drive
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Booting" accesskey="5">Booting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to boot different operating systems
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Configuration" accesskey="6">Configuration</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Writing your own configuration file
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Theme-file-format" accesskey="7">Theme file format</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Format of GRUB theme files
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Network" accesskey="8">Network</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Downloading OS images from a network
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Serial-terminal" accesskey="9">Serial terminal</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Using GRUB via a serial line
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Vendor-power_002don-keys">Vendor power-on keys</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Changing GRUB behaviour on vendor power-on keys
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Images">Images</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">GRUB image files
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Core-image-size-limitation">Core image size limitation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">GRUB image files size limitations
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Filesystem">Filesystem</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Filesystem syntax and semantics
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Interface">Interface</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The menu and the command-line
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Environment">Environment</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">GRUB environment variables
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Commands">Commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The list of available builtin commands
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Internationalisation">Internationalisation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Topics relating to language support
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Security">Security</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authentication, authorisation, and signatures
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Platform-limitations">Platform limitations</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The list of platform-specific limitations
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Platform_002dspecific-operations">Platform-specific operations</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Platform-specific operations
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Supported-kernels">Supported kernels</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The list of supported kernels
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Troubleshooting">Troubleshooting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Error messages produced by GRUB
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Invoking-grub2_002dinstall">Invoking grub2-install</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to use the GRUB installer
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Invoking-grub2_002dmkconfig">Invoking grub2-mkconfig</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Generate a GRUB configuration file
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Invoking-grub2_002dmkpasswd_002dpbkdf2">Invoking grub2-mkpasswd-pbkdf2</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
                                Generate GRUB password hashes
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Invoking-grub2_002dmkrelpath">Invoking grub2-mkrelpath</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Make system path relative to its root
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Invoking-grub2_002dmkrescue">Invoking grub2-mkrescue</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Make a GRUB rescue image
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Invoking-grub2_002dmount">Invoking grub2-mount</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Mount a file system using GRUB
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Invoking-grub2_002dprobe">Invoking grub2-probe</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Probe device information for GRUB
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Invoking-grub2_002dscript_002dcheck">Invoking grub2-script-check</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Check GRUB script file for syntax errors
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Obtaining-and-Building-GRUB">Obtaining and Building GRUB</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to obtain and build GRUB
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Reporting-bugs">Reporting bugs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Where you should send a bug report
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Future">Future</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Some future plans on GRUB
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Copying-This-Manual">Copying This Manual</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Copying This Manual
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Index" rel="index">Index</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr>
<span id="Introduction"></span><div class="header">
<p>
Next: <a href="#Naming-convention" accesskey="n" rel="next">Naming convention</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Introduction-to-GRUB"></span><h2 class="chapter">1 Introduction to GRUB</h2>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Overview" accesskey="1">Overview</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What exactly GRUB is and how to use it
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#History" accesskey="2">History</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">From maggot to house fly
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Changes-from-GRUB-Legacy" accesskey="3">Changes from GRUB Legacy</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Differences from previous versions
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Features" accesskey="4">Features</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">GRUB features
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Role-of-a-boot-loader" accesskey="5">Role of a boot loader</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The role of a boot loader
</td></tr>
</table>


<hr>
<span id="Overview"></span><div class="header">
<p>
Next: <a href="#History" accesskey="n" rel="next">History</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Overview-1"></span><h3 class="section">1.1 Overview</h3>

<p>Briefly, a <em>boot loader</em> is the first software program that runs when
a computer starts.  It is responsible for loading and transferring
control to an operating system <em>kernel</em> software (such as Linux or
GNU Mach).  The kernel, in turn, initializes the rest of the operating
system (e.g. a GNU system).
</p>
<p>GNU GRUB is a very powerful boot loader, which can load a wide variety
of free operating systems, as well as proprietary operating systems with
chain-loading<a id="DOCF1" href="#FOOT1"><sup>1</sup></a>. GRUB is designed to
address the complexity of booting a personal computer; both the
program and this manual are tightly bound to that computer platform,
although porting to other platforms may be addressed in the future.
</p>
<p>One of the important features in GRUB is flexibility; GRUB understands
filesystems and kernel executable formats, so you can load an arbitrary
operating system the way you like, without recording the physical
position of your kernel on the disk. Thus you can load the kernel
just by specifying its file name and the drive and partition where the
kernel resides.
</p>
<p>When booting with GRUB, you can use either a command-line interface
(see <a href="#Command_002dline-interface">Command-line interface</a>), or a menu interface (see <a href="#Menu-interface">Menu interface</a>). Using the command-line interface, you type the drive
specification and file name of the kernel manually. In the menu
interface, you just select an OS using the arrow keys. The menu is
based on a configuration file which you prepare beforehand
(see <a href="#Configuration">Configuration</a>). While in the menu, you can switch to the
command-line mode, and vice-versa. You can even edit menu entries
before using them.
</p>
<p>In the following chapters, you will learn how to specify a drive, a
partition, and a file name (see <a href="#Naming-convention">Naming convention</a>) to GRUB, how to
install GRUB on your drive (see <a href="#Installation">Installation</a>), and how to boot your
OSes (see <a href="#Booting">Booting</a>), step by step.
</p>

<hr>
<span id="History"></span><div class="header">
<p>
Next: <a href="#Changes-from-GRUB-Legacy" accesskey="n" rel="next">Changes from GRUB Legacy</a>, Previous: <a href="#Overview" accesskey="p" rel="prev">Overview</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="History-of-GRUB"></span><h3 class="section">1.2 History of GRUB</h3>

<p>GRUB originated in 1995 when Erich Boleyn was trying to boot the GNU
Hurd with the University of Utah&rsquo;s Mach 4 microkernel (now known as GNU
Mach).  Erich and Brian Ford designed the Multiboot Specification
(see <a href="https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Top">Motivation</a> in <cite>The Multiboot
Specification</cite>), because they were determined not to add to the large
number of mutually-incompatible PC boot methods.
</p>
<p>Erich then began modifying the FreeBSD boot loader so that it would
understand Multiboot. He soon realized that it would be a lot easier
to write his own boot loader from scratch than to keep working on the
FreeBSD boot loader, and so GRUB was born.
</p>
<p>Erich added many features to GRUB, but other priorities prevented him
from keeping up with the demands of its quickly-expanding user base. In
1999, Gordon Matzigkeit and Yoshinori K. Okuji adopted GRUB as an
official GNU package, and opened its development by making the latest
sources available via anonymous CVS. See <a href="#Obtaining-and-Building-GRUB">Obtaining and Building GRUB</a>, for more information.
</p>
<p>Over the next few years, GRUB was extended to meet many needs, but it
quickly became clear that its design was not keeping up with the extensions
being made to it, and we reached the point where it was very difficult to
make any further changes without breaking existing features.  Around 2002,
Yoshinori K. Okuji started work on PUPA (Preliminary Universal Programming
Architecture for GNU GRUB), aiming to rewrite the core of GRUB to make it
cleaner, safer, more robust, and more powerful.  PUPA was eventually renamed
to GRUB 2, and the original version of GRUB was renamed to GRUB Legacy.
Small amounts of maintenance continued to be done on GRUB Legacy, but the
last release (0.97) was made in 2005 and at the time of writing it seems
unlikely that there will be another.
</p>
<p>By around 2007, GNU/Linux distributions started to use GRUB 2 to limited
extents, and by the end of 2009 multiple major distributions were installing
it by default.
</p>

<hr>
<span id="Changes-from-GRUB-Legacy"></span><div class="header">
<p>
Next: <a href="#Features" accesskey="n" rel="next">Features</a>, Previous: <a href="#History" accesskey="p" rel="prev">History</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Differences-from-previous-versions"></span><h3 class="section">1.3 Differences from previous versions</h3>

<p>GRUB 2 is a rewrite of GRUB (see <a href="#History">History</a>), although it shares many
characteristics with the previous version, now known as GRUB Legacy.  Users
of GRUB Legacy may need some guidance to find their way around this new
version.
</p>
<ul>
<li> The configuration file has a new name (<samp>grub.cfg</samp> rather than
<samp>menu.lst</samp> or <samp>grub.conf</samp>), new syntax (see <a href="#Configuration">Configuration</a>) and
many new commands (see <a href="#Commands">Commands</a>).  Configuration cannot be copied over
directly, although most GRUB Legacy users should not find the syntax too
surprising.

</li><li> <samp>grub.cfg</samp> is typically automatically generated by
<code>grub2-mkconfig</code> (see <a href="#Simple-configuration">Simple configuration</a>).  This makes it
easier to handle versioned kernel upgrades.

</li><li> Partition numbers in GRUB device names now start at 1, not 0 (see <a href="#Naming-convention">Naming convention</a>).

</li><li> The configuration file is now written in something closer to a full
scripting language: variables, conditionals, and loops are available.

</li><li> A small amount of persistent storage is available across reboots, using the
<code>save_env</code> and <code>load_env</code> commands in GRUB and the
<code>grub2-editenv</code> utility.  This is not available in all configurations
(see <a href="#Environment-block">Environment block</a>).

</li><li> GRUB 2 has more reliable ways to find its own files and those of target
kernels on multiple-disk systems, and has commands (see <a href="#search">search</a>) to find
devices using file system labels or Universally Unique Identifiers (UUIDs).

</li><li> GRUB 2 is available for several other types of system in addition to the PC
BIOS systems supported by GRUB Legacy: PC EFI, PC coreboot, PowerPC, SPARC,
and MIPS Lemote Yeeloong are all supported.

</li><li> Many more file systems are supported, including but not limited to ext4,
HFS+, and NTFS.

</li><li> GRUB 2 can read files directly from LVM and RAID devices.

</li><li> A graphical terminal and a graphical menu system are available.

</li><li> GRUB 2&rsquo;s interface can be translated, including menu entry names.

</li><li> The image files (see <a href="#Images">Images</a>) that make up GRUB have been reorganised;
Stage 1, Stage 1.5, and Stage 2 are no more.

</li><li> GRUB 2 puts many facilities in dynamically loaded modules, allowing the core
image to be smaller, and allowing the core image to be built in more
flexible ways.
</li></ul>


<hr>
<span id="Features"></span><div class="header">
<p>
Next: <a href="#Role-of-a-boot-loader" accesskey="n" rel="next">Role of a boot loader</a>, Previous: <a href="#Changes-from-GRUB-Legacy" accesskey="p" rel="prev">Changes from GRUB Legacy</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="GRUB-features"></span><h3 class="section">1.4 GRUB features</h3>

<p>The primary requirement for GRUB is that it be compliant with the
<em>Multiboot Specification</em>, which is described in <a href="https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Top">Motivation</a> in <cite>The Multiboot Specification</cite>.
</p>
<p>The other goals, listed in approximate order of importance, are:
</p>
<ul>
<li> Basic functions must be straightforward for end-users.

</li><li> Rich functionality to support kernel experts and designers.

</li><li> Backward compatibility for booting FreeBSD, NetBSD, OpenBSD, and
Linux. Proprietary kernels (such as DOS, Windows NT, and OS/2) are
supported via a chain-loading function.
</li></ul>

<p>Except for specific compatibility modes (chain-loading and the Linux
<em>piggyback</em> format), all kernels will be started in much the same
state as in the Multiboot Specification. Only kernels loaded at 1 megabyte
or above are presently supported. Any attempt to load below that
boundary will simply result in immediate failure and an error message
reporting the problem.
</p>
<p>In addition to the requirements above, GRUB has the following features
(note that the Multiboot Specification doesn&rsquo;t require all the features
that GRUB supports):
</p>
<dl compact="compact">
<dt>Recognize multiple executable formats</dt>
<dd><p>Support many of the <em>a.out</em> variants plus <em>ELF</em>. Symbol
tables are also loaded.
</p>
</dd>
<dt>Support non-Multiboot kernels</dt>
<dd><p>Support many of the various free 32-bit kernels that lack Multiboot
compliance (primarily FreeBSD, NetBSD<a id="DOCF2" href="#FOOT2"><sup>2</sup></a>,
OpenBSD, and Linux). Chain-loading of other boot loaders is also
supported.
</p>
</dd>
<dt>Load multiples modules</dt>
<dd><p>Fully support the Multiboot feature of loading multiple modules.
</p>
</dd>
<dt>Load a configuration file</dt>
<dd><p>Support a human-readable text configuration file with preset boot
commands. You can also load another configuration file dynamically and
embed a preset configuration file in a GRUB image file. The list of
commands (see <a href="#Commands">Commands</a>) are a superset of those supported on the
command-line. An example configuration file is provided in
<a href="#Configuration">Configuration</a>.
</p>
</dd>
<dt>Provide a menu interface</dt>
<dd><p>A menu interface listing preset boot commands, with a programmable
timeout, is available. There is no fixed limit on the number of boot
entries, and the current implementation has space for several hundred.
</p>
</dd>
<dt>Have a flexible command-line interface</dt>
<dd><p>A fairly flexible command-line interface, accessible from the menu,
is available to edit any preset commands, or write a new boot command
set from scratch. If no configuration file is present, GRUB drops to
the command-line.
</p>
<p>The list of commands (see <a href="#Commands">Commands</a>) are a subset of those supported
for configuration files. Editing commands closely resembles the Bash
command-line (see <a href="features.html#Command-Line-Editing">Command Line Editing</a> in <cite>Bash Features</cite>), with <tt class="key">TAB</tt>-completion of commands,
devices, partitions, and files in a directory depending on context.
</p>
</dd>
<dt>Support multiple filesystem types</dt>
<dd><p>Support multiple filesystem types transparently, plus a useful explicit
blocklist notation. The currently supported filesystem types are <em>Amiga
Fast FileSystem (AFFS)</em>, <em>AtheOS fs</em>, <em>BeFS</em>,
<em>BtrFS</em> (including raid0, raid1, raid10, gzip and lzo),
<em>cpio</em> (little- and big-endian bin, odc and newc variants),
<em>Linux ext2/ext3/ext4</em>, <em>DOS FAT12/FAT16/FAT32</em>,
<em>exFAT</em>, <em>F2FS</em>, <em>HFS</em>, <em>HFS+</em>,
<em>ISO9660</em> (including Joliet, Rock-ridge and multi-chunk files),
<em>JFS</em>, <em>Minix fs</em> (versions 1, 2 and 3), <em>nilfs2</em>,
<em>NTFS</em> (including compression), <em>ReiserFS</em>, <em>ROMFS</em>,
<em>Amiga Smart FileSystem (SFS)</em>, <em>Squash4</em>, <em>tar</em>, <em>UDF</em>,
<em>BSD UFS/UFS2</em>, <em>XFS</em>, and <em>ZFS</em> (including lzjb, gzip,
zle, mirror, stripe, raidz1/2/3 and encryption in AES-CCM and AES-GCM).
See <a href="#Filesystem">Filesystem</a>, for more information.
</p>
</dd>
<dt>Support automatic decompression</dt>
<dd><p>Can decompress files which were compressed by <code>gzip</code> or
<code>xz</code><a id="DOCF3" href="#FOOT3"><sup>3</sup></a>. This function is both automatic and transparent to the user
(i.e. all functions operate upon the uncompressed contents of the specified
files). This greatly reduces a file size and loading time, a
particularly great benefit for floppies.<a id="DOCF4" href="#FOOT4"><sup>4</sup></a>
</p>
<p>It is conceivable that some kernel modules should be loaded in a
compressed state, so a different module-loading command can be specified
to avoid uncompressing the modules.
</p>
</dd>
<dt>Access data on any installed device</dt>
<dd><p>Support reading data from any or all floppies or hard disk(s) recognized
by the BIOS, independent of the setting of the root device.
</p>
</dd>
<dt>Be independent of drive geometry translations</dt>
<dd><p>Unlike many other boot loaders, GRUB makes the particular drive
translation irrelevant. A drive installed and running with one
translation may be converted to another translation without any adverse
effects or changes in GRUB&rsquo;s configuration.
</p>
</dd>
<dt>Detect all installed <small>RAM</small></dt>
<dd><p>GRUB can generally find all the installed <small>RAM</small> on a PC-compatible
machine. It uses an advanced BIOS query technique for finding all
memory regions. As described on the Multiboot Specification (see <a href="https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Top">Motivation</a> in <cite>The Multiboot
Specification</cite>), not all kernels make use of this information, but GRUB
provides it for those who do.
</p>
</dd>
<dt>Support Logical Block Address mode</dt>
<dd><p>In traditional disk calls (called <em>CHS mode</em>), there is a geometry
translation problem, that is, the BIOS cannot access over 1024
cylinders, so the accessible space is limited to at least 508 MB and to
at most 8GB. GRUB can&rsquo;t universally solve this problem, as there is no
standard interface used in all machines. However, several newer machines
have the new interface, Logical Block Address (<em>LBA</em>) mode. GRUB
automatically detects if LBA mode is available and uses it if
available. In LBA mode, GRUB can access the entire disk.
</p>
</dd>
<dt>Support network booting</dt>
<dd><p>GRUB is basically a disk-based boot loader but also has network
support. You can load OS images from a network by using the <em>TFTP</em>
protocol.
</p>
</dd>
<dt>Support remote terminals</dt>
<dd><p>To support computers with no console, GRUB provides remote terminal
support, so that you can control GRUB from a remote host. Only serial
terminal support is implemented at the moment.
</p></dd>
</dl>


<hr>
<span id="Role-of-a-boot-loader"></span><div class="header">
<p>
Previous: <a href="#Features" accesskey="p" rel="prev">Features</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-role-of-a-boot-loader"></span><h3 class="section">1.5 The role of a boot loader</h3>

<p>The following is a quotation from Gordon Matzigkeit, a GRUB fanatic:
</p>
<blockquote>
<p>Some people like to acknowledge both the operating system and kernel when
they talk about their computers, so they might say they use
&ldquo;GNU/Linux&rdquo; or &ldquo;GNU/Hurd&rdquo;.  Other people seem to think that the
kernel is the most important part of the system, so they like to call
their GNU operating systems &ldquo;Linux systems.&rdquo;
</p>
<p>I, personally, believe that this is a grave injustice, because the
<em>boot loader</em> is the most important software of all. I used to
refer to the above systems as either &ldquo;LILO&rdquo;<a id="DOCF5" href="#FOOT5"><sup>5</sup></a> or &ldquo;GRUB&rdquo;
systems.
</p>
<p>Unfortunately, nobody ever understood what I was talking about; now I
just use the word &ldquo;GNU&rdquo; as a pseudonym for GRUB.
</p>
<p>So, if you ever hear people talking about their alleged &ldquo;GNU&rdquo; systems,
remember that they are actually paying homage to the best boot loader
around&hellip; GRUB!
</p></blockquote>

<p>We, the GRUB maintainers, do not (usually) encourage Gordon&rsquo;s level of
fanaticism, but it helps to remember that boot loaders deserve
recognition.  We hope that you enjoy using GNU GRUB as much as we did
writing it.
</p>

<hr>
<span id="Naming-convention"></span><div class="header">
<p>
Next: <a href="#OS_002dspecific-notes-about-grub-tools" accesskey="n" rel="next">OS-specific notes about grub tools</a>, Previous: <a href="#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Naming-convention-1"></span><h2 class="chapter">2 Naming convention</h2>

<p>The device syntax used in GRUB is a wee bit different from what you may
have seen before in your operating system(s), and you need to know it so
that you can specify a drive/partition.
</p>
<p>Look at the following examples and explanations:
</p>
<div class="example">
<pre class="example">(fd0)
</pre></div>

<p>First of all, GRUB requires that the device name be enclosed with
&lsquo;<samp>(</samp>&rsquo; and &lsquo;<samp>)</samp>&rsquo;. The &lsquo;<samp>fd</samp>&rsquo; part means that it is a floppy
disk. The number &lsquo;<samp>0</samp>&rsquo; is the drive number, which is counted from
<em>zero</em>. This expression means that GRUB will use the whole floppy
disk.
</p>
<div class="example">
<pre class="example">(hd0,msdos2)
</pre></div>

<p>Here, &lsquo;<samp>hd</samp>&rsquo; means it is a hard disk drive. The first integer
&lsquo;<samp>0</samp>&rsquo; indicates the drive number, that is, the first hard disk,
the string &lsquo;<samp>msdos</samp>&rsquo; indicates the partition scheme, while
the second integer, &lsquo;<samp>2</samp>&rsquo;, indicates the partition number (or the
<small>PC</small> slice number in the BSD terminology). The partition numbers are
counted from <em>one</em>, not from zero (as was the case in previous
versions of GRUB). This expression means the second partition of the
first hard disk drive. In this case, GRUB uses one partition of the
disk, instead of the whole disk.
</p>
<div class="example">
<pre class="example">(hd0,msdos5)
</pre></div>

<p>This specifies the first <em>extended partition</em> of the first hard disk
drive. Note that the partition numbers for extended partitions are
counted from &lsquo;<samp>5</samp>&rsquo;, regardless of the actual number of primary
partitions on your hard disk.
</p>
<div class="example">
<pre class="example">(hd1,msdos1,bsd1)
</pre></div>

<p>This means the BSD &lsquo;<samp>a</samp>&rsquo; partition on first <small>PC</small> slice number
of the second hard disk.
</p>
<p>Of course, to actually access the disks or partitions with GRUB, you
need to use the device specification in a command, like &lsquo;<samp>set
root=(fd0)</samp>&rsquo; or &lsquo;<samp>parttool (hd0,msdos3) hidden-</samp>&rsquo;. To help you find out
which number specifies a partition you want, the GRUB command-line
(see <a href="#Command_002dline-interface">Command-line interface</a>) options have argument
completion. This means that, for example, you only need to type
</p>
<div class="example">
<pre class="example">set root=(
</pre></div>

<p>followed by a <tt class="key">TAB</tt>, and GRUB will display the list of drives,
partitions, or file names. So it should be quite easy to determine the
name of your target partition, even with minimal knowledge of the
syntax.
</p>
<p>Note that GRUB does <em>not</em> distinguish IDE from SCSI - it simply
counts the drive numbers from zero, regardless of their type. Normally,
any IDE drive number is less than any SCSI drive number, although that
is not true if you change the boot sequence by swapping IDE and SCSI
drives in your BIOS.
</p>
<p>Now the question is, how to specify a file? Again, consider an
example:
</p>
<div class="example">
<pre class="example">(hd0,msdos1)/vmlinuz
</pre></div>

<p>This specifies the file named &lsquo;<samp>vmlinuz</samp>&rsquo;, found on the first
partition of the first hard disk drive. Note that the argument
completion works with file names, too.
</p>
<p>That was easy, admit it. Now read the next chapter, to find out how to
actually install GRUB on your drive.
</p>
<hr>
<span id="OS_002dspecific-notes-about-grub-tools"></span><div class="header">
<p>
Next: <a href="#Installation" accesskey="n" rel="next">Installation</a>, Previous: <a href="#Naming-convention" accesskey="p" rel="prev">Naming convention</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="OS_002dspecific-notes-about-grub-tools-1"></span><h2 class="chapter">3 OS-specific notes about grub tools</h2>

<p>On OS which have device nodes similar to Unix-like OS GRUB tools use the
OS name. E.g. for GNU/Linux:
</p>
<div class="example">
<pre class="example"># <kbd>grub2-install /dev/sda</kbd>
</pre></div>

<p>On AROS we use another syntax. For volumes:
</p>
<div class="example">
<pre class="example">//:&lt;volume name&gt;
</pre></div>

<p>E.g.
</p>
<div class="example">
<pre class="example">//:DH0
</pre></div>

<p>For disks we use syntax:
</p><div class="example">
<pre class="example">//:&lt;driver name&gt;/unit/flags
</pre></div>

<p>E.g.
</p>
<div class="example">
<pre class="example"># <kbd>grub2-install //:ata.device/0/0</kbd>
</pre></div>

<p>On Windows we use UNC path. For volumes it&rsquo;s typically
</p>
<div class="example">
<pre class="example">\\?\Volume{&lt;GUID&gt;}
\\?\&lt;drive letter&gt;:
</pre></div>

<p>E.g.
</p>
<div class="example">
<pre class="example">\\?\Volume{17f34d50-cf64-4b02-800e-51d79c3aa2ff}
\\?\C:
</pre></div>


<p>For disks it&rsquo;s
</p>
<div class="example">
<pre class="example">\\?\PhysicalDrive&lt;number&gt;
</pre></div>

<p>E.g.
</p>
<div class="example">
<pre class="example"># <kbd>grub2-install \\?\PhysicalDrive0</kbd>
</pre></div>

<p>Beware that you may need to further escape the backslashes depending on your
shell.
</p>
<p>When compiled with cygwin support then cygwin drive names are automatically
when needed. E.g.
</p>
<div class="example">
<pre class="example"># <kbd>grub2-install /dev/sda</kbd>
</pre></div>

<hr>
<span id="Installation"></span><div class="header">
<p>
Next: <a href="#Booting" accesskey="n" rel="next">Booting</a>, Previous: <a href="#OS_002dspecific-notes-about-grub-tools" accesskey="p" rel="prev">OS-specific notes about grub tools</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Installation-1"></span><h2 class="chapter">4 Installation</h2>

<p>In order to install GRUB as your boot loader, you need to first
install the GRUB system and utilities under your UNIX-like operating
system (see <a href="#Obtaining-and-Building-GRUB">Obtaining and Building GRUB</a>). You can do this either
from the source tarball, or as a package for your OS.
</p>
<p>After you have done that, you need to install the boot loader on a
drive (floppy or hard disk) by using the utility
<code>grub2-install</code> (see <a href="#Invoking-grub2_002dinstall">Invoking grub2-install</a>) on a UNIX-like OS.
</p>
<p>GRUB comes with boot images, which are normally put in the directory
<samp>/usr/lib/grub/&lt;cpu&gt;-&lt;platform&gt;</samp> (for BIOS-based machines
<samp>/usr/lib/grub/i386-pc</samp>). Hereafter, the directory where GRUB images are
initially placed (normally <samp>/usr/lib/grub/&lt;cpu&gt;-&lt;platform&gt;</samp>) will be
called the <em>image directory</em>, and the directory where the boot
loader needs to find them (usually <samp>/boot</samp>) will be called
the <em>boot directory</em>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Installing-GRUB-using-grub2_002dinstall" accesskey="1">Installing GRUB using grub2-install</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Making-a-GRUB-bootable-CD_002dROM" accesskey="2">Making a GRUB bootable CD-ROM</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Device-map" accesskey="3">Device map</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#BIOS-installation" accesskey="4">BIOS installation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr>
<span id="Installing-GRUB-using-grub2_002dinstall"></span><div class="header">
<p>
Next: <a href="#Making-a-GRUB-bootable-CD_002dROM" accesskey="n" rel="next">Making a GRUB bootable CD-ROM</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Installing-GRUB-using-grub2_002dinstall-1"></span><h3 class="section">4.1 Installing GRUB using grub2-install</h3>

<p>For information on where GRUB should be installed on PC BIOS platforms,
see <a href="#BIOS-installation">BIOS installation</a>.
</p>
<p>In order to install GRUB under a UNIX-like OS (such
as <small>GNU</small>), invoke the program <code>grub2-install</code> (see <a href="#Invoking-grub2_002dinstall">Invoking grub2-install</a>) as the superuser (<em>root</em>).
</p>
<p>The usage is basically very simple. You only need to specify one
argument to the program, namely, where to install the boot loader. The
argument has to be either a device file (like &lsquo;<samp>/dev/hda</samp>&rsquo;).
For example, under Linux the following will install GRUB into the MBR
of the first IDE disk:
</p>
<div class="example">
<pre class="example"># <kbd>grub2-install /dev/sda</kbd>
</pre></div>

<p>Likewise, under GNU/Hurd, this has the same effect:
</p>
<div class="example">
<pre class="example"># <kbd>grub2-install /dev/hd0</kbd>
</pre></div>

<p>But all the above examples assume that GRUB should put images under
the <samp>/boot</samp> directory. If you want GRUB to put images under a directory
other than <samp>/boot</samp>, you need to specify the option
<samp>--boot-directory</samp>. The typical usage is that you create a GRUB
boot floppy with a filesystem. Here is an example:
</p>
<div class="example">
<pre class="example"># <kbd>mke2fs /dev/fd0</kbd>
# <kbd>mount -t ext2 /dev/fd0 /mnt</kbd>
# <kbd>mkdir /mnt/boot</kbd>
# <kbd>grub2-install --boot-directory=/mnt/boot /dev/fd0</kbd>
# <kbd>umount /mnt</kbd>
</pre></div>

<p>Some BIOSes have a bug of exposing the first partition of a USB drive as a
floppy instead of exposing the USB drive as a hard disk (they call it
&ldquo;USB-FDD&rdquo; boot). In such cases, you need to install like this:
</p>
<div class="example">
<pre class="example"># <kbd>losetup /dev/loop0 /dev/sdb1</kbd>
# <kbd>mount /dev/loop0 /mnt/usb</kbd>
# <kbd>grub2-install --boot-directory=/mnt/usb/bugbios --force --allow-floppy /dev/loop0</kbd>
</pre></div>

<p>This install doesn&rsquo;t conflict with standard install as long as they are in
separate directories.
</p>
<p>Note that <code>grub2-install</code> is actually just a shell script and the
real task is done by other tools such as <code>grub2-mkimage</code>. Therefore,
you may run those commands directly to install GRUB, without using
<code>grub2-install</code>. Don&rsquo;t do that, however, unless you are very familiar
with the internals of GRUB. Installing a boot loader on a running OS may be
extremely dangerous.
</p>
<p>On EFI systems for fixed disk install you have to mount EFI System Partition.
If you mount it at <samp>/boot/efi</samp> then you don&rsquo;t need any special arguments:
</p>
<div class="example">
<pre class="example"># <kbd>grub2-install</kbd>
</pre></div>

<p>Otherwise you need to specify where your EFI System partition is mounted:
</p>
<div class="example">
<pre class="example"># <kbd>grub2-install --efi-directory=/mnt/efi</kbd>
</pre></div>

<p>For removable installs you have to use <samp>--removable</samp> and specify both
<samp>--boot-directory</samp> and <samp>--efi-directory</samp>:
</p>
<div class="example">
<pre class="example"># <kbd>grub2-install --efi-directory=/mnt/usb --boot-directory=/mnt/usb/boot --removable</kbd>
</pre></div>

<hr>
<span id="Making-a-GRUB-bootable-CD_002dROM"></span><div class="header">
<p>
Next: <a href="#Device-map" accesskey="n" rel="next">Device map</a>, Previous: <a href="#Installing-GRUB-using-grub2_002dinstall" accesskey="p" rel="prev">Installing GRUB using grub2-install</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Making-a-GRUB-bootable-CD_002dROM-1"></span><h3 class="section">4.2 Making a GRUB bootable CD-ROM</h3>

<p>GRUB supports the <em>no emulation mode</em> in the El Torito
specification<a id="DOCF6" href="#FOOT6"><sup>6</sup></a>. This means that you can use the whole CD-ROM
from GRUB and you don&rsquo;t have to make a floppy or hard disk image file,
which can cause compatibility problems.
</p>
<p>For booting from a CD-ROM, GRUB uses a special image called
<samp>cdboot.img</samp>, which is concatenated with <samp>core.img</samp>. The
<samp>core.img</samp> used for this should be built with at least the
&lsquo;<samp>iso9660</samp>&rsquo; and &lsquo;<samp>biosdisk</samp>&rsquo; modules. Your bootable CD-ROM will
usually also need to include a configuration file <samp>grub.cfg</samp> and some
other GRUB modules.
</p>
<p>To make a simple generic GRUB rescue CD, you can use the
<code>grub2-mkrescue</code> program (see <a href="#Invoking-grub2_002dmkrescue">Invoking grub2-mkrescue</a>):
</p>
<div class="example">
<pre class="example">$ <kbd>grub2-mkrescue -o grub.iso</kbd>
</pre></div>

<p>You will often need to include other files in your image. To do this, first
make a top directory for the bootable image, say, &lsquo;<samp>iso</samp>&rsquo;:
</p>
<div class="example">
<pre class="example">$ <kbd>mkdir iso</kbd>
</pre></div>

<p>Make a directory for GRUB:
</p>
<div class="example">
<pre class="example">$ <kbd>mkdir -p iso/boot/grub</kbd>
</pre></div>

<p>If desired, make the config file <samp>grub.cfg</samp> under <samp>iso/boot/grub</samp>
(see <a href="#Configuration">Configuration</a>), and copy any files and directories for the disc to the
directory <samp>iso/</samp>.
</p>
<p>Finally, make the image:
</p>
<div class="example">
<pre class="example">$ <kbd>grub2-mkrescue -o grub.iso iso</kbd>
</pre></div>

<p>This produces a file named <samp>grub.iso</samp>, which then can be burned
into a CD (or a DVD), or written to a USB mass storage device.
</p>
<p>The root device will be set up appropriately on entering your
<samp>grub.cfg</samp> configuration file, so you can refer to file names on the CD
without needing to use an explicit device name. This makes it easier to
produce rescue images that will work on both optical drives and USB mass
storage devices.
</p>

<hr>
<span id="Device-map"></span><div class="header">
<p>
Next: <a href="#BIOS-installation" accesskey="n" rel="next">BIOS installation</a>, Previous: <a href="#Making-a-GRUB-bootable-CD_002dROM" accesskey="p" rel="prev">Making a GRUB bootable CD-ROM</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-map-between-BIOS-drives-and-OS-devices"></span><h3 class="section">4.3 The map between BIOS drives and OS devices</h3>

<p>If the device map file exists, the GRUB utilities (<code>grub2-probe</code>,
etc.) read it to map BIOS drives to OS devices.  This file consists of lines
like this:
</p>
<div class="example">
<pre class="example">(<var>device</var>) <var>file</var>
</pre></div>

<p><var>device</var> is a drive specified in the GRUB syntax (see <a href="#Device-syntax">Device syntax</a>), and <var>file</var> is an OS file, which is normally a device file.
</p>
<p>Historically, the device map file was used because GRUB device names had to
be used in the configuration file, and they were derived from BIOS drive
numbers.  The map between BIOS drives and OS devices cannot always be
guessed correctly: for example, GRUB will get the order wrong if you
exchange the boot sequence between IDE and SCSI in your BIOS.
</p>
<p>Unfortunately, even OS device names are not always stable.  Modern versions
of the Linux kernel may probe drives in a different order from boot to boot,
and the prefix (<samp>/dev/hd*</samp> versus <samp>/dev/sd*</samp>) may change depending
on the driver subsystem in use.  As a result, the device map file required
frequent editing on some systems.
</p>
<p>GRUB avoids this problem nowadays by using UUIDs or file system labels when
generating <samp>grub.cfg</samp>, and we advise that you do the same for any
custom menu entries you write.  If the device map file does not exist, then
the GRUB utilities will assume a temporary device map on the fly.  This is
often good enough, particularly in the common case of single-disk systems.
</p>
<p>However, the device map file is not entirely obsolete yet, and it is
used for overriding when current environment is different from the one on boot.
Most common case is if you use a partition or logical volume as a disk for
virtual machine.  You can put any comments in the file if needed,
as the GRUB utilities assume that a line is just a comment if
the first character is &lsquo;<samp>#</samp>&rsquo;.
</p>

<hr>
<span id="BIOS-installation"></span><div class="header">
<p>
Previous: <a href="#Device-map" accesskey="p" rel="prev">Device map</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="BIOS-installation-1"></span><h3 class="section">4.4 BIOS installation</h3>

<span id="MBR"></span><h3 class="heading">MBR</h3>

<p>The partition table format traditionally used on PC BIOS platforms is called
the Master Boot Record (MBR) format; this is the format that allows up to
four primary partitions and additional logical partitions.  With this
partition table format, there are two ways to install GRUB: it can be
embedded in the area between the MBR and the first partition (called by
various names, such as the &quot;boot track&quot;, &quot;MBR gap&quot;, or &quot;embedding area&quot;, and
which is usually at least 1000 KiB), or the core image can be installed in a
file system and a list of the blocks that make it up can be stored in the
first sector of that partition.
</p>
<p>Modern tools usually leave MBR gap of at least 1023 KiB. This amount is
sufficient to cover most configurations. Hence this value is recommended
by the GRUB team.
</p>
<p>Historically many tools left only 31 KiB of space. This is not enough to
parse reliably difficult structures like Btrfs, ZFS, RAID or LVM, or to
use difficult disk access methods like ahci. Hence GRUB will warn if attempted
to install into small MBR gap except in a small number of configurations
that were grandfathered. The grandfathered config must:
</p>
<p>* use biosdisk as disk access module for <samp>/boot</samp>
* not use any additional partition maps to access <samp>/boot</samp>
* <samp>/boot</samp> must be on one of following filesystems:
   * AFFS, AFS, BFS, cpio, newc, odc, ext2/3/4, FAT, exFAT,
   F2FS, HFS, uncompressed HFS+, ISO9660, JFS, Minix, Minix2, Minix3, NILFS2,
   NTFS, ReiserFS, ROMFS, SFS, tar, UDF, UFS1, UFS2, XFS
</p>
<p>MBR gap has few technical problems.  There is no way to reserve space in
the embedding area with complete safety, and some proprietary software is
known to use it to make it difficult for users to work around licensing
restrictions. GRUB works it around by detecting sectors by other software and
avoiding them and protecting its own sectors using Reed-Solomon encoding.
</p>
<p>GRUB team recommends having MBR gap of at least 1000 KiB
</p>
<p>Should it be not possible GRUB has support for a fallback solution which is
heavily recommended against. Installing to a filesystem means that GRUB is
vulnerable to its blocks being moved around by filesystem features such as
tail packing, or even by aggressive fsck implementations, so this approach
is quite fragile; and this approach can only be used if the <samp>/boot</samp>
filesystem is on the same disk that the BIOS boots from, so that GRUB does
not have to rely on guessing BIOS drive numbers.
</p>
<p>The GRUB development team generally recommends embedding GRUB before the
first partition, unless you have special requirements.  You must ensure that
the first partition starts at least 1000 KiB (2000 sectors) from the start of
the disk; on modern disks, it is often a performance advantage to align
partitions on larger boundaries anyway, so the first partition might start 1
MiB from the start of the disk.
</p>
<span id="GPT"></span><h3 class="heading">GPT</h3>

<p>Some newer systems use the GUID Partition Table (GPT) format.  This was
specified as part of the Extensible Firmware Interface (EFI), but it can
also be used on BIOS platforms if system software supports it; for example,
GRUB and GNU/Linux can be used in this configuration.  With this format, it
is possible to reserve a whole partition for GRUB, called the BIOS Boot
Partition.  GRUB can then be embedded into that partition without the risk
of being overwritten by other software and without being contained in a
filesystem which might move its blocks around.
</p>
<p>When creating a BIOS Boot Partition on a GPT system, you should make sure
that it is at least 31 KiB in size.  (GPT-formatted disks are not usually
particularly small, so we recommend that you make it larger than the bare
minimum, such as 1 MiB, to allow plenty of room for growth.)  You must also
make sure that it has the proper partition type.  Using GNU Parted, you can
set this using a command such as the following:
</p>
<div class="example">
<pre class="example"># <kbd>parted /dev/<var>disk</var> set <var>partition-number</var> bios_grub on</kbd>
</pre></div>

<p>If you are using gdisk, set the partition type to &lsquo;<samp>0xEF02</samp>&rsquo;.  With
partitioning programs that require setting the GUID directly, it should be
&lsquo;<samp>21686148-6449-6e6f-744e656564454649</samp>&rsquo;.
</p>
<p><strong>Caution:</strong> Be very careful which partition you select!  When GRUB
finds a BIOS Boot Partition during installation, it will automatically
overwrite part of it.  Make sure that the partition does not contain any
other data.
</p>

<hr>
<span id="Booting"></span><div class="header">
<p>
Next: <a href="#Configuration" accesskey="n" rel="next">Configuration</a>, Previous: <a href="#Installation" accesskey="p" rel="prev">Installation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Booting-1"></span><h2 class="chapter">5 Booting</h2>

<p>GRUB can load Multiboot-compliant kernels in a consistent way,
but for some free operating systems you need to use some OS-specific
magic.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#General-boot-methods" accesskey="1">General boot methods</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to boot OSes with GRUB generally
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Loopback-booting" accesskey="2">Loopback booting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes on booting from loopbacks
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#LVM-cache-booting" accesskey="3">LVM cache booting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes on booting from LVM cache logical volume
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#OS_002dspecific-notes" accesskey="4">OS-specific notes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes on some operating systems
</td></tr>
</table>


<hr>
<span id="General-boot-methods"></span><div class="header">
<p>
Next: <a href="#Loopback-booting" accesskey="n" rel="next">Loopback booting</a>, Up: <a href="#Booting" accesskey="u" rel="up">Booting</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="How-to-boot-operating-systems"></span><h3 class="section">5.1 How to boot operating systems</h3>

<p>GRUB has three distinct boot methods: loading an operating system
directly, using kexec from userspace, and chainloading another
bootloader. Generally speaking, the first two are more desirable
because you don&rsquo;t need to install or maintain other boot loaders and
GRUB is flexible enough to load an operating system from an arbitrary
disk/partition. However, chainloading is sometimes required, as GRUB
doesn&rsquo;t support all existing operating systems natively.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Loading-an-operating-system-directly" accesskey="1">Loading an operating system directly</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Kexec" accesskey="2">Kexec</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Chain_002dloading" accesskey="3">Chain-loading</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr>
<span id="Loading-an-operating-system-directly"></span><div class="header">
<p>
Next: <a href="#Kexec" accesskey="n" rel="next">Kexec</a>, Up: <a href="#General-boot-methods" accesskey="u" rel="up">General boot methods</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="How-to-boot-an-OS-directly-with-GRUB"></span><h4 class="subsection">5.1.1 How to boot an OS directly with GRUB</h4>

<p>Multiboot (see <a href="https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Top">Motivation</a> in <cite>The Multiboot Specification</cite>) is the native format supported by GRUB.
For the sake of convenience, there is also support for Linux, FreeBSD,
NetBSD and OpenBSD. If you want to boot other operating systems, you
will have to chain-load them (see <a href="#Chain_002dloading">Chain-loading</a>).
</p>
<p>FIXME: this section is incomplete.
</p>
<ol>
<li> Run the command <code>boot</code> (see <a href="#boot">boot</a>).
</li></ol>

<p>However, DOS and Windows have some deficiencies, so you might have to
use more complicated instructions. See <a href="#DOS_002fWindows">DOS/Windows</a>, for more
information.
</p>

<hr>
<span id="Kexec"></span><div class="header">
<p>
Next: <a href="#Chain_002dloading" accesskey="n" rel="next">Chain-loading</a>, Previous: <a href="#Loading-an-operating-system-directly" accesskey="p" rel="prev">Loading an operating system directly</a>, Up: <a href="#General-boot-methods" accesskey="u" rel="up">General boot methods</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Kexec-with-grub2_002demu"></span><h4 class="subsection">5.1.2 Kexec with grub2-emu</h4>

<p>GRUB can be run in userspace by invoking the grub2-emu tool. It will
read all configuration scripts as if booting directly (see See <a href="#Loading-an-operating-system-directly">Loading an operating system directly</a>). With the <code>--kexec</code> flag, and
kexec(8) support from the operating system, the <code>linux</code> command
will directly boot the target image. For systems that lack working
systemctl(1) support for kexec, passing the <code>--kexec</code> flag twice
will fallback to invoking kexec(8) directly; note however that this
fallback may be unsafe outside read-only environments, as it does not
invoke shutdown machinery.
</p>

<hr>
<span id="Chain_002dloading"></span><div class="header">
<p>
Previous: <a href="#Kexec" accesskey="p" rel="prev">Kexec</a>, Up: <a href="#General-boot-methods" accesskey="u" rel="up">General boot methods</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Chain_002dloading-an-OS"></span><h4 class="subsection">5.1.3 Chain-loading an OS</h4>

<p>Operating systems that do not support Multiboot and do not have specific
support in GRUB (specific support is available for Linux, FreeBSD, NetBSD
and OpenBSD) must be chain-loaded, which involves loading another boot
loader and jumping to it in real mode.
</p>
<p>The <code>chainloader</code> command (see <a href="#chainloader">chainloader</a>) is used to set this
up.  It is normally also necessary to load some GRUB modules and set the
appropriate root device.  Putting this together, we get something like this,
for a Windows system on the first partition of the first hard disk:
</p>
<pre class="verbatim">menuentry &quot;Windows&quot; {
	insmod chain
	insmod ntfs
	set root=(hd0,1)
	chainloader +1
}
</pre>
<p>On systems with multiple hard disks, an additional workaround may be
required.  See <a href="#DOS_002fWindows">DOS/Windows</a>.
</p>
<p>Chain-loading is only supported on PC BIOS and EFI platforms.
</p>
<hr>
<span id="Loopback-booting"></span><div class="header">
<p>
Next: <a href="#LVM-cache-booting" accesskey="n" rel="next">LVM cache booting</a>, Previous: <a href="#General-boot-methods" accesskey="p" rel="prev">General boot methods</a>, Up: <a href="#Booting" accesskey="u" rel="up">Booting</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Loopback-booting-1"></span><h3 class="section">5.2 Loopback booting</h3>
<p>GRUB is able to read from an image (be it one of CD or HDD) stored on
any of its accessible storages (refer to see <a href="#loopback">loopback</a> command).
However the OS itself should be able to find its root. This usually
involves running a userspace program running before the real root
is discovered. This is achieved by GRUB loading a specially made
small image and passing it as ramdisk to the kernel. This is achieved
by commands <code>kfreebsd_module</code>, <code>knetbsd_module_elf</code>,
<code>kopenbsd_ramdisk</code>, <code>initrd</code> (see <a href="#initrd">initrd</a>),
<code>initrd16</code> (see <a href="#initrd">initrd</a>), <code>multiboot_module</code>,
<code>multiboot2_module</code> or <code>xnu_ramdisk</code>
depending on the loader. Note that for knetbsd the image must be put
inside miniroot.kmod and the whole miniroot.kmod has to be loaded. In
kopenbsd payload this is disabled by default. Aditionally behaviour of
initial ramdisk depends on command line options. Several distributors provide
the image for this purpose or it&rsquo;s integrated in their standard ramdisk and
activated by special option. Consult your kernel and distribution manual for
more details. Other loaders like appleloader, chainloader (BIOS, EFI, coreboot),
freedos, ntldr and plan9 provide no possibility of loading initial ramdisk and
as far as author is aware the payloads in question don&rsquo;t support either initial
ramdisk or discovering loopback boot in other way and as such not bootable this
way. Please consider alternative boot methods like copying all files
from the image to actual partition. Consult your OS documentation for
more details
</p>
<hr>
<span id="LVM-cache-booting"></span><div class="header">
<p>
Next: <a href="#OS_002dspecific-notes" accesskey="n" rel="next">OS-specific notes</a>, Previous: <a href="#Loopback-booting" accesskey="p" rel="prev">Loopback booting</a>, Up: <a href="#Booting" accesskey="u" rel="up">Booting</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Booting-from-LVM-cache-logical-volume"></span><h3 class="section">5.3 Booting from LVM cache logical volume</h3>

<p>The LVM cache logical volume is the logical volume consisting of the original
and the cache pool logical volume. The original is usually on a larger and
slower storage device while the cache pool is on a smaller and faster one. The
performance of the original volume can be improved by storing the frequently
used data on the cache pool to utilize the greater performance of faster
device.
</p>
<p>GRUB boots from LVM cache logical volume merely by reading it&rsquo;s original
logical volume so that dirty data in cache pool volume is disregarded. This is
not a problem for &quot;writethrough&quot; cache mode as it ensures that any data written
will be stored both on the cache and the origin LV. For the other cache mode
&quot;writeback&quot;, which delays writing from the cache pool back to the origin LV to
boost performance, GRUB may fail to boot in the wake of accidental power outage
due to it&rsquo;s inability to assemble the cache device for reading the required
dirty data left behind. The situation will be improved after adding full
support to the LVM cache logical volume in the future.
</p>
<hr>
<span id="OS_002dspecific-notes"></span><div class="header">
<p>
Previous: <a href="#LVM-cache-booting" accesskey="p" rel="prev">LVM cache booting</a>, Up: <a href="#Booting" accesskey="u" rel="up">Booting</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Some-caveats-on-OS_002dspecific-issues"></span><h3 class="section">5.4 Some caveats on OS-specific issues</h3>

<p>Here, we describe some caveats on several operating systems.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#GNU_002fHurd" accesskey="1">GNU/Hurd</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#GNU_002fLinux" accesskey="2">GNU/Linux</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#NetBSD" accesskey="3">NetBSD</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#DOS_002fWindows" accesskey="4">DOS/Windows</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr>
<span id="GNU_002fHurd"></span><div class="header">
<p>
Next: <a href="#GNU_002fLinux" accesskey="n" rel="next">GNU/Linux</a>, Up: <a href="#OS_002dspecific-notes" accesskey="u" rel="up">OS-specific notes</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="GNU_002fHurd-1"></span><h4 class="subsection">5.4.1 GNU/Hurd</h4>

<p>Since GNU/Hurd is Multiboot-compliant, it is easy to boot it; there is
nothing special about it. But do not forget that you have to specify a
root partition to the kernel.
</p>
<ol>
<li> Set GRUB&rsquo;s root device to the same drive as GNU/Hurd&rsquo;s.  The command
<code>search --set=root --file /boot/gnumach.gz</code> or similar may help you
(see <a href="#search">search</a>).

</li><li> Load the kernel and the modules, like this:

<div class="example">
<pre class="example">grub&gt; <kbd>multiboot /boot/gnumach.gz root=device:hd0s1</kbd>
grub&gt; <kbd>module  /hurd/ext2fs.static ext2fs --readonly \
                   --multiboot-command-line='${kernel-command-line}' \
                   --host-priv-port='${host-port}' \
                   --device-master-port='${device-port}' \
                   --exec-server-task='${exec-task}' -T typed '${root}' \
                   '$(task-create)' '$(task-resume)'</kbd>
grub&gt; <kbd>module /lib/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'</kbd>
</pre></div>

</li><li> Finally, run the command <code>boot</code> (see <a href="#boot">boot</a>).
</li></ol>


<hr>
<span id="GNU_002fLinux"></span><div class="header">
<p>
Next: <a href="#NetBSD" accesskey="n" rel="next">NetBSD</a>, Previous: <a href="#GNU_002fHurd" accesskey="p" rel="prev">GNU/Hurd</a>, Up: <a href="#OS_002dspecific-notes" accesskey="u" rel="up">OS-specific notes</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="GNU_002fLinux-1"></span><h4 class="subsection">5.4.2 GNU/Linux</h4>

<p>It is relatively easy to boot GNU/Linux from GRUB, because it somewhat
resembles to boot a Multiboot-compliant OS.
</p>
<ol>
<li> Set GRUB&rsquo;s root device to the same drive as GNU/Linux&rsquo;s.  The command
<code>search --set=root --file /vmlinuz</code> or similar may help you
(see <a href="#search">search</a>).

</li><li> Load the kernel using the command <code>linux</code> (see <a href="#linux">linux</a>):

<div class="example">
<pre class="example">grub&gt; <kbd>linux /vmlinuz root=/dev/sda1</kbd>
</pre></div>

<p>If you need to specify some kernel parameters, just append them to the
command.  For example, to set <samp>acpi</samp> to &lsquo;<samp>off</samp>&rsquo;, do this:
</p>
<div class="example">
<pre class="example">grub&gt; <kbd>linux /vmlinuz root=/dev/sda1 acpi=off</kbd>
</pre></div>

<p>See the documentation in the Linux source tree for complete information on
the available options.
</p>
<p>With <code>linux</code> GRUB uses 32-bit protocol. Some BIOS services like APM
or EDD aren&rsquo;t available with this protocol. In this case you need to use
<code>linux16</code>
</p>
<div class="example">
<pre class="example">grub&gt; <kbd>linux16 /vmlinuz root=/dev/sda1 acpi=off</kbd>
</pre></div>

</li><li> If you use an initrd, execute the command <code>initrd</code> (see <a href="#initrd">initrd</a>)
after <code>linux</code>:

<div class="example">
<pre class="example">grub&gt; <kbd>initrd /initrd</kbd>
</pre></div>

<p>If you used <code>linux16</code> you need to use <code>initrd16</code>:
</p>
<div class="example">
<pre class="example">grub&gt; <kbd>initrd16 /initrd</kbd>
</pre></div>

</li><li> Finally, run the command <code>boot</code> (see <a href="#boot">boot</a>).
</li></ol>


<hr>
<span id="NetBSD"></span><div class="header">
<p>
Next: <a href="#DOS_002fWindows" accesskey="n" rel="next">DOS/Windows</a>, Previous: <a href="#GNU_002fLinux" accesskey="p" rel="prev">GNU/Linux</a>, Up: <a href="#OS_002dspecific-notes" accesskey="u" rel="up">OS-specific notes</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="NetBSD-1"></span><h4 class="subsection">5.4.3 NetBSD</h4>

<p>Booting a NetBSD kernel from GRUB is also relatively easy: first set
GRUB&rsquo;s root device, then load the kernel and the modules, and finally
run <code>boot</code>.
</p>
<ol>
<li> Set GRUB&rsquo;s root device to the partition holding the NetBSD root file
system.  For a disk with a NetBSD disk label, this is usually the first
partition (a:).  In that case, and assuming that the partition is on the
first hard disk, set GRUB&rsquo;s root device as follows:

<div class="example">
<pre class="example">grub&gt; <kbd>insmod part_bsd</kbd>
grub&gt; <kbd>set root=(hd0,netbsd1)</kbd>
</pre></div>

<p>For a disk with a GUID Partition Table (GPT), and assuming that the
NetBSD root partition is the third GPT partition, do this:
</p>
<div class="example">
<pre class="example">grub&gt; <kbd>insmod part_gpt</kbd>
grub&gt; <kbd>set root=(hd0,gpt3)</kbd>
</pre></div>

</li><li> Load the kernel using the command <code>knetbsd</code>:

<div class="example">
<pre class="example">grub&gt; <kbd>knetbsd /netbsd</kbd>
</pre></div>

<p>Various options may be given to <code>knetbsd</code>.  These options are,
for the most part, the same as in the NetBSD boot loader.  For instance,
to boot the system in single-user mode and with verbose messages, do
this:
</p>
<div class="example">
<pre class="example">grub&gt; <kbd>knetbsd /netbsd -s -v</kbd>
</pre></div>

</li><li> If needed, load kernel modules with the command
<code>knetbsd_module_elf</code>.  A typical example is the module for the
root file system:

<div class="example">
<pre class="example">grub&gt; <kbd>knetbsd_module_elf /stand/amd64/6.0/modules/ffs/ffs.kmod</kbd>
</pre></div>

</li><li> Finally, run the command <code>boot</code> (see <a href="#boot">boot</a>).
</li></ol>


<hr>
<span id="DOS_002fWindows"></span><div class="header">
<p>
Previous: <a href="#NetBSD" accesskey="p" rel="prev">NetBSD</a>, Up: <a href="#OS_002dspecific-notes" accesskey="u" rel="up">OS-specific notes</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="DOS_002fWindows-1"></span><h4 class="subsection">5.4.4 DOS/Windows</h4>

<p>GRUB cannot boot DOS or Windows directly, so you must chain-load them
(see <a href="#Chain_002dloading">Chain-loading</a>). However, their boot loaders have some critical
deficiencies, so it may not work to just chain-load them. To overcome
the problems, GRUB provides you with two helper functions.
</p>
<p>If you have installed DOS (or Windows) on a non-first hard disk, you
have to use the disk swapping technique, because that OS cannot boot
from any disks but the first one. The workaround used in GRUB is the
command <code>drivemap</code> (see <a href="#drivemap">drivemap</a>), like this:
</p>
<div class="example">
<pre class="example">drivemap -s (hd0) (hd1)
</pre></div>

<p>This performs a <em>virtual</em> swap between your first and second hard
drive.
</p>
<p><strong>Caution:</strong> This is effective only if DOS (or Windows) uses BIOS
to access the swapped disks. If that OS uses a special driver for the
disks, this probably won&rsquo;t work.
</p>
<p>Another problem arises if you installed more than one set of DOS/Windows
onto one disk, because they could be confused if there are more than one
primary partitions for DOS/Windows. Certainly you should avoid doing
this, but there is a solution if you do want to do so. Use the partition
hiding/unhiding technique.
</p>
<p>If GRUB <em>hides</em> a DOS (or Windows) partition (see <a href="#parttool">parttool</a>), DOS (or
Windows) will ignore the partition. If GRUB <em>unhides</em> a DOS (or Windows)
partition, DOS (or Windows) will detect the partition. Thus, if you have
installed DOS (or Windows) on the first and the second partition of the
first hard disk, and you want to boot the copy on the first partition, do
the following:
</p>
<div class="example">
<pre class="example">parttool (hd0,1) hidden-
parttool (hd0,2) hidden+
set root=(hd0,1)
chainloader +1
parttool <tt>${root}</tt> boot+
boot
</pre></div>


<hr>
<span id="Configuration"></span><div class="header">
<p>
Next: <a href="#Theme-file-format" accesskey="n" rel="next">Theme file format</a>, Previous: <a href="#Booting" accesskey="p" rel="prev">Booting</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Writing-your-own-configuration-file"></span><h2 class="chapter">6 Writing your own configuration file</h2>

<p>GRUB is configured using <samp>grub.cfg</samp>, usually located under
<samp>/boot/grub</samp>.  This file is quite flexible, but most users will not
need to write the whole thing by hand.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Simple-configuration" accesskey="1">Simple configuration</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Recommended for most users
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Root-Identifcation-Heuristics" accesskey="2">Root Identifcation Heuristics</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Summary on how the root file system is identified.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Shell_002dlike-scripting" accesskey="3">Shell-like scripting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">For power users and developers
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Multi_002dboot-manual-config" accesskey="4">Multi-boot manual config</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">For non-standard multi-OS scenarios
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Embedded-configuration" accesskey="5">Embedded configuration</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Embedding a configuration file into GRUB
</td></tr>
</table>


<hr>
<span id="Simple-configuration"></span><div class="header">
<p>
Next: <a href="#Root-Identifcation-Heuristics" accesskey="n" rel="next">Root Identifcation Heuristics</a>, Up: <a href="#Configuration" accesskey="u" rel="up">Configuration</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Simple-configuration-handling"></span><h3 class="section">6.1 Simple configuration handling</h3>

<p>The program <code>grub2-mkconfig</code> (see <a href="#Invoking-grub2_002dmkconfig">Invoking grub2-mkconfig</a>)
generates <samp>grub.cfg</samp> files suitable for most cases.  It is suitable for
use when upgrading a distribution, and will discover available kernels and
attempt to generate menu entries for them.
</p>
<p><code>grub2-mkconfig</code> does have some limitations.  While adding extra
custom menu entries to the end of the list can be done by editing
<samp>/etc/grub.d/40_custom</samp> or creating <samp>/boot/grub2/custom.cfg</samp>,
changing the order of menu entries or changing their titles may require
making complex changes to shell scripts stored in <samp>/etc/grub.d/</samp>.  This
may be improved in the future.  In the meantime, those who feel that it
would be easier to write <samp>grub.cfg</samp> directly are encouraged to do so
(see <a href="#Booting">Booting</a>, and <a href="#Shell_002dlike-scripting">Shell-like scripting</a>), and to disable any system
provided by their distribution to automatically run <code>grub2-mkconfig</code>.
</p>
<p>The file <samp>/etc/default/grub</samp> controls the operation of
<code>grub2-mkconfig</code>.  It is sourced by a shell script, and so must be
valid POSIX shell input; normally, it will just be a sequence of
&lsquo;<samp>KEY=value</samp>&rsquo; lines, but if the value contains spaces or other special
characters then it must be quoted.  For example:
</p>
<div class="example">
<pre class="example">GRUB_TERMINAL_INPUT=&quot;console serial&quot;
</pre></div>

<p>Valid keys in <samp>/etc/default/grub</samp> are as follows:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>GRUB_DEFAULT</samp>&rsquo;</dt>
<dd><p>The default menu entry.  This may be a number, in which case it identifies
the Nth entry in the generated menu counted from zero, or the title of a
menu entry, or the special string &lsquo;<samp>saved</samp>&rsquo;.  Using the id may be
useful if you want to set a menu entry as the default even though there may
be a variable number of entries before it.
</p>
<p>For example, if you have:
</p>
<pre class="verbatim">menuentry 'Example GNU/Linux distribution' --class gnu-linux --id example-gnu-linux {
	...
}
</pre>
<p>then you can make this the default using:
</p>
<div class="example">
<pre class="example">GRUB_DEFAULT=example-gnu-linux
</pre></div>

<p>Previously it was documented the way to use entry title. While this still
works it&rsquo;s not recommended since titles often contain unstable device names
and may be translated
</p>
<p>If you set this to &lsquo;<samp>saved</samp>&rsquo;, then the default menu entry will be that
saved by &lsquo;<samp>GRUB_SAVEDEFAULT</samp>&rsquo; or <code>grub2-set-default</code>.  This relies on
the environment block, which may not be available in all situations
(see <a href="#Environment-block">Environment block</a>).
</p>
<p>The default is &lsquo;<samp>0</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_SAVEDEFAULT</samp>&rsquo;</dt>
<dd><p>If this option is set to &lsquo;<samp>true</samp>&rsquo;, then, when an entry is selected, save
it as a new default entry for use by future runs of GRUB.  This is only
useful if &lsquo;<samp>GRUB_DEFAULT=saved</samp>&rsquo;; it is a separate option because
&lsquo;<samp>GRUB_DEFAULT=saved</samp>&rsquo; is useful without this option, in conjunction with
<code>grub2-set-default</code>.  Unset by default.
This option relies on the environment block, which may not be available in
all situations (see <a href="#Environment-block">Environment block</a>).
</p>
</dd>
<dt>&lsquo;<samp>GRUB_TIMEOUT</samp>&rsquo;</dt>
<dd><p>Boot the default entry this many seconds after the menu is displayed, unless
a key is pressed.  The default is &lsquo;<samp>5</samp>&rsquo;.  Set to &lsquo;<samp>0</samp>&rsquo; to boot
immediately without displaying the menu, or to &lsquo;<samp>-1</samp>&rsquo; to wait
indefinitely.
</p>
<p>If &lsquo;<samp>GRUB_TIMEOUT_STYLE</samp>&rsquo; is set to &lsquo;<samp>countdown</samp>&rsquo; or &lsquo;<samp>hidden</samp>&rsquo;,
the timeout is instead counted before the menu is displayed.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_TIMEOUT_STYLE</samp>&rsquo;</dt>
<dd><p>If this option is unset or set to &lsquo;<samp>menu</samp>&rsquo;, then GRUB will display the
menu and then wait for the timeout set by &lsquo;<samp>GRUB_TIMEOUT</samp>&rsquo; to expire
before booting the default entry.  Pressing a key interrupts the timeout.
</p>
<p>If this option is set to &lsquo;<samp>countdown</samp>&rsquo; or &lsquo;<samp>hidden</samp>&rsquo;, then, before
displaying the menu, GRUB will wait for the timeout set by &lsquo;<samp>GRUB_TIMEOUT</samp>&rsquo;
to expire.  If <tt class="key">ESC</tt> or <tt class="key">F4</tt> are pressed, or <tt class="key">SHIFT</tt> is held down
during that time, it will display the menu and wait for input.  If a hotkey
associated with a menu entry is pressed, it will boot the associated menu entry
immediately. If the timeout expires before either of these happens, it will
boot the default entry.  In the &lsquo;<samp>countdown</samp>&rsquo; case, it will show a one-line
indication of the remaining time.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_DEFAULT_BUTTON</samp>&rsquo;</dt>
<dt>&lsquo;<samp>GRUB_TIMEOUT_BUTTON</samp>&rsquo;</dt>
<dt>&lsquo;<samp>GRUB_TIMEOUT_STYLE_BUTTON</samp>&rsquo;</dt>
<dt>&lsquo;<samp>GRUB_BUTTON_CMOS_ADDRESS</samp>&rsquo;</dt>
<dd><p>Variants of the corresponding variables without the &lsquo;<samp>_BUTTON</samp>&rsquo; suffix,
used to support vendor-specific power buttons.  See <a href="#Vendor-power_002don-keys">Vendor power-on keys</a>.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_DISTRIBUTOR</samp>&rsquo;</dt>
<dd><p>Set by distributors of GRUB to their identifying name.  This is used to
generate more informative menu entry titles.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_TERMINAL_INPUT</samp>&rsquo;</dt>
<dd><p>Select the terminal input device.  You may select multiple devices here,
separated by spaces.
</p>
<p>Valid terminal input names depend on the platform, but may include
&lsquo;<samp>console</samp>&rsquo; (native platform console), &lsquo;<samp>serial</samp>&rsquo; (serial terminal),
&lsquo;<samp>serial_&lt;port&gt;</samp>&rsquo; (serial terminal with explicit port selection),
&lsquo;<samp>at_keyboard</samp>&rsquo; (PC AT keyboard), or &lsquo;<samp>usb_keyboard</samp>&rsquo; (USB keyboard
using the HID Boot Protocol, for cases where the firmware does not handle
this).
</p>
<p>The default is to use the platform&rsquo;s native terminal input.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_TERMINAL_OUTPUT</samp>&rsquo;</dt>
<dd><p>Select the terminal output device.  You may select multiple devices here,
separated by spaces.
</p>
<p>Valid terminal output names depend on the platform, but may include
&lsquo;<samp>console</samp>&rsquo; (native platform console), &lsquo;<samp>serial</samp>&rsquo; (serial terminal),
&lsquo;<samp>serial_&lt;port&gt;</samp>&rsquo; (serial terminal with explicit port selection),
&lsquo;<samp>gfxterm</samp>&rsquo; (graphics-mode output), &lsquo;<samp>vga_text</samp>&rsquo; (VGA text output),
&lsquo;<samp>mda_text</samp>&rsquo; (MDA text output), &lsquo;<samp>morse</samp>&rsquo; (Morse-coding using system
beeper) or &lsquo;<samp>spkmodem</samp>&rsquo; (simple data protocol using system speaker).
</p>
<p>&lsquo;<samp>spkmodem</samp>&rsquo; is useful when no serial port is available. Connect the output
of sending system (where GRUB is running) to line-in of receiving system
(usually developer machine).
On receiving system compile &lsquo;<samp>spkmodem-recv</samp>&rsquo; from
&lsquo;<samp>util/spkmodem-recv.c</samp>&rsquo; and run:
</p>
<div class="example">
<pre class="example">parecord --channels=1 --rate=48000 --format=s16le | ./spkmodem-recv
</pre></div>

<p>The default is to use the platform&rsquo;s native terminal output.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_TERMINAL</samp>&rsquo;</dt>
<dd><p>If this option is set, it overrides both &lsquo;<samp>GRUB_TERMINAL_INPUT</samp>&rsquo; and
&lsquo;<samp>GRUB_TERMINAL_OUTPUT</samp>&rsquo; to the same value.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_SERIAL_COMMAND</samp>&rsquo;</dt>
<dd><p>A command to configure the serial port when using the serial console.
See <a href="#serial">serial</a>.  Defaults to &lsquo;<samp>serial</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_CMDLINE_LINUX</samp>&rsquo;</dt>
<dd><p>Command-line arguments to add to menu entries for the Linux kernel.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_CMDLINE_LINUX_DEFAULT</samp>&rsquo;</dt>
<dd><p>Unless &lsquo;<samp>GRUB_DISABLE_RECOVERY</samp>&rsquo; is set to &lsquo;<samp>true</samp>&rsquo;, two menu
entries will be generated for each Linux kernel: one default entry and one
entry for recovery mode.  This option lists command-line arguments to add
only to the default menu entry, after those listed in
&lsquo;<samp>GRUB_CMDLINE_LINUX</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_CMDLINE_NETBSD</samp>&rsquo;</dt>
<dt>&lsquo;<samp>GRUB_CMDLINE_NETBSD_DEFAULT</samp>&rsquo;</dt>
<dd><p>As &lsquo;<samp>GRUB_CMDLINE_LINUX</samp>&rsquo; and &lsquo;<samp>GRUB_CMDLINE_LINUX_DEFAULT</samp>&rsquo;, but for
NetBSD.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_CMDLINE_GNUMACH</samp>&rsquo;</dt>
<dd><p>As &lsquo;<samp>GRUB_CMDLINE_LINUX</samp>&rsquo;, but for GNU Mach.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_CMDLINE_XEN</samp>&rsquo;</dt>
<dt>&lsquo;<samp>GRUB_CMDLINE_XEN_DEFAULT</samp>&rsquo;</dt>
<dd><p>The values of these options are passed to Xen hypervisor Xen menu entries,
for all respectively normal entries.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_CMDLINE_LINUX_XEN_REPLACE</samp>&rsquo;</dt>
<dt>&lsquo;<samp>GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT</samp>&rsquo;</dt>
<dd><p>The values of these options replace the values of &lsquo;<samp>GRUB_CMDLINE_LINUX</samp>&rsquo;
and &lsquo;<samp>GRUB_CMDLINE_LINUX_DEFAULT</samp>&rsquo; for Linux and Xen menu entries.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_EARLY_INITRD_LINUX_CUSTOM</samp>&rsquo;</dt>
<dt>&lsquo;<samp>GRUB_EARLY_INITRD_LINUX_STOCK</samp>&rsquo;</dt>
<dd><p>List of space-separated early initrd images to be loaded from &lsquo;<samp>/boot</samp>&rsquo;.
This is for loading things like CPU microcode, firmware, ACPI tables, crypto
keys, and so on. These early images will be loaded in the order declared,
and all will be loaded before the actual functional initrd image.
</p>
<p>&lsquo;<samp>GRUB_EARLY_INITRD_LINUX_STOCK</samp>&rsquo; is for your distribution to declare
images that are provided by the distribution. It should not be modified
without understanding the consequences. They will be loaded first.
</p>
<p>&lsquo;<samp>GRUB_EARLY_INITRD_LINUX_CUSTOM</samp>&rsquo; is for your custom created images.
</p>
<p>The default stock images are as follows, though they may be overridden by
your distribution:
</p><div class="example">
<pre class="example">intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode.cpio
</pre></div>

</dd>
<dt>&lsquo;<samp>GRUB_DISABLE_LINUX_UUID</samp>&rsquo;</dt>
<dd><p>Normally, <code>grub2-mkconfig</code> will generate menu entries that use
universally-unique identifiers (UUIDs) to identify the root filesystem to
the Linux kernel, using a &lsquo;<samp>root=UUID=...</samp>&rsquo; kernel parameter.  This is
usually more reliable, but in some cases it may not be appropriate.  To
disable the use of UUIDs, set this option to &lsquo;<samp>true</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_DISABLE_LINUX_PARTUUID</samp>&rsquo;</dt>
<dd><p>If <code>grub-mkconfig</code> cannot identify the root filesystem via its
universally-unique indentifier (UUID), <code>grub-mkconfig</code> can use the UUID
of the partition containing the filesystem to identify the root filesystem to
the Linux kernel via a &lsquo;<samp>root=PARTUUID=...</samp>&rsquo; kernel parameter.  This is not
as reliable as using the filesystem UUID, but is more reliable than using the
Linux device names. When &lsquo;<samp>GRUB_DISABLE_LINUX_PARTUUID</samp>&rsquo; is set to
&lsquo;<samp>false</samp>&rsquo;, the Linux kernel version must be 2.6.37 (3.10 for systems using
the MSDOS partition scheme) or newer.  This option defaults to &lsquo;<samp>true</samp>&rsquo;.  To
enable the use of partition UUIDs, set this option to &lsquo;<samp>false</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_DISABLE_RECOVERY</samp>&rsquo;</dt>
<dd><p>If this option is set to &lsquo;<samp>true</samp>&rsquo;, disable the generation of recovery
mode menu entries.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_DISABLE_UUID</samp>&rsquo;</dt>
<dd><p>Normally, <code>grub2-mkconfig</code> will generate menu entries that use
universally-unique identifiers (UUIDs) to identify various filesystems to
search for files.  This is usually more reliable, but in some cases it may
not be appropriate.  To disable this use of UUIDs, set this option to
&lsquo;<samp>true</samp>&rsquo;. Setting this option to &lsquo;<samp>true</samp>&rsquo;, will also set the options
&lsquo;<samp>GRUB_DISABLE_LINUX_UUID</samp>&rsquo; and &lsquo;<samp>GRUB_DISABLE_LINUX_PARTUUID</samp>&rsquo; to
&lsquo;<samp>true</samp>&rsquo;, unless they have been explicilty set to &lsquo;<samp>false</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_VIDEO_BACKEND</samp>&rsquo;</dt>
<dd><p>If graphical video support is required, either because the &lsquo;<samp>gfxterm</samp>&rsquo;
graphical terminal is in use or because &lsquo;<samp>GRUB_GFXPAYLOAD_LINUX</samp>&rsquo; is set,
then <code>grub2-mkconfig</code> will normally load all available GRUB video
drivers and use the one most appropriate for your hardware.  If you need to
override this for some reason, then you can set this option.
</p>
<p>After <code>grub2-install</code> has been run, the available video drivers are
listed in <samp>/boot/grub2/video.lst</samp>.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_GFXMODE</samp>&rsquo;</dt>
<dd><p>Set the resolution used on the &lsquo;<samp>gfxterm</samp>&rsquo; graphical terminal.  Note that
you can only use modes which your graphics card supports via VESA BIOS
Extensions (VBE), so for example native LCD panel resolutions may not be
available.  The default is &lsquo;<samp>auto</samp>&rsquo;, which tries to select a preferred
resolution.  See <a href="#gfxmode">gfxmode</a>.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_BACKGROUND</samp>&rsquo;</dt>
<dd><p>Set a background image for use with the &lsquo;<samp>gfxterm</samp>&rsquo; graphical terminal.
The value of this option must be a file readable by GRUB at boot time, and
it must end with <samp>.png</samp>, <samp>.tga</samp>, <samp>.jpg</samp>, or <samp>.jpeg</samp>.
The image will be scaled if necessary to fit the screen.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_THEME</samp>&rsquo;</dt>
<dd><p>Set a theme for use with the &lsquo;<samp>gfxterm</samp>&rsquo; graphical terminal.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_GFXPAYLOAD_LINUX</samp>&rsquo;</dt>
<dd><p>Set to &lsquo;<samp>text</samp>&rsquo; to force the Linux kernel to boot in normal text mode,
&lsquo;<samp>keep</samp>&rsquo; to preserve the graphics mode set using &lsquo;<samp>GRUB_GFXMODE</samp>&rsquo;,
&lsquo;<samp><var>width</var>x<var>height</var></samp>&rsquo;[&lsquo;<samp>x<var>depth</var></samp>&rsquo;] to set a particular
graphics mode, or a sequence of these separated by commas or semicolons to
try several modes in sequence.  See <a href="#gfxpayload">gfxpayload</a>.
</p>
<p>Depending on your kernel, your distribution, your graphics card, and the
phase of the moon, note that using this option may cause GNU/Linux to suffer
from various display problems, particularly during the early part of the
boot sequence.  If you have problems, set this option to &lsquo;<samp>text</samp>&rsquo; and
GRUB will tell Linux to boot in normal text mode.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_DISABLE_OS_PROBER</samp>&rsquo;</dt>
<dd><p>Normally, <code>grub2-mkconfig</code> will try to use the external
<code>os-prober</code> program, if installed, to discover other operating
systems installed on the same system and generate appropriate menu entries
for them.  Set this option to &lsquo;<samp>true</samp>&rsquo; to disable this.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_OS_PROBER_SKIP_LIST</samp>&rsquo;</dt>
<dd><p>List of space-separated FS UUIDs of filesystems to be ignored from os-prober
output. For efi chainloaders it&rsquo;s &lt;UUID&gt;@&lt;EFI FILE&gt;
</p>
</dd>
<dt>&lsquo;<samp>GRUB_DISABLE_SUBMENU</samp>&rsquo;</dt>
<dd><p>Normally, <code>grub2-mkconfig</code> will generate top level menu entry for
the kernel with highest version number and put all other found kernels
or alternative menu entries for recovery mode in submenu. For entries returned
by <code>os-prober</code> first entry will be put on top level and all others
in submenu. If this option is set to &lsquo;<samp>true</samp>&rsquo;, flat menu with all entries
on top level will be generated instead. Changing this option will require
changing existing values of &lsquo;<samp>GRUB_DEFAULT</samp>&rsquo;, &lsquo;<samp>fallback</samp>&rsquo; (see <a href="#fallback">fallback</a>)
and &lsquo;<samp>default</samp>&rsquo; (see <a href="#default">default</a>) environment variables as well as saved
default entry using <code>grub2-set-default</code> and value used with
<code>grub2-reboot</code>.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_ENABLE_CRYPTODISK</samp>&rsquo;</dt>
<dd><p>If set to &lsquo;<samp>y</samp>&rsquo;, <code>grub2-mkconfig</code> and <code>grub2-install</code> will
check for encrypted disks and generate additional commands needed to access
them during boot.  Note that in this case unattended boot is not possible
because GRUB will wait for passphrase to unlock encrypted container.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_INIT_TUNE</samp>&rsquo;</dt>
<dd><p>Play a tune on the speaker when GRUB starts.  This is particularly useful
for users unable to see the screen.  The value of this option is passed
directly to <a href="#play">play</a>.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_BADRAM</samp>&rsquo;</dt>
<dd><p>If this option is set, GRUB will issue a <a href="#badram">badram</a> command to filter
out specified regions of RAM.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_PRELOAD_MODULES</samp>&rsquo;</dt>
<dd><p>This option may be set to a list of GRUB module names separated by spaces.
Each module will be loaded as early as possible, at the start of
<samp>grub.cfg</samp>.
</p>
</dd>
</dl>

<p>The following options are still accepted for compatibility with existing
configurations, but have better replacements:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>GRUB_HIDDEN_TIMEOUT</samp>&rsquo;</dt>
<dd><p>Wait this many seconds before displaying the menu.  If <tt class="key">ESC</tt> or <tt class="key">F4</tt> are
pressed, or <tt class="key">SHIFT</tt> is held down during that time, display the menu and wait
for input according to &lsquo;<samp>GRUB_TIMEOUT</samp>&rsquo;.  If a hotkey associated with a menu
entry is pressed, boot the associated menu entry immediately.  If the timeout
expires before either of these happens, display the menu for the number of
seconds specified in &lsquo;<samp>GRUB_TIMEOUT</samp>&rsquo; before booting the default entry.
</p>
<p>If you set &lsquo;<samp>GRUB_HIDDEN_TIMEOUT</samp>&rsquo;, you should also set
&lsquo;<samp>GRUB_TIMEOUT=0</samp>&rsquo; so that the menu is not displayed at all unless
<tt class="key">ESC</tt> or <tt class="key">F4</tt> are pressed, or <tt class="key">SHIFT</tt> is held down.
</p>
<p>This option is unset by default, and is deprecated in favour of the less
confusing &lsquo;<samp>GRUB_TIMEOUT_STYLE=countdown</samp>&rsquo; or
&lsquo;<samp>GRUB_TIMEOUT_STYLE=hidden</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_HIDDEN_TIMEOUT_QUIET</samp>&rsquo;</dt>
<dd><p>In conjunction with &lsquo;<samp>GRUB_HIDDEN_TIMEOUT</samp>&rsquo;, set this to &lsquo;<samp>true</samp>&rsquo; to
suppress the verbose countdown while waiting for a key to be pressed before
displaying the menu.
</p>
<p>This option is unset by default, and is deprecated in favour of the less
confusing &lsquo;<samp>GRUB_TIMEOUT_STYLE=countdown</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>GRUB_HIDDEN_TIMEOUT_BUTTON</samp>&rsquo;</dt>
<dd><p>Variant of &lsquo;<samp>GRUB_HIDDEN_TIMEOUT</samp>&rsquo;, used to support vendor-specific power
buttons.  See <a href="#Vendor-power_002don-keys">Vendor power-on keys</a>.
</p>
<p>This option is unset by default, and is deprecated in favour of the less
confusing &lsquo;<samp>GRUB_TIMEOUT_STYLE=countdown</samp>&rsquo; or
&lsquo;<samp>GRUB_TIMEOUT_STYLE=hidden</samp>&rsquo;.
</p>
</dd>
</dl>

<p>For more detailed customisation of <code>grub2-mkconfig</code>&rsquo;s output, you may
edit the scripts in <samp>/etc/grub.d</samp> directly.
<samp>/etc/grub.d/40_custom</samp> is particularly useful for adding entire custom
menu entries; simply type the menu entries you want to add at the end of
that file, making sure to leave at least the first two lines intact.
</p>
<hr>
<span id="Root-Identifcation-Heuristics"></span><div class="header">
<p>
Next: <a href="#Shell_002dlike-scripting" accesskey="n" rel="next">Shell-like scripting</a>, Previous: <a href="#Simple-configuration" accesskey="p" rel="prev">Simple configuration</a>, Up: <a href="#Configuration" accesskey="u" rel="up">Configuration</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Root-Identifcation-Heuristics-1"></span><h3 class="section">6.2 Root Identifcation Heuristics</h3>
<p>If the target operating system uses the Linux kernel, <code>grub-mkconfig</code>
attempts to identify the root file system via a heuristic algoirthm.  This
algorithm selects the identification method of the root file system by
considering three factors.  The first is if an initrd for the target operating
system is also present.  The second is &lsquo;<samp>GRUB_DISABLE_LINUX_UUID</samp>&rsquo; and if set
to &lsquo;<samp>true</samp>&rsquo;, prevents <code>grub-mkconfig</code> from identifying the root file
system by its UUID.  The third is &lsquo;<samp>GRUB_DISABLE_LINUX_PARTUUID</samp>&rsquo; and if set
to &lsquo;<samp>true</samp>&rsquo;, prevents <code>grub-mkconfig</code> from identifying the root file
system via the UUID of its enclosing partition.  If the variables are assigned
any other value, that value is considered equivalent to &lsquo;<samp>false</samp>&rsquo;.  The
variables are also considered to be set to &lsquo;<samp>false</samp>&rsquo; if they are not set.
</p>
<p>When booting, the Linux kernel will delegate the task of mounting the root
filesystem to the initrd.  Most initrd images determine the root file system by
checking the Linux kernel&rsquo;s command-line for the &lsquo;<samp>root</samp>&rsquo; key and use its
value as the identification method of the root file system.  To improve the
reliability of booting, most initrd images also allow the root file system to be
identified by its UUID.  Because of this behavior, the <code>grub-mkconfig</code>
command will set &lsquo;<samp>root</samp>&rsquo; to &lsquo;<samp>root=UUID=...</samp>&rsquo; to provide the initrd with
the filesystem UUID of the root file system.
</p>
<p>If no initrd is detected or &lsquo;<samp>GRUB_DISABLE_LINUX_UUID</samp>&rsquo; is set to &lsquo;<samp>true</samp>&rsquo;
then <code>grub-command</code> will identify the root filesystem by setting the
kernel command-line variable &lsquo;<samp>root</samp>&rsquo; to &lsquo;<samp>root=PARTUUID=...</samp>&rsquo; unless
&lsquo;<samp>GRUB_DISABLE_LINUX_PARTUUID</samp>&rsquo; is also set to &lsquo;<samp>true</samp>&rsquo;.  If
&lsquo;<samp>GRUB_DISABLE_LINUX_PARTUUID</samp>&rsquo; is also set to &lsquo;<samp>true</samp>&rsquo;,
<code>grub-command</code> will identify by its Linux device name.
</p>
<p>The following table summarizes the behavior of the <code>grub-mkconfig</code>
command.
</p>
<table>
<thead><tr><th>Initrd detected</th><th>GRUB_DISABLE_LINUX_PARTUUID Set To</th><th>GRUB_DISABLE_LINUX_UUID Set To</th><th>Linux Root ID Method</th></tr></thead>
<tr><td>false</td><td>false</td><td>false</td><td>part UUID</td></tr>
<tr><td>false</td><td>false</td><td>true</td><td>part UUID</td></tr>
<tr><td>false</td><td>true</td><td>false</td><td>dev name</td></tr>
<tr><td>false</td><td>true</td><td>true</td><td>dev name</td></tr>
<tr><td>true</td><td>false</td><td>false</td><td>fs UUID</td></tr>
<tr><td>true</td><td>false</td><td>true</td><td>part UUID</td></tr>
<tr><td>true</td><td>true</td><td>false</td><td>fs UUID</td></tr>
<tr><td>true</td><td>true</td><td>true</td><td>dev name</td></tr>
</table>

<p>Remember, &lsquo;<samp>GRUB_DISABLE_LINUX_PARTUUID</samp>&rsquo; and &lsquo;<samp>GRUB_DISABLE_LINUX_UUID</samp>&rsquo;
are also considered to be set to &lsquo;<samp>false</samp>&rsquo; when they are unset.
</p>
<hr>
<span id="Shell_002dlike-scripting"></span><div class="header">
<p>
Next: <a href="#Multi_002dboot-manual-config" accesskey="n" rel="next">Multi-boot manual config</a>, Previous: <a href="#Root-Identifcation-Heuristics" accesskey="p" rel="prev">Root Identifcation Heuristics</a>, Up: <a href="#Configuration" accesskey="u" rel="up">Configuration</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Writing-full-configuration-files-directly"></span><h3 class="section">6.3 Writing full configuration files directly</h3>


<p><samp>grub.cfg</samp> is written in GRUB&rsquo;s built-in scripting language, which has
a syntax quite similar to that of GNU Bash and other Bourne shell
derivatives.
</p>
<span id="Words"></span><h3 class="heading">Words</h3>

<p>A <em>word</em> is a sequence of characters considered as a single unit by
GRUB.  Words are separated by <em>metacharacters</em>, which are the following
plus space, tab, and newline:
</p>
<div class="example">
<pre class="example">{ } | &amp; $ ; &lt; &gt;
</pre></div>
 
<p>Quoting may be used to include metacharacters in words; see below.
</p>
<span id="Reserved-words"></span><h3 class="heading">Reserved words</h3>

<p>Reserved words have a special meaning to GRUB.  The following words are
recognised as reserved when unquoted and either the first word of a simple
command or the third word of a <code>for</code> command:
</p>
<div class="example">
<pre class="example">! [[ ]] { }
case do done elif else esac fi for function
if in menuentry select then time until while
</pre></div>

<p>Not all of these reserved words have a useful purpose yet; some are reserved
for future expansion.
</p>
<span id="Quoting"></span><h3 class="heading">Quoting</h3>

<p>Quoting is used to remove the special meaning of certain characters or
words.  It can be used to treat metacharacters as part of a word, to prevent
reserved words from being recognised as such, and to prevent variable
expansion.
</p>
<p>There are three quoting mechanisms: the escape character, single quotes, and
double quotes.
</p>
<p>A non-quoted backslash (\) is the <em>escape character</em>.  It preserves the
literal value of the next character that follows, with the exception of
newline.
</p>
<p>Enclosing characters in single quotes preserves the literal value of each
character within the quotes.  A single quote may not occur between single
quotes, even when preceded by a backslash.
</p>
<p>Enclosing characters in double quotes preserves the literal value of all
characters within the quotes, with the exception of &lsquo;<samp>$</samp>&rsquo; and &lsquo;<samp>\</samp>&rsquo;.
The &lsquo;<samp>$</samp>&rsquo; character retains its special meaning within double quotes.
The backslash retains its special meaning only when followed by one of the
following characters: &lsquo;<samp>$</samp>&rsquo;, &lsquo;<samp>&quot;</samp>&rsquo;, &lsquo;<samp>\</samp>&rsquo;, or newline.  A
backslash-newline pair is treated as a line continuation (that is, it is
removed from the input stream and effectively ignored<a id="DOCF7" href="#FOOT7"><sup>7</sup></a>).  A double quote may be quoted within
double quotes by preceding it with a backslash.
</p>
<span id="Variable-expansion"></span><h3 class="heading">Variable expansion</h3>

<p>The &lsquo;<samp>$</samp>&rsquo; character introduces variable expansion.  The variable name to
be expanded may be enclosed in braces, which are optional but serve to
protect the variable to be expanded from characters immediately following it
which could be interpreted as part of the name.
</p>
<p>Normal variable names begin with an alphabetic character, followed by zero
or more alphanumeric characters.  These names refer to entries in the GRUB
environment (see <a href="#Environment">Environment</a>).
</p>
<p>Positional variable names consist of one or more digits.  They represent
parameters passed to function calls, with &lsquo;<samp>$1</samp>&rsquo; representing the first
parameter, and so on.
</p>
<p>The special variable name &lsquo;<samp>?</samp>&rsquo; expands to the exit status of the most
recently executed command.  When positional variable names are active, other
special variable names &lsquo;<samp>@</samp>&rsquo;, &lsquo;<samp>*</samp>&rsquo; and &lsquo;<samp>#</samp>&rsquo; are defined and they
expand to all positional parameters with necessary quoting, positional
parameters without any quoting, and positional parameter count respectively.
</p>
<span id="Comments"></span><h3 class="heading">Comments</h3>

<p>A word beginning with &lsquo;<samp>#</samp>&rsquo; causes that word and all remaining characters
on that line to be ignored.
</p>
<span id="Simple-commands"></span><h3 class="heading">Simple commands</h3>

<p>A <em>simple command</em> is a sequence of words separated by spaces or tabs
and terminated by a semicolon or a newline.  The first word specifies the
command to be executed.  The remaining words are passed as arguments to the
invoked command.
</p>
<p>The return value of a simple command is its exit status.  If the reserved
word <code>!</code> precedes the command, then the return value is instead the
logical negation of the command&rsquo;s exit status.
</p>
<span id="Compound-commands"></span><h3 class="heading">Compound commands</h3>

<p>A <em>compound command</em> is one of the following:
</p>
<dl compact="compact">
<dt>for <var>name</var> in <var>word</var> &hellip;; do <var>list</var>; done</dt>
<dd><p>The list of words following <code>in</code> is expanded, generating a list of
items.  The variable <var>name</var> is set to each element of this list in turn,
and <var>list</var> is executed each time.  The return value is the exit status
of the last command that executes.  If the expansion of the items following
<code>in</code> results in an empty list, no commands are executed, and the return
status is 0.
</p>
</dd>
<dt>if <var>list</var>; then <var>list</var>; [elif <var>list</var>; then <var>list</var>;] &hellip; [else <var>list</var>;] fi</dt>
<dd><p>The <code>if</code> <var>list</var> is executed.  If its exit status is zero, the
<code>then</code> <var>list</var> is executed.  Otherwise, each <code>elif</code> <var>list</var>
is executed in turn, and if its exit status is zero, the corresponding
<code>then</code> <var>list</var> is executed and the command completes.  Otherwise,
the <code>else</code> <var>list</var> is executed, if present.  The exit status is the
exit status of the last command executed, or zero if no condition tested
true.
</p>
</dd>
<dt>while <var>cond</var>; do <var>list</var>; done</dt>
<dt>until <var>cond</var>; do <var>list</var>; done</dt>
<dd><p>The <code>while</code> command continuously executes the <code>do</code> <var>list</var> as
long as the last command in <var>cond</var> returns an exit status of zero.  The
<code>until</code> command is identical to the <code>while</code> command, except that
the test is negated; the <code>do</code> <var>list</var> is executed as long as the
last command in <var>cond</var> returns a non-zero exit status.  The exit status
of the <code>while</code> and <code>until</code> commands is the exit status of the last
<code>do</code> <var>list</var> command executed, or zero if none was executed.
</p>
</dd>
<dt>function <var>name</var> { <var>command</var>; &hellip; }</dt>
<dd><p>This defines a function named <var>name</var>.  The <em>body</em> of the function is
the list of commands within braces, each of which must be terminated with a
semicolon or a newline.  This list of commands will be executed whenever
<var>name</var> is specified as the name of a simple command.  Function
definitions do not affect the exit status in <code>$?</code>.  When executed, the
exit status of a function is the exit status of the last command executed in
the body.
</p>
</dd>
<dt>menuentry <var>title</var> [<samp>--class=class</samp> &hellip;] [<samp>--users=users</samp>] [<samp>--unrestricted</samp>] [<samp>--hotkey=key</samp>] [<samp>--id=id</samp>] { <var>command</var>; &hellip; }</dt>
<dd><p>See <a href="#menuentry">menuentry</a>.
</p></dd>
</dl>

<span id="Built_002din-Commands"></span><h3 class="heading">Built-in Commands</h3>

<p>Some built-in commands are also provided by GRUB script to help script
writers perform actions that are otherwise not possible.  For example, these
include commands to jump out of a loop without fully completing it, etc.
</p>
<dl compact="compact">
<dt>break [<code>n</code>]</dt>
<dd><p>Exit from within a <code>for</code>, <code>while</code>, or <code>until</code> loop.  If
<code>n</code> is specified, break <code>n</code> levels.  <code>n</code> must be greater than
or equal to 1.  If <code>n</code> is greater than the number of enclosing loops,
all enclosing loops are exited.  The return value is 0 unless <code>n</code> is
not greater than or equal to 1.
</p>
</dd>
<dt>continue [<code>n</code>]</dt>
<dd><p>Resume the next iteration of the enclosing <code>for</code>, <code>while</code> or
<code>until</code> loop.  If <code>n</code> is specified, resume at the <code>n</code>th
enclosing loop.  <code>n</code> must be greater than or equal to 1.  If <code>n</code>
is greater than the number of enclosing loops, the last enclosing loop (the
<em>top-level</em> loop) is resumed.  The return value is 0 unless <code>n</code> is
not greater than or equal to 1.
</p>
</dd>
<dt>return [<code>n</code>]</dt>
<dd><p>Causes a function to exit with the return value specified by <code>n</code>.  If
<code>n</code> is omitted, the return status is that of the last command executed
in the function body.  If used outside a function the return status is
false.
</p>
</dd>
<dt>setparams [<code>arg</code>] &hellip;</dt>
<dd><p>Replace positional parameters starting with <code>$1</code> with arguments to
<code>setparams</code>.
</p>
</dd>
<dt>shift [<code>n</code>]</dt>
<dd><p>The positional parameters from <code>n</code>+1 &hellip; are renamed to
<code>$1</code>&hellip;.  Parameters represented by the numbers <code>$#</code> down to
<code>$#</code>-<code>n</code>+1 are unset.  <code>n</code> must be a non-negative number less
than or equal to <code>$#</code>.  If <code>n</code> is 0, no parameters are changed.
If <code>n</code> is not given, it is assumed to be 1.  If <code>n</code> is greater
than <code>$#</code>, the positional parameters are not changed.  The return
status is greater than zero if <code>n</code> is greater than <code>$#</code> or less
than zero; otherwise 0.
</p>
</dd>
</dl>

<hr>
<span id="Multi_002dboot-manual-config"></span><div class="header">
<p>
Next: <a href="#Embedded-configuration" accesskey="n" rel="next">Embedded configuration</a>, Previous: <a href="#Shell_002dlike-scripting" accesskey="p" rel="prev">Shell-like scripting</a>, Up: <a href="#Configuration" accesskey="u" rel="up">Configuration</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Multi_002dboot-manual-config-1"></span><h3 class="section">6.4 Multi-boot manual config</h3>

<p>Currently autogenerating config files for multi-boot environments depends on
os-prober and has several shortcomings. While fixing it is scheduled for the
next release, meanwhile you can make use of the power of GRUB syntax and do it
yourself. A possible configuration is detailed here, feel free to adjust to your
needs.
</p>
<p>First create a separate GRUB partition, big enough to hold GRUB. Some of the
following entries show how to load OS installer images from this same partition,
for that you obviously need to make the partition large enough to hold those
images as well.
Mount this partition on/mnt/boot and disable GRUB in all OSes and manually
install self-compiled latest GRUB with:
</p>
<p><code>grub2-install --boot-directory=/mnt/boot /dev/sda</code>
</p>
<p>In all the OSes install GRUB tools but disable installing GRUB in bootsector,
so you&rsquo;ll have menu.lst and grub.cfg available for use. Also disable os-prober
use by setting:
</p>
<p><code>GRUB_DISABLE_OS_PROBER=true</code>
</p>
<p>in /etc/default/grub
</p>
<p>Then write a grub.cfg (/mnt/boot/grub2/grub.cfg):
</p>
<div class="example">
<pre class="example">

menuentry &quot;OS using grub2&quot; {
   insmod xfs
   search --set=root --label OS1 --hint hd0,msdos8
   configfile /boot/grub2/grub.cfg
}

menuentry &quot;OS using grub2-legacy&quot; {
   insmod ext2
   search --set=root --label OS2 --hint hd0,msdos6
   legacy_configfile /boot/grub2/menu.lst
}

menuentry &quot;Windows XP&quot; {
   insmod ntfs
   search --set=root --label WINDOWS_XP --hint hd0,msdos1
   ntldr /ntldr
}

menuentry &quot;Windows 7&quot; {
   insmod ntfs
   search --set=root --label WINDOWS_7 --hint hd0,msdos2
   ntldr /bootmgr
}

menuentry &quot;FreeBSD&quot; {
          insmod zfs
          search --set=root --label freepool --hint hd0,msdos7
          kfreebsd /freebsd@/boot/kernel/kernel
          kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
          kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
          kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
          set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
          set kFreeBSD.hw.psm.synaptics_support=1
}

menuentry &quot;experimental GRUB&quot; {
          search --set=root --label GRUB --hint hd0,msdos5
          multiboot /experimental/grub/i386-pc/core.img
}

menuentry &quot;Fedora 16 installer&quot; {
          search --set=root --label GRUB --hint hd0,msdos5
          linux /fedora/vmlinuz lang=en_US keymap=sg resolution=1280x800
          initrd /fedora/initrd.img
}

menuentry &quot;Fedora rawhide installer&quot; {
          search --set=root --label GRUB --hint hd0,msdos5
          linux /fedora/vmlinuz repo=ftp://mirror.switch.ch/mirror/fedora/linux/development/rawhide/x86_64 lang=en_US keymap=sg resolution=1280x800
          initrd /fedora/initrd.img
}

menuentry &quot;Debian sid installer&quot; {
          search --set=root --label GRUB --hint hd0,msdos5
          linux /debian/dists/sid/main/installer-amd64/current/images/hd-media/vmlinuz
          initrd /debian/dists/sid/main/installer-amd64/current/images/hd-media/initrd.gz
}

</pre></div>

<p>Notes:
</p><ul>
<li> Argument to search after &ndash;label is FS LABEL. You can also use UUIDs with &ndash;fs-uuid UUID instead of &ndash;label LABEL. You could also use direct <code>root=hd0,msdosX</code> but this is not recommended due to device name instability.
</li></ul>

<hr>
<span id="Embedded-configuration"></span><div class="header">
<p>
Previous: <a href="#Multi_002dboot-manual-config" accesskey="p" rel="prev">Multi-boot manual config</a>, Up: <a href="#Configuration" accesskey="u" rel="up">Configuration</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Embedding-a-configuration-file-into-GRUB"></span><h3 class="section">6.5 Embedding a configuration file into GRUB</h3>

<p>GRUB supports embedding a configuration file directly into the core image,
so that it is loaded before entering normal mode.  This is useful, for
example, when it is not straightforward to find the real configuration file,
or when you need to debug problems with loading that file.
<code>grub2-install</code> uses this feature when it is not using BIOS disk
functions or when installing to a different disk from the one containing
<samp>/boot/grub</samp>, in which case it needs to use the <code>search</code>
command (see <a href="#search">search</a>) to find <samp>/boot/grub</samp>.
</p>
<p>To embed a configuration file, use the <samp>-c</samp> option to
<code>grub2-mkimage</code>.  The file is copied into the core image, so it may
reside anywhere on the file system, and may be removed after running
<code>grub2-mkimage</code>.
</p>
<p>After the embedded configuration file (if any) is executed, GRUB will load
the &lsquo;<samp>normal</samp>&rsquo; module (see <a href="#normal">normal</a>), which will then read the real
configuration file from <samp>$prefix/grub.cfg</samp>.  By this point, the
<code>root</code> variable will also have been set to the root device name.  For
example, <code>prefix</code> might be set to &lsquo;<samp>(hd0,1)/boot/grub</samp>&rsquo;, and
<code>root</code> might be set to &lsquo;<samp>hd0,1</samp>&rsquo;.  Thus, in most cases, the embedded
configuration file only needs to set the <code>prefix</code> and <code>root</code>
variables, and then drop through to GRUB&rsquo;s normal processing.  A typical
example of this might look like this:
</p>
<div class="example">
<pre class="example">search.fs_uuid 01234567-89ab-cdef-0123-456789abcdef root
set prefix=($root)/boot/grub
</pre></div>

<p>(The &lsquo;<samp>search_fs_uuid</samp>&rsquo; module must be included in the core image for this
example to work.)
</p>
<p>In more complex cases, it may be useful to read other configuration files
directly from the embedded configuration file.  This allows such things as
reading files not called <samp>grub.cfg</samp>, or reading files from a directory
other than that where GRUB&rsquo;s loadable modules are installed.  To do this,
include the &lsquo;<samp>configfile</samp>&rsquo; and &lsquo;<samp>normal</samp>&rsquo; modules in the core image,
and embed a configuration file that uses the <code>configfile</code> command to
load another file.  The following example of this also requires the
<code>echo</code>, <code>search_label</code>, and <code>test</code> modules to be
included in the core image:
</p>
<div class="example">
<pre class="example">search.fs_label grub root
if [ -e /boot/grub2/example/test1.cfg ]; then
    set prefix=($root)/boot/grub
    configfile /boot/grub2/example/test1.cfg
else
    if [ -e /boot/grub2/example/test2.cfg ]; then
        set prefix=($root)/boot/grub
        configfile /boot/grub2/example/test2.cfg
    else
        echo &quot;Could not find an example configuration file!&quot;
    fi
fi
</pre></div>

<p>The embedded configuration file may not contain menu entries directly, but
may only read them from elsewhere using <code>configfile</code>.
</p>
<hr>
<span id="Theme-file-format"></span><div class="header">
<p>
Next: <a href="#Network" accesskey="n" rel="next">Network</a>, Previous: <a href="#Configuration" accesskey="p" rel="prev">Configuration</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Theme-file-format-1"></span><h2 class="chapter">7 Theme file format</h2>
<span id="Introduction-1"></span><h3 class="section">7.1 Introduction</h3>
<p>The GRUB graphical menu supports themes that can customize the layout and
appearance of the GRUB boot menu.  The theme is configured through a plain
text file that specifies the layout of the various GUI components (including
the boot menu, timeout progress bar, and text messages) as well as the
appearance using colors, fonts, and images. Example is available in docs/example_theme.txt
</p>
<span id="Theme-Elements"></span><h3 class="section">7.2 Theme Elements</h3>
<span id="Colors"></span><h4 class="subsection">7.2.1 Colors</h4>

<p>Colors can be specified in several ways:
</p>
<ul>
<li> HTML-style &ldquo;#RRGGBB&rdquo; or &ldquo;#RGB&rdquo; format, where *R*, *G*, and *B* are hexadecimal digits (e.g., &ldquo;#8899FF&rdquo;)
</li><li> as comma-separated decimal RGB values (e.g., &ldquo;128, 128, 255&rdquo;)
</li><li> with &ldquo;SVG 1.0 color names&rdquo; (e.g., &ldquo;cornflowerblue&rdquo;) which must be specified in lowercase.
</li></ul>
<span id="Fonts"></span><h4 class="subsection">7.2.2 Fonts</h4>
<p>The fonts GRUB uses &ldquo;PFF2 font format&rdquo; bitmap fonts.  Fonts are specified
with full font names.  Currently there is no
provision for a preference list of fonts, or deriving one font from another.
Fonts are loaded with the &ldquo;loadfont&rdquo; command in GRUB (<a href="#loadfont">loadfont</a>).  To see the list of
loaded fonts, execute the &ldquo;lsfonts&rdquo; command (<a href="#lsfonts">lsfonts</a>).  If there are too many fonts to
fit on screen, do &ldquo;set pager=1&rdquo; before executing &ldquo;lsfonts&rdquo;.
</p>

<span id="Progress-Bar"></span><h4 class="subsection">7.2.3 Progress Bar</h4>

<div class="float"><span id="Pixmap_002dstyled-progress-bar"></span>
<div class="float-caption"><p><strong>Figure 7.1
</strong></p></div></div>
<div class="float"><span id="Plain-progress-bar_002c-drawn-with-solid-color_002e"></span>
<div class="float-caption"><p><strong>Figure 7.2
</strong></p></div></div>
<p>Progress bars are used to display the remaining time before GRUB boots the
default menu entry.  To create a progress bar that will display the remaining
time before automatic boot, simply create a &ldquo;progress_bar&rdquo; component with
the id &ldquo;__timeout__&rdquo;.  This indicates to GRUB that the progress bar should
be updated as time passes, and it should be made invisible if the countdown to
automatic boot is interrupted by the user.
</p>
<p>Progress bars may optionally have text displayed on them.  This text is
controlled by variable &ldquo;text&rdquo; which contains a printf template with the
only argument %d is the number of seconds remaining. Additionally special
values &ldquo;@TIMEOUT_NOTIFICATION_SHORT@&rdquo;, &ldquo;@TIMEOUT_NOTIFICATION_MIDDLE@&rdquo;,
&ldquo;@TIMEOUT_NOTIFICATION_LONG@&rdquo; are replaced with standard and translated
templates.
</p>
<span id="Circular-Progress-Indicator"></span><h4 class="subsection">7.2.4 Circular Progress Indicator</h4>


<p>The circular progress indicator functions similarly to the progress bar.  When
given an id of &ldquo;__timeout__&rdquo;, GRUB updates the circular progress indicator&rsquo;s
value to indicate the time remaining.  For the circular progress indicator,
there are two images used to render it:  the *center* image, and the *tick*
image.  The center image is rendered in the center of the component, while the
tick image is used to render each mark along the circumference of the
indicator.
</p>

<span id="Labels"></span><h4 class="subsection">7.2.5 Labels</h4>

<p>Text labels can be placed on the boot screen.  The font, color, and horizontal
alignment can be specified for labels.  If a label is given the id
&ldquo;__timeout__&rdquo;, then the &ldquo;text&rdquo; property for that label is also updated
with a message informing the user of the number of seconds remaining until
automatic boot.  This is useful in case you want the text displayed somewhere
else instead of directly on the progress bar.
</p>

<span id="Boot-Menu"></span><h4 class="subsection">7.2.6 Boot Menu</h4>


<p>The boot menu where GRUB displays the menu entries from the &ldquo;grub.cfg&rdquo; file.
It is a list of items, where each item has a title and an optional icon.  The
icon is selected based on the *classes* specified for the menu entry.  If
there is a PNG file named &ldquo;myclass.png&rdquo; in the &ldquo;grub/themes/icons&rdquo;
directory, it will be displayed for items which have the class *myclass*.  The
boot menu can be customized in several ways, such as the font and color used
for the menu entry title, and by specifying styled boxes for the menu itself
and for the selected item highlight.
</p>

<span id="Styled-Boxes"></span><h4 class="subsection">7.2.7 Styled Boxes</h4>

<p>One of the most important features for customizing the layout is the use of
 *styled boxes*.  A styled box is composed of 9 rectangular (and potentially
empty) regions, which are used to seamlessly draw the styled box on screen:
</p>
<table>
<tr><td width="30%">Northwest (nw)</td><td width="30%">North (n)</td><td width="30%">Northeast (ne)</td></tr>
<tr><td width="30%">West (w)</td><td width="30%">Center (c)</td><td width="30%">East (e)</td></tr>
<tr><td width="30%">Southwest (sw)</td><td width="30%">South (s)</td><td width="30%">Southeast (se)</td></tr>
</table>

<p>To support any size of box on screen, the center slice and the slices for the
top, bottom, and sides are all scaled to the correct size for the component on
screen, using the following rules:
</p>
<ol>
<li> The edge slices (north, south, east, and west) are scaled in the direction of the edge they are adjacent to.  For instance, the west slice is scaled vertically.
</li><li> The corner slices (northwest, northeast, southeast, and southwest) are not scaled.
</li><li> The center slice is scaled to fill the remaining space in the middle.
</li></ol>

<p>As an example of how an image might be sliced up, consider the styled box
used for a terminal view.
</p>
<div class="float"><span id="An-example-of-the-slices-_0028in-red_0029-used-for-a-terminal-window_002e-This-drawing-was-created-and-sliced-in-Inkscape_005f_002c-as-the-next-section-explains_002e"></span>
<div class="float-caption"><p><strong>Figure 7.3
</strong></p></div></div>   
<span id="Creating-Styled-Box-Images"></span><h4 class="subsection">7.2.8 Creating Styled Box Images</h4>

<p>The Inkscape_ scalable vector graphics editor is a very useful tool for
creating styled box images.  One process that works well for slicing a drawing
into the necessary image slices is:
</p>
<ol>
<li> Create or open the drawing you&rsquo;d like use.
</li><li> Create a new layer on the top of the layer stack.  Make it visible.  Select this layer as the current layer.
</li><li> Draw 9 rectangles on your drawing where you&rsquo;d like the slices to be.  Clear the fill option, and set the stroke to 1 pixel wide solid stroke.  The corners of the slices must meet precisely; if it is off by a single pixel, it will probably be evident when the styled box is rendered in the GRUB menu.  You should probably go to File | Document Properties | Grids and enable a grid or create a guide (click on one of the rulers next to the drawing and drag over the drawing; release the mouse button to place the guide) to help place the rectangles precisely.
</li><li> Right click on the center slice rectangle and choose Object Properties. Change the &quot;Id&quot; to &ldquo;slice_c&ldquo; and click Set.  Repeat this for the remaining 8 rectangles, giving them Id values of &ldquo;slice_n&ldquo;, &ldquo;slice_ne&ldquo;, &ldquo;slice_e&ldquo;, and so on according to the location.
</li><li> Save the drawing.
</li><li> Select all the slice rectangles.  With the slice layer selected, you can simply press Ctrl+A to select all rectangles.  The status bar should indicate that 9 rectangles are selected.
</li><li> Click the layer hide icon for the slice layer in the layer palette.  The rectangles will remain selected, even though they are hidden.
</li><li> Choose File | Export Bitmap and check the *Batch export 9 selected objects* box.  Make sure that *Hide all except selected* is unchecked. click *Export*.  This will create PNG files in the same directory as the drawing, named after the slices.  These can now be used for a styled box in a GRUB theme.
</li></ol>

<span id="Theme-File-Manual"></span><h3 class="section">7.3 Theme File Manual</h3>

<p>The theme file is a plain text file.  Lines that begin with &ldquo;#&ldquo; are ignored
and considered comments.  (Note: This may not be the case if the previous line
ended where a value was expected.)
</p>
<p>The theme file contains two types of statements:
</p><ol>
<li> Global properties.
</li><li> Component construction.
</li></ol>

<span id="Global-Properties"></span><h4 class="subsection">7.3.1 Global Properties</h4>

<span id="Format"></span><h4 class="subsection">7.3.2 Format</h4>

<p>Global properties are specified with the simple format:
</p><ul>
<li> name1: value1
</li><li> name2: &quot;value which may contain spaces&quot;
</li><li> name3: #88F
</li></ul>

<p>In this example, name3 is assigned a color value.
</p>

<span id="Global-Property-List"></span><h4 class="subsection">7.3.3 Global Property List</h4>

<table>
<tr><td width="30%">title-text</td><td width="60%">Specifies the text to display at the top center of the screen as a title.</td></tr>
<tr><td width="30%">title-font</td><td width="60%">Defines the font used for the title message at the top of the screen.</td></tr>
<tr><td width="30%">title-color</td><td width="60%">Defines the color of the title message.</td></tr>
<tr><td width="30%">message-font</td><td width="60%">Currently unused. Left for backward compatibility.</td></tr>
<tr><td width="30%">message-color</td><td width="60%">Currently unused. Left for backward compatibility.</td></tr>
<tr><td width="30%">message-bg-color</td><td width="60%">Currently unused. Left for backward compatibility.</td></tr>
<tr><td width="30%">desktop-image</td><td width="60%">Specifies the image to use as the background.  It will be scaled
   to fit the screen size or proportionally scaled depending on the scale
   method.</td></tr>
<tr><td width="30%">desktop-image-scale-method</td><td width="60%">Specifies the scaling method for the *desktop-image*. Options are
   &ldquo;stretch&ldquo;, &ldquo;crop&ldquo;, &ldquo;padding&ldquo;, &ldquo;fitwidth&ldquo;, &ldquo;fitheight&ldquo;.
   &ldquo;stretch&ldquo; for fitting the screen size. Otherwise it is proportional
   scaling of a part of *desktop-image* to the part of the screen.
   &ldquo;crop&ldquo; part of the *desktop-image* will be proportionally scaled to
   fit the screen sizes. &ldquo;padding&ldquo; the entire *desktop-image* will be
   contained on the screen. &ldquo;fitwidth&ldquo; for fitting the *desktop-image*&rsquo;s
   width with screen width. &ldquo;fitheight&ldquo; for fitting the *desktop-image*&rsquo;s
   height with the screen height. Default is &ldquo;stretch&ldquo;.</td></tr>
<tr><td width="30%">desktop-image-h-align</td><td width="60%">Specifies the horizontal alignment of the *desktop-image* if
   *desktop-image-scale-method* isn&rsquo;t equeal to &ldquo;stretch&ldquo;. Options are
   &ldquo;left&ldquo;, &ldquo;center&ldquo;, &ldquo;right&ldquo;. Default is &ldquo;center&ldquo;.</td></tr>
<tr><td width="30%">desktop-image-v-align</td><td width="60%">Specifies the vertical alignment of the *desktop-image* if
   *desktop-image-scale-method* isn&rsquo;t equeal to &ldquo;stretch&ldquo;. Options are
   &ldquo;top&ldquo;, &ldquo;center&ldquo;, &ldquo;bottom&ldquo;. Default is &ldquo;center&ldquo;.</td></tr>
<tr><td width="30%">desktop-color</td><td width="60%">Specifies the color for the background if *desktop-image* is not
   specified.</td></tr>
<tr><td width="30%">terminal-box</td><td width="60%">Specifies the file name pattern for the styled box slices used for the
   command line terminal window.  For example, &ldquo;terminal-box: terminal_*.png&ldquo;
   will use the images &ldquo;terminal_c.png&ldquo; as the center area, &ldquo;terminal_n.png&ldquo;
   as the north (top) edge, &ldquo;terminal_nw.png&ldquo; as the northwest (upper left)
   corner, and so on.  If the image for any slice is not found, it will simply
   be left empty.</td></tr>
<tr><td width="30%">terminal-border</td><td width="60%">Specifies the border width of the terminal window.</td></tr>
<tr><td width="30%">terminal-left</td><td width="60%">Specifies the left coordinate of the terminal window.</td></tr>
<tr><td width="30%">terminal-top</td><td width="60%">Specifies the top coordinate of the terminal window.</td></tr>
<tr><td width="30%">terminal-width</td><td width="60%">Specifies the width of the terminal window.</td></tr>
<tr><td width="30%">terminal-height</td><td width="60%">Specifies the height of the terminal window.</td></tr>
</table>


<span id="Component-Construction"></span><h4 class="subsection">7.3.4 Component Construction</h4>

<p>Greater customizability comes is provided by components.  A tree of components
forms the user interface.  *Containers* are components that can contain other
components, and there is always a single root component which is an instance
of a *canvas* container.
</p>
<p>Components are created in the theme file by prefixing the type of component
with a &rsquo;+&rsquo; sign:
</p>
<p><code>   + label { text=&quot;GRUB&quot; font=&quot;aqui 11&quot; color=&quot;#8FF&quot; } </code>
</p>
<p>properties of a component are specified as &quot;name = value&quot; (whitespace
surrounding tokens is optional and is ignored) where *value* may be:
</p><ul>
<li> a single word (e.g., &ldquo;align = center&ldquo;, &ldquo;color = #FF8080&ldquo;),
</li><li> a quoted string (e.g., &ldquo;text = &quot;Hello, World!&quot;&ldquo;), or
</li><li> a tuple (e.g., &ldquo;preferred_size = (120, 80)&ldquo;).
</li></ul>

<span id="Component-List"></span><h4 class="subsection">7.3.5 Component List</h4>

<p>The following is a list of the components and the properties they support.
</p>
<ul>
<li> label
   A label displays a line of text.
   
<p>Properties:
   </p><table>
<tr><td width="20%">id</td><td width="70%">Set to &ldquo;__timeout__&ldquo; to display the time elapsed to an automatical
      boot of the default entry.</td></tr>
<tr><td width="20%">text</td><td width="70%">The text to display. If &ldquo;id&ldquo; is set to &ldquo;__timeout__&ldquo; and no
      &ldquo;text&ldquo; property is set then the amount of seconds will be shown.
      If set to &ldquo;@KEYMAP_SHORT@&ldquo;, &ldquo;@KEYMAP_MIDDLE@&ldquo; or
      &ldquo;@KEYMAP_LONG@&ldquo; then predefined hotkey information will be shown.</td></tr>
<tr><td width="20%">font</td><td width="70%">The font to use for text display.</td></tr>
<tr><td width="20%">color</td><td width="70%">The color of the text.</td></tr>
<tr><td width="20%">align</td><td width="70%">The horizontal alignment of the text within the component.
      Options are &ldquo;left&ldquo;, &ldquo;center&ldquo; and &ldquo;right&ldquo;.</td></tr>
<tr><td width="20%">visible</td><td width="70%">Set to &ldquo;false&ldquo; to hide the label.</td></tr>
</table>

</li><li> image
   A component that displays an image.  The image is scaled to fit
   the component.

<p>Properties:
</p>
<table>
<tr><td width="20%">file</td><td width="70%">The full path to the image file to load.</td></tr>
</table>

</li><li> progress_bar
   Displays a horizontally oriented progress bar.  It can be rendered using
   simple solid filled rectangles, or using a pair of pixmap styled boxes.

<p>Properties:
</p>
<table>
<tr><td width="20%">id</td><td width="70%">Set to &ldquo;__timeout__&ldquo; to display the time elapsed to an automatical
      boot of the default entry.</td></tr>
<tr><td width="20%">fg_color</td><td width="70%">The foreground color for plain solid color rendering.</td></tr>
<tr><td width="20%">bg_color</td><td width="70%">The background color for plain solid color rendering.</td></tr>
<tr><td width="20%">border_color</td><td width="70%">The border color for plain solid color rendering.</td></tr>
<tr><td width="20%">text_color</td><td width="70%">The text color.</td></tr>
<tr><td width="20%">bar_style</td><td width="70%">The styled box specification for the frame of the progress bar.
      Example: &ldquo;progress_frame_*.png&ldquo;
      If the value is equal to &ldquo;highlight_style&ldquo; then no styled boxes
      will be shown.</td></tr>
<tr><td width="20%">highlight_style</td><td width="70%">The styled box specification for the highlighted region of the
      progress bar. This box will be used to paint just the highlighted region
      of the bar, and will be increased in size as the bar nears completion.
      Example: &ldquo;progress_hl_*.png&ldquo;.
      If the value is equal to &ldquo;bar_style&ldquo; then no styled boxes
      will be shown.</td></tr>
<tr><td width="20%">highlight_overlay</td><td width="70%">If this option is set to &ldquo;true&ldquo; then the highlight box
      side slices (every slice except the center slice) will overlay the
      frame box side slices. And the center slice of the highlight box
      can move all the way (from top to bottom), being drawn on the center
      slice of the frame box. That way we can make a progress bar with
      round-shaped edges so there won&rsquo;t be a free space from the highlight to
      the frame in top and bottom scrollbar positions. Default is &ldquo;false&ldquo;.</td></tr>
<tr><td width="20%">font</td><td width="70%">The font to use for progress bar.</td></tr>
<tr><td width="20%">text</td><td width="70%">The text to display on the progress bar.  If the progress bar&rsquo;s ID
      is set to &ldquo;__timeout__&ldquo; and the value of this property is set to
      &ldquo;@TIMEOUT_NOTIFICATION_SHORT@&ldquo;, &ldquo;@TIMEOUT_NOTIFICATION_MIDDLE@&ldquo;
      or &ldquo;@TIMEOUT_NOTIFICATION_LONG@&ldquo;, then GRUB will update this
      property with an informative message as the timeout approaches.</td></tr>
</table>

</li><li> circular_progress
   Displays a circular progress indicator.  The appearance of this component
   is determined by two images:  the *center* image and the *tick* image.  The
   center image is generally larger and will be drawn in the center of the
   component.  Around the circumference of a circle within the component, the
   tick image will be drawn a certain number of times, depending on the
   properties of the component.

<p>Properties:
</p>
<table>
<tr><td width="30%">id</td><td width="60%">Set to &ldquo;__timeout__&ldquo; to display the time elapsed to an automatical
      boot of the default entry.</td></tr>
<tr><td width="30%">center_bitmap</td><td width="60%">The file name of the image to draw in the center of the component.</td></tr>
<tr><td width="30%">tick_bitmap</td><td width="60%">The file name of the image to draw for the tick marks.</td></tr>
<tr><td width="30%">num_ticks</td><td width="60%">The number of ticks that make up a full circle.</td></tr>
<tr><td width="30%">ticks_disappear</td><td width="60%">Boolean value indicating whether tick marks should progressively appear,
      or progressively disappear as *value* approaches *end*.  Specify
      &ldquo;true&ldquo; or &ldquo;false&ldquo;. Default is &ldquo;false&ldquo;.</td></tr>
<tr><td width="30%">start_angle</td><td width="60%">The position of the first tick mark to appear or disappear.
      Measured in &quot;parrots&quot;, 1 &quot;parrot&quot; = 1 / 256 of the full circle.
      Use values &ldquo;xxx deg&ldquo; or &ldquo;xxx \xc2\xb0&ldquo; to set the angle in degrees.</td></tr>
</table>

</li><li> boot_menu
   Displays the GRUB boot menu.  It allows selecting items and executing them.

<p>Properties:
</p>
<table>
<tr><td width="40%">item_font</td><td width="50%">The font to use for the menu item titles.</td></tr>
<tr><td width="40%">selected_item_font</td><td width="50%">The font to use for the selected menu item, or &ldquo;inherit&ldquo; (the default)
      to use &ldquo;item_font&ldquo; for the selected menu item as well.</td></tr>
<tr><td width="40%">item_color</td><td width="50%">The color to use for the menu item titles.</td></tr>
<tr><td width="40%">selected_item_color</td><td width="50%">The color to use for the selected menu item, or &ldquo;inherit&ldquo; (the default)
      to use &ldquo;item_color&ldquo; for the selected menu item as well.</td></tr>
<tr><td width="40%">icon_width</td><td width="50%">The width of menu item icons.  Icons are scaled to the specified size.</td></tr>
<tr><td width="40%">icon_height</td><td width="50%">The height of menu item icons.</td></tr>
<tr><td width="40%">item_height</td><td width="50%">The height of each menu item in pixels.</td></tr>
<tr><td width="40%">item_padding</td><td width="50%">The amount of space in pixels to leave on each side of the menu item
      contents.</td></tr>
<tr><td width="40%">item_icon_space</td><td width="50%">The space between an item&rsquo;s icon and the title text, in pixels.</td></tr>
<tr><td width="40%">item_spacing</td><td width="50%">The amount of space to leave between menu items, in pixels.</td></tr>
<tr><td width="40%">menu_pixmap_style</td><td width="50%">The image file pattern for the menu frame styled box.
      Example:  &ldquo;menu_*.png&ldquo; (this will use images such as &ldquo;menu_c.png&ldquo;,
      &ldquo;menu_w.png&ldquo;, &lsquo;menu_nw.png&ldquo;, etc.)</td></tr>
<tr><td width="40%">item_pixmap_style</td><td width="50%">The image file pattern for the item styled box.</td></tr>
<tr><td width="40%">selected_item_pixmap_style</td><td width="50%">The image file pattern for the selected item highlight styled box.</td></tr>
<tr><td width="40%">scrollbar</td><td width="50%">Boolean value indicating whether the scroll bar should be drawn if the
      frame and thumb styled boxes are configured.</td></tr>
<tr><td width="40%">scrollbar_frame</td><td width="50%">The image file pattern for the entire scroll bar.
      Example:  &ldquo;scrollbar_*.png&ldquo;</td></tr>
<tr><td width="40%">scrollbar_thumb</td><td width="50%">The image file pattern for the scroll bar thumb (the part of the scroll
      bar that moves as scrolling occurs).
      Example:  &ldquo;scrollbar_thumb_*.png&ldquo;</td></tr>
<tr><td width="40%">scrollbar_thumb_overlay</td><td width="50%">If this option is set to &ldquo;true&ldquo; then the scrollbar thumb
      side slices (every slice except the center slice) will overlay the
      scrollbar frame side slices. And the center slice of the scrollbar_thumb
      can move all the way (from top to bottom), being drawn on the center
      slice of the scrollbar frame. That way we can make a scrollbar with
      round-shaped edges so there won&rsquo;t be a free space from the thumb to
      the frame in top and bottom scrollbar positions. Default is &ldquo;false&ldquo;.</td></tr>
<tr><td width="40%">scrollbar_slice</td><td width="50%">The menu frame styled box&rsquo;s slice in which the scrollbar will be
      drawn. Possible values are &ldquo;west&ldquo;, &ldquo;center&ldquo;, &ldquo;east&ldquo; (default).
      &ldquo;west&ldquo; - the scrollbar will be drawn in the west slice (right-aligned).
      &ldquo;east&ldquo; - the scrollbar will be drawn in the east slice (left-aligned).
      &ldquo;center&ldquo; - the scrollbar will be drawn in the center slice.
      Note: in case of &ldquo;center&ldquo; slice:
      a) If the scrollbar should be drawn then boot menu entry&rsquo;s width is
      decreased by the scrollbar&rsquo;s width and the scrollbar is drawn at the
      right side of the center slice.
      b) If the scrollbar won&rsquo;t be drawn then the boot menu entry&rsquo;s width
      is the width of the center slice.
      c) We don&rsquo;t necessary need the menu pixmap box to display the scrollbar.</td></tr>
<tr><td width="40%">scrollbar_left_pad</td><td width="50%">The left scrollbar padding in pixels.
      Unused if &ldquo;scrollbar_slice&ldquo; is &ldquo;west&ldquo;.</td></tr>
<tr><td width="40%">scrollbar_right_pad</td><td width="50%">The right scrollbar padding in pixels.
      Unused if &ldquo;scrollbar_slice&ldquo; is &ldquo;east&ldquo;.</td></tr>
<tr><td width="40%">scrollbar_top_pad</td><td width="50%">The top scrollbar padding in pixels.</td></tr>
<tr><td width="40%">scrollbar_bottom_pad</td><td width="50%">The bottom scrollbar padding in pixels.</td></tr>
<tr><td width="40%">visible</td><td width="50%">Set to &ldquo;false&ldquo; to hide the boot menu.</td></tr>
</table>

</li><li> canvas
   Canvas is a container that allows manual placement of components within it.
   It does not alter the positions of its child components.  It assigns all
   child components their preferred sizes.

</li><li> hbox
   The *hbox* container lays out its children from left to right, giving each
   one its preferred width.  The height of each child is set to the maximum of
   the preferred heights of all children.
   
</li><li> vbox
   The *vbox* container lays out its children from top to bottom, giving each
   one its preferred height.  The width of each child is set to the maximum of
   the preferred widths of all children.
</li></ul>


<span id="Common-properties"></span><h4 class="subsection">7.3.6 Common properties</h4>

<p>The following properties are supported by all components:
</p><dl compact="compact">
<dt>&lsquo;<samp>left</samp>&rsquo;</dt>
<dd><p>The distance from the left border of container to left border of the object in either of three formats:
        </p><table>
<tr><td width="20%">x</td><td width="70%">Value in pixels</td></tr>
<tr><td width="20%">p%</td><td width="70%">Percentage</td></tr>
<tr><td width="20%">p%+x</td><td width="70%">mixture of both</td></tr>
</table>
</dd>
<dt>&lsquo;<samp>top</samp>&rsquo;</dt>
<dd><p>The distance from the left border of container to left border of the object in same format.
</p></dd>
<dt>&lsquo;<samp>width</samp>&rsquo;</dt>
<dd><p>The width of object in same format.
</p></dd>
<dt>&lsquo;<samp>height</samp>&rsquo;</dt>
<dd><p>The height of object in same format.
</p></dd>
<dt>&lsquo;<samp>id</samp>&rsquo;</dt>
<dd><p>The identifier for the component.  This can be any arbitrary string.
   The ID can be used by scripts to refer to various components in the GUI
   component tree.  Currently, there is one special ID value that GRUB
   recognizes:
</p>
<table>
<tr><td width="20%">&ldquo;__timeout__&ldquo;</td><td width="70%">Component with this ID will be updated by GRUB and will indicate
      time elapsed to an automatical boot of the default entry.
      Affected components: &ldquo;label&ldquo;, &ldquo;circular_progress&ldquo;, &ldquo;progress_bar&ldquo;.</td></tr>
</table>
</dd>
</dl>



<hr>
<span id="Network"></span><div class="header">
<p>
Next: <a href="#Serial-terminal" accesskey="n" rel="next">Serial terminal</a>, Previous: <a href="#Theme-file-format" accesskey="p" rel="prev">Theme file format</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Booting-GRUB-from-the-network"></span><h2 class="chapter">8 Booting GRUB from the network</h2>

<p>The following instructions don&rsquo;t work for *-emu, i386-qemu, i386-coreboot,
i386-multiboot, mips_loongson, mips-arc and mips_qemu_mips
</p>
<p>To generate a netbootable directory, run:
</p>
<div class="example">
<pre class="example">grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/&lt;platform&gt;
</pre></div>

<p>E.g. for i386-pc:
</p>
<div class="example">
<pre class="example">grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i386-pc
</pre></div>

<p>Then follow instructions printed out by grub2-mknetdir on configuring your DHCP
server.
</p>
<p>The grub.cfg file is placed in the same directory as the path output by
grub-mknetdir hereafter referred to as FWPATH. GRUB will search for its
configuration files in order using the following rules where the appended
value corresponds to a value on the client machine.
</p>
<div class="example">
<pre class="example">&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-&lsquo;<samp>(UUID OF MACHINE)</samp>&rsquo;
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-&lsquo;<samp>(MAC ADDRESS OF NIC)</samp>&rsquo;
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-&lsquo;<samp>(IPv4 OR IPv6 ADDRESS)</samp>&rsquo;
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg
</pre></div>

<p>The UUID is the Client Machine Identifier Option Definition as specified in
RFC 4578. The client will only attempt to loouk up a UUID config file if it
was provided by the DHCP server.
</p>
<p>The client will only attempt to look up an IPv6 address config once, however,
it will try the IPv4 multiple times. The concrete example below shows what
would happen under the IPv4 case.
</p>
<div class="example">
<pre class="example">UUID: 7726a678-7fc0-4853-a4f6-c85ac36a120a
MAC:  52:54:00:ec:33:81
IPV4: 10.0.0.130 (0A000082)
</pre></div>

<div class="example">
<pre class="example">&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-7726a678-7fc0-4853-a4f6-c85ac36a120a
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-52-54-00-ec-33-81
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-0A000082
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-0A00008
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-0A0000
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-0A000
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-0A00
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-0A0
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-0A
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg-0
&lsquo;<samp>(FWPATH)</samp>&rsquo;/grub.cfg
</pre></div>

<p>This feature is enabled by default but it can be disabled by setting the
&lsquo;<samp>feature_net_search_cfg</samp>&rsquo; to &lsquo;<samp>n</samp>&rsquo;. Since this happens before the
configuration file is read by GRUB, this option has to be disabled in an
embedded configuration file (see <a href="#Embedded-configuration">Embedded configuration</a>).
</p>
<p>After GRUB has started, files on the TFTP server will be accessible via the
&lsquo;<samp>(tftp)</samp>&rsquo; device.
</p>
<p>The server IP address can be controlled by changing the
&lsquo;<samp>(tftp)</samp>&rsquo; device name to &lsquo;<samp>(tftp,<var>server-ip</var>)</samp>&rsquo;. Note that
this should be changed both in the prefix and in any references to the
device name in the configuration file.
</p>
<p>GRUB provides several environment variables which may be used to inspect or
change the behaviour of the PXE device. In the following description
<var>&lt;interface&gt;</var> is placeholder for the name of network interface (platform
dependent):
</p>
<dl compact="compact">
<dt>&lsquo;<samp>net_<var>&lt;interface&gt;</var>_ip</samp>&rsquo;</dt>
<dd><p>The network interface&rsquo;s IP address.  Read-only.
</p>
</dd>
<dt>&lsquo;<samp>net_<var>&lt;interface&gt;</var>_mac</samp>&rsquo;</dt>
<dd><p>The network interface&rsquo;s MAC address.  Read-only.
</p>
</dd>
<dt>&lsquo;<samp>net_<var>&lt;interface&gt;</var>_hostname</samp>&rsquo;</dt>
<dd><p>The client host name provided by DHCP.  Read-only.
</p>
</dd>
<dt>&lsquo;<samp>net_<var>&lt;interface&gt;</var>_domain</samp>&rsquo;</dt>
<dd><p>The client domain name provided by DHCP.  Read-only.
</p>
</dd>
<dt>&lsquo;<samp>net_<var>&lt;interface&gt;</var>_rootpath</samp>&rsquo;</dt>
<dd><p>The path to the client&rsquo;s root disk provided by DHCP.  Read-only.
</p>
</dd>
<dt>&lsquo;<samp>net_<var>&lt;interface&gt;</var>_extensionspath</samp>&rsquo;</dt>
<dd><p>The path to additional DHCP vendor extensions provided by DHCP.  Read-only.
</p>
</dd>
<dt>&lsquo;<samp>net_<var>&lt;interface&gt;</var>_boot_file</samp>&rsquo;</dt>
<dd><p>The boot file name provided by DHCP.  Read-only.
</p>
</dd>
<dt>&lsquo;<samp>net_<var>&lt;interface&gt;</var>_dhcp_server_name</samp>&rsquo;</dt>
<dd><p>The name of the DHCP server responsible for these boot parameters.
Read-only.
</p>
</dd>
<dt>&lsquo;<samp>net_<var>&lt;interface&gt;</var>_next_server</samp>&rsquo;</dt>
<dd><p>The IP address of the next (usually, TFTP) server provided by DHCP.
Read-only.
</p>
</dd>
<dt>&lsquo;<samp>net_default_interface</samp>&rsquo;</dt>
<dd><p>Initially set to name of network interface that was used to load grub.
Read-write, although setting it affects only interpretation of
&lsquo;<samp>net_default_ip</samp>&rsquo; and &lsquo;<samp>net_default_mac</samp>&rsquo;
</p>
</dd>
<dt>&lsquo;<samp>net_default_ip</samp>&rsquo;</dt>
<dd><p>The IP address of default interface.  Read-only. This is alias for the
&lsquo;<samp>net_${net_default_interface}_ip</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>net_default_mac</samp>&rsquo;</dt>
<dd><p>The default interface&rsquo;s MAC address.  Read-only.  This is alias for the
&lsquo;<samp>net_${net_default_interface}_mac</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>net_default_server</samp>&rsquo;</dt>
<dd><p>The default server used by network drives (see <a href="#Device-syntax">Device syntax</a>).  Read-write,
although setting this is only useful before opening a network device.
</p>
</dd>
</dl>


<hr>
<span id="Serial-terminal"></span><div class="header">
<p>
Next: <a href="#Vendor-power_002don-keys" accesskey="n" rel="next">Vendor power-on keys</a>, Previous: <a href="#Network" accesskey="p" rel="prev">Network</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Using-GRUB-via-a-serial-line"></span><h2 class="chapter">9 Using GRUB via a serial line</h2>

<p>This chapter describes how to use the serial terminal support in GRUB.
</p>
<p>If you have many computers or computers with no display/keyboard, it
could be very useful to control the computers through serial
communications. To connect one computer with another via a serial line,
you need to prepare a null-modem (cross) serial cable, and you may need
to have multiport serial boards, if your computer doesn&rsquo;t have extra
serial ports. In addition, a terminal emulator is also required, such as
minicom. Refer to a manual of your operating system, for more
information.
</p>
<p>As for GRUB, the instruction to set up a serial terminal is quite
simple.  Here is an example:
</p>
<div class="example">
<pre class="example">grub&gt; <kbd>serial --unit=0 --speed=9600</kbd>
grub&gt; <kbd>terminal_input serial; terminal_output serial</kbd>
</pre></div>

<p>The command <code>serial</code> initializes the serial unit 0 with the
speed 9600bps. The serial unit 0 is usually called &lsquo;<samp>COM1</samp>&rsquo;, so, if
you want to use COM2, you must specify &lsquo;<samp>--unit=1</samp>&rsquo; instead. This
command accepts many other options, so please refer to <a href="#serial">serial</a>,
for more details.
</p>
<p>The commands <code>terminal_input</code> (see <a href="#terminal_005finput">terminal_input</a>) and
<code>terminal_output</code> (see <a href="#terminal_005foutput">terminal_output</a>) choose which type of
terminal you want to use. In the case above, the terminal will be a
serial terminal, but you can also pass <code>console</code> to the command,
as &lsquo;<samp>terminal_input serial console</samp>&rsquo;. In this case, a terminal in which
you press any key will be selected as a GRUB terminal. In the example above,
note that you need to put both commands on the same command line, as you
will lose the ability to type commands on the console after the first
command.
</p>
<p>However, note that GRUB assumes that your terminal emulator is
compatible with VT100 by default. This is true for most terminal
emulators nowadays, but you should pass the option <samp>--dumb</samp> to
the command if your terminal emulator is not VT100-compatible or
implements few VT100 escape sequences. If you specify this option then
GRUB provides you with an alternative menu interface, because the normal
menu requires several fancy features of your terminal.
</p>

<hr>
<span id="Vendor-power_002don-keys"></span><div class="header">
<p>
Next: <a href="#Images" accesskey="n" rel="next">Images</a>, Previous: <a href="#Serial-terminal" accesskey="p" rel="prev">Serial terminal</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Using-GRUB-with-vendor-power_002don-keys"></span><h2 class="chapter">10 Using GRUB with vendor power-on keys</h2>

<p>Some laptop vendors provide an additional power-on button which boots
another OS.  GRUB supports such buttons with the &lsquo;<samp>GRUB_TIMEOUT_BUTTON</samp>&rsquo;,
&lsquo;<samp>GRUB_TIMEOUT_STYLE_BUTTON</samp>&rsquo;, &lsquo;<samp>GRUB_DEFAULT_BUTTON</samp>&rsquo;, and
&lsquo;<samp>GRUB_BUTTON_CMOS_ADDRESS</samp>&rsquo; variables in default/grub (see <a href="#Simple-configuration">Simple configuration</a>).  &lsquo;<samp>GRUB_TIMEOUT_BUTTON</samp>&rsquo;,
&lsquo;<samp>GRUB_TIMEOUT_STYLE_BUTTON</samp>&rsquo;, and &lsquo;<samp>GRUB_DEFAULT_BUTTON</samp>&rsquo; are used
instead of the corresponding variables without the &lsquo;<samp>_BUTTON</samp>&rsquo; suffix
when powered on using the special button.  &lsquo;<samp>GRUB_BUTTON_CMOS_ADDRESS</samp>&rsquo;
is vendor-specific and partially model-specific.  Values known to the GRUB
team are:
</p>
<dl compact="compact">
<dt><tt class="key">Dell XPS M1330M</tt></dt>
<dd><p>121:3
</p></dd>
<dt><tt class="key">Dell XPS M1530</tt></dt>
<dd><p>85:3
</p></dd>
<dt><tt class="key">Dell Latitude E4300</tt></dt>
<dd><p>85:3
</p></dd>
<dt><tt class="key">Asus EeePC 1005PE</tt></dt>
<dd><p>84:1 (unconfirmed)
</p></dd>
<dt><tt class="key">LENOVO ThinkPad T410s (2912W1C)</tt></dt>
<dd><p>101:3
</p></dd>
</dl>

<p>To take full advantage of this function, install GRUB into the MBR
(see <a href="#Installing-GRUB-using-grub2_002dinstall">Installing GRUB using grub2-install</a>).
</p>
<p>If you have a laptop which has a similar feature and not in the above list
could you figure your address and contribute?
To discover the address do the following:
</p><ul>
<li> boot normally
</li><li> <div class="example">
<pre class="example">sudo modprobe nvram
sudo cat /dev/nvram | xxd &gt; normal_button.txt
</pre></div>
</li><li> boot using vendor button
</li><li> <div class="example">
<pre class="example">sudo modprobe nvram
sudo cat /dev/nvram | xxd &gt; normal_vendor.txt
</pre></div>
</li></ul>

<p>Then compare these text files and find where a bit was toggled. E.g. in
case of Dell XPS it was:
</p><div class="example">
<pre class="example">byte 0x47: 20 --&gt; 28
</pre></div>
<p>It&rsquo;s a bit number 3 as seen from following table:
</p><table>
<tr><td width="20%">0</td><td width="20%">01</td></tr>
<tr><td width="20%">1</td><td width="20%">02</td></tr>
<tr><td width="20%">2</td><td width="20%">04</td></tr>
<tr><td width="20%">3</td><td width="20%">08</td></tr>
<tr><td width="20%">4</td><td width="20%">10</td></tr>
<tr><td width="20%">5</td><td width="20%">20</td></tr>
<tr><td width="20%">6</td><td width="20%">40</td></tr>
<tr><td width="20%">7</td><td width="20%">80</td></tr>
</table>

<p>0x47 is decimal 71. Linux nvram implementation cuts first 14 bytes of
CMOS. So the real byte address in CMOS is 71+14=85
So complete address is 85:3
</p>
<hr>
<span id="Images"></span><div class="header">
<p>
Next: <a href="#Core-image-size-limitation" accesskey="n" rel="next">Core image size limitation</a>, Previous: <a href="#Vendor-power_002don-keys" accesskey="p" rel="prev">Vendor power-on keys</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="GRUB-image-files"></span><h2 class="chapter">11 GRUB image files</h2>


<p>GRUB consists of several images: a variety of bootstrap images for starting
GRUB in various ways, a kernel image, and a set of modules which are
combined with the kernel image to form a core image.  Here is a short
overview of them.
</p>
<dl compact="compact">
<dt><samp>boot.img</samp></dt>
<dd><p>On PC BIOS systems, this image is the first part of GRUB to start.  It is
written to a master boot record (MBR) or to the boot sector of a partition.
Because a PC boot sector is 512 bytes, the size of this image is exactly 512
bytes.
</p>
<p>The sole function of <samp>boot.img</samp> is to read the first sector of the core
image from a local disk and jump to it.  Because of the size restriction,
<samp>boot.img</samp> cannot understand any file system structure, so
<code>grub2-install</code> hardcodes the location of the first sector of the
core image into <samp>boot.img</samp> when installing GRUB.
</p>
</dd>
<dt><samp>diskboot.img</samp></dt>
<dd><p>This image is used as the first sector of the core image when booting from a
hard disk.  It reads the rest of the core image into memory and starts the
kernel.  Since file system handling is not yet available, it encodes the
location of the core image using a block list format.
</p>
</dd>
<dt><samp>cdboot.img</samp></dt>
<dd><p>This image is used as the first sector of the core image when booting from a
CD-ROM drive.  It performs a similar function to <samp>diskboot.img</samp>.
</p>
</dd>
<dt><samp>pxeboot.img</samp></dt>
<dd><p>This image is used as the start of the core image when booting from the
network using PXE.  See <a href="#Network">Network</a>.
</p>
</dd>
<dt><samp>lnxboot.img</samp></dt>
<dd><p>This image may be placed at the start of the core image in order to make
GRUB look enough like a Linux kernel that it can be booted by LILO using an
&lsquo;<samp>image=</samp>&rsquo; section.
</p>
</dd>
<dt><samp>kernel.img</samp></dt>
<dd><p>This image contains GRUB&rsquo;s basic run-time facilities: frameworks for device
and file handling, environment variables, the rescue mode command-line
parser, and so on.  It is rarely used directly, but is built into all core
images.
</p>
</dd>
<dt><samp>core.img</samp></dt>
<dd><p>This is the core image of GRUB.  It is built dynamically from the kernel
image and an arbitrary list of modules by the <code>grub2-mkimage</code>
program.  Usually, it contains enough modules to access <samp>/boot/grub</samp>,
and loads everything else (including menu handling, the ability to load
target operating systems, and so on) from the file system at run-time.  The
modular design allows the core image to be kept small, since the areas of
disk where it must be installed are often as small as 32KB.
</p>
<p>See <a href="#BIOS-installation">BIOS installation</a>, for details on where the core image can be
installed on PC systems.
</p>
</dd>
<dt><samp>*.mod</samp></dt>
<dd><p>Everything else in GRUB resides in dynamically loadable modules.  These are
often loaded automatically, or built into the core image if they are
essential, but may also be loaded manually using the <code>insmod</code>
command (see <a href="#insmod">insmod</a>).
</p></dd>
</dl>

<span id="For-GRUB-Legacy-users"></span><h3 class="heading">For GRUB Legacy users</h3>

<p>GRUB 2 has a different design from GRUB Legacy, and so correspondences with
the images it used cannot be exact.  Nevertheless, GRUB Legacy users often
ask questions in the terms they are familiar with, and so here is a brief
guide to how GRUB 2&rsquo;s images relate to that.
</p>
<dl compact="compact">
<dt><samp>stage1</samp></dt>
<dd><p>Stage 1 from GRUB Legacy was very similar to <samp>boot.img</samp> in GRUB 2, and
they serve the same function.
</p>
</dd>
<dt><samp>*_stage1_5</samp></dt>
<dd><p>In GRUB Legacy, Stage 1.5&rsquo;s function was to include enough filesystem code
to allow the much larger Stage 2 to be read from an ordinary filesystem.  In
this respect, its function was similar to <samp>core.img</samp> in GRUB 2.
However, <samp>core.img</samp> is much more capable than Stage 1.5 was; since it
offers a rescue shell, it is sometimes possible to recover manually in the
event that it is unable to load any other modules, for example if partition
numbers have changed.  <samp>core.img</samp> is built in a more flexible way,
allowing GRUB 2 to support reading modules from advanced disk types such as
LVM and RAID.
</p>
<p>GRUB Legacy could run with only Stage 1 and Stage 2 in some limited
configurations, while GRUB 2 requires <samp>core.img</samp> and cannot work
without it.
</p>
</dd>
<dt><samp>stage2</samp></dt>
<dd><p>GRUB 2 has no single Stage 2 image.  Instead, it loads modules from
<samp>/boot/grub</samp> at run-time.
</p>
</dd>
<dt><samp>stage2_eltorito</samp></dt>
<dd><p>In GRUB 2, images for booting from CD-ROM drives are now constructed using
<samp>cdboot.img</samp> and <samp>core.img</samp>, making sure that the core image
contains the &lsquo;<samp>iso9660</samp>&rsquo; module.  It is usually best to use the
<code>grub2-mkrescue</code> program for this.
</p>
</dd>
<dt><samp>nbgrub</samp></dt>
<dd><p>There is as yet no equivalent for <samp>nbgrub</samp> in GRUB 2; it was used by
Etherboot and some other network boot loaders.
</p>
</dd>
<dt><samp>pxegrub</samp></dt>
<dd><p>In GRUB 2, images for PXE network booting are now constructed using
<samp>pxeboot.img</samp> and <samp>core.img</samp>, making sure that the core image
contains the &lsquo;<samp>pxe</samp>&rsquo; and &lsquo;<samp>pxecmd</samp>&rsquo; modules.  See <a href="#Network">Network</a>.
</p></dd>
</dl>

<hr>
<span id="Core-image-size-limitation"></span><div class="header">
<p>
Next: <a href="#Filesystem" accesskey="n" rel="next">Filesystem</a>, Previous: <a href="#Images" accesskey="p" rel="prev">Images</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Core-image-size-limitation-1"></span><h2 class="chapter">12 Core image size limitation</h2>

<p>Heavily limited platforms:
</p><ul>
<li> i386-pc (normal and PXE): the core image size (compressed) is limited by 458240 bytes.
 kernel.img (.text + .data + .bss, uncompressed) is limited by 392704 bytes.
 module size (uncompressed) + kernel.img (.text + .data, uncompressed) is limited by the size of contiguous chunk at 1M address.
</li><li> sparc64-ieee1275: kernel.img (.text + .data + .bss) + modules + 256K (stack) + 2M (heap) is limited by space available at 0x4400. On most platforms it&rsquo;s just 3 or 4M since ieee1275 maps only so much.
</li><li> i386-ieee1275: kernel.img  (.text + .data + .bss) + modules is limited by memory available at 0x10000, at most 596K
</li></ul>

<p>Lightly limited platforms:
</p>
<ul>
<li> *-xen: limited only by adress space and RAM size.
</li><li> i386-qemu: kernel.img (.text + .data + .bss) is limited by 392704 bytes.
                 (core.img would be limited by ROM size but it&rsquo;s unlimited on qemu
</li><li> All EFI platforms: limited by contiguous RAM size and possibly firmware bugs
</li><li> Coreboot and multiboot. kernel.img (.text + .data + .bss) is limited by 392704 bytes.
      module size is limited by the size of contiguous chunk at 1M address.
</li><li> mipsel-loongson (ELF), mips(el)-qemu_mips (ELF): if uncompressed:
                kernel.img (.text + .data) + modules is limited by the space from 80200000 forward
                if compressed:
                kernel.img (.text + .data, uncompressed) + modules (uncompressed)
                + (modules + kernel.img (.text + .data)) (compressed)
                + decompressor is limited by the space from 80200000 forward
</li><li> mipsel-loongson (Flash), mips(el)-qemu_mips (Flash): kernel.img (.text + .data) + modules is limited by the space from 80200000 forward
                               core.img (final) is limited by flash size (512K on yeeloong and fulooong)
</li><li> mips-arc: if uncompressed:
                kernel.img (.text + .data) is limited by the space from 8bd00000 forward
                modules + dummy decompressor  is limited by the space from 8bd00000 backward
                if compressed:
                kernel.img (.text + .data, uncompressed) is limited by the space from 8bd00000 forward
                modules (uncompressed) + (modules + kernel.img (.text + .data)) (compressed, aligned to 1M)
                + 1M (decompressor + scratch space) is limited by the space from 8bd00000 backward
</li><li> powerpc-ieee1275: kernel.img (.text + .data + .bss) + modules is limited by space available at 0x200000
</li></ul>

<hr>
<span id="Filesystem"></span><div class="header">
<p>
Next: <a href="#Interface" accesskey="n" rel="next">Interface</a>, Previous: <a href="#Core-image-size-limitation" accesskey="p" rel="prev">Core image size limitation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Filesystem-syntax-and-semantics"></span><h2 class="chapter">13 Filesystem syntax and semantics</h2>

<p>GRUB uses a special syntax for specifying disk drives which can be
accessed by BIOS. Because of BIOS limitations, GRUB cannot distinguish
between IDE, ESDI, SCSI, or others. You must know yourself which BIOS
device is equivalent to which OS device. Normally, that will be clear if
you see the files in a device or use the command <code>search</code>
(see <a href="#search">search</a>).
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Device-syntax" accesskey="1">Device syntax</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to specify devices
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#File-name-syntax" accesskey="2">File name syntax</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to specify files
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Block-list-syntax" accesskey="3">Block list syntax</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to specify block lists
</td></tr>
</table>


<hr>
<span id="Device-syntax"></span><div class="header">
<p>
Next: <a href="#File-name-syntax" accesskey="n" rel="next">File name syntax</a>, Up: <a href="#Filesystem" accesskey="u" rel="up">Filesystem</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="How-to-specify-devices"></span><h3 class="section">13.1 How to specify devices</h3>

<p>The device syntax is like this:
</p>
<div class="example">
<pre class="example"><code>(<var>device</var>[,<var>partmap-name1</var><var>part-num1</var>[,<var>partmap-name2</var><var>part-num2</var>[,...]]])</code>
</pre></div>

<p>&lsquo;<samp>[]</samp>&rsquo; means the parameter is optional. <var>device</var> depends on the disk
driver in use. BIOS and EFI disks use either &lsquo;<samp>fd</samp>&rsquo; or &lsquo;<samp>hd</samp>&rsquo; followed
by a digit, like &lsquo;<samp>fd0</samp>&rsquo;, or &lsquo;<samp>cd</samp>&rsquo;.
AHCI, PATA (ata), crypto, USB use the name of driver followed by a number.
Memdisk and host are limited to one disk and so it&rsquo;s refered just by driver
name.
RAID (md), ofdisk (ieee1275 and nand), LVM (lvm), LDM, virtio (vdsk)
and arcdisk (arc) use intrinsic name of disk prefixed by driver name.
Additionally just &ldquo;nand&rdquo; refers to the disk aliased as &ldquo;nand&rdquo;.
Conflicts are solved by suffixing a number if necessarry.
Commas need to be escaped.
Loopback uses whatever name specified to <code>loopback</code> command.
Hostdisk uses names specified in device.map as long as it&rsquo;s of the form
[fhc]d[0-9]* or hostdisk/&lt;OS DEVICE&gt;.
For crypto and RAID (md) additionally you can use the syntax
&lt;driver name&gt;uuid/&lt;uuid&gt;.  For LVM additionally you can use the syntax
lvmid/&lt;volume-group-uuid&gt;/&lt;volume-uuid&gt;.
</p>
<div class="example">
<pre class="example">(fd0)
(hd0)
(cd)
(ahci0)
(ata0)
(crypto0)
(usb0)
(cryptouuid/123456789abcdef0123456789abcdef0)
(mduuid/123456789abcdef0123456789abcdef0)
(lvm/system-root)
(lvmid/F1ikgD-2RES-306G-il9M-7iwa-4NKW-EbV1NV/eLGuCQ-L4Ka-XUgR-sjtJ-ffch-bajr-fCNfz5)
(md/myraid)
(md/0)
(ieee1275/disk2)
(ieee1275//pci@1f\,0/ide@d/disk@2)
(nand)
(memdisk)
(host)
(myloop)
(hostdisk//dev/sda)
</pre></div>

<p><var>part-num</var> represents the partition number of <var>device</var>, starting
from one. <var>partname</var> is optional but is recommended since disk may have
several top-level partmaps. Specifying third and later component you can access
to subpartitions.
</p>
<p>The syntax &lsquo;<samp>(hd0)</samp>&rsquo; represents using the entire disk (or the
MBR when installing GRUB), while the syntax &lsquo;<samp>(hd0,1)</samp>&rsquo;
represents using the first partition of the disk (or the boot sector
of the partition when installing GRUB).
</p>
<div class="example">
<pre class="example">(hd0,msdos1)
(hd0,msdos1,msdos5)
(hd0,msdos1,bsd3)
(hd0,netbsd1)
(hd0,gpt1)
(hd0,1,3)
</pre></div>

<p>If you enabled the network support, the special drives
<code>(<var>protocol</var>[,<var>server</var>])</code> are also available. Supported protocols
are &lsquo;<samp>http</samp>&rsquo; and &lsquo;<samp>tftp</samp>&rsquo;. If <var>server</var> is omitted, value of
environment variable &lsquo;<samp>net_default_server</samp>&rsquo; is used.
Before using the network drive, you must initialize the network.
See <a href="#Network">Network</a>, for more information.
</p>
<p>If you boot GRUB from a CD-ROM, &lsquo;<samp>(cd)</samp>&rsquo; is available. See <a href="#Making-a-GRUB-bootable-CD_002dROM">Making a GRUB bootable CD-ROM</a>, for details.
</p>

<hr>
<span id="File-name-syntax"></span><div class="header">
<p>
Next: <a href="#Block-list-syntax" accesskey="n" rel="next">Block list syntax</a>, Previous: <a href="#Device-syntax" accesskey="p" rel="prev">Device syntax</a>, Up: <a href="#Filesystem" accesskey="u" rel="up">Filesystem</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="How-to-specify-files"></span><h3 class="section">13.2 How to specify files</h3>

<p>There are two ways to specify files, by <em>absolute file name</em> and by
<em>block list</em>.
</p>
<p>An absolute file name resembles a Unix absolute file name, using
&lsquo;<samp>/</samp>&rsquo; for the directory separator (not &lsquo;<samp>\</samp>&rsquo; as in DOS). One
example is &lsquo;<samp>(hd0,1)/boot/grub2/grub.cfg</samp>&rsquo;. This means the file
<samp>/boot/grub2/grub.cfg</samp> in the first partition of the first hard
disk. If you omit the device name in an absolute file name, GRUB uses
GRUB&rsquo;s <em>root device</em> implicitly. So if you set the root device to,
say, &lsquo;<samp>(hd1,1)</samp>&rsquo; by the command &lsquo;<samp>set root=(hd1,1)</samp>&rsquo; (see <a href="#set">set</a>),
then <code>/boot/kernel</code> is the same as <code>(hd1,1)/boot/kernel</code>.
</p>
<p>On ZFS filesystem the first path component must be
<var>volume</var>&lsquo;<samp>@</samp>&rsquo;[<var>snapshot</var>].
So &lsquo;<samp>/rootvol@snap-129/boot/grub2/grub.cfg</samp>&rsquo; refers to file
&lsquo;<samp>/boot/grub2/grub.cfg</samp>&rsquo; in snapshot of volume &lsquo;<samp>rootvol</samp>&rsquo; with name
&lsquo;<samp>snap-129</samp>&rsquo;.  Trailing &lsquo;<samp>@</samp>&rsquo; after volume name is mandatory even if
snapshot name is omitted.
</p>

<hr>
<span id="Block-list-syntax"></span><div class="header">
<p>
Previous: <a href="#File-name-syntax" accesskey="p" rel="prev">File name syntax</a>, Up: <a href="#Filesystem" accesskey="u" rel="up">Filesystem</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="How-to-specify-block-lists"></span><h3 class="section">13.3 How to specify block lists</h3>

<p>A block list is used for specifying a file that doesn&rsquo;t appear in the
filesystem, like a chainloader. The syntax is
<code>[<var>offset</var>]+<var>length</var>[,[<var>offset</var>]+<var>length</var>]&hellip;</code>.
Here is an example:
</p>
<div class="example">
<pre class="example"><code>0+100,200+1,300+300</code>
</pre></div>

<p>This represents that GRUB should read blocks 0 through 99, block 200,
and blocks 300 through 599. If you omit an offset, then GRUB assumes
the offset is zero.
</p>
<p>Like the file name syntax (see <a href="#File-name-syntax">File name syntax</a>), if a blocklist
does not contain a device name, then GRUB uses GRUB&rsquo;s <em>root
device</em>. So <code>(hd0,2)+1</code> is the same as <code>+1</code> when the root
device is &lsquo;<samp>(hd0,2)</samp>&rsquo;.
</p>

<hr>
<span id="Interface"></span><div class="header">
<p>
Next: <a href="#Environment" accesskey="n" rel="next">Environment</a>, Previous: <a href="#Filesystem" accesskey="p" rel="prev">Filesystem</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="GRUB_0027s-user-interface"></span><h2 class="chapter">14 GRUB&rsquo;s user interface</h2>

<p>GRUB has both a simple menu interface for choosing preset entries from a
configuration file, and a highly flexible command-line for performing
any desired combination of boot commands.
</p>
<p>GRUB looks for its configuration file as soon as it is loaded. If one
is found, then the full menu interface is activated using whatever
entries were found in the file. If you choose the <em>command-line</em> menu
option, or if the configuration file was not found, then GRUB drops to
the command-line interface.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Command_002dline-interface" accesskey="1">Command-line interface</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The flexible command-line interface
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Menu-interface" accesskey="2">Menu interface</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The simple menu interface
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Menu-entry-editor" accesskey="3">Menu entry editor</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Editing a menu entry
</td></tr>
</table>


<hr>
<span id="Command_002dline-interface"></span><div class="header">
<p>
Next: <a href="#Menu-interface" accesskey="n" rel="next">Menu interface</a>, Up: <a href="#Interface" accesskey="u" rel="up">Interface</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-flexible-command_002dline-interface"></span><h3 class="section">14.1 The flexible command-line interface</h3>

<p>The command-line interface provides a prompt and after it an editable
text area much like a command-line in Unix or DOS. Each command is
immediately executed after it is entered<a id="DOCF8" href="#FOOT8"><sup>8</sup></a>. The commands (see <a href="#Command_002dline-and-menu-entry-commands">Command-line and menu entry commands</a>) are a
subset of those available in the configuration file, used with exactly
the same syntax.
</p>
<p>Cursor movement and editing of the text on the line can be done via a
subset of the functions available in the Bash shell:
</p>
<dl compact="compact">
<dt><tt class="key">C-f</tt></dt>
<dt><tt class="key">PC right key</tt></dt>
<dd><p>Move forward one character.
</p>
</dd>
<dt><tt class="key">C-b</tt></dt>
<dt><tt class="key">PC left key</tt></dt>
<dd><p>Move back one character.
</p>
</dd>
<dt><tt class="key">C-a</tt></dt>
<dt><tt class="key">HOME</tt></dt>
<dd><p>Move to the start of the line.
</p>
</dd>
<dt><tt class="key">C-e</tt></dt>
<dt><tt class="key">END</tt></dt>
<dd><p>Move the the end of the line.
</p>
</dd>
<dt><tt class="key">C-d</tt></dt>
<dt><tt class="key">DEL</tt></dt>
<dd><p>Delete the character underneath the cursor.
</p>
</dd>
<dt><tt class="key">C-h</tt></dt>
<dt><tt class="key">BS</tt></dt>
<dd><p>Delete the character to the left of the cursor.
</p>
</dd>
<dt><tt class="key">C-k</tt></dt>
<dd><p>Kill the text from the current cursor position to the end of the line.
</p>
</dd>
<dt><tt class="key">C-u</tt></dt>
<dd><p>Kill backward from the cursor to the beginning of the line.
</p>
</dd>
<dt><tt class="key">C-y</tt></dt>
<dd><p>Yank the killed text back into the buffer at the cursor.
</p>
</dd>
<dt><tt class="key">C-p</tt></dt>
<dt><tt class="key">PC up key</tt></dt>
<dd><p>Move up through the history list.
</p>
</dd>
<dt><tt class="key">C-n</tt></dt>
<dt><tt class="key">PC down key</tt></dt>
<dd><p>Move down through the history list.
</p></dd>
</dl>

<p>When typing commands interactively, if the cursor is within or before
the first word in the command-line, pressing the <tt class="key">TAB</tt> key (or
<tt class="key">C-i</tt>) will display a listing of the available commands, and if the
cursor is after the first word, the <kbd><span class="key">TAB</span></kbd> will provide a
completion listing of disks, partitions, and file names depending on the
context. Note that to obtain a list of drives, one must open a
parenthesis, as <code>root (</code>.
</p>
<p>Note that you cannot use the completion functionality in the TFTP
filesystem. This is because TFTP doesn&rsquo;t support file name listing for
the security.
</p>

<hr>
<span id="Menu-interface"></span><div class="header">
<p>
Next: <a href="#Menu-entry-editor" accesskey="n" rel="next">Menu entry editor</a>, Previous: <a href="#Command_002dline-interface" accesskey="p" rel="prev">Command-line interface</a>, Up: <a href="#Interface" accesskey="u" rel="up">Interface</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-simple-menu-interface"></span><h3 class="section">14.2 The simple menu interface</h3>

<p>The menu interface is quite easy to use. Its commands are both
reasonably intuitive and described on screen.
</p>
<p>Basically, the menu interface provides a list of <em>boot entries</em> to
the user to choose from. Use the arrow keys to select the entry of
choice, then press <tt class="key">RET</tt> to run it.  An optional timeout is
available to boot the default entry (the first one if not set), which is
aborted by pressing any key.
</p>
<p>Commands are available to enter a bare command-line by pressing <tt class="key">c</tt>
(which operates exactly like the non-config-file version of GRUB, but
allows one to return to the menu if desired by pressing <tt class="key">ESC</tt>) or to
edit any of the <em>boot entries</em> by pressing <tt class="key">e</tt>.
</p>
<p>If you protect the menu interface with a password (see <a href="#Security">Security</a>),
all you can do is choose an entry by pressing <tt class="key">RET</tt>, or press
<tt class="key">p</tt> to enter the password.
</p>

<hr>
<span id="Menu-entry-editor"></span><div class="header">
<p>
Previous: <a href="#Menu-interface" accesskey="p" rel="prev">Menu interface</a>, Up: <a href="#Interface" accesskey="u" rel="up">Interface</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Editing-a-menu-entry"></span><h3 class="section">14.3 Editing a menu entry</h3>

<p>The menu entry editor looks much like the main menu interface, but the
lines in the menu are individual commands in the selected entry instead
of entry names.
</p>
<p>If an <tt class="key">ESC</tt> is pressed in the editor, it aborts all the changes made
to the configuration entry and returns to the main menu interface.
</p>
<p>Each line in the menu entry can be edited freely, and you can add new lines
by pressing <tt class="key">RET</tt> at the end of a line.  To boot the edited entry, press
<tt class="key">Ctrl-x</tt>.
</p>
<p>Although GRUB unfortunately does not support <em>undo</em>, you can do almost
the same thing by just returning to the main menu using <tt class="key">ESC</tt>.
</p>

<hr>
<span id="Environment"></span><div class="header">
<p>
Next: <a href="#Commands" accesskey="n" rel="next">Commands</a>, Previous: <a href="#Interface" accesskey="p" rel="prev">Interface</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="GRUB-environment-variables"></span><h2 class="chapter">15 GRUB environment variables</h2>

<p>GRUB supports environment variables which are rather like those offered by
all Unix-like systems.  Environment variables have a name, which is unique
and is usually a short identifier, and a value, which is an arbitrary string
of characters.  They may be set (see <a href="#set">set</a>), unset (see <a href="#unset">unset</a>), or
looked up (see <a href="#Shell_002dlike-scripting">Shell-like scripting</a>) by name.
</p>
<p>A number of environment variables have special meanings to various parts of
GRUB.  Others may be used freely in GRUB configuration files.
</p>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Special-environment-variables" accesskey="1">Special environment variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Environment-block" accesskey="2">Environment block</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr>
<span id="Special-environment-variables"></span><div class="header">
<p>
Next: <a href="#Environment-block" accesskey="n" rel="next">Environment block</a>, Up: <a href="#Environment" accesskey="u" rel="up">Environment</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Special-environment-variables-1"></span><h3 class="section">15.1 Special environment variables</h3>

<p>These variables have special meaning to GRUB.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#biosnum" accesskey="1">biosnum</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#check_005fappended_005fsignatures" accesskey="2">check_appended_signatures</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#check_005fsignatures" accesskey="3">check_signatures</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#chosen" accesskey="4">chosen</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#cmdpath" accesskey="5">cmdpath</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#color_005fhighlight" accesskey="6">color_highlight</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#color_005fnormal" accesskey="7">color_normal</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#config_005fdirectory" accesskey="8">config_directory</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#config_005ffile" accesskey="9">config_file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#debug">debug</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#default">default</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#fallback">fallback</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#gfxmode">gfxmode</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#gfxpayload">gfxpayload</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#gfxterm_005ffont">gfxterm_font</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#grub_005fcpu">grub_cpu</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#grub_005fplatform">grub_platform</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#icondir">icondir</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#lang">lang</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#locale_005fdir">locale_dir</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#menu_005fcolor_005fhighlight">menu_color_highlight</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#menu_005fcolor_005fnormal">menu_color_normal</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005f_003cinterface_003e_005fboot_005ffile">net_<var>&lt;interface&gt;</var>_boot_file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005f_003cinterface_003e_005fdhcp_005fserver_005fname">net_<var>&lt;interface&gt;</var>_dhcp_server_name</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005f_003cinterface_003e_005fdomain">net_<var>&lt;interface&gt;</var>_domain</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005f_003cinterface_003e_005fextensionspath">net_<var>&lt;interface&gt;</var>_extensionspath</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005f_003cinterface_003e_005fhostname">net_<var>&lt;interface&gt;</var>_hostname</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005f_003cinterface_003e_005fip">net_<var>&lt;interface&gt;</var>_ip</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005f_003cinterface_003e_005fmac">net_<var>&lt;interface&gt;</var>_mac</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005f_003cinterface_003e_005fnext_005fserver">net_<var>&lt;interface&gt;</var>_next_server</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005f_003cinterface_003e_005frootpath">net_<var>&lt;interface&gt;</var>_rootpath</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fdefault_005finterface">net_default_interface</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fdefault_005fip">net_default_ip</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fdefault_005fmac">net_default_mac</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fdefault_005fserver">net_default_server</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#pager">pager</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#prefix">prefix</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#pxe_005fblksize">pxe_blksize</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#pxe_005fdefault_005fgateway">pxe_default_gateway</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#pxe_005fdefault_005fserver">pxe_default_server</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#root">root</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#superusers">superusers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#theme">theme</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#timeout">timeout</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#timeout_005fstyle">timeout_style</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr>
<span id="biosnum"></span><div class="header">
<p>
Next: <a href="#check_005fappended_005fsignatures" accesskey="n" rel="next">check_appended_signatures</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="biosnum-1"></span><h4 class="subsection">15.1.1 biosnum</h4>

<p>When chain-loading another boot loader (see <a href="#Chain_002dloading">Chain-loading</a>), GRUB may
need to know what BIOS drive number corresponds to the root device
(see <a href="#root">root</a>) so that it can set up registers properly.  If the
<var>biosnum</var> variable is set, it overrides GRUB&rsquo;s own means of guessing
this.
</p>
<p>For an alternative approach which also changes BIOS drive mappings for the
chain-loaded system, see <a href="#drivemap">drivemap</a>.
</p>

<hr>
<span id="check_005fappended_005fsignatures"></span><div class="header">
<p>
Next: <a href="#check_005fsignatures" accesskey="n" rel="next">check_signatures</a>, Previous: <a href="#biosnum" accesskey="p" rel="prev">biosnum</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="check_005fappended_005fsignatures-1"></span><h4 class="subsection">15.1.2 check_appended_signatures</h4>

<p>This variable controls whether GRUB enforces appended signature validation on
certain loaded files. See <a href="#Using-appended-signatures">Using appended signatures</a>.
</p>

<hr>
<span id="check_005fsignatures"></span><div class="header">
<p>
Next: <a href="#chosen" accesskey="n" rel="next">chosen</a>, Previous: <a href="#check_005fappended_005fsignatures" accesskey="p" rel="prev">check_appended_signatures</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="check_005fsignatures-1"></span><h4 class="subsection">15.1.3 check_signatures</h4>

<p>This variable controls whether GRUB enforces GPG-style digital signature
validation on loaded files. See <a href="#Using-GPG_002dstyle-digital-signatures">Using GPG-style digital signatures</a>.
</p>
<hr>
<span id="chosen"></span><div class="header">
<p>
Next: <a href="#cmdpath" accesskey="n" rel="next">cmdpath</a>, Previous: <a href="#check_005fsignatures" accesskey="p" rel="prev">check_signatures</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="chosen-1"></span><h4 class="subsection">15.1.4 chosen</h4>

<p>When executing a menu entry, GRUB sets the <var>chosen</var> variable to the
title of the entry being executed.
</p>
<p>If the menu entry is in one or more submenus, then <var>chosen</var> is set to
the titles of each of the submenus starting from the top level followed by
the title of the menu entry itself, separated by &lsquo;<samp>&gt;</samp>&rsquo;.
</p>

<hr>
<span id="cmdpath"></span><div class="header">
<p>
Next: <a href="#color_005fhighlight" accesskey="n" rel="next">color_highlight</a>, Previous: <a href="#chosen" accesskey="p" rel="prev">chosen</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="cmdpath-1"></span><h4 class="subsection">15.1.5 cmdpath</h4>

<p>The location from which <samp>core.img</samp> was loaded as an absolute
directory name (see <a href="#File-name-syntax">File name syntax</a>).  This is set by GRUB at
startup based on information returned by platform firmware.  Not every
platform provides this information and some may return only device
without path name.
</p>

<hr>
<span id="color_005fhighlight"></span><div class="header">
<p>
Next: <a href="#color_005fnormal" accesskey="n" rel="next">color_normal</a>, Previous: <a href="#cmdpath" accesskey="p" rel="prev">cmdpath</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="color_005fhighlight-1"></span><h4 class="subsection">15.1.6 color_highlight</h4>

<p>This variable contains the &ldquo;highlight&rdquo; foreground and background terminal
colors, separated by a slash (&lsquo;<samp>/</samp>&rsquo;).  Setting this variable changes
those colors.  For the available color names, see <a href="#color_005fnormal">color_normal</a>.
</p>
<p>The default is &lsquo;<samp>black/light-gray</samp>&rsquo;.
</p>

<hr>
<span id="color_005fnormal"></span><div class="header">
<p>
Next: <a href="#config_005fdirectory" accesskey="n" rel="next">config_directory</a>, Previous: <a href="#color_005fhighlight" accesskey="p" rel="prev">color_highlight</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="color_005fnormal-1"></span><h4 class="subsection">15.1.7 color_normal</h4>

<p>This variable contains the &ldquo;normal&rdquo; foreground and background terminal
colors, separated by a slash (&lsquo;<samp>/</samp>&rsquo;).  Setting this variable changes
those colors.  Each color must be a name from the following list:
</p>
<ul>
<li> black
</li><li> blue
</li><li> green
</li><li> cyan
</li><li> red
</li><li> magenta
</li><li> brown
</li><li> light-gray
</li><li> dark-gray
</li><li> light-blue
</li><li> light-green
</li><li> light-cyan
</li><li> light-red
</li><li> light-magenta
</li><li> yellow
</li><li> white
</li></ul>

<p>The default is &lsquo;<samp>light-gray/black</samp>&rsquo;.
</p>
<p>The color support support varies from terminal to terminal.
</p>
<p>&lsquo;<samp>morse</samp>&rsquo; has no color support at all.
</p>
<p>&lsquo;<samp>mda_text</samp>&rsquo; color support is limited to highlighting by
black/white reversal.
</p>
<p>&lsquo;<samp>console</samp>&rsquo; on ARC, EMU and IEEE1275, &lsquo;<samp>serial_*</samp>&rsquo; and
&lsquo;<samp>spkmodem</samp>&rsquo; are governed by terminfo and support
only 8 colors if in modes &lsquo;<samp>vt100-color</samp>&rsquo; (default for console on emu),
&lsquo;<samp>arc</samp>&rsquo; (default for console on ARC), &lsquo;<samp>ieee1275</samp>&rsquo; (default
for console on IEEE1275). When in mode &lsquo;<samp>vt100</samp>&rsquo;
then the color support is limited to highlighting by black/white
reversal. When in mode &lsquo;<samp>dumb</samp>&rsquo; there is no color support.
</p>
<p>When console supports no colors this setting is ignored.
When console supports 8 colors, then the colors from the
second half of the previous list are mapped to the
matching colors of first half.
</p>
<p>&lsquo;<samp>console</samp>&rsquo; on EFI and BIOS and &lsquo;<samp>vga_text</samp>&rsquo; support all 16 colors.
</p>
<p>&lsquo;<samp>gfxterm</samp>&rsquo; supports all 16 colors and would be theoretically extendable
to support whole rgb24 palette but currently there is no compelling reason
to go beyond the current 16 colors.
</p>

<hr>
<span id="config_005fdirectory"></span><div class="header">
<p>
Next: <a href="#config_005ffile" accesskey="n" rel="next">config_file</a>, Previous: <a href="#color_005fnormal" accesskey="p" rel="prev">color_normal</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="config_005fdirectory-1"></span><h4 class="subsection">15.1.8 config_directory</h4>

<p>This variable is automatically set by GRUB to the directory part of
current configuration file name (see <a href="#config_005ffile">config_file</a>).
</p>

<hr>
<span id="config_005ffile"></span><div class="header">
<p>
Next: <a href="#debug" accesskey="n" rel="next">debug</a>, Previous: <a href="#config_005fdirectory" accesskey="p" rel="prev">config_directory</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="config_005ffile-1"></span><h4 class="subsection">15.1.9 config_file</h4>

<p>This variable is automatically set by GRUB to the name of configuration file that is being
processed by commands <code>configfile</code> (see <a href="#configfile">configfile</a>) or <code>normal</code>
(see <a href="#normal">normal</a>).  It is restored to the previous value when command completes.
</p>

<hr>
<span id="debug"></span><div class="header">
<p>
Next: <a href="#default" accesskey="n" rel="next">default</a>, Previous: <a href="#config_005ffile" accesskey="p" rel="prev">config_file</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="debug-1"></span><h4 class="subsection">15.1.10 debug</h4>

<p>This variable may be set to enable debugging output from various components
of GRUB.  The value is a list of debug facility names separated by
whitespace or &lsquo;<samp>,</samp>&rsquo;, or &lsquo;<samp>all</samp>&rsquo; to enable all available debugging
output. The facility names are the first argument to grub_dprintf. Consult
source for more details.
</p>

<hr>
<span id="default"></span><div class="header">
<p>
Next: <a href="#fallback" accesskey="n" rel="next">fallback</a>, Previous: <a href="#debug" accesskey="p" rel="prev">debug</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="default-1"></span><h4 class="subsection">15.1.11 default</h4>

<p>If this variable is set, it identifies a menu entry that should be
selected by default, possibly after a timeout (see <a href="#timeout">timeout</a>).  The
entry may be identified by number (starting from 0 at each level of
the hierarchy), by title, or by id.
</p>
<p>For example, if you have:
</p>
<pre class="verbatim">menuentry 'Example GNU/Linux distribution' --class gnu-linux --id example-gnu-linux {
	...
}
</pre>
<p>then you can make this the default using:
</p>
<div class="example">
<pre class="example">default=example-gnu-linux
</pre></div>

<p>If the entry is in a submenu, then it must be identified using the
number, title, or id of each of the submenus starting from the top
level, followed by the number, title, or id of the menu entry itself,
with each element separated by &lsquo;<samp>&gt;</samp>&rsquo;.  For example, take the
following menu structure:
</p>
<div class="example">
<pre class="example">GNU/Hurd --id gnu-hurd
  Standard Boot --id=gnu-hurd-std
  Rescue shell --id=gnu-hurd-rescue
Other platforms --id=other
  Minix --id=minix
    Version 3.4.0 --id=minix-3.4.0
    Version 3.3.0 --id=minix-3.3.0
  GRUB Invaders --id=grub-invaders
</pre></div>

<p>The more recent release of Minix would then be identified as
&lsquo;<samp>Other platforms&gt;Minix&gt;Version 3.4.0</samp>&rsquo;, or as &lsquo;<samp>1&gt;0&gt;0</samp>&rsquo;, or as
&lsquo;<samp>other&gt;minix&gt;minix-3.4.0</samp>&rsquo;.
</p>
<p>This variable is often set by &lsquo;<samp>GRUB_DEFAULT</samp>&rsquo; (see <a href="#Simple-configuration">Simple configuration</a>), <code>grub2-set-default</code>, or <code>grub2-reboot</code>.
</p>

<hr>
<span id="fallback"></span><div class="header">
<p>
Next: <a href="#gfxmode" accesskey="n" rel="next">gfxmode</a>, Previous: <a href="#default" accesskey="p" rel="prev">default</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="fallback-1"></span><h4 class="subsection">15.1.12 fallback</h4>

<p>If this variable is set, it identifies a menu entry that should be selected
if the default menu entry fails to boot.  Entries are identified in the same
way as for &lsquo;<samp>default</samp>&rsquo; (see <a href="#default">default</a>).
</p>

<hr>
<span id="gfxmode"></span><div class="header">
<p>
Next: <a href="#gfxpayload" accesskey="n" rel="next">gfxpayload</a>, Previous: <a href="#fallback" accesskey="p" rel="prev">fallback</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="gfxmode-1"></span><h4 class="subsection">15.1.13 gfxmode</h4>

<p>If this variable is set, it sets the resolution used on the &lsquo;<samp>gfxterm</samp>&rsquo;
graphical terminal.  Note that you can only use modes which your graphics
card supports via VESA BIOS Extensions (VBE), so for example native LCD
panel resolutions may not be available.  The default is &lsquo;<samp>auto</samp>&rsquo;, which
selects a platform-specific default that should look reasonable. Supported
modes can be listed by &lsquo;<samp>videoinfo</samp>&rsquo; command in GRUB.
</p>
<p>The resolution may be specified as a sequence of one or more modes,
separated by commas (&lsquo;<samp>,</samp>&rsquo;) or semicolons (&lsquo;<samp>;</samp>&rsquo;); each will be tried
in turn until one is found.  Each mode should be either &lsquo;<samp>auto</samp>&rsquo;,
&lsquo;<samp><var>width</var>x<var>height</var></samp>&rsquo;, or
&lsquo;<samp><var>width</var>x<var>height</var>x<var>depth</var></samp>&rsquo;.
</p>

<hr>
<span id="gfxpayload"></span><div class="header">
<p>
Next: <a href="#gfxterm_005ffont" accesskey="n" rel="next">gfxterm_font</a>, Previous: <a href="#gfxmode" accesskey="p" rel="prev">gfxmode</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="gfxpayload-1"></span><h4 class="subsection">15.1.14 gfxpayload</h4>

<p>If this variable is set, it controls the video mode in which the Linux
kernel starts up, replacing the &lsquo;<samp>vga=</samp>&rsquo; boot option (see <a href="#linux">linux</a>).  It
may be set to &lsquo;<samp>text</samp>&rsquo; to force the Linux kernel to boot in normal text
mode, &lsquo;<samp>keep</samp>&rsquo; to preserve the graphics mode set using &lsquo;<samp>gfxmode</samp>&rsquo;, or
any of the permitted values for &lsquo;<samp>gfxmode</samp>&rsquo; to set a particular graphics
mode (see <a href="#gfxmode">gfxmode</a>).
</p>
<p>Depending on your kernel, your distribution, your graphics card, and the
phase of the moon, note that using this option may cause GNU/Linux to suffer
from various display problems, particularly during the early part of the
boot sequence.  If you have problems, set this variable to &lsquo;<samp>text</samp>&rsquo; and
GRUB will tell Linux to boot in normal text mode.
</p>
<p>The default is platform-specific.  On platforms with a native text mode
(such as PC BIOS platforms), the default is &lsquo;<samp>text</samp>&rsquo;.  Otherwise the
default may be &lsquo;<samp>auto</samp>&rsquo; or a specific video mode.
</p>
<p>This variable is often set by &lsquo;<samp>GRUB_GFXPAYLOAD_LINUX</samp>&rsquo; (see <a href="#Simple-configuration">Simple configuration</a>).
</p>

<hr>
<span id="gfxterm_005ffont"></span><div class="header">
<p>
Next: <a href="#grub_005fcpu" accesskey="n" rel="next">grub_cpu</a>, Previous: <a href="#gfxpayload" accesskey="p" rel="prev">gfxpayload</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="gfxterm_005ffont-1"></span><h4 class="subsection">15.1.15 gfxterm_font</h4>

<p>If this variable is set, it names a font to use for text on the
&lsquo;<samp>gfxterm</samp>&rsquo; graphical terminal.  Otherwise, &lsquo;<samp>gfxterm</samp>&rsquo; may use any
available font.
</p>

<hr>
<span id="grub_005fcpu"></span><div class="header">
<p>
Next: <a href="#grub_005fplatform" accesskey="n" rel="next">grub_platform</a>, Previous: <a href="#gfxterm_005ffont" accesskey="p" rel="prev">gfxterm_font</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="grub_005fcpu-1"></span><h4 class="subsection">15.1.16 grub_cpu</h4>

<p>In normal mode (see <a href="#normal">normal</a>), GRUB sets the &lsquo;<samp>grub_cpu</samp>&rsquo; variable to
the CPU type for which GRUB was built (e.g. &lsquo;<samp>i386</samp>&rsquo; or &lsquo;<samp>powerpc</samp>&rsquo;).
</p>

<hr>
<span id="grub_005fplatform"></span><div class="header">
<p>
Next: <a href="#icondir" accesskey="n" rel="next">icondir</a>, Previous: <a href="#grub_005fcpu" accesskey="p" rel="prev">grub_cpu</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="grub_005fplatform-1"></span><h4 class="subsection">15.1.17 grub_platform</h4>

<p>In normal mode (see <a href="#normal">normal</a>), GRUB sets the &lsquo;<samp>grub_platform</samp>&rsquo; variable
to the platform for which GRUB was built (e.g. &lsquo;<samp>pc</samp>&rsquo; or &lsquo;<samp>efi</samp>&rsquo;).
</p>

<hr>
<span id="icondir"></span><div class="header">
<p>
Next: <a href="#lang" accesskey="n" rel="next">lang</a>, Previous: <a href="#grub_005fplatform" accesskey="p" rel="prev">grub_platform</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="icondir-1"></span><h4 class="subsection">15.1.18 icondir</h4>

<p>If this variable is set, it names a directory in which the GRUB graphical
menu should look for icons after looking in the theme&rsquo;s &lsquo;<samp>icons</samp>&rsquo;
directory.  See <a href="#Theme-file-format">Theme file format</a>.
</p>

<hr>
<span id="lang"></span><div class="header">
<p>
Next: <a href="#locale_005fdir" accesskey="n" rel="next">locale_dir</a>, Previous: <a href="#icondir" accesskey="p" rel="prev">icondir</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="lang-1"></span><h4 class="subsection">15.1.19 lang</h4>

<p>If this variable is set, it names the language code that the
<code>gettext</code> command (see <a href="#gettext">gettext</a>) uses to translate strings.  For
example, French would be named as &lsquo;<samp>fr</samp>&rsquo;, and Simplified Chinese as
&lsquo;<samp>zh_CN</samp>&rsquo;.
</p>
<p><code>grub2-mkconfig</code> (see <a href="#Simple-configuration">Simple configuration</a>) will try to set a
reasonable default for this variable based on the system locale.
</p>

<hr>
<span id="locale_005fdir"></span><div class="header">
<p>
Next: <a href="#menu_005fcolor_005fhighlight" accesskey="n" rel="next">menu_color_highlight</a>, Previous: <a href="#lang" accesskey="p" rel="prev">lang</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="locale_005fdir-1"></span><h4 class="subsection">15.1.20 locale_dir</h4>

<p>If this variable is set, it names the directory where translation files may
be found (see <a href="#gettext">gettext</a>), usually <samp>/boot/grub2/locale</samp>.  Otherwise,
internationalization is disabled.
</p>
<p><code>grub2-mkconfig</code> (see <a href="#Simple-configuration">Simple configuration</a>) will set a reasonable
default for this variable if internationalization is needed and any
translation files are available.
</p>

<hr>
<span id="menu_005fcolor_005fhighlight"></span><div class="header">
<p>
Next: <a href="#menu_005fcolor_005fnormal" accesskey="n" rel="next">menu_color_normal</a>, Previous: <a href="#locale_005fdir" accesskey="p" rel="prev">locale_dir</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="menu_005fcolor_005fhighlight-1"></span><h4 class="subsection">15.1.21 menu_color_highlight</h4>

<p>This variable contains the foreground and background colors to be used for
the highlighted menu entry, separated by a slash (&lsquo;<samp>/</samp>&rsquo;).  Setting this
variable changes those colors.  For the available color names,
see <a href="#color_005fnormal">color_normal</a>.
</p>
<p>The default is the value of &lsquo;<samp>color_highlight</samp>&rsquo;
(see <a href="#color_005fhighlight">color_highlight</a>).
</p>

<hr>
<span id="menu_005fcolor_005fnormal"></span><div class="header">
<p>
Next: <a href="#net_005f_003cinterface_003e_005fboot_005ffile" accesskey="n" rel="next">net_<var>&lt;interface&gt;</var>_boot_file</a>, Previous: <a href="#menu_005fcolor_005fhighlight" accesskey="p" rel="prev">menu_color_highlight</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="menu_005fcolor_005fnormal-1"></span><h4 class="subsection">15.1.22 menu_color_normal</h4>

<p>This variable contains the foreground and background colors to be used for
non-highlighted menu entries, separated by a slash (&lsquo;<samp>/</samp>&rsquo;).  Setting this
variable changes those colors.  For the available color names,
see <a href="#color_005fnormal">color_normal</a>.
</p>
<p>The default is the value of &lsquo;<samp>color_normal</samp>&rsquo; (see <a href="#color_005fnormal">color_normal</a>).
</p>

<hr>
<span id="net_005f_003cinterface_003e_005fboot_005ffile"></span><div class="header">
<p>
Next: <a href="#net_005f_003cinterface_003e_005fdhcp_005fserver_005fname" accesskey="n" rel="next">net_<var>&lt;interface&gt;</var>_dhcp_server_name</a>, Previous: <a href="#menu_005fcolor_005fnormal" accesskey="p" rel="prev">menu_color_normal</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005f_003cinterface_003e_005fboot_005ffile-1"></span><h4 class="subsection">15.1.23 net_<var>&lt;interface&gt;</var>_boot_file</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005f_003cinterface_003e_005fdhcp_005fserver_005fname"></span><div class="header">
<p>
Next: <a href="#net_005f_003cinterface_003e_005fdomain" accesskey="n" rel="next">net_<var>&lt;interface&gt;</var>_domain</a>, Previous: <a href="#net_005f_003cinterface_003e_005fboot_005ffile" accesskey="p" rel="prev">net_<var>&lt;interface&gt;</var>_boot_file</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005f_003cinterface_003e_005fdhcp_005fserver_005fname-1"></span><h4 class="subsection">15.1.24 net_<var>&lt;interface&gt;</var>_dhcp_server_name</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005f_003cinterface_003e_005fdomain"></span><div class="header">
<p>
Next: <a href="#net_005f_003cinterface_003e_005fextensionspath" accesskey="n" rel="next">net_<var>&lt;interface&gt;</var>_extensionspath</a>, Previous: <a href="#net_005f_003cinterface_003e_005fdhcp_005fserver_005fname" accesskey="p" rel="prev">net_<var>&lt;interface&gt;</var>_dhcp_server_name</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005f_003cinterface_003e_005fdomain-1"></span><h4 class="subsection">15.1.25 net_<var>&lt;interface&gt;</var>_domain</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005f_003cinterface_003e_005fextensionspath"></span><div class="header">
<p>
Next: <a href="#net_005f_003cinterface_003e_005fhostname" accesskey="n" rel="next">net_<var>&lt;interface&gt;</var>_hostname</a>, Previous: <a href="#net_005f_003cinterface_003e_005fdomain" accesskey="p" rel="prev">net_<var>&lt;interface&gt;</var>_domain</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005f_003cinterface_003e_005fextensionspath-1"></span><h4 class="subsection">15.1.26 net_<var>&lt;interface&gt;</var>_extensionspath</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005f_003cinterface_003e_005fhostname"></span><div class="header">
<p>
Next: <a href="#net_005f_003cinterface_003e_005fip" accesskey="n" rel="next">net_<var>&lt;interface&gt;</var>_ip</a>, Previous: <a href="#net_005f_003cinterface_003e_005fextensionspath" accesskey="p" rel="prev">net_<var>&lt;interface&gt;</var>_extensionspath</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005f_003cinterface_003e_005fhostname-1"></span><h4 class="subsection">15.1.27 net_<var>&lt;interface&gt;</var>_hostname</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005f_003cinterface_003e_005fip"></span><div class="header">
<p>
Next: <a href="#net_005f_003cinterface_003e_005fmac" accesskey="n" rel="next">net_<var>&lt;interface&gt;</var>_mac</a>, Previous: <a href="#net_005f_003cinterface_003e_005fhostname" accesskey="p" rel="prev">net_<var>&lt;interface&gt;</var>_hostname</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005f_003cinterface_003e_005fip-1"></span><h4 class="subsection">15.1.28 net_<var>&lt;interface&gt;</var>_ip</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005f_003cinterface_003e_005fmac"></span><div class="header">
<p>
Next: <a href="#net_005f_003cinterface_003e_005fnext_005fserver" accesskey="n" rel="next">net_<var>&lt;interface&gt;</var>_next_server</a>, Previous: <a href="#net_005f_003cinterface_003e_005fip" accesskey="p" rel="prev">net_<var>&lt;interface&gt;</var>_ip</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005f_003cinterface_003e_005fmac-1"></span><h4 class="subsection">15.1.29 net_<var>&lt;interface&gt;</var>_mac</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005f_003cinterface_003e_005fnext_005fserver"></span><div class="header">
<p>
Next: <a href="#net_005f_003cinterface_003e_005frootpath" accesskey="n" rel="next">net_<var>&lt;interface&gt;</var>_rootpath</a>, Previous: <a href="#net_005f_003cinterface_003e_005fmac" accesskey="p" rel="prev">net_<var>&lt;interface&gt;</var>_mac</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005f_003cinterface_003e_005fnext_005fserver-1"></span><h4 class="subsection">15.1.30 net_<var>&lt;interface&gt;</var>_next_server</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005f_003cinterface_003e_005frootpath"></span><div class="header">
<p>
Next: <a href="#net_005fdefault_005finterface" accesskey="n" rel="next">net_default_interface</a>, Previous: <a href="#net_005f_003cinterface_003e_005fnext_005fserver" accesskey="p" rel="prev">net_<var>&lt;interface&gt;</var>_next_server</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005f_003cinterface_003e_005frootpath-1"></span><h4 class="subsection">15.1.31 net_<var>&lt;interface&gt;</var>_rootpath</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005fdefault_005finterface"></span><div class="header">
<p>
Next: <a href="#net_005fdefault_005fip" accesskey="n" rel="next">net_default_ip</a>, Previous: <a href="#net_005f_003cinterface_003e_005frootpath" accesskey="p" rel="prev">net_<var>&lt;interface&gt;</var>_rootpath</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fdefault_005finterface-1"></span><h4 class="subsection">15.1.32 net_default_interface</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005fdefault_005fip"></span><div class="header">
<p>
Next: <a href="#net_005fdefault_005fmac" accesskey="n" rel="next">net_default_mac</a>, Previous: <a href="#net_005fdefault_005finterface" accesskey="p" rel="prev">net_default_interface</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fdefault_005fip-1"></span><h4 class="subsection">15.1.33 net_default_ip</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005fdefault_005fmac"></span><div class="header">
<p>
Next: <a href="#net_005fdefault_005fserver" accesskey="n" rel="next">net_default_server</a>, Previous: <a href="#net_005fdefault_005fip" accesskey="p" rel="prev">net_default_ip</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fdefault_005fmac-1"></span><h4 class="subsection">15.1.34 net_default_mac</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="net_005fdefault_005fserver"></span><div class="header">
<p>
Next: <a href="#pager" accesskey="n" rel="next">pager</a>, Previous: <a href="#net_005fdefault_005fmac" accesskey="p" rel="prev">net_default_mac</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fdefault_005fserver-1"></span><h4 class="subsection">15.1.35 net_default_server</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="pager"></span><div class="header">
<p>
Next: <a href="#prefix" accesskey="n" rel="next">prefix</a>, Previous: <a href="#net_005fdefault_005fserver" accesskey="p" rel="prev">net_default_server</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="pager-1"></span><h4 class="subsection">15.1.36 pager</h4>

<p>If set to &lsquo;<samp>1</samp>&rsquo;, pause output after each screenful and wait for keyboard
input.  The default is not to pause output.
</p>

<hr>
<span id="prefix"></span><div class="header">
<p>
Next: <a href="#pxe_005fblksize" accesskey="n" rel="next">pxe_blksize</a>, Previous: <a href="#pager" accesskey="p" rel="prev">pager</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="prefix-1"></span><h4 class="subsection">15.1.37 prefix</h4>

<p>The location of the &lsquo;<samp>/boot/grub</samp>&rsquo; directory as an absolute file name
(see <a href="#File-name-syntax">File name syntax</a>).  This is normally set by GRUB at startup based
on information provided by <code>grub2-install</code>.  GRUB modules are
dynamically loaded from this directory, so it must be set correctly in order
for many parts of GRUB to work.
</p>

<hr>
<span id="pxe_005fblksize"></span><div class="header">
<p>
Next: <a href="#pxe_005fdefault_005fgateway" accesskey="n" rel="next">pxe_default_gateway</a>, Previous: <a href="#prefix" accesskey="p" rel="prev">prefix</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="pxe_005fblksize-1"></span><h4 class="subsection">15.1.38 pxe_blksize</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="pxe_005fdefault_005fgateway"></span><div class="header">
<p>
Next: <a href="#pxe_005fdefault_005fserver" accesskey="n" rel="next">pxe_default_server</a>, Previous: <a href="#pxe_005fblksize" accesskey="p" rel="prev">pxe_blksize</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="pxe_005fdefault_005fgateway-1"></span><h4 class="subsection">15.1.39 pxe_default_gateway</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="pxe_005fdefault_005fserver"></span><div class="header">
<p>
Next: <a href="#root" accesskey="n" rel="next">root</a>, Previous: <a href="#pxe_005fdefault_005fgateway" accesskey="p" rel="prev">pxe_default_gateway</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="pxe_005fdefault_005fserver-1"></span><h4 class="subsection">15.1.40 pxe_default_server</h4>

<p>See <a href="#Network">Network</a>.
</p>

<hr>
<span id="root"></span><div class="header">
<p>
Next: <a href="#superusers" accesskey="n" rel="next">superusers</a>, Previous: <a href="#pxe_005fdefault_005fserver" accesskey="p" rel="prev">pxe_default_server</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="root-1"></span><h4 class="subsection">15.1.41 root</h4>

<p>The root device name (see <a href="#Device-syntax">Device syntax</a>).  Any file names that do not
specify an explicit device name are read from this device.  The default is
normally set by GRUB at startup based on the value of &lsquo;<samp>prefix</samp>&rsquo;
(see <a href="#prefix">prefix</a>).
</p>
<p>For example, if GRUB was installed to the first partition of the first hard
disk, then &lsquo;<samp>prefix</samp>&rsquo; might be set to &lsquo;<samp>(hd0,msdos1)/boot/grub</samp>&rsquo; and
&lsquo;<samp>root</samp>&rsquo; to &lsquo;<samp>hd0,msdos1</samp>&rsquo;.
</p>

<hr>
<span id="superusers"></span><div class="header">
<p>
Next: <a href="#theme" accesskey="n" rel="next">theme</a>, Previous: <a href="#root" accesskey="p" rel="prev">root</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="superusers-1"></span><h4 class="subsection">15.1.42 superusers</h4>

<p>This variable may be set to a list of superuser names to enable
authentication support.  See <a href="#Security">Security</a>.
</p>

<hr>
<span id="theme"></span><div class="header">
<p>
Next: <a href="#timeout" accesskey="n" rel="next">timeout</a>, Previous: <a href="#superusers" accesskey="p" rel="prev">superusers</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="theme-1"></span><h4 class="subsection">15.1.43 theme</h4>

<p>This variable may be set to a directory containing a GRUB graphical menu
theme.  See <a href="#Theme-file-format">Theme file format</a>.
</p>
<p>This variable is often set by &lsquo;<samp>GRUB_THEME</samp>&rsquo; (see <a href="#Simple-configuration">Simple configuration</a>).
</p>

<hr>
<span id="timeout"></span><div class="header">
<p>
Next: <a href="#timeout_005fstyle" accesskey="n" rel="next">timeout_style</a>, Previous: <a href="#theme" accesskey="p" rel="prev">theme</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="timeout-1"></span><h4 class="subsection">15.1.44 timeout</h4>

<p>If this variable is set, it specifies the time in seconds to wait for
keyboard input before booting the default menu entry.  A timeout of &lsquo;<samp>0</samp>&rsquo;
means to boot the default entry immediately without displaying the menu; a
timeout of &lsquo;<samp>-1</samp>&rsquo; (or unset) means to wait indefinitely.
</p>
<p>If &lsquo;<samp>timeout_style</samp>&rsquo; (see <a href="#timeout_005fstyle">timeout_style</a>) is set to &lsquo;<samp>countdown</samp>&rsquo;
or &lsquo;<samp>hidden</samp>&rsquo;, the timeout is instead counted before the menu is
displayed.
</p>
<p>This variable is often set by &lsquo;<samp>GRUB_TIMEOUT</samp>&rsquo; (see <a href="#Simple-configuration">Simple configuration</a>).
</p>

<hr>
<span id="timeout_005fstyle"></span><div class="header">
<p>
Previous: <a href="#timeout" accesskey="p" rel="prev">timeout</a>, Up: <a href="#Special-environment-variables" accesskey="u" rel="up">Special environment variables</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="timeout_005fstyle-1"></span><h4 class="subsection">15.1.45 timeout_style</h4>

<p>This variable may be set to &lsquo;<samp>menu</samp>&rsquo;, &lsquo;<samp>countdown</samp>&rsquo;, or &lsquo;<samp>hidden</samp>&rsquo;
to control the way in which the timeout (see <a href="#timeout">timeout</a>) interacts with
displaying the menu.  See the documentation of &lsquo;<samp>GRUB_TIMEOUT_STYLE</samp>&rsquo;
(see <a href="#Simple-configuration">Simple configuration</a>) for details.
</p>

<hr>
<span id="Environment-block"></span><div class="header">
<p>
Previous: <a href="#Special-environment-variables" accesskey="p" rel="prev">Special environment variables</a>, Up: <a href="#Environment" accesskey="u" rel="up">Environment</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-GRUB-environment-block"></span><h3 class="section">15.2 The GRUB environment block</h3>

<p>It is often useful to be able to remember a small amount of information from
one boot to the next.  For example, you might want to set the default menu
entry based on what was selected the last time.  GRUB deliberately does not
implement support for writing files in order to minimise the possibility of
the boot loader being responsible for file system corruption, so a GRUB
configuration file cannot just create a file in the ordinary way.  However,
GRUB provides an &ldquo;environment block&rdquo; which can be used to save a small
amount of state.
</p>
<p>The environment block is a preallocated 1024-byte file, which normally lives
in <samp>/boot/grub2/grubenv</samp> (although you should not assume this).  At boot
time, the <code>load_env</code> command (see <a href="#load_005fenv">load_env</a>) loads environment
variables from it, and the <code>save_env</code> (see <a href="#save_005fenv">save_env</a>) command
saves environment variables to it.  From a running system, the
<code>grub2-editenv</code> utility can be used to edit the environment block.
</p>
<p>For safety reasons, this storage is only available when installed on a plain
disk (no LVM or RAID), using a non-checksumming filesystem (no ZFS), and
using BIOS or EFI functions (no ATA, USB or IEEE1275).
</p>
<p><code>grub2-mkconfig</code> uses this facility to implement
&lsquo;<samp>GRUB_SAVEDEFAULT</samp>&rsquo; (see <a href="#Simple-configuration">Simple configuration</a>).
</p>

<hr>
<span id="Commands"></span><div class="header">
<p>
Next: <a href="#Internationalisation" accesskey="n" rel="next">Internationalisation</a>, Previous: <a href="#Environment" accesskey="p" rel="prev">Environment</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-list-of-available-commands"></span><h2 class="chapter">16 The list of available commands</h2>

<p>In this chapter, we list all commands that are available in GRUB.
</p>
<p>Commands belong to different groups. A few can only be used in
the global section of the configuration file (or &ldquo;menu&rdquo;); most
of them can be entered on the command-line and can be used either
anywhere in the menu or specifically in the menu entries.
</p>
<p>In rescue mode, only the <code>insmod</code> (see <a href="#insmod">insmod</a>), <code>ls</code>
(see <a href="#ls">ls</a>), <code>set</code> (see <a href="#set">set</a>), and <code>unset</code>
(see <a href="#unset">unset</a>) commands are normally available.  If you end up in rescue
mode and do not know what to do, then see <a href="#GRUB-only-offers-a-rescue-shell">GRUB only offers a rescue shell</a>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Menu_002dspecific-commands" accesskey="1">Menu-specific commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#General-commands" accesskey="2">General commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Command_002dline-and-menu-entry-commands" accesskey="3">Command-line and menu entry commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Networking-commands" accesskey="4">Networking commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr>
<span id="Menu_002dspecific-commands"></span><div class="header">
<p>
Next: <a href="#General-commands" accesskey="n" rel="next">General commands</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-list-of-commands-for-the-menu-only"></span><h3 class="section">16.1 The list of commands for the menu only</h3>

<p>The semantics used in parsing the configuration file are the following:
</p>
<ul>
<li> The files <em>must</em> be in plain-text format.

</li><li> &lsquo;<samp>#</samp>&rsquo; at the beginning of a line in a configuration file means it is
only a comment.

</li><li> Options are separated by spaces.

</li><li> All numbers can be either decimal or hexadecimal. A hexadecimal number
must be preceded by &lsquo;<samp>0x</samp>&rsquo;, and is case-insensitive.
</li></ul>

<p>These commands can only be used in the menu:
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#menuentry" accesskey="1">menuentry</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Start a menu entry
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#submenu" accesskey="2">submenu</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Group menu entries
</td></tr>
</table>


<hr>
<span id="menuentry"></span><div class="header">
<p>
Next: <a href="#submenu" accesskey="n" rel="next">submenu</a>, Up: <a href="#Menu_002dspecific-commands" accesskey="u" rel="up">Menu-specific commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="menuentry-1"></span><h4 class="subsection">16.1.1 menuentry</h4>

<dl>
<dt id="index-menuentry">Command: <strong>menuentry</strong> <em><var>title</var>  [<samp>--class=class</samp> &hellip;] [<samp>--users=users</samp>]  [<samp>--unrestricted</samp>] [<samp>--hotkey=key</samp>] [<samp>--id=id</samp>]  [<var>arg</var> &hellip;] { <var>command</var>; &hellip; }</em></dt>
<dd><p>This defines a GRUB menu entry named <var>title</var>.  When this entry is
selected from the menu, GRUB will set the <var>chosen</var> environment variable
to value of <samp>--id</samp> if <samp>--id</samp> is given, execute the list of
commands given within braces, and if the last command in the list returned
successfully and a kernel was loaded it will execute the <code>boot</code> command.
</p>
<p>The <samp>--class</samp> option may be used any number of times to group menu
entries into classes.  Menu themes may display different classes using
different styles.
</p>
<p>The <samp>--users</samp> option grants specific users access to specific menu
entries.  See <a href="#Security">Security</a>.
</p>
<p>The <samp>--unrestricted</samp> option grants all users access to specific menu
entries.  See <a href="#Security">Security</a>.
</p>
<p>The <samp>--hotkey</samp> option associates a hotkey with a menu entry.
<var>key</var> may be a single letter, or one of the aliases &lsquo;<samp>backspace</samp>&rsquo;,
&lsquo;<samp>tab</samp>&rsquo;, or &lsquo;<samp>delete</samp>&rsquo;.
</p>
<p>The <samp>--id</samp> may be used to associate unique identifier with a menu entry.
<var>id</var> is string of ASCII aphanumeric characters, underscore and hyphen
and should not start with a digit.
</p>
<p>All other arguments including <var>title</var> are passed as positional parameters
when list of commands is executed with <var>title</var> always assigned to <code>$1</code>.
</p></dd></dl>


<hr>
<span id="submenu"></span><div class="header">
<p>
Previous: <a href="#menuentry" accesskey="p" rel="prev">menuentry</a>, Up: <a href="#Menu_002dspecific-commands" accesskey="u" rel="up">Menu-specific commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="submenu-1"></span><h4 class="subsection">16.1.2 submenu</h4>

<dl>
<dt id="index-submenu">Command: <strong>submenu</strong> <em><var>title</var>  [<samp>--class=class</samp> &hellip;] [<samp>--users=users</samp>]  [<samp>--unrestricted</samp>] [<samp>--hotkey=key</samp>] [<samp>--id=id</samp>]  { <var>menu entries</var> &hellip; }</em></dt>
<dd><p>This defines a submenu.  An entry called <var>title</var> will be added to the
menu; when that entry is selected, a new menu will be displayed showing all
the entries within this submenu.
</p>
<p>All options are the same as in the <code>menuentry</code> command
(see <a href="#menuentry">menuentry</a>).
</p></dd></dl>


<hr>
<span id="General-commands"></span><div class="header">
<p>
Next: <a href="#Command_002dline-and-menu-entry-commands" accesskey="n" rel="next">Command-line and menu entry commands</a>, Previous: <a href="#Menu_002dspecific-commands" accesskey="p" rel="prev">Menu-specific commands</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-list-of-general-commands"></span><h3 class="section">16.2 The list of general commands</h3>

<p>Commands usable anywhere in the menu and in the command-line.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#serial" accesskey="1">serial</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Set up a serial device
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#terminal_005finput" accesskey="2">terminal_input</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Manage input terminals
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#terminal_005foutput" accesskey="3">terminal_output</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Manage output terminals
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#terminfo" accesskey="4">terminfo</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Define terminal type
</td></tr>
</table>


<hr>
<span id="serial"></span><div class="header">
<p>
Next: <a href="#terminal_005finput" accesskey="n" rel="next">terminal_input</a>, Up: <a href="#General-commands" accesskey="u" rel="up">General commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="serial-1"></span><h4 class="subsection">16.2.1 serial</h4>

<dl>
<dt id="index-serial">Command: <strong>serial</strong> <em>[<samp>--unit=unit</samp>] [<samp>--port=port</samp>] [<samp>--speed=speed</samp>] [<samp>--word=word</samp>] [<samp>--parity=parity</samp>] [<samp>--stop=stop</samp>]</em></dt>
<dd><p>Initialize a serial device. <var>unit</var> is a number in the range 0-3
specifying which serial port to use; default is 0, which corresponds to
the port often called COM1. <var>port</var> is the I/O port where the UART
is to be found; if specified it takes precedence over <var>unit</var>.
<var>speed</var> is the transmission speed; default is 9600. <var>word</var> and
<var>stop</var> are the number of data bits and stop bits. Data bits must
be in the range 5-8 and stop bits must be 1 or 2. Default is 8 data
bits and one stop bit. <var>parity</var> is one of &lsquo;<samp>no</samp>&rsquo;, &lsquo;<samp>odd</samp>&rsquo;,
&lsquo;<samp>even</samp>&rsquo; and defaults to &lsquo;<samp>no</samp>&rsquo;.
</p>
<p>The serial port is not used as a communication channel unless the
<code>terminal_input</code> or <code>terminal_output</code> command is used
(see <a href="#terminal_005finput">terminal_input</a>, see <a href="#terminal_005foutput">terminal_output</a>).
</p>
<p>See also <a href="#Serial-terminal">Serial terminal</a>.
</p></dd></dl>


<hr>
<span id="terminal_005finput"></span><div class="header">
<p>
Next: <a href="#terminal_005foutput" accesskey="n" rel="next">terminal_output</a>, Previous: <a href="#serial" accesskey="p" rel="prev">serial</a>, Up: <a href="#General-commands" accesskey="u" rel="up">General commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="terminal_005finput-1"></span><h4 class="subsection">16.2.2 terminal_input</h4>

<dl>
<dt id="index-terminal_005finput">Command: <strong>terminal_input</strong> <em>[<samp>--append</samp>|<samp>--remove</samp>]  [terminal1] [terminal2] &hellip;</em></dt>
<dd><p>List or select an input terminal.
</p>
<p>With no arguments, list the active and available input terminals.
</p>
<p>With <samp>--append</samp>, add the named terminals to the list of active input
terminals; any of these may be used to provide input to GRUB.
</p>
<p>With <samp>--remove</samp>, remove the named terminals from the active list.
</p>
<p>With no options but a list of terminal names, make only the listed terminal
names active.
</p></dd></dl>


<hr>
<span id="terminal_005foutput"></span><div class="header">
<p>
Next: <a href="#terminfo" accesskey="n" rel="next">terminfo</a>, Previous: <a href="#terminal_005finput" accesskey="p" rel="prev">terminal_input</a>, Up: <a href="#General-commands" accesskey="u" rel="up">General commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="terminal_005foutput-1"></span><h4 class="subsection">16.2.3 terminal_output</h4>

<dl>
<dt id="index-terminal_005foutput">Command: <strong>terminal_output</strong> <em>[<samp>--append</samp>|<samp>--remove</samp>]  [terminal1] [terminal2] &hellip;</em></dt>
<dd><p>List or select an output terminal.
</p>
<p>With no arguments, list the active and available output terminals.
</p>
<p>With <samp>--append</samp>, add the named terminals to the list of active output
terminals; all of these will receive output from GRUB.
</p>
<p>With <samp>--remove</samp>, remove the named terminals from the active list.
</p>
<p>With no options but a list of terminal names, make only the listed terminal
names active.
</p></dd></dl>


<hr>
<span id="terminfo"></span><div class="header">
<p>
Previous: <a href="#terminal_005foutput" accesskey="p" rel="prev">terminal_output</a>, Up: <a href="#General-commands" accesskey="u" rel="up">General commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="terminfo-1"></span><h4 class="subsection">16.2.4 terminfo</h4>

<dl>
<dt id="index-terminfo">Command: <strong>terminfo</strong> <em>[<samp>-a</samp>|<samp>-u</samp>|<samp>-v</samp>] [<samp>-g WxH</samp>] [term] [type]</em></dt>
<dd><p>Define the capabilities of your terminal by giving the name of an entry in
the terminfo database, which should correspond roughly to a &lsquo;<samp>TERM</samp>&rsquo;
environment variable in Unix.
</p>
<p>The currently available terminal types are &lsquo;<samp>vt100</samp>&rsquo;, &lsquo;<samp>vt100-color</samp>&rsquo;,
&lsquo;<samp>ieee1275</samp>&rsquo;, and &lsquo;<samp>dumb</samp>&rsquo;.  If you need other terminal types, please
contact us to discuss the best way to include support for these in GRUB.
</p>
<p>The <samp>-a</samp> (<samp>--ascii</samp>), <samp>-u</samp> (<samp>--utf8</samp>), and
<samp>-v</samp> (<samp>--visual-utf8</samp>) options control how non-ASCII text is
displayed.  <samp>-a</samp> specifies an ASCII-only terminal; <samp>-u</samp>
specifies logically-ordered UTF-8; and <samp>-v</samp> specifies
&quot;visually-ordered UTF-8&quot; (in other words, arranged such that a terminal
emulator without bidirectional text support will display right-to-left text
in the proper order; this is not really proper UTF-8, but a workaround).
</p>
<p>The <samp>-g</samp> (<samp>--geometry</samp>) can be used to specify terminal geometry.
</p>
<p>If no option or terminal type is specified, the current terminal type is
printed.
</p></dd></dl>


<hr>
<span id="Command_002dline-and-menu-entry-commands"></span><div class="header">
<p>
Next: <a href="#Networking-commands" accesskey="n" rel="next">Networking commands</a>, Previous: <a href="#General-commands" accesskey="p" rel="prev">General commands</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-list-of-command_002dline-and-menu-entry-commands"></span><h3 class="section">16.3 The list of command-line and menu entry commands</h3>

<p>These commands are usable in the command-line and in menu entries.  If
you forget a command, you can run the command <code>help</code>
(see <a href="#help">help</a>).
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#g_t_005b" accesskey="1">[</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Check file types and compare values
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#acpi" accesskey="2">acpi</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load ACPI tables
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#authenticate" accesskey="3">authenticate</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Check whether user is in user list
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#background_005fcolor" accesskey="4">background_color</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Set background color for active terminal
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#background_005fimage" accesskey="5">background_image</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load background image for active terminal
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#badram" accesskey="6">badram</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Filter out bad regions of RAM
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#blocklist" accesskey="7">blocklist</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Print a block list
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#boot" accesskey="8">boot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Start up your operating system
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#cat" accesskey="9">cat</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Show the contents of a file
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#chainloader">chainloader</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Chain-load another boot loader
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#clear">clear</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Clear the screen
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#cmosclean">cmosclean</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Clear bit in CMOS
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#cmosdump">cmosdump</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Dump CMOS contents
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#cmostest">cmostest</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Test bit in CMOS
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#cmp">cmp</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Compare two files
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#configfile">configfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load a configuration file
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#cpuid">cpuid</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Check for CPU features
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#crc">crc</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Compute or check CRC32 checksums
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#cryptomount">cryptomount</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Mount a crypto device
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#cutmem">cutmem</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Remove memory regions
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#date">date</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Display or set current date and time
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#devicetree">devicetree</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load a device tree blob
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#distrust">distrust</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Remove a pubkey from trusted keys
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#distrust_005fcertificate">distrust_certificate</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Remove a certificate from the list of trusted certificates
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#drivemap">drivemap</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Map a drive to another
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#echo">echo</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Display a line of text
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#eval">eval</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Evaluate agruments as GRUB commands
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#export">export</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Export an environment variable
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#false">false</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Do nothing, unsuccessfully
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#gettext">gettext</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Translate a string
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#gptsync">gptsync</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Fill an MBR based on GPT entries
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#halt">halt</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Shut down your computer
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#hashsum">hashsum</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Compute or check hash checksum
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#help">help</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Show help messages
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#initrd">initrd</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load a Linux initrd
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#initrd16">initrd16</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load a Linux initrd (16-bit mode)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#insmod">insmod</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Insert a module
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#keystatus">keystatus</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Check key modifier status
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#linux">linux</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load a Linux kernel
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#linux16">linux16</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load a Linux kernel (16-bit mode)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#list_005fcertificates">list_certificates</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List trusted certificates
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#list_005fenv">list_env</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List variables in environment block
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#list_005ftrusted">list_trusted</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List trusted public keys
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#load_005fenv">load_env</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load variables from environment block
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#loadfont">loadfont</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load font files
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#loopback">loopback</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Make a device from a filesystem image
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ls">ls</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List devices or files
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#lsfonts">lsfonts</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List loaded fonts
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#lsmod">lsmod</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Show loaded modules
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#md5sum">md5sum</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Compute or check MD5 hash
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#module">module</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load module for multiboot kernel
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#multiboot">multiboot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load multiboot compliant kernel
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#nativedisk">nativedisk</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Switch to native disk drivers
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#normal">normal</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Enter normal mode
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#normal_005fexit">normal_exit</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Exit from normal mode
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#parttool">parttool</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Modify partition table entries
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#password">password</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Set a clear-text password
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#password_005fpbkdf2">password_pbkdf2</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Set a hashed password
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#play">play</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Play a tune
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#probe">probe</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Retrieve device info
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#rdmsr">rdmsr</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Read values from model-specific registers
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#read">read</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Read user input
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#reboot">reboot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Reboot your computer
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#regexp">regexp</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Test if regular expression matches string
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#rmmod">rmmod</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Remove a module
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#save_005fenv">save_env</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Save variables to environment block
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#search">search</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Search devices by file, label, or UUID
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#sendkey">sendkey</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Emulate keystrokes
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#set">set</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Set an environment variable
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#sha1sum">sha1sum</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Compute or check SHA1 hash
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#sha256sum">sha256sum</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Compute or check SHA256 hash
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#sha512sum">sha512sum</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Compute or check SHA512 hash
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#sleep">sleep</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Wait for a specified number of seconds
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#smbios">smbios</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Retrieve SMBIOS information
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#source">source</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Read a configuration file in same context
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#test">test</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Check file types and compare values
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#true">true</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Do nothing, successfully
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#trust">trust</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Add public key to list of trusted keys
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#trust_005fcertificate">trust_certificate</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Add an x509 certificate to the list of trusted certificates
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#unset">unset</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Unset an environment variable
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#verify_005fappended">verify_appended</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Verify appended digital signature
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#verify_005fdetached">verify_detached</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Verify detached digital signature
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#videoinfo">videoinfo</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List available video modes
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#wrmsr">wrmsr</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Write values to model-specific registers
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#xen_005fhypervisor">xen_hypervisor</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load xen hypervisor binary (only on AArch64)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#xen_005fmodule">xen_module</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Load xen modules for xen hypervisor (only on AArch64)
</td></tr>
</table>


<hr>
<span id="g_t_005b"></span><div class="header">
<p>
Next: <a href="#acpi" accesskey="n" rel="next">acpi</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="g_t_005b-1"></span><h4 class="subsection">16.3.1 [</h4>
<dl>
<dt id="index-_005b">Command: <strong><code>[</code></strong> <em>expression <code>]</code></em></dt>
<dd><p>Alias for <code>test <var>expression</var></code> (see <a href="#test">test</a>).
</p></dd></dl>


<hr>
<span id="acpi"></span><div class="header">
<p>
Next: <a href="#authenticate" accesskey="n" rel="next">authenticate</a>, Previous: <a href="#g_t_005b" accesskey="p" rel="prev">[</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="acpi-1"></span><h4 class="subsection">16.3.2 acpi</h4>

<dl>
<dt id="index-acpi">Command: <strong>acpi</strong> <em>[<samp>-1</samp>|<samp>-2</samp>]  [<samp>--exclude=table1,&hellip;</samp>|<samp>--load-only=table1,&hellip;</samp>]  [<samp>--oemid=id</samp>] [<samp>--oemtable=table</samp>]  [<samp>--oemtablerev=rev</samp>] [<samp>--oemtablecreator=creator</samp>]  [<samp>--oemtablecreatorrev=rev</samp>] [<samp>--no-ebda</samp>]  filename &hellip;</em></dt>
<dd><p>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.
</p>
<p>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
<samp>--no-ebda</samp> option is used, the new tables will be known only to
GRUB, but may be used by GRUB&rsquo;s EFI emulation.
</p>
<p>Note: The command is not allowed when lockdown is enforced (see <a href="#Lockdown">Lockdown</a>).
      Otherwise an attacker can instruct the GRUB to load an SSDT table to
      overwrite the kernel lockdown configuration and later load and execute
      unsigned code.
</p></dd></dl>


<hr>
<span id="authenticate"></span><div class="header">
<p>
Next: <a href="#background_005fcolor" accesskey="n" rel="next">background_color</a>, Previous: <a href="#acpi" accesskey="p" rel="prev">acpi</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="authenticate-1"></span><h4 class="subsection">16.3.3 authenticate</h4>
<dl>
<dt id="index-authenticate">Command: <strong>authenticate</strong> <em>[userlist]</em></dt>
<dd><p>Check whether user is in <var>userlist</var> or listed in the value of variable
&lsquo;<samp>superusers</samp>&rsquo;. See see <a href="#superusers">superusers</a> for valid user list format.
If &lsquo;<samp>superusers</samp>&rsquo; is empty, this command returns true. See <a href="#Security">Security</a>.
</p></dd></dl>


<hr>
<span id="background_005fcolor"></span><div class="header">
<p>
Next: <a href="#background_005fimage" accesskey="n" rel="next">background_image</a>, Previous: <a href="#authenticate" accesskey="p" rel="prev">authenticate</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="background_005fcolor-1"></span><h4 class="subsection">16.3.4 background_color</h4>

<dl>
<dt id="index-background_005fcolor">Command: <strong>background_color</strong> <em>color</em></dt>
<dd><p>Set background color for active terminal. For valid color specifications see
see <a href="#Theme-file-format">Colors</a>. Background color can be changed only when
using &lsquo;<samp>gfxterm</samp>&rsquo; for terminal output.
</p>
<p>This command sets color of empty areas without text. Text background color
is controlled by environment variables <var>color_normal</var>, <var>color_highlight</var>,
<var>menu_color_normal</var>, <var>menu_color_highlight</var>. See <a href="#Special-environment-variables">Special environment variables</a>.
</p></dd></dl>


<hr>
<span id="background_005fimage"></span><div class="header">
<p>
Next: <a href="#badram" accesskey="n" rel="next">badram</a>, Previous: <a href="#background_005fcolor" accesskey="p" rel="prev">background_color</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="background_005fimage-1"></span><h4 class="subsection">16.3.5 background_image</h4>

<dl>
<dt id="index-background_005fimage">Command: <strong>background_image</strong> <em>[[<samp>--mode</samp> &lsquo;<samp>stretch</samp>&rsquo;|&lsquo;<samp>normal</samp>&rsquo;] file]</em></dt>
<dd><p>Load background image for active terminal from <var>file</var>. Image is stretched
to fill up entire screen unless option <samp>--mode</samp> &lsquo;<samp>normal</samp>&rsquo; is given.
Without arguments remove currently loaded background image. Background image
can be changed only when using &lsquo;<samp>gfxterm</samp>&rsquo; for terminal output.
</p>
</dd></dl>


<hr>
<span id="badram"></span><div class="header">
<p>
Next: <a href="#blocklist" accesskey="n" rel="next">blocklist</a>, Previous: <a href="#background_005fimage" accesskey="p" rel="prev">background_image</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="badram-1"></span><h4 class="subsection">16.3.6 badram</h4>

<dl>
<dt id="index-badram">Command: <strong>badram</strong> <em>addr,mask[,addr,mask...]</em></dt>
<dd><p>Filter out bad RAM.
</p>
<p>This command notifies the memory manager that specified regions of
RAM ought to be filtered out (usually, because they&rsquo;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.
</p>
<p>Syntax is the same as provided by the <a href="http://www.memtest.org/">Memtest86+ utility</a>: 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.
</p>
<p>The command is similar to <code>cutmem</code> command.
</p>
<p>Note: The command is not allowed when lockdown is enforced (see <a href="#Lockdown">Lockdown</a>).
      This prevents removing EFI memory regions to potentially subvert the
      security mechanisms provided by the UEFI secure boot.
</p></dd></dl>

<hr>
<span id="blocklist"></span><div class="header">
<p>
Next: <a href="#boot" accesskey="n" rel="next">boot</a>, Previous: <a href="#badram" accesskey="p" rel="prev">badram</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="blocklist-1"></span><h4 class="subsection">16.3.7 blocklist</h4>

<dl>
<dt id="index-blocklist">Command: <strong>blocklist</strong> <em>file</em></dt>
<dd><p>Print a block list (see <a href="#Block-list-syntax">Block list syntax</a>) for <var>file</var>.
</p></dd></dl>


<hr>
<span id="boot"></span><div class="header">
<p>
Next: <a href="#cat" accesskey="n" rel="next">cat</a>, Previous: <a href="#blocklist" accesskey="p" rel="prev">blocklist</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="boot-1"></span><h4 class="subsection">16.3.8 boot</h4>

<dl>
<dt id="index-boot">Command: <strong>boot</strong></dt>
<dd><p>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).
</p></dd></dl>


<hr>
<span id="cat"></span><div class="header">
<p>
Next: <a href="#chainloader" accesskey="n" rel="next">chainloader</a>, Previous: <a href="#boot" accesskey="p" rel="prev">boot</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="cat-1"></span><h4 class="subsection">16.3.9 cat</h4>

<dl>
<dt id="index-cat">Command: <strong>cat</strong> <em>[<samp>--dos</samp>] file</em></dt>
<dd><p>Display the contents of the file <var>file</var>. This command may be useful
to remind you of your OS&rsquo;s root partition:
</p>
<div class="example">
<pre class="example">grub&gt; <kbd>cat /etc/fstab</kbd>
</pre></div>

<p>If the <samp>--dos</samp> 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 (&lsquo;<samp>&lt;d&gt;</samp>&rsquo;) to make it easier to see
when boot problems are caused by a file formatted using DOS-style line
endings.
</p></dd></dl>


<hr>
<span id="chainloader"></span><div class="header">
<p>
Next: <a href="#clear" accesskey="n" rel="next">clear</a>, Previous: <a href="#cat" accesskey="p" rel="prev">cat</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="chainloader-1"></span><h4 class="subsection">16.3.10 chainloader</h4>

<dl>
<dt id="index-chainloader">Command: <strong>chainloader</strong> <em>[<samp>--force</samp>] file</em></dt>
<dd><p>Load <var>file</var> as a chain-loader. Like any other file loaded by the
filesystem code, it can use the blocklist notation (see <a href="#Block-list-syntax">Block list syntax</a>) to grab the first sector of the current partition with &lsquo;<samp>+1</samp>&rsquo;.
If you specify the option <samp>--force</samp>, then load <var>file</var> 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.
</p></dd></dl>


<hr>
<span id="clear"></span><div class="header">
<p>
Next: <a href="#cmosclean" accesskey="n" rel="next">cmosclean</a>, Previous: <a href="#chainloader" accesskey="p" rel="prev">chainloader</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="clear-1"></span><h4 class="subsection">16.3.11 clear</h4>

<dl>
<dt id="index-clear">Command: <strong>clear</strong></dt>
<dd><p>Clear the screen.
</p></dd></dl>


<hr>
<span id="cmosclean"></span><div class="header">
<p>
Next: <a href="#cmosdump" accesskey="n" rel="next">cmosdump</a>, Previous: <a href="#clear" accesskey="p" rel="prev">clear</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="cmosclean-1"></span><h4 class="subsection">16.3.12 cmosclean</h4>

<dl>
<dt id="index-cmosclean">Command: <strong>cmosclean</strong> <em>byte:bit</em></dt>
<dd><p>Clear value of bit in CMOS at location <var>byte</var>:<var>bit</var>. This command
is available only on platforms that support CMOS.
</p></dd></dl>


<hr>
<span id="cmosdump"></span><div class="header">
<p>
Next: <a href="#cmostest" accesskey="n" rel="next">cmostest</a>, Previous: <a href="#cmosclean" accesskey="p" rel="prev">cmosclean</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="cmosdump-1"></span><h4 class="subsection">16.3.13 cmosdump</h4>

<dl>
<dt id="index-CMOS">Dump: <strong>CMOS</strong> <em>contents</em></dt>
<dd><p>Dump full CMOS contents as hexadecimal values. This command is available only
on platforms that support CMOS.
</p></dd></dl>


<hr>
<span id="cmostest"></span><div class="header">
<p>
Next: <a href="#cmp" accesskey="n" rel="next">cmp</a>, Previous: <a href="#cmosdump" accesskey="p" rel="prev">cmosdump</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="cmostest-1"></span><h4 class="subsection">16.3.14 cmostest</h4>

<dl>
<dt id="index-cmostest">Command: <strong>cmostest</strong> <em>byte:bit</em></dt>
<dd><p>Test value of bit in CMOS at location <var>byte</var>:<var>bit</var>. Exit status
is zero if bit is set, non zero otherwise. This command is available only
on platforms that support CMOS.
</p></dd></dl>


<hr>
<span id="cmp"></span><div class="header">
<p>
Next: <a href="#configfile" accesskey="n" rel="next">configfile</a>, Previous: <a href="#cmostest" accesskey="p" rel="prev">cmostest</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="cmp-1"></span><h4 class="subsection">16.3.15 cmp</h4>

<dl>
<dt id="index-cmp">Command: <strong>cmp</strong> <em>file1 file2</em></dt>
<dd><p>Compare the file <var>file1</var> with the file <var>file2</var>. If they differ
in size, print the sizes like this:
</p>
<div class="example">
<pre class="example">Differ in size: 0x1234 [foo], 0x4321 [bar]
</pre></div>

<p>If the sizes are equal but the bytes at an offset differ, then print the
bytes like this:
</p>
<div class="example">
<pre class="example">Differ at the offset 777: 0xbe [foo], 0xef [bar]
</pre></div>

<p>If they are completely identical, nothing will be printed.
</p></dd></dl>


<hr>
<span id="configfile"></span><div class="header">
<p>
Next: <a href="#cpuid" accesskey="n" rel="next">cpuid</a>, Previous: <a href="#cmp" accesskey="p" rel="prev">cmp</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="configfile-1"></span><h4 class="subsection">16.3.16 configfile</h4>

<dl>
<dt id="index-configfile">Command: <strong>configfile</strong> <em>file</em></dt>
<dd><p>Load <var>file</var> as a configuration file.  If <var>file</var> defines any menu
entries, then show a menu containing them immediately.  Any environment
variable changes made by the commands in <var>file</var> will not be preserved
after <code>configfile</code> returns.
</p></dd></dl>


<hr>
<span id="cpuid"></span><div class="header">
<p>
Next: <a href="#crc" accesskey="n" rel="next">crc</a>, Previous: <a href="#configfile" accesskey="p" rel="prev">configfile</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="cpuid-1"></span><h4 class="subsection">16.3.17 cpuid</h4>

<dl>
<dt id="index-cpuid">Command: <strong>cpuid</strong> <em>[-l] [-p]</em></dt>
<dd><p>Check for CPU features.  This command is only available on x86 systems.
</p>
<p>With the <samp>-l</samp> option, return true if the CPU supports long mode
(64-bit).
</p>
<p>With the <samp>-p</samp> option, return true if the CPU supports Physical
Address Extension (PAE).
</p>
<p>If invoked without options, this command currently behaves as if it had been
invoked with <samp>-l</samp>.  This may change in the future.
</p></dd></dl>


<hr>
<span id="crc"></span><div class="header">
<p>
Next: <a href="#cryptomount" accesskey="n" rel="next">cryptomount</a>, Previous: <a href="#cpuid" accesskey="p" rel="prev">cpuid</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="crc-1"></span><h4 class="subsection">16.3.18 crc</h4>

<dl>
<dt id="index-crc">Command: <strong>crc</strong> <em>arg &hellip;</em></dt>
<dd><p>Alias for <code>hashsum --hash crc32 arg &hellip;</code>. See command <code>hashsum</code>
(see <a href="#hashsum">hashsum</a>) for full description.
</p></dd></dl>


<hr>
<span id="cryptomount"></span><div class="header">
<p>
Next: <a href="#cutmem" accesskey="n" rel="next">cutmem</a>, Previous: <a href="#crc" accesskey="p" rel="prev">crc</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="cryptomount-1"></span><h4 class="subsection">16.3.19 cryptomount</h4>

<dl>
<dt id="index-cryptomount">Command: <strong>cryptomount</strong> <em>device|<samp>-u</samp> uuid|<samp>-a</samp>|<samp>-b</samp></em></dt>
<dd><p>Setup access to encrypted device. If necessary, passphrase
is requested interactively. Option <var>device</var> configures specific grub device
(see <a href="#Naming-convention">Naming convention</a>); option <samp>-u</samp> <var>uuid</var> configures device
with specified <var>uuid</var>; option <samp>-a</samp> configures all detected encrypted
devices; option <samp>-b</samp> configures all geli containers that have boot flag set.
</p>
<p>GRUB suports devices encrypted using LUKS, LUKS2 and geli. Note that necessary
modules (<var>luks</var>, <var>luks2</var> and <var>geli</var>) have to be loaded manually
before this command can be used. For LUKS2 only the PBKDF2 key derivation
function is supported, as Argon2 is not yet supported.
</p>
<p>Also, note that, unlike filesystem UUIDs, UUIDs for encrypted devices must be
specified without dash separators.
</p></dd></dl>

<hr>
<span id="cutmem"></span><div class="header">
<p>
Next: <a href="#date" accesskey="n" rel="next">date</a>, Previous: <a href="#cryptomount" accesskey="p" rel="prev">cryptomount</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="cutmem-1"></span><h4 class="subsection">16.3.20 cutmem</h4>

<dl>
<dt id="index-cutmem">Command: <strong>cutmem</strong> <em>from[K|M|G] to[K|M|G]</em></dt>
<dd><p>Remove any memory regions in specified range.
</p>
<p>This command notifies the memory manager that specified regions of RAM ought to
be filtered out. 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.
</p>
<p>The command is similar to <code>badram</code> command.
</p>
<p>Note: The command is not allowed when lockdown is enforced (see <a href="#Lockdown">Lockdown</a>).
      This prevents removing EFI memory regions to potentially subvert the
      security mechanisms provided by the UEFI secure boot.
</p></dd></dl>

<hr>
<span id="date"></span><div class="header">
<p>
Next: <a href="#devicetree" accesskey="n" rel="next">devicetree</a>, Previous: <a href="#cutmem" accesskey="p" rel="prev">cutmem</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="date-1"></span><h4 class="subsection">16.3.21 date</h4>

<dl>
<dt id="index-date">Command: <strong>date</strong> <em>[[year-]month-day] [hour:minute[:second]]</em></dt>
<dd><p>With no arguments, print the current date and time.
</p>
<p>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, &lsquo;date
01-01&rsquo; will set the current month and day to January 1, but leave the year,
hour, minute, and second unchanged.
</p></dd></dl>


<hr>
<span id="devicetree"></span><div class="header">
<p>
Next: <a href="#distrust" accesskey="n" rel="next">distrust</a>, Previous: <a href="#date" accesskey="p" rel="prev">date</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="devicetree-1"></span><h4 class="subsection">16.3.22 devicetree</h4>

<dl>
<dt id="index-devicetree">Command: <strong>devicetree</strong> <em>file</em></dt>
<dd><p>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.
</p>
<p>Note: The command is not allowed when lockdown is enforced (see <a href="#Lockdown">Lockdown</a>).
      This is done to prevent subverting various security mechanisms.
</p></dd></dl>

<hr>
<span id="distrust"></span><div class="header">
<p>
Next: <a href="#distrust_005fcertificate" accesskey="n" rel="next">distrust_certificate</a>, Previous: <a href="#devicetree" accesskey="p" rel="prev">devicetree</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="distrust-1"></span><h4 class="subsection">16.3.23 distrust</h4>

<dl>
<dt id="index-distrust">Command: <strong>distrust</strong> <em>pubkey_id</em></dt>
<dd><p>Remove public key <var>pubkey_id</var> from GRUB&rsquo;s keyring of trusted keys.
<var>pubkey_id</var> is the last four bytes (eight hexadecimal digits) of
the GPG v4 key id, which is also the output of <code>list_trusted</code>
(see <a href="#list_005ftrusted">list_trusted</a>).  Outside of GRUB, the key id can be obtained
using <code>gpg --fingerprint</code>).
These keys are used to validate signatures when environment variable
<code>check_signatures</code> is set to <code>enforce</code>
(see <a href="#check_005fsignatures">check_signatures</a>), and by some invocations of
<code>verify_detached</code> (see <a href="#verify_005fdetached">verify_detached</a>).  See <a href="#Using-GPG_002dstyle-digital-signatures">Using GPG-style digital signatures</a>, for more information.
</p></dd></dl>


<hr>
<span id="distrust_005fcertificate"></span><div class="header">
<p>
Next: <a href="#drivemap" accesskey="n" rel="next">drivemap</a>, Previous: <a href="#distrust" accesskey="p" rel="prev">distrust</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="distrust_005fcertificate-1"></span><h4 class="subsection">16.3.24 distrust_certificate</h4>

<dl>
<dt id="index-distrust_005fcertificate">Command: <strong>distrust_certificate</strong> <em>cert_number</em></dt>
<dd><p>Remove the x509 certificate numbered <var>cert_number</var> from GRUB&rsquo;s keyring of
trusted x509 certificates for verifying appended signatures.
</p>
<p><var>cert_number</var> is the certificate number as listed by
<code>list_certificates</code> (see <a href="#list_005fcertificates">list_certificates</a>).
</p>
<p>These certificates are used to validate appended signatures when environment
variable <code>check_appended_signatures</code> is set to <code>enforce</code> or
<code>forced</code> (see <a href="#check_005fappended_005fsignatures">check_appended_signatures</a>), and by
<code>verify_appended</code> (see <a href="#verify_005fappended">verify_appended</a>). See
See <a href="#Using-appended-signatures">Using appended signatures</a> for more information.
</p></dd></dl>


<hr>
<span id="drivemap"></span><div class="header">
<p>
Next: <a href="#echo" accesskey="n" rel="next">echo</a>, Previous: <a href="#distrust_005fcertificate" accesskey="p" rel="prev">distrust_certificate</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="drivemap-1"></span><h4 class="subsection">16.3.25 drivemap</h4>

<dl>
<dt id="index-drivemap">Command: <strong>drivemap</strong> <em><samp>-l</samp>|<samp>-r</samp>|[<samp>-s</samp>]  from_drive to_drive</em></dt>
<dd><p>Without options, map the drive <var>from_drive</var> to the drive <var>to_drive</var>.
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 <tt>${root}</tt> as a
drive specification.
</p>
<p>With the <samp>-s</samp> option, perform the reverse mapping as well, swapping
the two drives.
</p>
<p>With the <samp>-l</samp> option, list the current mappings.
</p>
<p>With the <samp>-r</samp> option, reset all mappings to the default values.
</p>
<p>For example:
</p>
<div class="example">
<pre class="example">drivemap -s (hd0) (hd1)
</pre></div>
</dd></dl>


<hr>
<span id="echo"></span><div class="header">
<p>
Next: <a href="#eval" accesskey="n" rel="next">eval</a>, Previous: <a href="#drivemap" accesskey="p" rel="prev">drivemap</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="echo-1"></span><h4 class="subsection">16.3.26 echo</h4>

<dl>
<dt id="index-echo">Command: <strong>echo</strong> <em>[<samp>-n</samp>] [<samp>-e</samp>] string &hellip;</em></dt>
<dd><p>Display the requested text and, unless the <samp>-n</samp> 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 &lsquo;<samp>${var}</samp>&rsquo;.
</p>
<p>The <samp>-e</samp> option enables interpretation of backslash escapes.  The
following sequences are recognised:
</p>
<dl compact="compact">
<dt><code>\\</code></dt>
<dd><p>backslash
</p>
</dd>
<dt><code>\a</code></dt>
<dd><p>alert (BEL)
</p>
</dd>
<dt><code>\c</code></dt>
<dd><p>suppress trailing new line
</p>
</dd>
<dt><code>\f</code></dt>
<dd><p>form feed
</p>
</dd>
<dt><code>\n</code></dt>
<dd><p>new line
</p>
</dd>
<dt><code>\r</code></dt>
<dd><p>carriage return
</p>
</dd>
<dt><code>\t</code></dt>
<dd><p>horizontal tab
</p>
</dd>
<dt><code>\v</code></dt>
<dd><p>vertical tab
</p></dd>
</dl>

<p>When interpreting backslash escapes, backslash followed by any other
character will print that character.
</p></dd></dl>


<hr>
<span id="eval"></span><div class="header">
<p>
Next: <a href="#export" accesskey="n" rel="next">export</a>, Previous: <a href="#echo" accesskey="p" rel="prev">echo</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="eval-1"></span><h4 class="subsection">16.3.27 eval</h4>

<dl>
<dt id="index-eval">Command: <strong>eval</strong> <em>string ...</em></dt>
<dd><p>Concatenate arguments together using single space as separator and evaluate
result as sequence of GRUB commands.
</p></dd></dl>


<hr>
<span id="export"></span><div class="header">
<p>
Next: <a href="#false" accesskey="n" rel="next">false</a>, Previous: <a href="#eval" accesskey="p" rel="prev">eval</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="export-1"></span><h4 class="subsection">16.3.28 export</h4>

<dl>
<dt id="index-export">Command: <strong>export</strong> <em>envvar</em></dt>
<dd><p>Export the environment variable <var>envvar</var>. Exported variables are visible
to subsidiary configuration files loaded using <code>configfile</code>.
</p></dd></dl>


<hr>
<span id="false"></span><div class="header">
<p>
Next: <a href="#gettext" accesskey="n" rel="next">gettext</a>, Previous: <a href="#export" accesskey="p" rel="prev">export</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="false-1"></span><h4 class="subsection">16.3.29 false</h4>

<dl>
<dt id="index-false">Command: <strong>false</strong></dt>
<dd><p>Do nothing, unsuccessfully.  This is mainly useful in control constructs
such as <code>if</code> and <code>while</code> (see <a href="#Shell_002dlike-scripting">Shell-like scripting</a>).
</p></dd></dl>


<hr>
<span id="gettext"></span><div class="header">
<p>
Next: <a href="#gptsync" accesskey="n" rel="next">gptsync</a>, Previous: <a href="#false" accesskey="p" rel="prev">false</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="gettext-1"></span><h4 class="subsection">16.3.30 gettext</h4>

<dl>
<dt id="index-gettext">Command: <strong>gettext</strong> <em>string</em></dt>
<dd><p>Translate <var>string</var> into the current language.
</p>
<p>The current language code is stored in the &lsquo;<samp>lang</samp>&rsquo; variable in GRUB&rsquo;s
environment (see <a href="#lang">lang</a>).  Translation files in MO format are read from
&lsquo;<samp>locale_dir</samp>&rsquo; (see <a href="#locale_005fdir">locale_dir</a>), usually <samp>/boot/grub2/locale</samp>.
</p></dd></dl>


<hr>
<span id="gptsync"></span><div class="header">
<p>
Next: <a href="#halt" accesskey="n" rel="next">halt</a>, Previous: <a href="#gettext" accesskey="p" rel="prev">gettext</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="gptsync-1"></span><h4 class="subsection">16.3.31 gptsync</h4>

<dl>
<dt id="index-gptsync">Command: <strong>gptsync</strong> <em>device [partition[+/-[type]]] &hellip;</em></dt>
<dd><p>Disks using the GUID Partition Table (GPT) also have a legacy Master Boot
Record (MBR) partition table for compatibility with the BIOS and with older
operating systems.  The legacy MBR can only represent a limited subset of
GPT partition entries.
</p>
<p>This command populates the legacy MBR with the specified <var>partition</var>
entries on <var>device</var>.  Up to three partitions may be used.
</p>
<p><var>type</var> is an MBR partition type code; prefix with &lsquo;<samp>0x</samp>&rsquo; if you want
to enter this in hexadecimal.  The separator between <var>partition</var> and
<var>type</var> may be &lsquo;<samp>+</samp>&rsquo; to make the partition active, or &lsquo;<samp>-</samp>&rsquo; to make
it inactive; only one partition may be active.  If both the separator and
type are omitted, then the partition will be inactive.
</p></dd></dl>


<hr>
<span id="halt"></span><div class="header">
<p>
Next: <a href="#hashsum" accesskey="n" rel="next">hashsum</a>, Previous: <a href="#gptsync" accesskey="p" rel="prev">gptsync</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="halt-1"></span><h4 class="subsection">16.3.32 halt</h4>

<dl>
<dt id="index-halt">Command: <strong>halt</strong> <em><samp>--no-apm</samp></em></dt>
<dd><p>The command halts the computer. If the <samp>--no-apm</samp> option
is specified, no APM BIOS call is performed. Otherwise, the computer
is shut down using APM.
</p></dd></dl>


<hr>
<span id="hashsum"></span><div class="header">
<p>
Next: <a href="#help" accesskey="n" rel="next">help</a>, Previous: <a href="#halt" accesskey="p" rel="prev">halt</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="hashsum-1"></span><h4 class="subsection">16.3.33 hashsum</h4>

<dl>
<dt id="index-hashsum">Command: <strong>hashsum</strong> <em><samp>--hash</samp> hash <samp>--keep-going</samp> <samp>--uncompress</samp> <samp>--check</samp> file [<samp>--prefix</samp> dir]|file &hellip;</em></dt>
<dd><p>Compute or verify file hashes. Hash type is selected with option <samp>--hash</samp>.
Supported hashes are: &lsquo;<samp>adler32</samp>&rsquo;, &lsquo;<samp>crc64</samp>&rsquo;, &lsquo;<samp>crc32</samp>&rsquo;,
&lsquo;<samp>crc32rfc1510</samp>&rsquo;, &lsquo;<samp>crc24rfc2440</samp>&rsquo;, &lsquo;<samp>md4</samp>&rsquo;, &lsquo;<samp>md5</samp>&rsquo;,
&lsquo;<samp>ripemd160</samp>&rsquo;, &lsquo;<samp>sha1</samp>&rsquo;, &lsquo;<samp>sha224</samp>&rsquo;, &lsquo;<samp>sha256</samp>&rsquo;, &lsquo;<samp>sha512</samp>&rsquo;,
&lsquo;<samp>sha384</samp>&rsquo;, &lsquo;<samp>tiger192</samp>&rsquo;, &lsquo;<samp>tiger</samp>&rsquo;, &lsquo;<samp>tiger2</samp>&rsquo;, &lsquo;<samp>whirlpool</samp>&rsquo;.
Option <samp>--uncompress</samp> uncompresses files before computing hash.
</p>
<p>When list of files is given, hash of each file is computed and printed,
followed by file name, each file on a new line.
</p>
<p>When option <samp>--check</samp> is given, it points to a file that contains
list of <var>hash name</var> pairs in the same format as used by UNIX
<code>md5sum</code> command. Option <samp>--prefix</samp>
may be used to give directory where files are located. Hash verification
stops after the first mismatch was found unless option <samp>--keep-going</samp>
was given.  The exit code <code>$?</code> is set to 0 if hash verification
is successful.  If it fails, <code>$?</code> is set to a nonzero value.
</p></dd></dl>


<hr>
<span id="help"></span><div class="header">
<p>
Next: <a href="#initrd" accesskey="n" rel="next">initrd</a>, Previous: <a href="#hashsum" accesskey="p" rel="prev">hashsum</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="help-1"></span><h4 class="subsection">16.3.34 help</h4>

<dl>
<dt id="index-help">Command: <strong>help</strong> <em>[pattern &hellip;]</em></dt>
<dd><p>Display helpful information about builtin commands. If you do not
specify <var>pattern</var>, this command shows short descriptions of all
available commands.
</p>
<p>If you specify any <var>patterns</var>, it displays longer information
about each of the commands whose names begin with those <var>patterns</var>.
</p></dd></dl>


<hr>
<span id="initrd"></span><div class="header">
<p>
Next: <a href="#initrd16" accesskey="n" rel="next">initrd16</a>, Previous: <a href="#help" accesskey="p" rel="prev">help</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="initrd-1"></span><h4 class="subsection">16.3.35 initrd</h4>

<dl>
<dt id="index-initrd">Command: <strong>initrd</strong> <em>file [file &hellip;]</em></dt>
<dd><p>Load, in order, all initial ramdisks for a Linux kernel image, and set
the appropriate parameters in the Linux setup area in memory.  This may only
be used after the <code>linux</code> command (see <a href="#linux">linux</a>) has been run.  See
also <a href="#GNU_002fLinux">GNU/Linux</a>.
</p></dd></dl>


<hr>
<span id="initrd16"></span><div class="header">
<p>
Next: <a href="#insmod" accesskey="n" rel="next">insmod</a>, Previous: <a href="#initrd" accesskey="p" rel="prev">initrd</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="initrd16-1"></span><h4 class="subsection">16.3.36 initrd16</h4>

<dl>
<dt id="index-initrd16">Command: <strong>initrd16</strong> <em>file [file &hellip;]</em></dt>
<dd><p>Load, in order, all initial ramdisks for a Linux kernel image to be booted in
16-bit mode, and set the appropriate parameters in the Linux setup area in
memory.  This may only be used after the <code>linux16</code> command
(see <a href="#linux16">linux16</a>) has been run.  See also <a href="#GNU_002fLinux">GNU/Linux</a>.
</p>
<p>This command is only available on x86 systems.
</p></dd></dl>


<hr>
<span id="insmod"></span><div class="header">
<p>
Next: <a href="#keystatus" accesskey="n" rel="next">keystatus</a>, Previous: <a href="#initrd16" accesskey="p" rel="prev">initrd16</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="insmod-1"></span><h4 class="subsection">16.3.37 insmod</h4>

<dl>
<dt id="index-insmod">Command: <strong>insmod</strong> <em>module</em></dt>
<dd><p>Insert the dynamic GRUB module called <var>module</var>.
</p></dd></dl>


<hr>
<span id="keystatus"></span><div class="header">
<p>
Next: <a href="#linux" accesskey="n" rel="next">linux</a>, Previous: <a href="#insmod" accesskey="p" rel="prev">insmod</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="keystatus-1"></span><h4 class="subsection">16.3.38 keystatus</h4>

<dl>
<dt id="index-keystatus">Command: <strong>keystatus</strong> <em>[<samp>--shift</samp>] [<samp>--ctrl</samp>] [<samp>--alt</samp>]</em></dt>
<dd><p>Return true if the Shift, Control, or Alt modifier keys are held down, as
requested by options. This is useful in scripting, to allow some user
control over behaviour without having to wait for a keypress.
</p>
<p>Checking key modifier status is only supported on some platforms. If invoked
without any options, the <code>keystatus</code> command returns true if and
only if checking key modifier status is supported.
</p></dd></dl>


<hr>
<span id="linux"></span><div class="header">
<p>
Next: <a href="#linux16" accesskey="n" rel="next">linux16</a>, Previous: <a href="#keystatus" accesskey="p" rel="prev">keystatus</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="linux-1"></span><h4 class="subsection">16.3.39 linux</h4>

<dl>
<dt id="index-linux">Command: <strong>linux</strong> <em>file &hellip;</em></dt>
<dd><p>Load a Linux kernel image from <var>file</var>.  The rest of the line is passed
verbatim as the <em>kernel command-line</em>.  Any initrd must be reloaded
after using this command (see <a href="#initrd">initrd</a>).
</p>
<p>On x86 systems, the kernel will be booted using the 32-bit boot protocol.
Note that this means that the &lsquo;<samp>vga=</samp>&rsquo; boot option will not work; if you
want to set a special video mode, you will need to use GRUB commands such as
&lsquo;<samp>set gfxpayload=1024x768</samp>&rsquo; or &lsquo;<samp>set gfxpayload=keep</samp>&rsquo; (to keep the
same mode as used in GRUB) instead.  GRUB can automatically detect some uses
of &lsquo;<samp>vga=</samp>&rsquo; and translate them to appropriate settings of
&lsquo;<samp>gfxpayload</samp>&rsquo;.  The <code>linux16</code> command (see <a href="#linux16">linux16</a>) avoids
this restriction.
</p></dd></dl>


<hr>
<span id="linux16"></span><div class="header">
<p>
Next: <a href="#list_005fcertificates" accesskey="n" rel="next">list_certificates</a>, Previous: <a href="#linux" accesskey="p" rel="prev">linux</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="linux16-1"></span><h4 class="subsection">16.3.40 linux16</h4>

<dl>
<dt id="index-linux16">Command: <strong>linux16</strong> <em>file &hellip;</em></dt>
<dd><p>Load a Linux kernel image from <var>file</var> in 16-bit mode.  The rest of the
line is passed verbatim as the <em>kernel command-line</em>.  Any initrd must
be reloaded after using this command (see <a href="#initrd16">initrd16</a>).
</p>
<p>The kernel will be booted using the traditional 16-bit boot protocol.  As
well as bypassing problems with &lsquo;<samp>vga=</samp>&rsquo; described in <a href="#linux">linux</a>, this
permits booting some other programs that implement the Linux boot protocol
for the sake of convenience.
</p>
<p>This command is only available on x86 systems.
</p></dd></dl>


<hr>
<span id="list_005fcertificates"></span><div class="header">
<p>
Next: <a href="#list_005fenv" accesskey="n" rel="next">list_env</a>, Previous: <a href="#linux16" accesskey="p" rel="prev">linux16</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="list_005fcertificates-1"></span><h4 class="subsection">16.3.41 list_certificates</h4>

<dl>
<dt id="index-list_005fcertificates">Command: <strong>list_certificates</strong></dt>
<dd><p>List all x509 certificates trusted by GRUB for validating appended signatures.
The output is a numbered list of certificates, showing the certificate&rsquo;s serial
number and Common Name.
</p>
<p>The certificate number can be used as an argument to
<code>distrust_certificate</code> (see <a href="#distrust_005fcertificate">distrust_certificate</a>).
</p>
<p>See See <a href="#Using-appended-signatures">Using appended signatures</a> for more information.
</p></dd></dl>


<hr>
<span id="list_005fenv"></span><div class="header">
<p>
Next: <a href="#list_005ftrusted" accesskey="n" rel="next">list_trusted</a>, Previous: <a href="#list_005fcertificates" accesskey="p" rel="prev">list_certificates</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="list_005fenv-1"></span><h4 class="subsection">16.3.42 list_env</h4>

<dl>
<dt id="index-list_005fenv">Command: <strong>list_env</strong> <em>[<samp>--file</samp> file]</em></dt>
<dd><p>List all variables in the environment block file.  See <a href="#Environment-block">Environment block</a>.
</p>
<p>The <samp>--file</samp> option overrides the default location of the
environment block.
</p></dd></dl>

<hr>
<span id="list_005ftrusted"></span><div class="header">
<p>
Next: <a href="#load_005fenv" accesskey="n" rel="next">load_env</a>, Previous: <a href="#list_005fenv" accesskey="p" rel="prev">list_env</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="list_005ftrusted-1"></span><h4 class="subsection">16.3.43 list_trusted</h4>

<dl>
<dt id="index-list_005ftrusted">Command: <strong>list_trusted</strong></dt>
<dd><p>List all public keys trusted by GRUB for validating signatures.
The output is in GPG&rsquo;s v4 key fingerprint format (i.e., the output of
<code>gpg --fingerprint</code>).  The least significant four bytes (last
eight hexadecimal digits) can be used as an argument to
<code>distrust</code> (see <a href="#distrust">distrust</a>).
See <a href="#Using-GPG_002dstyle-digital-signatures">Using GPG-style digital signatures</a>, for more information about uses for
these keys.
</p></dd></dl>

<hr>
<span id="load_005fenv"></span><div class="header">
<p>
Next: <a href="#loadfont" accesskey="n" rel="next">loadfont</a>, Previous: <a href="#list_005ftrusted" accesskey="p" rel="prev">list_trusted</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="load_005fenv-1"></span><h4 class="subsection">16.3.44 load_env</h4>

<dl>
<dt id="index-load_005fenv">Command: <strong>load_env</strong> <em>[<samp>--file</samp> file] [<samp>--skip-sig</samp>] [whitelisted_variable_name] &hellip;</em></dt>
<dd><p>Load all variables from the environment block file into the environment.
See <a href="#Environment-block">Environment block</a>.
</p>
<p>The <samp>--file</samp> option overrides the default location of the environment
block.
</p>
<p>The <samp>--skip-sig</samp> option skips signature checking even when the
value of environment variable <code>check_signatures</code> is set to
<code>enforce</code> (see <a href="#check_005fsignatures">check_signatures</a>).
</p>
<p>If one or more variable names are provided as arguments, they are
interpreted as a whitelist of variables to load from the environment
block file.  Variables set in the file but not present in the
whitelist are ignored.
</p>
<p>The <samp>--skip-sig</samp> option should be used with care, and should
always be used in concert with a whitelist of acceptable variables
whose values should be set.  Failure to employ a carefully constructed
whitelist could result in reading a malicious value into critical
environment variables from the file, such as setting
<code>check_signatures=no</code>, modifying <code>prefix</code> to boot from an
unexpected location or not at all, etc.
</p>
<p>When used with care, <samp>--skip-sig</samp> and the whitelist enable an
administrator to configure a system to boot only signed
configurations, but to allow the user to select from among multiple
configurations, and to enable &ldquo;one-shot&rdquo; boot attempts and
&ldquo;savedefault&rdquo; behavior.  See <a href="#Using-GPG_002dstyle-digital-signatures">Using GPG-style digital signatures</a>, for more
information.
</p>
<p>Extra care should be taken when combining this command with appended signatures
(see <a href="#Using-appended-signatures">Using appended signatures</a>), as this file is not validated by an
appended signature and could set <code>check_appended_signatures=no</code> if GRUB is
not in see <a href="#Lockdown">Lockdown</a> mode.
</p></dd></dl>


<hr>
<span id="loadfont"></span><div class="header">
<p>
Next: <a href="#loopback" accesskey="n" rel="next">loopback</a>, Previous: <a href="#load_005fenv" accesskey="p" rel="prev">load_env</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="loadfont-1"></span><h4 class="subsection">16.3.45 loadfont</h4>

<dl>
<dt id="index-loadfont">Command: <strong>loadfont</strong> <em>file &hellip;</em></dt>
<dd><p>Load specified font files. Unless absolute pathname is given, <var>file</var>
is assumed to be in directory &lsquo;<samp>$prefix/fonts</samp>&rsquo; with
suffix &lsquo;<samp>.pf2</samp>&rsquo; appended. See <a href="#Theme-file-format">Fonts</a>.
</p></dd></dl>


<hr>
<span id="loopback"></span><div class="header">
<p>
Next: <a href="#ls" accesskey="n" rel="next">ls</a>, Previous: <a href="#loadfont" accesskey="p" rel="prev">loadfont</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="loopback-1"></span><h4 class="subsection">16.3.46 loopback</h4>

<dl>
<dt id="index-loopback">Command: <strong>loopback</strong> <em>[<samp>-d</samp>] device file</em></dt>
<dd><p>Make the device named <var>device</var> correspond to the contents of the
filesystem image in <var>file</var>.  For example:
</p>
<div class="example">
<pre class="example">loopback loop0 /path/to/image
ls (loop0)/
</pre></div>

<p>With the <samp>-d</samp> option, delete a device previously created using this
command.
</p></dd></dl>


<hr>
<span id="ls"></span><div class="header">
<p>
Next: <a href="#lsfonts" accesskey="n" rel="next">lsfonts</a>, Previous: <a href="#loopback" accesskey="p" rel="prev">loopback</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="ls-1"></span><h4 class="subsection">16.3.47 ls</h4>

<dl>
<dt id="index-ls">Command: <strong>ls</strong> <em>[arg &hellip;]</em></dt>
<dd><p>List devices or files.
</p>
<p>With no arguments, print all devices known to GRUB.
</p>
<p>If the argument is a device name enclosed in parentheses (see <a href="#Device-syntax">Device syntax</a>), then print the name of the filesystem of that device.
</p>
<p>If the argument is a directory given as an absolute file name (see <a href="#File-name-syntax">File name syntax</a>), then list the contents of that directory.
</p></dd></dl>


<hr>
<span id="lsfonts"></span><div class="header">
<p>
Next: <a href="#lsmod" accesskey="n" rel="next">lsmod</a>, Previous: <a href="#ls" accesskey="p" rel="prev">ls</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="lsfonts-1"></span><h4 class="subsection">16.3.48 lsfonts</h4>

<dl>
<dt id="index-lsfonts">Command: <strong>lsfonts</strong></dt>
<dd><p>List loaded fonts.
</p></dd></dl>


<hr>
<span id="lsmod"></span><div class="header">
<p>
Next: <a href="#md5sum" accesskey="n" rel="next">md5sum</a>, Previous: <a href="#lsfonts" accesskey="p" rel="prev">lsfonts</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="lsmod-1"></span><h4 class="subsection">16.3.49 lsmod</h4>

<dl>
<dt id="index-lsmod">Command: <strong>lsmod</strong></dt>
<dd><p>Show list of loaded modules.
</p></dd></dl>

<hr>
<span id="md5sum"></span><div class="header">
<p>
Next: <a href="#module" accesskey="n" rel="next">module</a>, Previous: <a href="#lsmod" accesskey="p" rel="prev">lsmod</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="md5sum-1"></span><h4 class="subsection">16.3.50 md5sum</h4>

<dl>
<dt id="index-md5sum">Command: <strong>md5sum</strong> <em>arg &hellip;</em></dt>
<dd><p>Alias for <code>hashsum --hash md5 arg &hellip;</code>. See command <code>hashsum</code>
(see <a href="#hashsum">hashsum</a>) for full description.
</p></dd></dl>

<hr>
<span id="module"></span><div class="header">
<p>
Next: <a href="#multiboot" accesskey="n" rel="next">multiboot</a>, Previous: <a href="#md5sum" accesskey="p" rel="prev">md5sum</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="module-1"></span><h4 class="subsection">16.3.51 module</h4>

<dl>
<dt id="index-module">Command: <strong>module</strong> <em>[--nounzip] file [arguments]</em></dt>
<dd><p>Load a module for multiboot kernel image.  The rest of the
line is passed verbatim as the module command line.
</p></dd></dl>

<hr>
<span id="multiboot"></span><div class="header">
<p>
Next: <a href="#nativedisk" accesskey="n" rel="next">nativedisk</a>, Previous: <a href="#module" accesskey="p" rel="prev">module</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="multiboot-1"></span><h4 class="subsection">16.3.52 multiboot</h4>

<dl>
<dt id="index-multiboot">Command: <strong>multiboot</strong> <em>[--quirk-bad-kludge] [--quirk-modules-after-kernel] file &hellip;</em></dt>
<dd><p>Load a multiboot kernel image from <var>file</var>.  The rest of the
line is passed verbatim as the <em>kernel command-line</em>.  Any module must
be reloaded after using this command (see <a href="#module">module</a>).
</p>
<p>Some kernels have known problems. You need to specify &ndash;quirk-* for those.
&ndash;quirk-bad-kludge is a problem seen in several products that they include
loading kludge information with invalid data in ELF file. GRUB prior to 0.97
and some custom builds preferred ELF information while 0.97 and GRUB 2
use kludge. Use this option to ignore kludge.
Known affected systems: old Solaris, SkyOS.
</p>
<p>&ndash;quirk-modules-after-kernel is needed for kernels which load at relatively
high address e.g. 16MiB mark and can&rsquo;t cope with modules stuffed between
1MiB mark and beginning of the kernel.
Known afftected systems: VMWare.
</p></dd></dl>

<hr>
<span id="nativedisk"></span><div class="header">
<p>
Next: <a href="#normal" accesskey="n" rel="next">normal</a>, Previous: <a href="#multiboot" accesskey="p" rel="prev">multiboot</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="nativedisk-1"></span><h4 class="subsection">16.3.53 nativedisk</h4>

<dl>
<dt id="index-nativedisk">Command: <strong>nativedisk</strong></dt>
<dd><p>Switch from firmware disk drivers to native ones.
Really useful only on platforms where both
firmware and native disk drives are available.
Currently i386-pc, i386-efi, i386-ieee1275 and
x86_64-efi.
</p></dd></dl>

<hr>
<span id="normal"></span><div class="header">
<p>
Next: <a href="#normal_005fexit" accesskey="n" rel="next">normal_exit</a>, Previous: <a href="#nativedisk" accesskey="p" rel="prev">nativedisk</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="normal-1"></span><h4 class="subsection">16.3.54 normal</h4>

<dl>
<dt id="index-normal">Command: <strong>normal</strong> <em>[file]</em></dt>
<dd><p>Enter normal mode and display the GRUB menu.
</p>
<p>In normal mode, commands, filesystem modules, and cryptography modules are
automatically loaded, and the full GRUB script parser is available.  Other
modules may be explicitly loaded using <code>insmod</code> (see <a href="#insmod">insmod</a>).
</p>
<p>If a <var>file</var> is given, then commands will be read from that file.
Otherwise, they will be read from <samp>$prefix/grub.cfg</samp> if it exists.
</p>
<p><code>normal</code> may be called from within normal mode, creating a nested
environment.  It is more usual to use <code>configfile</code>
(see <a href="#configfile">configfile</a>) for this.
</p></dd></dl>


<hr>
<span id="normal_005fexit"></span><div class="header">
<p>
Next: <a href="#parttool" accesskey="n" rel="next">parttool</a>, Previous: <a href="#normal" accesskey="p" rel="prev">normal</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="normal_005fexit-1"></span><h4 class="subsection">16.3.55 normal_exit</h4>

<dl>
<dt id="index-normal_005fexit">Command: <strong>normal_exit</strong></dt>
<dd><p>Exit normal mode (see <a href="#normal">normal</a>).  If this instance of normal mode was not
nested within another one, then return to rescue mode.
</p></dd></dl>


<hr>
<span id="parttool"></span><div class="header">
<p>
Next: <a href="#password" accesskey="n" rel="next">password</a>, Previous: <a href="#normal_005fexit" accesskey="p" rel="prev">normal_exit</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="parttool-1"></span><h4 class="subsection">16.3.56 parttool</h4>

<dl>
<dt id="index-parttool">Command: <strong>parttool</strong> <em>partition commands</em></dt>
<dd><p>Make various modifications to partition table entries.
</p>
<p>Each <var>command</var> is either a boolean option, in which case it must be
followed with &lsquo;<samp>+</samp>&rsquo; or &lsquo;<samp>-</samp>&rsquo; (with no intervening space) to enable or
disable that option, or else it takes a value in the form
&lsquo;<samp><var>command</var>=<var>value</var></samp>&rsquo;.
</p>
<p>Currently, <code>parttool</code> is only useful on DOS partition tables (also
known as Master Boot Record, or MBR).  On these partition tables, the
following commands are available:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>boot</samp>&rsquo; (boolean)</dt>
<dd><p>When enabled, this makes the selected partition be the active (bootable)
partition on its disk, clearing the active flag on all other partitions.
This command is limited to <em>primary</em> partitions.
</p>
</dd>
<dt>&lsquo;<samp>type</samp>&rsquo; (value)</dt>
<dd><p>Change the type of an existing partition.  The value must be a number in the
range 0-0xFF (prefix with &lsquo;<samp>0x</samp>&rsquo; to enter it in hexadecimal).
</p>
</dd>
<dt>&lsquo;<samp>hidden</samp>&rsquo; (boolean)</dt>
<dd><p>When enabled, this hides the selected partition by setting the <em>hidden</em>
bit in its partition type code; when disabled, unhides the selected
partition by clearing this bit.  This is useful only when booting DOS or
Windows and multiple primary FAT partitions exist in one disk.  See also
<a href="#DOS_002fWindows">DOS/Windows</a>.
</p></dd>
</dl>
</dd></dl>


<hr>
<span id="password"></span><div class="header">
<p>
Next: <a href="#password_005fpbkdf2" accesskey="n" rel="next">password_pbkdf2</a>, Previous: <a href="#parttool" accesskey="p" rel="prev">parttool</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="password-1"></span><h4 class="subsection">16.3.57 password</h4>

<dl>
<dt id="index-password">Command: <strong>password</strong> <em>user clear-password</em></dt>
<dd><p>Define a user named <var>user</var> with password <var>clear-password</var>.
See <a href="#Security">Security</a>.
</p></dd></dl>


<hr>
<span id="password_005fpbkdf2"></span><div class="header">
<p>
Next: <a href="#play" accesskey="n" rel="next">play</a>, Previous: <a href="#password" accesskey="p" rel="prev">password</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="password_005fpbkdf2-1"></span><h4 class="subsection">16.3.58 password_pbkdf2</h4>

<dl>
<dt id="index-password_005fpbkdf2">Command: <strong>password_pbkdf2</strong> <em>user hashed-password</em></dt>
<dd><p>Define a user named <var>user</var> with password hash <var>hashed-password</var>.
Use <code>grub2-mkpasswd-pbkdf2</code> (see <a href="#Invoking-grub2_002dmkpasswd_002dpbkdf2">Invoking grub2-mkpasswd-pbkdf2</a>)
to generate password hashes.  See <a href="#Security">Security</a>.
</p></dd></dl>


<hr>
<span id="play"></span><div class="header">
<p>
Next: <a href="#probe" accesskey="n" rel="next">probe</a>, Previous: <a href="#password_005fpbkdf2" accesskey="p" rel="prev">password_pbkdf2</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="play-1"></span><h4 class="subsection">16.3.59 play</h4>

<dl>
<dt id="index-play">Command: <strong>play</strong> <em>file | tempo [pitch1 duration1] [pitch2 duration2] &hellip;</em></dt>
<dd><p>Plays a tune
</p>
<p>If the argument is a file name (see <a href="#File-name-syntax">File name syntax</a>), play the tune
recorded in it.  The file format is first the tempo as an unsigned 32bit
little-endian number, then pairs of unsigned 16bit little-endian numbers for
pitch and duration pairs.
</p>
<p>If the arguments are a series of numbers, play the inline tune.
</p>
<p>The tempo is the base for all note durations. 60 gives a 1-second base, 120
gives a half-second base, etc.  Pitches are Hz.  Set pitch to 0 to produce
a rest.
</p></dd></dl>


<hr>
<span id="probe"></span><div class="header">
<p>
Next: <a href="#rdmsr" accesskey="n" rel="next">rdmsr</a>, Previous: <a href="#play" accesskey="p" rel="prev">play</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="probe-1"></span><h4 class="subsection">16.3.60 probe</h4>

<dl>
<dt id="index-probe">Command: <strong>probe</strong> <em>[<samp>--set</samp> var] <samp>--driver</samp>|<samp>--partmap</samp>|<samp>--fs</samp>|<samp>--fs-uuid</samp>|<samp>--label</samp>|<samp>--part-uuid</samp> device</em></dt>
<dd><p>Retrieve device information. If option <samp>--set</samp> is given, assign result
to variable <var>var</var>, otherwise print information on the screen.
</p>
<p>The option <samp>--part-uuid</samp> is currently only implemented for MSDOS and GPT formatted disks.
</p></dd></dl>


<hr>
<span id="rdmsr"></span><div class="header">
<p>
Next: <a href="#read" accesskey="n" rel="next">read</a>, Previous: <a href="#probe" accesskey="p" rel="prev">probe</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="rdmsr-1"></span><h4 class="subsection">16.3.61 rdmsr</h4>

<dl>
<dt id="index-rdmsr">Command:: <strong>rdmsr</strong> <em>0xADDR [-v VARNAME]</em></dt>
<dd><p>Read a model-specific register at address 0xADDR. If the parameter
<samp>-v</samp> is used and an environment variable <var>VARNAME</var> is
given, set that environment variable to the value that was read.
</p>
<p>Please note that on SMP systems, reading from a MSR that has a
scope per hardware thread, implies that the value that is returned
only applies to the particular cpu/core/thread that runs the command.
</p>
<p>Also, if you specify a reserved or unimplemented MSR address, it will
cause a general protection exception (which is not currently being handled)
and the system will reboot.
</p></dd></dl>


<hr>
<span id="read"></span><div class="header">
<p>
Next: <a href="#reboot" accesskey="n" rel="next">reboot</a>, Previous: <a href="#rdmsr" accesskey="p" rel="prev">rdmsr</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="read-1"></span><h4 class="subsection">16.3.62 read</h4>

<dl>
<dt id="index-read">Command: <strong>read</strong> <em>[var]</em></dt>
<dd><p>Read a line of input from the user.  If an environment variable <var>var</var> is
given, set that environment variable to the line of input that was read,
with no terminating newline.
</p></dd></dl>


<hr>
<span id="reboot"></span><div class="header">
<p>
Next: <a href="#regexp" accesskey="n" rel="next">regexp</a>, Previous: <a href="#read" accesskey="p" rel="prev">read</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="reboot-1"></span><h4 class="subsection">16.3.63 reboot</h4>

<dl>
<dt id="index-reboot">Command: <strong>reboot</strong></dt>
<dd><p>Reboot the computer.
</p></dd></dl>


<hr>
<span id="regexp"></span><div class="header">
<p>
Next: <a href="#rmmod" accesskey="n" rel="next">rmmod</a>, Previous: <a href="#reboot" accesskey="p" rel="prev">reboot</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="regexp-1"></span><h4 class="subsection">16.3.64 regexp</h4>

<dl>
<dt id="index-regexp">Command: <strong>regexp</strong> <em>[<samp>--set</samp> [number:]var] regexp string</em></dt>
<dd><p>Test if regular expression <var>regexp</var> matches <var>string</var>. Supported
regular expressions are POSIX.2 Extended Regular Expressions. If option
<samp>--set</samp> is given, store <var>number</var>th matched subexpression in
variable <var>var</var>. Subexpressions are numbered in order of their opening
parentheses starting from &lsquo;<samp>1</samp>&rsquo;.  <var>number</var> defaults to &lsquo;<samp>1</samp>&rsquo;.
</p></dd></dl>


<hr>
<span id="rmmod"></span><div class="header">
<p>
Next: <a href="#save_005fenv" accesskey="n" rel="next">save_env</a>, Previous: <a href="#regexp" accesskey="p" rel="prev">regexp</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="rmmod-1"></span><h4 class="subsection">16.3.65 rmmod</h4>

<dl>
<dt id="index-rmmod">Command: <strong>rmmod</strong> <em>module</em></dt>
<dd><p>Remove a loaded <var>module</var>.
</p></dd></dl>


<hr>
<span id="save_005fenv"></span><div class="header">
<p>
Next: <a href="#search" accesskey="n" rel="next">search</a>, Previous: <a href="#rmmod" accesskey="p" rel="prev">rmmod</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="save_005fenv-1"></span><h4 class="subsection">16.3.66 save_env</h4>

<dl>
<dt id="index-save_005fenv">Command: <strong>save_env</strong> <em>[<samp>--file</samp> file] var &hellip;</em></dt>
<dd><p>Save the named variables from the environment to the environment block file.
See <a href="#Environment-block">Environment block</a>.
</p>
<p>The <samp>--file</samp> option overrides the default location of the environment
block.
</p>
<p>This command will operate successfully even when environment variable
<code>check_signatures</code> is set to <code>enforce</code>
(see <a href="#check_005fsignatures">check_signatures</a>), since it writes to disk and does not alter
the behavior of GRUB based on any contents of disk that have been
read.  It is possible to modify a digitally signed environment block
file from within GRUB using this command, such that its signature will
no longer be valid on subsequent boots.  Care should be taken in such
advanced configurations to avoid rendering the system
unbootable. See <a href="#Using-GPG_002dstyle-digital-signatures">Using GPG-style digital signatures</a>, for more information.
</p></dd></dl>


<hr>
<span id="search"></span><div class="header">
<p>
Next: <a href="#sendkey" accesskey="n" rel="next">sendkey</a>, Previous: <a href="#save_005fenv" accesskey="p" rel="prev">save_env</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="search-1"></span><h4 class="subsection">16.3.67 search</h4>

<dl>
<dt id="index-search">Command: <strong>search</strong> <em>[<samp>--file</samp>|<samp>--label</samp>|<samp>--fs-uuid</samp>]  [<samp>--set</samp> [var]] [<samp>--no-floppy</samp>] name</em></dt>
<dd><p>Search devices by file (<samp>-f</samp>, <samp>--file</samp>), filesystem label
(<samp>-l</samp>, <samp>--label</samp>), or filesystem UUID (<samp>-u</samp>,
<samp>--fs-uuid</samp>).
</p>
<p>If the <samp>--set</samp> option is used, the first device found is set as the
value of environment variable <var>var</var>.  The default variable is
&lsquo;<samp>root</samp>&rsquo;.
</p>
<p>The <samp>--no-floppy</samp> option prevents searching floppy devices, which can
be slow.
</p>
<p>The &lsquo;<samp>search.file</samp>&rsquo;, &lsquo;<samp>search.fs_label</samp>&rsquo;, and &lsquo;<samp>search.fs_uuid</samp>&rsquo;
commands are aliases for &lsquo;<samp>search --file</samp>&rsquo;, &lsquo;<samp>search --label</samp>&rsquo;, and
&lsquo;<samp>search --fs-uuid</samp>&rsquo; respectively.
</p></dd></dl>


<hr>
<span id="sendkey"></span><div class="header">
<p>
Next: <a href="#set" accesskey="n" rel="next">set</a>, Previous: <a href="#search" accesskey="p" rel="prev">search</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="sendkey-1"></span><h4 class="subsection">16.3.68 sendkey</h4>

<dl>
<dt id="index-sendkey">Command: <strong>sendkey</strong> <em>[<samp>--num</samp>|<samp>--caps</samp>|<samp>--scroll</samp>|<samp>--insert</samp>|<samp>--pause</samp>|<samp>--left-shift</samp>|<samp>--right-shift</samp>|<samp>--sysrq</samp>|<samp>--numkey</samp>|<samp>--capskey</samp>|<samp>--scrollkey</samp>|<samp>--insertkey</samp>|<samp>--left-alt</samp>|<samp>--right-alt</samp>|<samp>--left-ctrl</samp>|<samp>--right-ctrl</samp>  &lsquo;<samp>on</samp>&rsquo;|&lsquo;<samp>off</samp>&rsquo;]&hellip;  [<samp>no-led</samp>]  keystroke</em></dt>
<dd><p>Insert keystrokes into the keyboard buffer when booting.  Sometimes an
operating system or chainloaded boot loader requires particular keys to be
pressed: for example, one might need to press a particular key to enter
&quot;safe mode&quot;, or when chainloading another boot loader one might send
keystrokes to it to navigate its menu.  
</p>
<p>You may provide up to 16 keystrokes (the length of the BIOS keyboard
buffer).  Keystroke names may be upper-case or lower-case letters, digits,
or taken from the following table:
</p>

<table>
<thead><tr><th width="40%">Name</th><th width="50%">Key</th></tr></thead>
<tr><td width="40%">escape</td><td width="50%">Escape</td></tr>
<tr><td width="40%">exclam</td><td width="50%">!</td></tr>
<tr><td width="40%">at</td><td width="50%">@</td></tr>
<tr><td width="40%">numbersign</td><td width="50%">#</td></tr>
<tr><td width="40%">dollar</td><td width="50%">$</td></tr>
<tr><td width="40%">percent</td><td width="50%">%</td></tr>
<tr><td width="40%">caret</td><td width="50%">^</td></tr>
<tr><td width="40%">ampersand</td><td width="50%">&amp;</td></tr>
<tr><td width="40%">asterisk</td><td width="50%">*</td></tr>
<tr><td width="40%">parenleft</td><td width="50%">(</td></tr>
<tr><td width="40%">parenright</td><td width="50%">)</td></tr>
<tr><td width="40%">minus</td><td width="50%">-</td></tr>
<tr><td width="40%">underscore</td><td width="50%">_</td></tr>
<tr><td width="40%">equal</td><td width="50%">=</td></tr>
<tr><td width="40%">plus</td><td width="50%">+</td></tr>
<tr><td width="40%">backspace</td><td width="50%">Backspace</td></tr>
<tr><td width="40%">tab</td><td width="50%">Tab</td></tr>
<tr><td width="40%">bracketleft</td><td width="50%">[</td></tr>
<tr><td width="40%">braceleft</td><td width="50%">{</td></tr>
<tr><td width="40%">bracketright</td><td width="50%">]</td></tr>
<tr><td width="40%">braceright</td><td width="50%">}</td></tr>
<tr><td width="40%">enter</td><td width="50%">Enter</td></tr>
<tr><td width="40%">control</td><td width="50%">press and release Control</td></tr>
<tr><td width="40%">semicolon</td><td width="50%">;</td></tr>
<tr><td width="40%">colon</td><td width="50%">:</td></tr>
<tr><td width="40%">quote</td><td width="50%">&rsquo;</td></tr>
<tr><td width="40%">doublequote</td><td width="50%">&quot;</td></tr>
<tr><td width="40%">backquote</td><td width="50%">&lsquo;</td></tr>
<tr><td width="40%">tilde</td><td width="50%">~</td></tr>
<tr><td width="40%">shift</td><td width="50%">press and release left Shift</td></tr>
<tr><td width="40%">backslash</td><td width="50%">\</td></tr>
<tr><td width="40%">bar</td><td width="50%">|</td></tr>
<tr><td width="40%">comma</td><td width="50%">,</td></tr>
<tr><td width="40%">less</td><td width="50%">&lt;</td></tr>
<tr><td width="40%">period</td><td width="50%">.</td></tr>
<tr><td width="40%">greater</td><td width="50%">&gt;</td></tr>
<tr><td width="40%">slash</td><td width="50%">/</td></tr>
<tr><td width="40%">question</td><td width="50%">?</td></tr>
<tr><td width="40%">rshift</td><td width="50%">press and release right Shift</td></tr>
<tr><td width="40%">alt</td><td width="50%">press and release Alt</td></tr>
<tr><td width="40%">space</td><td width="50%">space bar</td></tr>
<tr><td width="40%">capslock</td><td width="50%">Caps Lock</td></tr>
<tr><td width="40%">F1</td><td width="50%">F1</td></tr>
<tr><td width="40%">F2</td><td width="50%">F2</td></tr>
<tr><td width="40%">F3</td><td width="50%">F3</td></tr>
<tr><td width="40%">F4</td><td width="50%">F4</td></tr>
<tr><td width="40%">F5</td><td width="50%">F5</td></tr>
<tr><td width="40%">F6</td><td width="50%">F6</td></tr>
<tr><td width="40%">F7</td><td width="50%">F7</td></tr>
<tr><td width="40%">F8</td><td width="50%">F8</td></tr>
<tr><td width="40%">F9</td><td width="50%">F9</td></tr>
<tr><td width="40%">F10</td><td width="50%">F10</td></tr>
<tr><td width="40%">F11</td><td width="50%">F11</td></tr>
<tr><td width="40%">F12</td><td width="50%">F12</td></tr>
<tr><td width="40%">num1</td><td width="50%">1 (numeric keypad)</td></tr>
<tr><td width="40%">num2</td><td width="50%">2 (numeric keypad)</td></tr>
<tr><td width="40%">num3</td><td width="50%">3 (numeric keypad)</td></tr>
<tr><td width="40%">num4</td><td width="50%">4 (numeric keypad)</td></tr>
<tr><td width="40%">num5</td><td width="50%">5 (numeric keypad)</td></tr>
<tr><td width="40%">num6</td><td width="50%">6 (numeric keypad)</td></tr>
<tr><td width="40%">num7</td><td width="50%">7 (numeric keypad)</td></tr>
<tr><td width="40%">num8</td><td width="50%">8 (numeric keypad)</td></tr>
<tr><td width="40%">num9</td><td width="50%">9 (numeric keypad)</td></tr>
<tr><td width="40%">num0</td><td width="50%">0 (numeric keypad)</td></tr>
<tr><td width="40%">numperiod</td><td width="50%">. (numeric keypad)</td></tr>
<tr><td width="40%">numend</td><td width="50%">End (numeric keypad)</td></tr>
<tr><td width="40%">numdown</td><td width="50%">Down (numeric keypad)</td></tr>
<tr><td width="40%">numpgdown</td><td width="50%">Page Down (numeric keypad)</td></tr>
<tr><td width="40%">numleft</td><td width="50%">Left (numeric keypad)</td></tr>
<tr><td width="40%">numcenter</td><td width="50%">5 with Num Lock inactive (numeric keypad)</td></tr>
<tr><td width="40%">numright</td><td width="50%">Right (numeric keypad)</td></tr>
<tr><td width="40%">numhome</td><td width="50%">Home (numeric keypad)</td></tr>
<tr><td width="40%">numup</td><td width="50%">Up (numeric keypad)</td></tr>
<tr><td width="40%">numpgup</td><td width="50%">Page Up (numeric keypad)</td></tr>
<tr><td width="40%">numinsert</td><td width="50%">Insert (numeric keypad)</td></tr>
<tr><td width="40%">numdelete</td><td width="50%">Delete (numeric keypad)</td></tr>
<tr><td width="40%">numasterisk</td><td width="50%">* (numeric keypad)</td></tr>
<tr><td width="40%">numminus</td><td width="50%">- (numeric keypad)</td></tr>
<tr><td width="40%">numplus</td><td width="50%">+ (numeric keypad)</td></tr>
<tr><td width="40%">numslash</td><td width="50%">/ (numeric keypad)</td></tr>
<tr><td width="40%">numenter</td><td width="50%">Enter (numeric keypad)</td></tr>
<tr><td width="40%">delete</td><td width="50%">Delete</td></tr>
<tr><td width="40%">insert</td><td width="50%">Insert</td></tr>
<tr><td width="40%">home</td><td width="50%">Home</td></tr>
<tr><td width="40%">end</td><td width="50%">End</td></tr>
<tr><td width="40%">pgdown</td><td width="50%">Page Down</td></tr>
<tr><td width="40%">pgup</td><td width="50%">Page Up</td></tr>
<tr><td width="40%">down</td><td width="50%">Down</td></tr>
<tr><td width="40%">up</td><td width="50%">Up</td></tr>
<tr><td width="40%">left</td><td width="50%">Left</td></tr>
<tr><td width="40%">right</td><td width="50%">Right</td></tr>
</table>

<p>As well as keystrokes, the <code>sendkey</code> command takes various options
that affect the BIOS keyboard status flags.  These options take an &lsquo;<samp>on</samp>&rsquo;
or &lsquo;<samp>off</samp>&rsquo; parameter, specifying that the corresponding status flag be
set or unset; omitting the option for a given status flag will leave that
flag at its initial state at boot.  The <samp>--num</samp>, <samp>--caps</samp>,
<samp>--scroll</samp>, and <samp>--insert</samp> options emulate setting the
corresponding mode, while the <samp>--numkey</samp>, <samp>--capskey</samp>,
<samp>--scrollkey</samp>, and <samp>--insertkey</samp> options emulate pressing and
holding the corresponding key.  The other status flag options are
self-explanatory.
</p>
<p>If the <samp>--no-led</samp> option is given, the status flag options will have
no effect on keyboard LEDs.
</p>
<p>If the <code>sendkey</code> command is given multiple times, then only the last
invocation has any effect.
</p>
<p>Since <code>sendkey</code> manipulates the BIOS keyboard buffer, it may cause
hangs, reboots, or other misbehaviour on some systems.  If the operating
system or boot loader that runs after GRUB uses its own keyboard driver
rather than the BIOS keyboard functions, then <code>sendkey</code> will have no
effect.
</p>
<p>This command is only available on PC BIOS systems.
</p></dd></dl>


<hr>
<span id="set"></span><div class="header">
<p>
Next: <a href="#sha1sum" accesskey="n" rel="next">sha1sum</a>, Previous: <a href="#sendkey" accesskey="p" rel="prev">sendkey</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="set-1"></span><h4 class="subsection">16.3.69 set</h4>

<dl>
<dt id="index-set">Command: <strong>set</strong> <em>[envvar=value]</em></dt>
<dd><p>Set the environment variable <var>envvar</var> to <var>value</var>. If invoked with no
arguments, print all environment variables with their values.
</p></dd></dl>


<hr>
<span id="sha1sum"></span><div class="header">
<p>
Next: <a href="#sha256sum" accesskey="n" rel="next">sha256sum</a>, Previous: <a href="#set" accesskey="p" rel="prev">set</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="sha1sum-1"></span><h4 class="subsection">16.3.70 sha1sum</h4>

<dl>
<dt id="index-sha1sum">Command: <strong>sha1sum</strong> <em>arg &hellip;</em></dt>
<dd><p>Alias for <code>hashsum --hash sha1 arg &hellip;</code>. See command <code>hashsum</code>
(see <a href="#hashsum">hashsum</a>) for full description.
</p></dd></dl>


<hr>
<span id="sha256sum"></span><div class="header">
<p>
Next: <a href="#sha512sum" accesskey="n" rel="next">sha512sum</a>, Previous: <a href="#sha1sum" accesskey="p" rel="prev">sha1sum</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="sha256sum-1"></span><h4 class="subsection">16.3.71 sha256sum</h4>

<dl>
<dt id="index-sha256sum">Command: <strong>sha256sum</strong> <em>arg &hellip;</em></dt>
<dd><p>Alias for <code>hashsum --hash sha256 arg &hellip;</code>. See command <code>hashsum</code>
(see <a href="#hashsum">hashsum</a>) for full description.
</p></dd></dl>


<hr>
<span id="sha512sum"></span><div class="header">
<p>
Next: <a href="#sleep" accesskey="n" rel="next">sleep</a>, Previous: <a href="#sha256sum" accesskey="p" rel="prev">sha256sum</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="sha512sum-1"></span><h4 class="subsection">16.3.72 sha512sum</h4>

<dl>
<dt id="index-sha512sum">Command: <strong>sha512sum</strong> <em>arg &hellip;</em></dt>
<dd><p>Alias for <code>hashsum --hash sha512 arg &hellip;</code>. See command <code>hashsum</code>
(see <a href="#hashsum">hashsum</a>) for full description.
</p></dd></dl>


<hr>
<span id="sleep"></span><div class="header">
<p>
Next: <a href="#smbios" accesskey="n" rel="next">smbios</a>, Previous: <a href="#sha512sum" accesskey="p" rel="prev">sha512sum</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="sleep-1"></span><h4 class="subsection">16.3.73 sleep</h4>

<dl>
<dt id="index-sleep">Command: <strong>sleep</strong> <em>[<samp>--verbose</samp>] [<samp>--interruptible</samp>] count</em></dt>
<dd><p>Sleep for <var>count</var> seconds. If option <samp>--interruptible</samp> is given,
allow pressing <tt class="key">ESC</tt>, <tt class="key">F4</tt> or holding down <tt class="key">SHIFT</tt> to interrupt
sleep.  With <samp>--verbose</samp> show countdown of remaining seconds. Exit code
is set to 0 if timeout expired and to 1 if timeout was interrupted using any
of the mentioned keys.
</p></dd></dl>


<hr>
<span id="smbios"></span><div class="header">
<p>
Next: <a href="#source" accesskey="n" rel="next">source</a>, Previous: <a href="#sleep" accesskey="p" rel="prev">sleep</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="smbios-1"></span><h4 class="subsection">16.3.74 smbios</h4>

<dl>
<dt id="index-smbios">Command: <strong>smbios</strong> <em>[<samp>--type</samp> <var>type</var>]  [<samp>--handle</samp> <var>handle</var>]  [<samp>--match</samp> <var>match</var>]  (<samp>--get-byte</samp> | <samp>--get-word</samp> | <samp>--get-dword</samp> |   <samp>--get-qword</samp> | <samp>--get-string</samp> | <samp>--get-uuid</samp>)  <var>offset</var>  [<samp>--set</samp> <var>variable</var>]</em></dt>
<dd><p>Retrieve SMBIOS information.
</p>
<p>The <code>smbios</code> command returns the value of a field in an SMBIOS
structure.  The following options determine which structure to select.
</p>
<ul>
<li> Specifying <samp>--type</samp> will select structures with a matching
<var>type</var>.  The type can be any integer from 0 to 255.
</li><li> Specifying <samp>--handle</samp> will select structures with a matching
<var>handle</var>.  The handle can be any integer from 0 to 65535.
</li><li> Specifying <samp>--match</samp> will select structure number <var>match</var> in the
filtered list of structures; e.g. <code>smbios --type 4 --match 2</code> will select
the second Process Information (Type 4) structure.  The list is always ordered
the same as the hardware&rsquo;s SMBIOS table.  The match number must be a positive
integer.  If unspecified, the first matching structure will be selected.
</li></ul>

<p>The remaining options determine which field in the selected SMBIOS structure to
return.  Only one of these options may be specified at a time.
</p>
<ul>
<li> When given <samp>--get-byte</samp>, return the value of the byte
at <var>offset</var> bytes into the selected SMBIOS structure.
It will be formatted as an unsigned decimal integer.
</li><li> When given <samp>--get-word</samp>, return the value of the word (two bytes)
at <var>offset</var> bytes into the selected SMBIOS structure.
It will be formatted as an unsigned decimal integer.
</li><li> When given <samp>--get-dword</samp>, return the value of the dword (four bytes)
at <var>offset</var> bytes into the selected SMBIOS structure.
It will be formatted as an unsigned decimal integer.
</li><li> When given <samp>--get-qword</samp>, return the value of the qword (eight bytes)
at <var>offset</var> bytes into the selected SMBIOS structure.
It will be formatted as an unsigned decimal integer.
</li><li> When given <samp>--get-string</samp>, return the string with its index found
at <var>offset</var> bytes into the selected SMBIOS structure.
</li><li> When given <samp>--get-uuid</samp>, return the value of the UUID (sixteen bytes)
at <var>offset</var> bytes into the selected SMBIOS structure.
It will be formatted as lower-case hyphenated hexadecimal digits, with the
first three fields as little-endian, and the rest printed byte-by-byte.
</li></ul>

<p>The default action is to print the value of the requested field to the console,
but a variable name can be specified with <samp>--set</samp> to store the value
instead of printing it.
</p>
<p>For example, this will store and then display the system manufacturer&rsquo;s name.
</p>
<div class="example">
<pre class="example">smbios --type 1 --get-string 4 --set system_manufacturer
echo $system_manufacturer
</pre></div>
</dd></dl>


<hr>
<span id="source"></span><div class="header">
<p>
Next: <a href="#test" accesskey="n" rel="next">test</a>, Previous: <a href="#smbios" accesskey="p" rel="prev">smbios</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="source-1"></span><h4 class="subsection">16.3.75 source</h4>

<dl>
<dt id="index-source">Command: <strong>source</strong> <em>file</em></dt>
<dd><p>Read <var>file</var> as a configuration file, as if its contents had been
incorporated directly into the sourcing file.  Unlike <code>configfile</code>
(see <a href="#configfile">configfile</a>), this executes the contents of <var>file</var> without
changing context: any environment variable changes made by the commands in
<var>file</var> will be preserved after <code>source</code> returns, and the menu
will not be shown immediately.
</p></dd></dl>


<hr>
<span id="test"></span><div class="header">
<p>
Next: <a href="#true" accesskey="n" rel="next">true</a>, Previous: <a href="#source" accesskey="p" rel="prev">source</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="test-1"></span><h4 class="subsection">16.3.76 test</h4>

<dl>
<dt id="index-test">Command: <strong>test</strong> <em>expression</em></dt>
<dd><p>Evaluate <var>expression</var> and return zero exit status if result is true,
non zero status otherwise.
</p>
<p><var>expression</var> is one of:
</p>
<dl compact="compact">
<dt><var>string1</var> <code>==</code> <var>string2</var></dt>
<dd><p>the strings are equal
</p></dd>
<dt><var>string1</var> <code>!=</code> <var>string2</var></dt>
<dd><p>the strings are not equal
</p></dd>
<dt><var>string1</var> <code>&lt;</code> <var>string2</var></dt>
<dd><p><var>string1</var> is lexicographically less than <var>string2</var>
</p></dd>
<dt><var>string1</var> <code>&lt;=</code> <var>string2</var></dt>
<dd><p><var>string1</var> is lexicographically less or equal than <var>string2</var>
</p></dd>
<dt><var>string1</var> <code>&gt;</code> <var>string2</var></dt>
<dd><p><var>string1</var> is lexicographically greater than <var>string2</var>
</p></dd>
<dt><var>string1</var> <code>&gt;=</code> <var>string2</var></dt>
<dd><p><var>string1</var> is lexicographically greater or equal than <var>string2</var>
</p></dd>
<dt><var>integer1</var> <code>-eq</code> <var>integer2</var></dt>
<dd><p><var>integer1</var> is equal to <var>integer2</var>
</p></dd>
<dt><var>integer1</var> <code>-ge</code> <var>integer2</var></dt>
<dd><p><var>integer1</var> is greater than or equal to <var>integer2</var>
</p></dd>
<dt><var>integer1</var> <code>-gt</code> <var>integer2</var></dt>
<dd><p><var>integer1</var> is greater than <var>integer2</var>
</p></dd>
<dt><var>integer1</var> <code>-le</code> <var>integer2</var></dt>
<dd><p><var>integer1</var> is less than or equal to <var>integer2</var>
</p></dd>
<dt><var>integer1</var> <code>-lt</code> <var>integer2</var></dt>
<dd><p><var>integer1</var> is less than <var>integer2</var>
</p></dd>
<dt><var>integer1</var> <code>-ne</code> <var>integer2</var></dt>
<dd><p><var>integer1</var> is not equal to <var>integer2</var>
</p></dd>
<dt><var>prefix</var><var>integer1</var> <code>-pgt</code> <var>prefix</var><var>integer2</var></dt>
<dd><p><var>integer1</var> is greater than <var>integer2</var> after stripping off common non-numeric <var>prefix</var>.
</p></dd>
<dt><var>prefix</var><var>integer1</var> <code>-plt</code> <var>prefix</var><var>integer2</var></dt>
<dd><p><var>integer1</var> is less than <var>integer2</var> after stripping off common non-numeric <var>prefix</var>.
</p></dd>
<dt><var>file1</var> <code>-nt</code> <var>file2</var></dt>
<dd><p><var>file1</var> is newer than <var>file2</var> (modification time). Optionally numeric <var>bias</var> may be directly appended to <code>-nt</code> in which case it is added to the first file modification time.
</p></dd>
<dt><var>file1</var> <code>-ot</code> <var>file2</var></dt>
<dd><p><var>file1</var> is older than <var>file2</var> (modification time). Optionally numeric <var>bias</var> may be directly appended to <code>-ot</code> in which case it is added to the first file modification time.
</p></dd>
<dt><code>-d</code> <var>file</var></dt>
<dd><p><var>file</var> exists and is a directory
</p></dd>
<dt><code>-e</code> <var>file</var></dt>
<dd><p><var>file</var> exists
</p></dd>
<dt><code>-f</code> <var>file</var></dt>
<dd><p><var>file</var> exists and is not a directory
</p></dd>
<dt><code>-s</code> <var>file</var></dt>
<dd><p><var>file</var> exists and has a size greater than zero
</p></dd>
<dt><code>-n</code> <var>string</var></dt>
<dd><p>the length of <var>string</var> is nonzero
</p></dd>
<dt><var>string</var></dt>
<dd><p><var>string</var> is equivalent to <code>-n <var>string</var></code>
</p></dd>
<dt><code>-z</code> <var>string</var></dt>
<dd><p>the length of <var>string</var> is zero
</p></dd>
<dt><code>(</code> <var>expression</var> <code>)</code></dt>
<dd><p><var>expression</var> is true
</p></dd>
<dt><code>!</code> <var>expression</var></dt>
<dd><p><var>expression</var> is false
</p></dd>
<dt><var>expression1</var> <code>-a</code> <var>expression2</var></dt>
<dd><p>both <var>expression1</var> and <var>expression2</var> are true
</p></dd>
<dt><var>expression1</var> <var>expression2</var></dt>
<dd><p>both <var>expression1</var> and <var>expression2</var> are true. This syntax is not POSIX-compliant and is not recommended.
</p></dd>
<dt><var>expression1</var> <code>-o</code> <var>expression2</var></dt>
<dd><p>either <var>expression1</var> or <var>expression2</var> is true
</p></dd>
</dl>
</dd></dl>


<hr>
<span id="true"></span><div class="header">
<p>
Next: <a href="#trust" accesskey="n" rel="next">trust</a>, Previous: <a href="#test" accesskey="p" rel="prev">test</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="true-1"></span><h4 class="subsection">16.3.77 true</h4>

<dl>
<dt id="index-true">Command: <strong>true</strong></dt>
<dd><p>Do nothing, successfully.  This is mainly useful in control constructs such
as <code>if</code> and <code>while</code> (see <a href="#Shell_002dlike-scripting">Shell-like scripting</a>).
</p></dd></dl>

<hr>
<span id="trust"></span><div class="header">
<p>
Next: <a href="#trust_005fcertificate" accesskey="n" rel="next">trust_certificate</a>, Previous: <a href="#true" accesskey="p" rel="prev">true</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="trust-1"></span><h4 class="subsection">16.3.78 trust</h4>

<dl>
<dt id="index-trust">Command: <strong>trust</strong> <em>[<samp>--skip-sig</samp>] pubkey_file</em></dt>
<dd><p>Read public key from <var>pubkey_file</var> and add it to GRUB&rsquo;s internal
list of trusted public keys.  These keys are used to validate digital
signatures when environment variable <code>check_signatures</code> is set to
<code>enforce</code>.  Note that if <code>check_signatures</code> is set to
<code>enforce</code> when <code>trust</code> executes, then <var>pubkey_file</var>
must itself be properly signed.  The <samp>--skip-sig</samp> option can be
used to disable signature-checking when reading <var>pubkey_file</var>
itself. It is expected that <samp>--skip-sig</samp> is useful for testing
and manual booting. See <a href="#Using-GPG_002dstyle-digital-signatures">Using GPG-style digital signatures</a>, for more
information.
</p></dd></dl>


<hr>
<span id="trust_005fcertificate"></span><div class="header">
<p>
Next: <a href="#unset" accesskey="n" rel="next">unset</a>, Previous: <a href="#trust" accesskey="p" rel="prev">trust</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="trust_005fcertificate-1"></span><h4 class="subsection">16.3.79 trust_certificate</h4>

<dl>
<dt id="index-trust_005fcertificate">Command: <strong>trust_certificate</strong> <em>x509_certificate</em></dt>
<dd><p>Read an DER-formatted x509 certificate from the file <var>x509_certificate</var>
and add it to GRUB&rsquo;s internal list of trusted x509 certificates. These
certificates are used to validate appended signatures when the environment
variable <code>check_appended_signatures</code> is set to <code>enforce</code> or
<code>forced</code>.
</p>
<p>Note that if <code>check_appended_signatures</code> is set to <code>enforce</code> or
<code>forced</code> when <code>trust_certificate</code> is executed, then
<var>x509_certificate</var> must itself bear an appended signature. (It is not
sufficient that <var>x509_certificate</var> be signed by a trusted certificate
according to the x509 rules: grub does not include support for validating
signatures within x509 certificates themselves.)
</p>
<p>See See <a href="#Using-appended-signatures">Using appended signatures</a> for more information.
</p></dd></dl>


<hr>
<span id="unset"></span><div class="header">
<p>
Next: <a href="#verify_005fappended" accesskey="n" rel="next">verify_appended</a>, Previous: <a href="#trust_005fcertificate" accesskey="p" rel="prev">trust_certificate</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="unset-1"></span><h4 class="subsection">16.3.80 unset</h4>

<dl>
<dt id="index-unset">Command: <strong>unset</strong> <em>envvar</em></dt>
<dd><p>Unset the environment variable <var>envvar</var>.
</p></dd></dl>



<hr>
<span id="verify_005fappended"></span><div class="header">
<p>
Next: <a href="#verify_005fdetached" accesskey="n" rel="next">verify_detached</a>, Previous: <a href="#unset" accesskey="p" rel="prev">unset</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="verify_005fappended-1"></span><h4 class="subsection">16.3.81 verify_appended</h4>

<dl>
<dt id="index-verify_005fappended">Command: <strong>verify_appended</strong> <em>file</em></dt>
<dd><p>Verifies an appended signature on <var>file</var> against the trusted certificates
known to GRUB (See see <a href="#list_005fcertificates">list_certificates</a>, see <a href="#trust_005fcertificate">trust_certificate</a>, and
see <a href="#distrust_005fcertificate">distrust_certificate</a>).
</p>
<p>Exit code <code>$?</code> is set to 0 if the signature validates
successfully.  If validation fails, it is set to a non-zero value.
See See <a href="#Using-appended-signatures">Using appended signatures</a>, for more information.
</p></dd></dl>

<hr>
<span id="verify_005fdetached"></span><div class="header">
<p>
Next: <a href="#videoinfo" accesskey="n" rel="next">videoinfo</a>, Previous: <a href="#verify_005fappended" accesskey="p" rel="prev">verify_appended</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="verify_005fdetached-1"></span><h4 class="subsection">16.3.82 verify_detached</h4>

<dl>
<dt id="index-verify_005fdetached">Command: <strong>verify_detached</strong> <em>[<samp>--skip-sig</samp>] file signature_file [pubkey_file]</em></dt>
<dd><p>Verifies a GPG-style detached signature, where the signed file is
<var>file</var>, and the signature itself is in file <var>signature_file</var>.
Optionally, a specific public key to use can be specified using
<var>pubkey_file</var>.  When environment variable <code>check_signatures</code>
is set to <code>enforce</code>, then <var>pubkey_file</var> must itself be
properly signed by an already-trusted key.  An unsigned
<var>pubkey_file</var> can be loaded by specifying <samp>--skip-sig</samp>.
If <var>pubkey_file</var> is omitted, then public keys from GRUB&rsquo;s trusted keys
(see <a href="#list_005ftrusted">list_trusted</a>, see <a href="#trust">trust</a>, and see <a href="#distrust">distrust</a>) are
tried.
</p>
<p>Exit code <code>$?</code> is set to 0 if the signature validates
successfully.  If validation fails, it is set to a non-zero value.
See <a href="#Using-GPG_002dstyle-digital-signatures">Using GPG-style digital signatures</a>, for more information.
</p></dd></dl>

<hr>
<span id="videoinfo"></span><div class="header">
<p>
Next: <a href="#wrmsr" accesskey="n" rel="next">wrmsr</a>, Previous: <a href="#verify_005fdetached" accesskey="p" rel="prev">verify_detached</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="videoinfo-1"></span><h4 class="subsection">16.3.83 videoinfo</h4>

<dl>
<dt id="index-videoinfo">Command: <strong>videoinfo</strong> <em>[[WxH]xD]</em></dt>
<dd><p>List available video modes. If resolution is given, show only matching modes.
</p></dd></dl>

<hr>
<span id="wrmsr"></span><div class="header">
<p>
Next: <a href="#xen_005fhypervisor" accesskey="n" rel="next">xen_hypervisor</a>, Previous: <a href="#videoinfo" accesskey="p" rel="prev">videoinfo</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="wrmsr-1"></span><h4 class="subsection">16.3.84 wrmsr</h4>

<dl>
<dt id="index-wrmsr">Command:: <strong>wrmsr</strong> <em>0xADDR 0xVALUE</em></dt>
<dd><p>Write a 0xVALUE to a model-specific register at address 0xADDR.
</p>
<p>Please note that on SMP systems, writing to a MSR that has a scope
per hardware thread, implies that the value that is written
only applies to the particular cpu/core/thread that runs the command.
</p>
<p>Also, if you specify a reserved or unimplemented MSR address, it will
cause a general protection exception (which is not currently being handled)
and the system will reboot.
</p>
<p>Note: The command is not allowed when lockdown is enforced (see <a href="#Lockdown">Lockdown</a>).
      This is done to prevent subverting various security mechanisms.
</p></dd></dl>

<hr>
<span id="xen_005fhypervisor"></span><div class="header">
<p>
Next: <a href="#xen_005fmodule" accesskey="n" rel="next">xen_module</a>, Previous: <a href="#wrmsr" accesskey="p" rel="prev">wrmsr</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="xen_005fhypervisor-1"></span><h4 class="subsection">16.3.85 xen_hypervisor</h4>

<dl>
<dt id="index-xen_005fhypervisor">Command: <strong>xen_hypervisor</strong> <em>file  [arguments] &hellip;</em></dt>
<dd><p>Load a Xen hypervisor binary from <var>file</var>. The rest of the line is passed
verbatim as the <em>kernel command-line</em>. Any other binaries must be
reloaded after using this command.
This command is only available on AArch64 systems.
</p></dd></dl>

<hr>
<span id="xen_005fmodule"></span><div class="header">
<p>
Previous: <a href="#xen_005fhypervisor" accesskey="p" rel="prev">xen_hypervisor</a>, Up: <a href="#Command_002dline-and-menu-entry-commands" accesskey="u" rel="up">Command-line and menu entry commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="xen_005fmodule-1"></span><h4 class="subsection">16.3.86 xen_module</h4>

<dl>
<dt id="index-xen_005fmodule">Command: <strong>xen_module</strong> <em>[--nounzip] file [arguments]</em></dt>
<dd><p>Load a module for xen hypervisor at the booting process of xen.
The rest of the line is passed verbatim as the module command line.
Modules should be loaded in the following order:
 - dom0 kernel image
 - dom0 ramdisk if present
 - XSM policy if present
This command is only available on AArch64 systems.
</p></dd></dl>

<hr>
<span id="Networking-commands"></span><div class="header">
<p>
Previous: <a href="#Command_002dline-and-menu-entry-commands" accesskey="p" rel="prev">Command-line and menu entry commands</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="The-list-of-networking-commands"></span><h3 class="section">16.4 The list of networking commands</h3>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#net_005fadd_005faddr" accesskey="1">net_add_addr</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Add a network address
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fadd_005fdns" accesskey="2">net_add_dns</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Add a DNS server
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fadd_005froute" accesskey="3">net_add_route</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Add routing entry
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fbootp" accesskey="4">net_bootp</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Perform a bootp/DHCP autoconfiguration
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fbootp6" accesskey="5">net_bootp6</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Perform a DHCPv6 autoconfiguration
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fdel_005faddr" accesskey="6">net_del_addr</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Remove IP address from interface
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fdel_005fdns" accesskey="7">net_del_dns</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Remove a DNS server
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fdel_005froute" accesskey="8">net_del_route</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Remove a route entry
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fdhcp" accesskey="9">net_dhcp</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Perform a DHCP autoconfiguration
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fget_005fdhcp_005foption">net_get_dhcp_option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Retrieve DHCP options
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fipv6_005fautoconf">net_ipv6_autoconf</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Perform IPv6 autoconfiguration
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fls_005faddr">net_ls_addr</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List interfaces
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fls_005fcards">net_ls_cards</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List network cards
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fls_005fdns">net_ls_dns</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List DNS servers
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fls_005froutes">net_ls_routes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">List routing entries
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#net_005fnslookup">net_nslookup</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Perform a DNS lookup
</td></tr>
</table>


<hr>
<span id="net_005fadd_005faddr"></span><div class="header">
<p>
Next: <a href="#net_005fadd_005fdns" accesskey="n" rel="next">net_add_dns</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fadd_005faddr-1"></span><h4 class="subsection">16.4.1 net_add_addr</h4>

<dl>
<dt id="index-net_005fadd_005faddr">Command: <strong>net_add_addr</strong> <em><var>interface</var> <var>card</var> <var>address</var></em></dt>
<dd><p>Configure additional network <var>interface</var> with <var>address</var> on a
network <var>card</var>. <var>address</var> can be either IP in dotted decimal notation,
or symbolic name which is resolved using DNS lookup. If successful, this command
also adds local link routing entry to the default subnet of <var>address</var>
with name <var>interface</var>&lsquo;<samp>:local</samp>&rsquo; via <var>interface</var>.
</p></dd></dl>


<hr>
<span id="net_005fadd_005fdns"></span><div class="header">
<p>
Next: <a href="#net_005fadd_005froute" accesskey="n" rel="next">net_add_route</a>, Previous: <a href="#net_005fadd_005faddr" accesskey="p" rel="prev">net_add_addr</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fadd_005fdns-1"></span><h4 class="subsection">16.4.2 net_add_dns</h4>

<dl>
<dt id="index-net_005fadd_005fdns">Command: <strong>net_add_dns</strong> <em><var>server</var></em></dt>
<dd><p>Resolve <var>server</var> IP address and add to the list of DNS servers used during
name lookup.
</p></dd></dl>


<hr>
<span id="net_005fadd_005froute"></span><div class="header">
<p>
Next: <a href="#net_005fbootp" accesskey="n" rel="next">net_bootp</a>, Previous: <a href="#net_005fadd_005fdns" accesskey="p" rel="prev">net_add_dns</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fadd_005froute-1"></span><h4 class="subsection">16.4.3 net_add_route</h4>

<dl>
<dt id="index-net_005fadd_005froute">Command: <strong>net_add_route</strong> <em><var>shortname</var> <var>ip</var>[/<var>prefix</var>] [<var>interface</var> | &lsquo;<samp>gw</samp>&rsquo; <var>gateway</var>]</em></dt>
<dd><p>Add route to network with address <var>ip</var> as modified by <var>prefix</var> via
either local <var>interface</var> or <var>gateway</var>. <var>prefix</var> is optional and
defaults to 32 for IPv4 address and 128 for IPv6 address. Route is identified
by <var>shortname</var> which can be used to remove it (see <a href="#net_005fdel_005froute">net_del_route</a>).
</p></dd></dl>


<hr>
<span id="net_005fbootp"></span><div class="header">
<p>
Next: <a href="#net_005fdel_005faddr" accesskey="n" rel="next">net_del_addr</a>, Previous: <a href="#net_005fadd_005froute" accesskey="p" rel="prev">net_add_route</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fbootp-1"></span><h4 class="subsection">16.4.4 net_bootp</h4>

<dl>
<dt id="index-net_005fbootp">Command: <strong>net_bootp</strong> <em>[<var>card</var>]</em></dt>
<dd><p>Alias for net_dhcp, for compatibility with older Grub versions. Will perform
the same DHCP handshake with potential fallback to BOOTP as the net_dhcp
command (see <a href="#net_005fdhcp">net_dhcp</a>).
</p>
</dd></dl>


<hr>
<span id="net_005fdel_005faddr"></span><div class="header">
<p>
Next: <a href="#net_005fdel_005fdns" accesskey="n" rel="next">net_del_dns</a>, Previous: <a href="#net_005fbootp" accesskey="p" rel="prev">net_bootp</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fdel_005faddr-1"></span><h4 class="subsection">16.4.5 net_del_addr</h4>

<dl>
<dt id="index-net_005fdel_005faddr">Command: <strong>net_del_addr</strong> <em><var>interface</var></em></dt>
<dd><p>Remove configured <var>interface</var> with associated address.
</p></dd></dl>


<hr>
<span id="net_005fdel_005fdns"></span><div class="header">
<p>
Next: <a href="#net_005fdel_005froute" accesskey="n" rel="next">net_del_route</a>, Previous: <a href="#net_005fdel_005faddr" accesskey="p" rel="prev">net_del_addr</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fdel_005fdns-1"></span><h4 class="subsection">16.4.6 net_del_dns</h4>

<dl>
<dt id="index-net_005fdel_005fdns">Command: <strong>net_del_dns</strong> <em><var>address</var></em></dt>
<dd><p>Remove <var>address</var> from list of servers used during name lookup.
</p></dd></dl>


<hr>
<span id="net_005fdel_005froute"></span><div class="header">
<p>
Next: <a href="#net_005fdhcp" accesskey="n" rel="next">net_dhcp</a>, Previous: <a href="#net_005fdel_005fdns" accesskey="p" rel="prev">net_del_dns</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fdel_005froute-1"></span><h4 class="subsection">16.4.7 net_del_route</h4>

<dl>
<dt id="index-net_005fdel_005froute">Command: <strong>net_del_route</strong> <em><var>shortname</var></em></dt>
<dd><p>Remove route entry identified by <var>shortname</var>.
</p></dd></dl>


<hr>
<span id="net_005fdhcp"></span><div class="header">
<p>
Next: <a href="#net_005fbootp6" accesskey="n" rel="next">net_bootp6</a>, Previous: <a href="#net_005fdel_005froute" accesskey="p" rel="prev">net_del_route</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fdhcp-1"></span><h4 class="subsection">16.4.8 net_dhcp</h4>

<dl>
<dt id="index-net_005fdhcp">Command: <strong>net_dhcp</strong> <em>[<var>card</var>]</em></dt>
<dd><p>Perform configuration of <var>card</var> using DHCP protocol. If no card name
is specified, try to configure all existing cards.
Falls back to the BOOTP protocol, if needed. If configuration was
successful, interface with name <var>card</var>&lsquo;<samp>:dhcp</samp>&rsquo; and configured
address is added to <var>card</var>.
Additionally the following DHCP options are recognized and processed:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>1 (Subnet Mask)</samp>&rsquo;</dt>
<dd><p>Used to calculate network local routing entry for interface <var>card</var>&lsquo;<samp>:dhcp</samp>&rsquo;.
</p></dd>
<dt>&lsquo;<samp>3 (Router)</samp>&rsquo;</dt>
<dd><p>Adds default route entry with the name <var>card</var>&lsquo;<samp>:dhcp:default</samp>&rsquo; via gateway
from DHCP option. Note that only option with single route is accepted.
</p></dd>
<dt>&lsquo;<samp>6 (Domain Name Server)</samp>&rsquo;</dt>
<dd><p>Adds all servers from option value to the list of servers used during name resolution.
</p></dd>
<dt>&lsquo;<samp>12 (Host Name)</samp>&rsquo;</dt>
<dd><p>Sets environment variable &lsquo;<samp>net_</samp>&rsquo;<var>&lt;card&gt;</var>&lsquo;<samp>_dhcp_hostname</samp>&rsquo;
(see <a href="#net_005f_003cinterface_003e_005fhostname">net_<var>&lt;interface&gt;</var>_hostname</a>) to the value of option.
</p></dd>
<dt>&lsquo;<samp>15 (Domain Name)</samp>&rsquo;</dt>
<dd><p>Sets environment variable &lsquo;<samp>net_</samp>&rsquo;<var>&lt;card&gt;</var>&lsquo;<samp>_dhcp_domain</samp>&rsquo;
(see <a href="#net_005f_003cinterface_003e_005fdomain">net_<var>&lt;interface&gt;</var>_domain</a>) to the value of option.
</p></dd>
<dt>&lsquo;<samp>17 (Root Path)</samp>&rsquo;</dt>
<dd><p>Sets environment variable &lsquo;<samp>net_</samp>&rsquo;<var>&lt;card&gt;</var>&lsquo;<samp>_dhcp_rootpath</samp>&rsquo;
(see <a href="#net_005f_003cinterface_003e_005frootpath">net_<var>&lt;interface&gt;</var>_rootpath</a>) to the value of option.
</p></dd>
<dt>&lsquo;<samp>18 (Extensions Path)</samp>&rsquo;</dt>
<dd><p>Sets environment variable &lsquo;<samp>net_</samp>&rsquo;<var>&lt;card&gt;</var>&lsquo;<samp>_dhcp_extensionspath</samp>&rsquo;
(see <a href="#net_005f_003cinterface_003e_005fextensionspath">net_<var>&lt;interface&gt;</var>_extensionspath</a>) to the value of option.
</p></dd>
<dt>&lsquo;<samp>66 (TFTP Server Name)</samp>&rsquo;</dt>
<dd><p>Sets environment variable &lsquo;<samp>net_</samp>&rsquo;<var>&lt;card&gt;</var>&lsquo;<samp>_dhcp_server_name</samp>&rsquo;
(see <a href="#net_005f_003cinterface_003e_005fdhcp_005fserver_005fname">net_<var>&lt;interface&gt;</var>_dhcp_server_name</a>) to the value of option.
</p></dd>
<dt>&lsquo;<samp>67 (Filename)</samp>&rsquo;</dt>
<dd><p>Sets environment variable &lsquo;<samp>net_</samp>&rsquo;<var>&lt;card&gt;</var>&lsquo;<samp>_boot_file</samp>&rsquo;
(see <a href="#net_005f_003cinterface_003e_005fboot_005ffile">net_<var>&lt;interface&gt;</var>_boot_file</a>) to the value of option.
</p></dd>
</dl>

</dd></dl>

<hr>
<span id="net_005fbootp6"></span><div class="header">
<p>
Next: <a href="#net_005fget_005fdhcp_005foption" accesskey="n" rel="next">net_get_dhcp_option</a>, Previous: <a href="#net_005fdhcp" accesskey="p" rel="prev">net_dhcp</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fbootp6-1"></span><h4 class="subsection">16.4.9 net_bootp6</h4>

<dl>
<dt id="index-net_005fbootp6">Command: <strong>net_bootp6</strong> <em>[<var>card</var>]</em></dt>
<dd><p>Perform configuration of <var>card</var> using DHCPv6 protocol. If no card name is
specified, try to configure all existing cards. If configuration was
successful, interface with name <var>card</var>&lsquo;<samp>:dhcp6</samp>&rsquo; and configured address
is added to <var>card</var>.
</p>
<dl compact="compact">
<dt>&lsquo;<samp>1 (Domain Name Server)</samp>&rsquo;</dt>
<dd><p>Adds all servers from option value to the list of servers used during name
resolution.
</p></dd>
</dl>

</dd></dl>

<hr>
<span id="net_005fget_005fdhcp_005foption"></span><div class="header">
<p>
Next: <a href="#net_005fipv6_005fautoconf" accesskey="n" rel="next">net_ipv6_autoconf</a>, Previous: <a href="#net_005fbootp6" accesskey="p" rel="prev">net_bootp6</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fget_005fdhcp_005foption-1"></span><h4 class="subsection">16.4.10 net_get_dhcp_option</h4>

<dl>
<dt id="index-net_005fget_005fdhcp_005foption">Command: <strong>net_get_dhcp_option</strong> <em><var>var</var> <var>interface</var> <var>number</var> <var>type</var></em></dt>
<dd><p>Request DHCP option <var>number</var> of <var>type</var> via <var>interface</var>. <var>type</var>
can be one of &lsquo;<samp>string</samp>&rsquo;, &lsquo;<samp>number</samp>&rsquo; or &lsquo;<samp>hex</samp>&rsquo;. If option is found,
assign its value to variable <var>var</var>. Values of types &lsquo;<samp>number</samp>&rsquo; and &lsquo;<samp>hex</samp>&rsquo;
are converted to string representation.
</p></dd></dl>


<hr>
<span id="net_005fipv6_005fautoconf"></span><div class="header">
<p>
Next: <a href="#net_005fls_005faddr" accesskey="n" rel="next">net_ls_addr</a>, Previous: <a href="#net_005fget_005fdhcp_005foption" accesskey="p" rel="prev">net_get_dhcp_option</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fipv6_005fautoconf-1"></span><h4 class="subsection">16.4.11 net_ipv6_autoconf</h4>

<dl>
<dt id="index-net_005fipv6_005fautoconf">Command: <strong>net_ipv6_autoconf</strong> <em>[<var>card</var>]</em></dt>
<dd><p>Perform IPv6 autoconfiguration by adding to the <var>card</var> interface with name
<var>card</var>&lsquo;<samp>:link</samp>&rsquo; and link local MAC-based address. If no card is specified,
perform autoconfiguration for all existing cards.
</p></dd></dl>


<hr>
<span id="net_005fls_005faddr"></span><div class="header">
<p>
Next: <a href="#net_005fls_005fcards" accesskey="n" rel="next">net_ls_cards</a>, Previous: <a href="#net_005fipv6_005fautoconf" accesskey="p" rel="prev">net_ipv6_autoconf</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fls_005faddr-1"></span><h4 class="subsection">16.4.12 net_ls_addr</h4>

<dl>
<dt id="index-net_005fls_005faddr">Command: <strong>net_ls_addr</strong></dt>
<dd><p>List all configured interfaces with their MAC and IP addresses.
</p></dd></dl>


<hr>
<span id="net_005fls_005fcards"></span><div class="header">
<p>
Next: <a href="#net_005fls_005fdns" accesskey="n" rel="next">net_ls_dns</a>, Previous: <a href="#net_005fls_005faddr" accesskey="p" rel="prev">net_ls_addr</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fls_005fcards-1"></span><h4 class="subsection">16.4.13 net_ls_cards</h4>

<dl>
<dt id="index-net_005fls_005fcards">Command: <strong>net_ls_cards</strong></dt>
<dd><p>List all detected network cards with their MAC address.
</p></dd></dl>


<hr>
<span id="net_005fls_005fdns"></span><div class="header">
<p>
Next: <a href="#net_005fls_005froutes" accesskey="n" rel="next">net_ls_routes</a>, Previous: <a href="#net_005fls_005fcards" accesskey="p" rel="prev">net_ls_cards</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fls_005fdns-1"></span><h4 class="subsection">16.4.14 net_ls_dns</h4>

<dl>
<dt id="index-net_005fls_005fdns">Command: <strong>net_ls_dns</strong></dt>
<dd><p>List addresses of DNS servers used during name lookup.
</p></dd></dl>


<hr>
<span id="net_005fls_005froutes"></span><div class="header">
<p>
Next: <a href="#net_005fnslookup" accesskey="n" rel="next">net_nslookup</a>, Previous: <a href="#net_005fls_005fdns" accesskey="p" rel="prev">net_ls_dns</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fls_005froutes-1"></span><h4 class="subsection">16.4.15 net_ls_routes</h4>

<dl>
<dt id="index-net_005fls_005froutes">Command: <strong>net_ls_routes</strong></dt>
<dd><p>List routing entries.
</p></dd></dl>


<hr>
<span id="net_005fnslookup"></span><div class="header">
<p>
Previous: <a href="#net_005fls_005froutes" accesskey="p" rel="prev">net_ls_routes</a>, Up: <a href="#Networking-commands" accesskey="u" rel="up">Networking commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="net_005fnslookup-1"></span><h4 class="subsection">16.4.16 net_nslookup</h4>

<dl>
<dt id="index-net_005fnslookup">Command: <strong>net_nslookup</strong> <em><var>name</var> [<var>server</var>]</em></dt>
<dd><p>Resolve address of <var>name</var> using DNS server <var>server</var>. If no server
is given, use default list of servers.
</p></dd></dl>


<hr>
<span id="Internationalisation"></span><div class="header">
<p>
Next: <a href="#Security" accesskey="n" rel="next">Security</a>, Previous: <a href="#Commands" accesskey="p" rel="prev">Commands</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Internationalisation-1"></span><h2 class="chapter">17 Internationalisation</h2>

<span id="Charset"></span><h3 class="section">17.1 Charset</h3>
<p>GRUB uses UTF-8 internally other than in rendering where some GRUB-specific
appropriate representation is used. All text files (including config) are
assumed to be encoded in UTF-8.
</p>
<span id="Filesystems"></span><h3 class="section">17.2 Filesystems</h3>
<p>NTFS, JFS, UDF, HFS+, exFAT, long filenames in FAT, Joliet part of
ISO9660 are treated as UTF-16 as per specification. AFS and BFS are read
as UTF-8, again according to specification. BtrFS, cpio, tar, squash4, minix,
minix2, minix3, ROMFS, ReiserFS, XFS, ext2, ext3, ext4, FAT (short names),
F2FS, RockRidge part of ISO9660, nilfs2, UFS1, UFS2 and ZFS are assumed
to be UTF-8. This might be false on systems configured with legacy charset
but as long as the charset used is superset of ASCII you should be able to
access ASCII-named files. And it&rsquo;s recommended to configure your system to use
UTF-8 to access the filesystem, convmv may help with migration. ISO9660 (plain)
filenames are specified as being ASCII or being described with unspecified
escape sequences. GRUB assumes that the ISO9660 names are UTF-8 (since
any ASCII is valid UTF-8). There are some old CD-ROMs which use CP437
in non-compliant way. You&rsquo;re still able to access files with names containing
only ASCII characters on such filesystems though. You&rsquo;re also able to access
any file if the filesystem contains valid Joliet (UTF-16) or RockRidge (UTF-8).
AFFS, SFS and HFS never use unicode and GRUB assumes them to be in Latin1,
Latin1 and MacRoman respectively. GRUB handles filesystem case-insensitivity
however no attempt is performed at case conversion of international characters
so e.g. a file named lowercase greek alpha is treated as different from
the one named as uppercase alpha. The filesystems in questions are
NTFS (except POSIX namespace), HFS+ (configurable at mkfs time, default
insensitive), SFS (configurable at mkfs time, default insensitive),
JFS (configurable at mkfs time, default sensitive), HFS, AFFS, FAT, exFAT
and ZFS (configurable on per-subvolume basis by property &ldquo;casesensitivity&rdquo;,
default sensitive). On ZFS subvolumes marked as case insensitive files
containing lowercase international characters are inaccessible.
Also like all supported filesystems except HFS+ and ZFS (configurable on
per-subvolume basis by property &ldquo;normalization&rdquo;, default none) GRUB makes
no attempt at check of canonical equivalence so a file name u-diaresis is
treated as distinct from u+combining diaresis. This however means that in
order to access file on HFS+ its name must be specified in normalisation form D.
On normalized ZFS subvolumes filenames out of normalisation are inaccessible.
</p>
<span id="Output-terminal"></span><h3 class="section">17.3 Output terminal</h3>
<p>Firmware output console &ldquo;console&rdquo; on ARC and IEEE1275 are limited to ASCII.
</p>
<p>BIOS firmware console and VGA text are limited to ASCII and some pseudographics.
</p>
<p>None of above mentioned is appropriate for displaying international and any
unsupported character is replaced with question mark except pseudographics
which we attempt to approximate with ASCII.
</p>
<p>EFI console on the other hand nominally supports UTF-16 but actual language
coverage depends on firmware and may be very limited.
</p>
<p>The encoding used on serial can be chosen with <code>terminfo</code> as
either ASCII, UTF-8 or &ldquo;visual UTF-8&rdquo;. Last one is against the specification
but results in correct rendering of right-to-left on some readers which don&rsquo;t
have own bidi implementation.
</p>
<p>On emu GRUB checks if charset is UTF-8 and uses it if so and uses ASCII
otherwise.
</p>
<p>When using gfxterm or gfxmenu GRUB itself is responsible for rendering the
text. In this case GRUB is limited by loaded fonts. If fonts contain all
required characters then bidirectional text, cursive variants and combining
marks other than enclosing, half (e.g. left half tilde or combining overline)
and double ones. Ligatures aren&rsquo;t supported though. This should cover European,
Middle Eastern (if you don&rsquo;t mind lack of lam-alif ligature in Arabic) and
East Asian scripts. Notable unsupported scripts are Brahmic family and
derived as well as Mongolian, Tifinagh, Korean Jamo (precomposed characters
have no problem) and tonal writing (2e5-2e9). GRUB also ignores deprecated
(as specified in Unicode) characters (e.g. tags). GRUB also doesn&rsquo;t handle so
called &ldquo;annotation characters&rdquo; If you can complete either of
two lists or, better, propose a patch to improve rendering, please contact
developer team.
</p>
<span id="Input-terminal"></span><h3 class="section">17.4 Input terminal</h3>
<p>Firmware console on BIOS, IEEE1275 and ARC doesn&rsquo;t allow you to enter non-ASCII
characters. EFI specification allows for such but author is unaware of any
actual implementations. Serial input is currently limited for latin1 (unlikely
to change). Own keyboard implementations (at_keyboard and usb_keyboard) 
supports any key but work on one-char-per-keystroke.
So no dead keys or advanced input method. Also there is no keymap change hotkey.
In practice it makes difficult to enter any text using non-Latin alphabet.
Moreover all current input consumers are limited to ASCII.
</p>
<span id="Gettext"></span><h3 class="section">17.5 Gettext</h3>
<p>GRUB supports being translated. For this you need to have language *.mo files in $prefix/locale, load gettext module and set &ldquo;lang&rdquo; variable.
</p>
<span id="Regexp"></span><h3 class="section">17.6 Regexp</h3>
<p>Regexps work on unicode characters, however no attempt at checking cannonical
equivalence has been made. Moreover the classes like [:alpha:] match only
ASCII subset.
</p>
<span id="Other"></span><h3 class="section">17.7 Other</h3>
<p>Currently GRUB always uses YEAR-MONTH-DAY HOUR:MINUTE:SECOND [WEEKDAY] 24-hour
datetime format but weekdays are translated.
GRUB always uses the decimal number format with [0-9] as digits and . as
descimal separator and no group separator.
IEEE1275 aliases are matched case-insensitively except non-ASCII which is
matched as binary. Similar behaviour is for matching OSBundleRequired.
Since IEEE1275 aliases and OSBundleRequired don&rsquo;t contain any non-ASCII it
should never be a problem in practice.
Case-sensitive identifiers are matched as raw strings, no canonical
equivalence check is performed. Case-insenstive identifiers are matched
as RAW but additionally [a-z] is equivalent to [A-Z]. GRUB-defined
identifiers use only ASCII and so should user-defined ones.
Identifiers containing non-ASCII may work but aren&rsquo;t supported.
Only the ASCII space characters (space U+0020, tab U+000b, CR U+000d and
LF U+000a) are recognised. Other unicode space characters aren&rsquo;t a valid
field separator.
<code>test</code> (see <a href="#test">test</a>) tests &lt;, &gt;, &lt;=, &gt;=, -pgt and -plt compare the strings in the
lexicographical order of unicode codepoints, replicating the behaviour of
test from coreutils.
environment variables and commands are listed in the same order.
</p>
<hr>
<span id="Security"></span><div class="header">
<p>
Next: <a href="#Platform-limitations" accesskey="n" rel="next">Platform limitations</a>, Previous: <a href="#Internationalisation" accesskey="p" rel="prev">Internationalisation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Security-1"></span><h2 class="chapter">18 Security</h2>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Authentication-and-authorisation" accesskey="1">Authentication and authorisation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Users and access control
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Using-GPG_002dstyle-digital-signatures" accesskey="2">Using GPG-style digital signatures</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Booting digitally signed code
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Using-appended-signatures" accesskey="3">Using appended signatures</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">An alternative approach to booting digitally signed code
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#UEFI-secure-boot-and-shim" accesskey="4">UEFI secure boot and shim</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Booting digitally signed PE files
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Secure-Boot-Advanced-Targeting" accesskey="5">Secure Boot Advanced Targeting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Embedded information for generation number based revocation
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Measured-Boot" accesskey="6">Measured Boot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Measuring boot components
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Lockdown" accesskey="7">Lockdown</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Lockdown when booting on a secure setup
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Signing-GRUB-itself" accesskey="8">Signing GRUB itself</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Ensuring the integrity of the GRUB core image
</td></tr>
</table>

<hr>
<span id="Authentication-and-authorisation"></span><div class="header">
<p>
Next: <a href="#Using-GPG_002dstyle-digital-signatures" accesskey="n" rel="next">Using GPG-style digital signatures</a>, Up: <a href="#Security" accesskey="u" rel="up">Security</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Authentication-and-authorisation-in-GRUB"></span><h3 class="section">18.1 Authentication and authorisation in GRUB</h3>

<p>By default, the boot loader interface is accessible to anyone with physical
access to the console: anyone can select and edit any menu entry, and anyone
can get direct access to a GRUB shell prompt.  For most systems, this is
reasonable since anyone with direct physical access has a variety of other
ways to gain full access, and requiring authentication at the boot loader
level would only serve to make it difficult to recover broken systems.
</p>
<p>However, in some environments, such as kiosks, it may be appropriate to lock
down the boot loader to require authentication before performing certain
operations.
</p>
<p>The &lsquo;<samp>password</samp>&rsquo; (see <a href="#password">password</a>) and &lsquo;<samp>password_pbkdf2</samp>&rsquo;
(see <a href="#password_005fpbkdf2">password_pbkdf2</a>) commands can be used to define users, each of
which has an associated password.  &lsquo;<samp>password</samp>&rsquo; sets the password in
plain text, requiring <samp>grub.cfg</samp> to be secure; &lsquo;<samp>password_pbkdf2</samp>&rsquo;
sets the password hashed using the Password-Based Key Derivation Function
(RFC 2898), requiring the use of <code>grub2-mkpasswd-pbkdf2</code>
(see <a href="#Invoking-grub2_002dmkpasswd_002dpbkdf2">Invoking grub2-mkpasswd-pbkdf2</a>) to generate password hashes.
</p>
<p>In order to enable authentication support, the &lsquo;<samp>superusers</samp>&rsquo; environment
variable must be set to a list of usernames, separated by any of spaces,
commas, semicolons, pipes, or ampersands.  Superusers are permitted to use
the GRUB command line, edit menu entries, and execute any menu entry.  If
&lsquo;<samp>superusers</samp>&rsquo; is set, then use of the command line and editing of menu
entries are automatically restricted to superusers. Setting &lsquo;<samp>superusers</samp>&rsquo;
to empty string effectively disables both access to CLI and editing of menu
entries. Note: The environment variable needs to be exported to also affect
the section defined by the &lsquo;<samp>submenu</samp>&rsquo; command (see <a href="#submenu">submenu</a>).
</p>
<p>Other users may be allowed to execute specific menu entries by giving a list of
usernames (as above) using the <samp>--users</samp> option to the
&lsquo;<samp>menuentry</samp>&rsquo; command (see <a href="#menuentry">menuentry</a>).  If the <samp>--unrestricted</samp>
option is used for a menu entry, then that entry is unrestricted.
If the <samp>--users</samp> option is not used for a menu entry, then that
only superusers are able to use it.
</p>
<p>Putting this together, a typical <samp>grub.cfg</samp> fragment might look like
this:
</p>
<div class="example">
<pre class="example">set superusers=&quot;root&quot;
password_pbkdf2 root grub.pbkdf2.sha512.10000.biglongstring
password user1 insecure

menuentry &quot;May be run by any user&quot; --unrestricted {
	set root=(hd0,1)
	linux /vmlinuz
}

menuentry &quot;Superusers only&quot; --users &quot;&quot; {
	set root=(hd0,1)
	linux /vmlinuz single
}

menuentry &quot;May be run by user1 or a superuser&quot; --users user1 {
	set root=(hd0,2)
	chainloader +1
}
</pre></div>

<p>The <code>grub2-mkconfig</code> program does not yet have built-in support for
generating configuration files with authentication.  You can use
<samp>/etc/grub.d/40_custom</samp> to add simple superuser authentication, by
adding <kbd>set superusers=</kbd> and <kbd>password</kbd> or <kbd>password_pbkdf2</kbd>
commands.
</p>
<hr>
<span id="Using-GPG_002dstyle-digital-signatures"></span><div class="header">
<p>
Next: <a href="#Using-appended-signatures" accesskey="n" rel="next">Using appended signatures</a>, Previous: <a href="#Authentication-and-authorisation" accesskey="p" rel="prev">Authentication and authorisation</a>, Up: <a href="#Security" accesskey="u" rel="up">Security</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Using-GPG_002dstyle-digital-signatures-in-GRUB"></span><h3 class="section">18.2 Using GPG-style digital signatures in GRUB</h3>

<p>GRUB&rsquo;s <samp>core.img</samp> can optionally provide enforcement that all files
subsequently read from disk are covered by a valid digital signature.
This section does <strong>not</strong> cover how to ensure that your
platform&rsquo;s firmware (e.g., Coreboot) validates <samp>core.img</samp>.
</p>
<p>If environment variable <code>check_signatures</code>
(see <a href="#check_005fsignatures">check_signatures</a>) is set to <code>enforce</code>, then every
attempt by the GRUB <samp>core.img</samp> to load another file <samp>foo</samp>
implicitly invokes <code>verify_detached foo foo.sig</code>
(see <a href="#verify_005fdetached">verify_detached</a>).  <code>foo.sig</code> must contain a valid
digital signature over the contents of <code>foo</code>, which can be
verified with a public key currently trusted by GRUB
(see <a href="#list_005ftrusted">list_trusted</a>, see <a href="#trust">trust</a>, and see <a href="#distrust">distrust</a>).  If
validation fails, then file <samp>foo</samp> cannot be opened.  This failure
may halt or otherwise impact the boot process.
</p>
<p>An initial trusted public key can be embedded within the GRUB <samp>core.img</samp>
using the <code>--pubkey</code> option to <code>grub-install</code>
(see <a href="#Invoking-grub2_002dinstall">Invoking grub2-install</a>).
</p>


<p>GRUB uses GPG-style detached signatures (meaning that a file
<samp>foo.sig</samp> will be produced when file <samp>foo</samp> is signed), and
currently supports the DSA and RSA signing algorithms. A signing key
can be generated as follows:
</p>
<div class="example">
<pre class="example">gpg --gen-key
</pre></div>

<p>An individual file can be signed as follows:
</p>
<div class="example">
<pre class="example">gpg --detach-sign /path/to/file
</pre></div>

<p>For successful validation of all of GRUB&rsquo;s subcomponents and the
loaded OS kernel, they must all be signed.  One way to accomplish this
is the following (after having already produced the desired
<samp>grub.cfg</samp> file, e.g., by running <code>grub2-mkconfig</code>
(see <a href="#Invoking-grub2_002dmkconfig">Invoking grub2-mkconfig</a>):
</p>
<div class="example">
<pre class="example"># Edit /dev/shm/passphrase.txt to contain your signing key's passphrase
for i in `find /boot -name &quot;*.cfg&quot; -or -name &quot;*.lst&quot; -or \
  -name &quot;*.mod&quot; -or -name &quot;vmlinuz*&quot; -or -name &quot;initrd*&quot; -or \
  -name &quot;grubenv&quot;`;
do
  gpg --batch --detach-sign --passphrase-fd 0 $i &lt; \
    /dev/shm/passphrase.txt
done
shred /dev/shm/passphrase.txt
</pre></div>

<p>See also: <a href="#check_005fsignatures">check_signatures</a>, <a href="#verify_005fdetached">verify_detached</a>, <a href="#trust">trust</a>,
<a href="#list_005ftrusted">list_trusted</a>, <a href="#distrust">distrust</a>, <a href="#load_005fenv">load_env</a>, <a href="#save_005fenv">save_env</a>.
</p>
<p>Note that internally signature enforcement is controlled by setting
the environment variable <code>check_signatures</code> equal to
<code>enforce</code>.  Passing one or more <code>--pubkey</code> options to
<code>grub2-mkimage</code> implicitly defines <code>check_signatures</code>
equal to <code>enforce</code> in <samp>core.img</samp> prior to processing any
configuration files.
</p>
<p>Note that signature checking does <strong>not</strong> prevent an attacker
with (serial, physical, ...) console access from dropping manually to
the GRUB console and executing:
</p>
<div class="example">
<pre class="example">set check_signatures=no
</pre></div>

<p>To prevent this, password-protection (see <a href="#Authentication-and-authorisation">Authentication and authorisation</a>) is essential.  Note that even with GRUB password
protection, GRUB itself cannot prevent someone with physical access to
the machine from altering that machine&rsquo;s firmware (e.g., Coreboot
or BIOS) configuration to cause the machine to boot from a different
(attacker-controlled) device.  GRUB is at best only one link in a
secure boot chain.
</p>
<hr>
<span id="Using-appended-signatures"></span><div class="header">
<p>
Next: <a href="#UEFI-secure-boot-and-shim" accesskey="n" rel="next">UEFI secure boot and shim</a>, Previous: <a href="#Using-GPG_002dstyle-digital-signatures" accesskey="p" rel="prev">Using GPG-style digital signatures</a>, Up: <a href="#Security" accesskey="u" rel="up">Security</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Using-appended-signatures-in-GRUB"></span><h3 class="section">18.3 Using appended signatures in GRUB</h3>

<p>GRUB supports verifying Linux-style &rsquo;appended signatures&rsquo; for secure boot.
Appended signatures are PKCS#7 messages containing a signature over the
contents of a file, plus some metadata, appended to the end of a file. A file
with an appended signature ends with the magic string:
</p>
<div class="example">
<pre class="example">~Module signature appended~\n
</pre></div>

<p>where <code>\n</code> represents the line-feed character, <code>0x0a</code>.
</p>
<p>Certificates can be managed at boot time using the see <a href="#trust_005fcertificate">trust_certificate</a>,
see <a href="#distrust_005fcertificate">distrust_certificate</a> and see <a href="#list_005fcertificates">list_certificates</a> commands.
Certificates can also be built in to the core image using the <code>--x509</code>
parameter to <code>grub-install</code> or <code>grub-mkimage</code>.
</p>
<p>A file can be explictly verified using the see <a href="#verify_005fappended">verify_appended</a> command.
</p>
<p>Only signatures made with the SHA-256 or SHA-512 hash algorithm are supported,
and only RSA signatures are supported.
</p>
<p>A file can be signed with the <code>sign-file</code> utility supplied with the
Linux kernel source. For example, if you have <code>signing.key</code> as the private
key and <code>certificate.der</code> as the x509 certificate containing the public key:
</p>
<div class="example">
<pre class="example">sign-file SHA256 signing.key certificate.der vmlinux vmlinux.signed
</pre></div>

<p>Enforcement of signature verification is controlled by the
<code>check_appended_signatures</code> variable.
</p>
<ul>
<li> &lsquo;<samp>no</samp>&rsquo;: no verification is performed. This is the default when GRUB
      is not in see <a href="#Lockdown">Lockdown</a> mode.
</li><li> &lsquo;<samp>enforce</samp>&rsquo;: verification is performed. Verification can be disabled
      by setting the variable back to &lsquo;<samp>no</samp>&rsquo;.
</li><li> &lsquo;<samp>forced</samp>&rsquo;: verification is performed and cannot be disabled. This is
      set when GRUB is in Lockdown when the appendedsig module is loaded.
</li></ul>

<p>Unlike GPG-style signatures, not all files loaded by GRUB are required to be
signed. Once verification is turned on, the following file types will have
appended signatures verified:
</p>
<ul>
<li> Linux kernels
</li><li> GRUB modules, except those built into the core image
</li><li> Any new certificate files to be trusted
</li></ul>

<p>ACPI tables and Device Tree images will not be checked for appended signatures
but must be verified by another mechanism such as GPG-style signatures before
they will be loaded.
</p>
<p>Unless lockdown mode is enabled, signature checking does <strong>not</strong>
stop an attacker with console access from dropping manually to the GRUB
console and executing:
</p>
<div class="example">
<pre class="example">set check_appended_signatures=no
</pre></div>

<p>Refer to the section on password-protecting GRUB (see <a href="#Authentication-and-authorisation">Authentication and authorisation</a>) for more information on preventing this.
</p>
<p>Additionally, unless lockdown mode is enabled:
</p>
<ul>
<li> Special care must be taken around the <code>loadenv</code> command, which
      can be used to turn off <code>check_appended_signature</code>.

</li><li> If the grub configuration file is loaded from the disk, anyone who can
      modify the file on disk can turn off <code>check_appended_signature</code>.
      Consider embedding the configuration into the core grub image.
</li></ul>

<hr>
<span id="UEFI-secure-boot-and-shim"></span><div class="header">
<p>
Next: <a href="#Secure-Boot-Advanced-Targeting" accesskey="n" rel="next">Secure Boot Advanced Targeting</a>, Previous: <a href="#Using-appended-signatures" accesskey="p" rel="prev">Using appended signatures</a>, Up: <a href="#Security" accesskey="u" rel="up">Security</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="UEFI-secure-boot-and-shim-support"></span><h3 class="section">18.4 UEFI secure boot and shim support</h3>

<p>The GRUB, except the <code>chainloader</code> command, works with the UEFI secure
boot and the shim. This functionality is provided by the shim_lock verifier. It
is built into the <samp>core.img</samp> and is registered if the UEFI secure boot is
enabled. The &lsquo;<samp>shim_lock</samp>&rsquo; variable is set to &lsquo;<samp>y</samp>&rsquo; when shim_lock verifier
is registered. If it is desired to use UEFI secure boot without shim, one can
disable shim_lock by disabling shim verification with MokSbState UEFI variable
or by building grub image with &lsquo;<samp>--disable-shim-lock</samp>&rsquo; option.
</p>
<p>All GRUB modules not stored in the <samp>core.img</samp>, OS kernels, ACPI tables,
Device Trees, etc. have to be signed, e.g, using PGP. Additionally, the commands
that can be used to subvert the UEFI secure boot mechanism, such as <code>iorw</code>
and <code>memrw</code> will not be available when the UEFI secure boot is enabled.
This is done for security reasons and are enforced by the GRUB Lockdown mechanism
(see <a href="#Lockdown">Lockdown</a>).
</p>
<hr>
<span id="Secure-Boot-Advanced-Targeting"></span><div class="header">
<p>
Next: <a href="#Measured-Boot" accesskey="n" rel="next">Measured Boot</a>, Previous: <a href="#UEFI-secure-boot-and-shim" accesskey="p" rel="prev">UEFI secure boot and shim</a>, Up: <a href="#Security" accesskey="u" rel="up">Security</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Embedded-information-for-generation-number-based-revocation"></span><h3 class="section">18.5 Embedded information for generation number based revocation</h3>

<p>The Secure Boot Advanced Targeting (SBAT) is a mechanism to allow the revocation
of components in the boot path by using generation numbers embedded into the EFI
binaries. The SBAT metadata is located in an .sbat data section that has set of
UTF-8 strings as comma-separated values (CSV). See
<a href="https://github.com/rhboot/shim/blob/main/SBAT.md">https://github.com/rhboot/shim/blob/main/SBAT.md</a> for more details.
</p>
<p>To add a data section containing the SBAT information into the binary, the
<samp>--sbat</samp> option of <code>grub-mkimage</code> command should be used. The content
of a CSV file, encoded with UTF-8, is copied as is to the .sbat data section into
the generated EFI binary. The CSV file can be stored anywhere on the file system.
</p>
<div class="example">
<pre class="example">grub-mkimage -O x86_64-efi -o grubx64.efi -p '(tftp)/grub' --sbat sbat.csv efinet tftp
</pre></div>

<hr>
<span id="Measured-Boot"></span><div class="header">
<p>
Next: <a href="#Lockdown" accesskey="n" rel="next">Lockdown</a>, Previous: <a href="#Secure-Boot-Advanced-Targeting" accesskey="p" rel="prev">Secure Boot Advanced Targeting</a>, Up: <a href="#Security" accesskey="u" rel="up">Security</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Measuring-boot-components"></span><h3 class="section">18.6 Measuring boot components</h3>

<p>If the tpm module is loaded and the platform has a Trusted Platform Module
installed, GRUB will log each command executed and each file loaded into the
TPM event log and extend the PCR values in the TPM correspondingly. All events
will be logged into the PCR described below with a type of EV_IPL and an
event description as described below.
</p>
<table>
<thead><tr><th width="30%">Event type</th><th width="10%">PCR</th><th width="60%">Description</th></tr></thead>
<tr><td width="30%">Command</td><td width="10%">8</td><td width="60%">All executed commands (including those from configuration files) will be
logged and measured as entered with a prefix of &ldquo;grub_cmd: &ldquo;</td></tr>
<tr><td width="30%">Kernel command line</td><td width="10%">8</td><td width="60%">Any command line passed to a kernel will be logged and measured as entered
with a prefix of &ldquo;kernel_cmdline: &rdquo;</td></tr>
<tr><td width="30%">Module command line</td><td width="10%">8</td><td width="60%">Any command line passed to a kernel module will be logged and measured as
entered with a prefix of &ldquo;module_cmdline: &ldquo;</td></tr>
<tr><td width="30%">Files</td><td width="10%">9</td><td width="60%">Any file read by GRUB will be logged and measured with a descriptive text
corresponding to the filename.</td></tr>
</table>

<p>GRUB will not measure its own <samp>core.img</samp> - it is expected that firmware
will carry this out. GRUB will also not perform any measurements until the
tpm module is loaded. As such it is recommended that the tpm module be built
into <samp>core.img</samp> in order to avoid a potential gap in measurement between
<samp>core.img</samp> being loaded and the tpm module being loaded.
</p>
<p>Measured boot is currently only supported on EFI and IBM IEEE1275 PowerPC
platforms.
</p>
<hr>
<span id="Lockdown"></span><div class="header">
<p>
Next: <a href="#Signing-GRUB-itself" accesskey="n" rel="next">Signing GRUB itself</a>, Previous: <a href="#Measured-Boot" accesskey="p" rel="prev">Measured Boot</a>, Up: <a href="#Security" accesskey="u" rel="up">Security</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Lockdown-when-booting-on-a-secure-setup"></span><h3 class="section">18.7 Lockdown when booting on a secure setup</h3>

<p>The GRUB can be locked down when booted on a secure boot environment, for example
if UEFI or Power secure boot is enabled. On a locked down configuration, the
GRUB will be restricted and some operations/commands cannot be executed.
</p>
<p>The &lsquo;<samp>lockdown</samp>&rsquo; variable is set to &lsquo;<samp>y</samp>&rsquo; when the GRUB is locked down.
Otherwise it does not exit.
</p>
<hr>
<span id="Signing-GRUB-itself"></span><div class="header">
<p>
Previous: <a href="#Lockdown" accesskey="p" rel="prev">Lockdown</a>, Up: <a href="#Security" accesskey="u" rel="up">Security</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Signing-GRUB-itself-1"></span><h3 class="section">18.8 Signing GRUB itself</h3>

<p>To ensure a complete secure-boot chain, there must be a way for the code that
loads GRUB to verify the integrity of the core image.
</p>
<p>This is ultimately platform-specific and individual platforms can define their
own mechanisms. However, there are general-purpose mechanisms that can be used
with GRUB.
</p>
<span id="Signing-GRUB-for-UEFI-secure-boot"></span><h3 class="section">18.9 Signing GRUB for UEFI secure boot</h3>

<p>On UEFI platforms, <samp>core.img</samp> is a PE binary. Therefore, it can be signed
with a tool such as <code>pesign</code> or <code>sbsign</code>. Refer to the
suggestions in see <a href="#UEFI-secure-boot-and-shim">UEFI secure boot and shim</a> to ensure that the final
image works under UEFI secure boot and can maintain the secure-boot chain. It
will also be necessary to enrol the public key used into a relevant firmware
key database.
</p>
<span id="Signing-GRUB-with-an-appended-signature"></span><h3 class="section">18.10 Signing GRUB with an appended signature</h3>

<p>The <samp>core.elf</samp> itself can be signed with a Linux kernel module-style
appended signature.
</p>
<p>To support IEEE1275 platforms where the boot image is often loaded directly
from a disk partition rather than from a file system, the <samp>core.elf</samp>
can specify the size and location of the appended signature with an ELF
note added by <code>grub-install</code>.
</p>
<p>An image can be signed this way using the <code>sign-file</code> command from
the Linux kernel:
</p>
<div class="example">
<pre class="example"># grub.key is your private key and certificate.der is your public key

# Determine the size of the appended signature. It depends on the signing
# certificate and the hash algorithm
touch empty
sign-file SHA256 grub.key certificate.der empty empty.sig
SIG_SIZE=`stat -c '%s' empty.sig`
rm empty empty.sig

# Build a grub image with $SIG_SIZE reserved for the signature
grub-install --appended-signature-size $SIG_SIZE --modules=&quot;...&quot; ...

# Replace the reserved size with a signature:
# cut off the last $SIG_SIZE bytes with truncate's minus modifier
truncate -s -$SIG_SIZE /boot/grub/powerpc-ieee1275/core.elf core.elf.unsigned
# sign the trimmed file with an appended signature, restoring the correct size
sign-file SHA256 grub.key certificate.der core.elf.unsigned core.elf.signed

# Don't forget to install the signed image as required
# (e.g. on powerpc-ieee1275, to the PReP partition)
</pre></div>

<p>As with UEFI secure boot, it is necessary to build in the required modules,
or sign them separately.
</p>

<hr>
<span id="Platform-limitations"></span><div class="header">
<p>
Next: <a href="#Platform_002dspecific-operations" accesskey="n" rel="next">Platform-specific operations</a>, Previous: <a href="#Security" accesskey="p" rel="prev">Security</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Platform-limitations-1"></span><h2 class="chapter">19 Platform limitations</h2>

<p>GRUB2 is designed to be portable and is actually ported across platforms. We
try to keep all platforms at the level. Unfortunately some platforms are better
supported than others. This is detailed in current and 2 following sections.
</p>
<p>All platforms have an artificially GRUB imposed disk size restriction of 1 EiB.
In some cases, larger disk sizes can be used, but access will not be allowed
beyond 1 EiB.
</p>
<p>LUKS2 devices with size larger than 16 EiB are currently not supported. They
can not be created as crypto devices by cryptomount, so can not even be
partially read from. LUKS have no limitations other than those imposed by the
format.
</p>
<p>ARC platform is unable to change datetime (firmware doesn&rsquo;t seem to provide a
function for it).
EMU has similar limitation.
</p>
<p>On EMU platform no serial port is available.
</p>
<p>Console charset refers only to firmware-assisted console. gfxterm is always
Unicode (see Internationalisation section for its limitations). Serial is
configurable to UTF-8 or ASCII (see Internationalisation). In case of qemu
and coreboot ports the refered console is vga_text. Loongson always uses
gfxterm.
</p>
<p>Most limited one is ASCII. CP437 provides additionally pseudographics.
GRUB2 doesn&rsquo;t use any language characters from CP437 as often CP437 is replaced
by national encoding compatible only in pseudographics.
Unicode is the most versatile charset which supports many languages. However
the actual console may be much more limited depending on firmware
</p>
<p>On BIOS, network is supported only if the image is loaded through network.
On sparc64, GRUB is unable to determine which server it was booted from.
</p>
<p>Direct ATA/AHCI support allows to circumvent various firmware limitations but
isn&rsquo;t needed for normal operation except on baremetal ports.
</p>
<p>AT keyboard support allows keyboard layout remapping and support for keys not
available through firmware. It isn&rsquo;t needed for normal operation except
baremetal ports.
</p>
<p>Speaker allows morse and spkmodem communication.
</p>
<p>USB support provides benefits similar to ATA (for USB disks) or AT (for USB
keyboards). In addition it allows USBserial.
</p>
<p>Chainloading refers to the ability to load another bootloader through the same protocol
</p>
<p>Hints allow faster disk discovery by already knowing in advance which is the disk in
question. On some platforms hints are correct unless you move the disk between boots.
On other platforms it&rsquo;s just an educated guess.
Note that hint failure results in just reduced performance, not a failure
</p>
<p>BadRAM is the ability to mark some of the RAM as &ldquo;bad&rdquo;. Note: due to protocol
limitations mips-loongson (with Linux protocol)
and mips-qemu_mips can use only memory up to first hole.
</p>
<p>Bootlocation is ability of GRUB to automatically detect where it boots from.
&ldquo;disk&rdquo; means the detection is limited to detecting the disk with partition
being discovered on install time. &ldquo;partition&rdquo; means that disk and partiton
can be automatically discovered. &ldquo;file&rdquo; means that boot image file name as
well as disk and partition can be discovered. For consistency, default install ignores
partition and relies solely on disk detection. If no bootlocation discovery is available
or boot and grub-root disks are different, UUID is used instead. On ARC if no device
to install to is specified, UUID is used instead as well.
</p>

<table>
<tr><td width="20%"></td><td width="20%">BIOS</td><td width="20%">Coreboot</td><td width="20%">Multiboot</td><td width="20%">Qemu</td></tr>
<tr><td width="20%">video</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">console charset</td><td width="20%">CP437</td><td width="20%">CP437</td><td width="20%">CP437</td><td width="20%">CP437</td></tr>
<tr><td width="20%">network</td><td width="20%">yes (*)</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">ATA/AHCI</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">AT keyboard</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">Speaker</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">USB</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">chainloader</td><td width="20%">local</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">cpuid</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">partial</td></tr>
<tr><td width="20%">rdmsr</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">partial</td></tr>
<tr><td width="20%">wrmsr</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">partial</td></tr>
<tr><td width="20%">hints</td><td width="20%">guess</td><td width="20%">guess</td><td width="20%">guess</td><td width="20%">guess</td></tr>
<tr><td width="20%">PCI</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">badram</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">compression</td><td width="20%">always</td><td width="20%">pointless</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">exit</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">bootlocation</td><td width="20%">disk</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
</table>

<table>
<tr><td width="20%"></td><td width="20%">ia32 EFI</td><td width="20%">amd64 EFI</td><td width="20%">ia32 IEEE1275</td><td width="20%">Itanium</td></tr>
<tr><td width="20%">video</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">console charset</td><td width="20%">Unicode</td><td width="20%">Unicode</td><td width="20%">ASCII</td><td width="20%">Unicode</td></tr>
<tr><td width="20%">network</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">ATA/AHCI</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">AT keyboard</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">Speaker</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">USB</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">chainloader</td><td width="20%">local</td><td width="20%">local</td><td width="20%">no</td><td width="20%">local</td></tr>
<tr><td width="20%">cpuid</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">no</td></tr>
<tr><td width="20%">rdmsr</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">no</td></tr>
<tr><td width="20%">wrmsr</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">partial</td><td width="20%">no</td></tr>
<tr><td width="20%">hints</td><td width="20%">guess</td><td width="20%">guess</td><td width="20%">good</td><td width="20%">guess</td></tr>
<tr><td width="20%">PCI</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">badram</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">yes</td></tr>
<tr><td width="20%">compression</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">exit</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">bootlocation</td><td width="20%">file</td><td width="20%">file</td><td width="20%">file, ignored</td><td width="20%">file</td></tr>
</table>

<table>
<tr><td width="20%"></td><td width="20%">Loongson</td><td width="20%">sparc64</td><td width="20%">Powerpc</td><td width="20%">ARC</td></tr>
<tr><td width="20%">video</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">console charset</td><td width="20%">N/A</td><td width="20%">ASCII</td><td width="20%">ASCII</td><td width="20%">ASCII</td></tr>
<tr><td width="20%">network</td><td width="20%">no</td><td width="20%">yes (*)</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">ATA/AHCI</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">AT keyboard</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">Speaker</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">USB</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">chainloader</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">cpuid</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">rdmsr</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">wrmsr</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">hints</td><td width="20%">good</td><td width="20%">good</td><td width="20%">good</td><td width="20%">no</td></tr>
<tr><td width="20%">PCI</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">badram</td><td width="20%">yes (*)</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">compression</td><td width="20%">configurable</td><td width="20%">no</td><td width="20%">no</td><td width="20%">configurable</td></tr>
<tr><td width="20%">exit</td><td width="20%">no</td><td width="20%">yes</td><td width="20%">yes</td><td width="20%">yes</td></tr>
<tr><td width="20%">bootlocation</td><td width="20%">no</td><td width="20%">partition</td><td width="20%">file</td><td width="20%">file (*)</td></tr>
</table>

<table>
<tr><td width="20%"></td><td width="20%">MIPS qemu</td><td width="20%">emu</td><td width="20%">xen</td></tr>
<tr><td width="20%">video</td><td width="20%">no</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">console charset</td><td width="20%">CP437</td><td width="20%">Unicode (*)</td><td width="20%">ASCII</td></tr>
<tr><td width="20%">network</td><td width="20%">no</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">ATA/AHCI</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">AT keyboard</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">Speaker</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">USB</td><td width="20%">N/A</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">chainloader</td><td width="20%">yes</td><td width="20%">no</td><td width="20%">yes</td></tr>
<tr><td width="20%">cpuid</td><td width="20%">no</td><td width="20%">no</td><td width="20%">yes</td></tr>
<tr><td width="20%">rdmsr</td><td width="20%">no</td><td width="20%">no</td><td width="20%">yes</td></tr>
<tr><td width="20%">wrmsr</td><td width="20%">no</td><td width="20%">no</td><td width="20%">yes</td></tr>
<tr><td width="20%">hints</td><td width="20%">guess</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">PCI</td><td width="20%">no</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">badram</td><td width="20%">yes (*)</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">compression</td><td width="20%">configurable</td><td width="20%">no</td><td width="20%">no</td></tr>
<tr><td width="20%">exit</td><td width="20%">no</td><td width="20%">yes</td><td width="20%">no</td></tr>
<tr><td width="20%">bootlocation</td><td width="20%">no</td><td width="20%">file</td><td width="20%">no</td></tr>
</table>

<hr>
<span id="Platform_002dspecific-operations"></span><div class="header">
<p>
Next: <a href="#Supported-kernels" accesskey="n" rel="next">Supported kernels</a>, Previous: <a href="#Platform-limitations" accesskey="p" rel="prev">Platform limitations</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Outline"></span><h2 class="chapter">20 Outline</h2>

<p>Some platforms have features which allows to implement
some commands useless or not implementable on others.
</p>
<p>Quick summary:
</p>
<p>Information retrieval:
</p>
<ul>
<li> mipsel-loongson: lsspd
</li><li> mips-arc: lsdev
</li><li> efi: lsefisystab, lssal, lsefimmap, lsefi
</li><li> i386-pc: lsapm
</li><li> i386-coreboot: lscoreboot, coreboot_boottime, cbmemc
</li><li> acpi-enabled (i386-pc, i386-coreboot, i386-multiboot, *-efi): lsacpi
</li></ul>

<p>Workarounds for platform-specific issues:
</p><ul>
<li> i386-efi/x86_64-efi: loadbios, fakebios, fix_video
</li><li> acpi-enabled (i386-pc, i386-coreboot, i386-multiboot, *-efi):
    acpi (override ACPI tables)
</li><li> i386-pc: drivemap
</li><li> i386-pc: sendkey
</li></ul>

<p>Advanced operations for power users:
</p><ul>
<li> x86: iorw (direct access to I/O ports)
</li></ul>

<p>Miscelaneous:
</p><ul>
<li> cmos (x86-*, ieee1275, mips-qemu_mips, mips-loongson): cmostest
    (used on some laptops to check for special power-on key), cmosclean
</li><li> i386-pc: play
</li></ul>

<hr>
<span id="Supported-kernels"></span><div class="header">
<p>
Next: <a href="#Troubleshooting" accesskey="n" rel="next">Troubleshooting</a>, Previous: <a href="#Platform_002dspecific-operations" accesskey="p" rel="prev">Platform-specific operations</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Supported-boot-targets"></span><h2 class="chapter">21 Supported boot targets</h2>

<p>X86 support is summarised in the following table. &ldquo;Yes&rdquo; means that the kernel works on the given platform, &ldquo;crashes&rdquo; means an early kernel crash which we hope will be fixed by concerned kernel developers. &ldquo;no&rdquo; means GRUB doesn&rsquo;t load the given kernel on a given platform. &ldquo;headless&rdquo; means that the kernel works but lacks console drivers (you can still use serial or network console).  In case of &ldquo;no&rdquo; and &ldquo;crashes&rdquo; the reason is given in footnote.
</p><table>
<tr><td width="50%"></td><td width="22%">BIOS</td><td width="22%">Coreboot</td></tr>
<tr><td width="50%">BIOS chainloading</td><td width="22%">yes</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">NTLDR</td><td width="22%">yes</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">Plan9</td><td width="22%">yes</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">Freedos</td><td width="22%">yes</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">FreeBSD bootloader</td><td width="22%">yes</td><td width="22%">crashes (1)</td></tr>
<tr><td width="50%">32-bit kFreeBSD</td><td width="22%">yes</td><td width="22%">crashes (5)</td></tr>
<tr><td width="50%">64-bit kFreeBSD</td><td width="22%">yes</td><td width="22%">crashes (5)</td></tr>
<tr><td width="50%">32-bit kNetBSD</td><td width="22%">yes</td><td width="22%">crashes (1)</td></tr>
<tr><td width="50%">64-bit kNetBSD</td><td width="22%">yes</td><td width="22%">crashes</td></tr>
<tr><td width="50%">32-bit kOpenBSD</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">64-bit kOpenBSD</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">Multiboot</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">Multiboot2</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">32-bit Linux (legacy protocol)</td><td width="22%">yes</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">64-bit Linux (legacy protocol)</td><td width="22%">yes</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">32-bit Linux (modern protocol)</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">64-bit Linux (modern protocol)</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">32-bit XNU</td><td width="22%">yes</td><td width="22%">?</td></tr>
<tr><td width="50%">64-bit XNU</td><td width="22%">yes</td><td width="22%">?</td></tr>
<tr><td width="50%">32-bit EFI chainloader</td><td width="22%">no (2)</td><td width="22%">no (2)</td></tr>
<tr><td width="50%">64-bit EFI chainloader</td><td width="22%">no (2)</td><td width="22%">no (2)</td></tr>
<tr><td width="50%">Appleloader</td><td width="22%">no (2)</td><td width="22%">no (2)</td></tr>
</table>

<table>
<tr><td width="50%"></td><td width="22%">Multiboot</td><td width="22%">Qemu</td></tr>
<tr><td width="50%">BIOS chainloading</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">NTLDR</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">Plan9</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">FreeDOS</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">FreeBSD bootloader</td><td width="22%">crashes (1)</td><td width="22%">crashes (1)</td></tr>
<tr><td width="50%">32-bit kFreeBSD</td><td width="22%">crashes (5)</td><td width="22%">crashes (5)</td></tr>
<tr><td width="50%">64-bit kFreeBSD</td><td width="22%">crashes (5)</td><td width="22%">crashes (5)</td></tr>
<tr><td width="50%">32-bit kNetBSD</td><td width="22%">crashes (1)</td><td width="22%">crashes (1)</td></tr>
<tr><td width="50%">64-bit kNetBSD</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">32-bit kOpenBSD</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">64-bit kOpenBSD</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">Multiboot</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">Multiboot2</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">32-bit Linux (legacy protocol)</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">64-bit Linux (legacy protocol)</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">32-bit Linux (modern protocol)</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">64-bit Linux (modern protocol)</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">32-bit XNU</td><td width="22%">?</td><td width="22%">?</td></tr>
<tr><td width="50%">64-bit XNU</td><td width="22%">?</td><td width="22%">?</td></tr>
<tr><td width="50%">32-bit EFI chainloader</td><td width="22%">no (2)</td><td width="22%">no (2)</td></tr>
<tr><td width="50%">64-bit EFI chainloader</td><td width="22%">no (2)</td><td width="22%">no (2)</td></tr>
<tr><td width="50%">Appleloader</td><td width="22%">no (2)</td><td width="22%">no (2)</td></tr>
</table>

<table>
<tr><td width="50%"></td><td width="22%">ia32 EFI</td><td width="22%">amd64 EFI</td></tr>
<tr><td width="50%">BIOS chainloading</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">NTLDR</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">Plan9</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">FreeDOS</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">FreeBSD bootloader</td><td width="22%">crashes (1)</td><td width="22%">crashes (1)</td></tr>
<tr><td width="50%">32-bit kFreeBSD</td><td width="22%">headless</td><td width="22%">headless</td></tr>
<tr><td width="50%">64-bit kFreeBSD</td><td width="22%">headless</td><td width="22%">headless</td></tr>
<tr><td width="50%">32-bit kNetBSD</td><td width="22%">crashes (1)</td><td width="22%">crashes (1)</td></tr>
<tr><td width="50%">64-bit kNetBSD</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">32-bit kOpenBSD</td><td width="22%">headless</td><td width="22%">headless</td></tr>
<tr><td width="50%">64-bit kOpenBSD</td><td width="22%">headless</td><td width="22%">headless</td></tr>
<tr><td width="50%">Multiboot</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">Multiboot2</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">32-bit Linux (legacy protocol)</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">64-bit Linux (legacy protocol)</td><td width="22%">no (1)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">32-bit Linux (modern protocol)</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">64-bit Linux (modern protocol)</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">32-bit XNU</td><td width="22%">yes</td><td width="22%">yes</td></tr>
<tr><td width="50%">64-bit XNU</td><td width="22%">yes (4)</td><td width="22%">yes</td></tr>
<tr><td width="50%">32-bit EFI chainloader</td><td width="22%">yes</td><td width="22%">no (3)</td></tr>
<tr><td width="50%">64-bit EFI chainloader</td><td width="22%">no (3)</td><td width="22%">yes</td></tr>
<tr><td width="50%">Appleloader</td><td width="22%">yes</td><td width="22%">yes</td></tr>
</table>

<table>
<tr><td width="50%"></td><td width="22%">ia32 IEEE1275</td></tr>
<tr><td width="50%">BIOS chainloading</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">NTLDR</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">Plan9</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">FreeDOS</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">FreeBSD bootloader</td><td width="22%">crashes (1)</td></tr>
<tr><td width="50%">32-bit kFreeBSD</td><td width="22%">crashes (5)</td></tr>
<tr><td width="50%">64-bit kFreeBSD</td><td width="22%">crashes (5)</td></tr>
<tr><td width="50%">32-bit kNetBSD</td><td width="22%">crashes (1)</td></tr>
<tr><td width="50%">64-bit kNetBSD</td><td width="22%">?</td></tr>
<tr><td width="50%">32-bit kOpenBSD</td><td width="22%">?</td></tr>
<tr><td width="50%">64-bit kOpenBSD</td><td width="22%">?</td></tr>
<tr><td width="50%">Multiboot</td><td width="22%">?</td></tr>
<tr><td width="50%">Multiboot2</td><td width="22%">?</td></tr>
<tr><td width="50%">32-bit Linux (legacy protocol)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">64-bit Linux (legacy protocol)</td><td width="22%">no (1)</td></tr>
<tr><td width="50%">32-bit Linux (modern protocol)</td><td width="22%">?</td></tr>
<tr><td width="50%">64-bit Linux (modern protocol)</td><td width="22%">?</td></tr>
<tr><td width="50%">32-bit XNU</td><td width="22%">?</td></tr>
<tr><td width="50%">64-bit XNU</td><td width="22%">?</td></tr>
<tr><td width="50%">32-bit EFI chainloader</td><td width="22%">no (2)</td></tr>
<tr><td width="50%">64-bit EFI chainloader</td><td width="22%">no (2)</td></tr>
<tr><td width="50%">Appleloader</td><td width="22%">no (2)</td></tr>
</table>

<ol>
<li> Requires BIOS
</li><li> EFI only
</li><li> 32-bit and 64-bit EFI have different structures and work in different CPU modes so it&rsquo;s not possible to chainload 32-bit bootloader on 64-bit platform and vice-versa
</li><li> Some modules may need to be disabled
</li><li> Requires ACPI
</li></ol>

<p>PowerPC, IA64 and Sparc64 ports support only Linux. MIPS port supports Linux
and multiboot2.
</p>
<span id="Boot-tests"></span><h3 class="section">21.1 Boot tests</h3>

<p>As you have seen in previous chapter the support matrix is pretty big and some of the configurations are only rarely used. To ensure the quality bootchecks are available for all x86 targets except EFI chainloader, Appleloader and XNU. All x86 platforms have bootcheck facility except ieee1275. Multiboot, multiboot2, BIOS chainloader, ntldr and freebsd-bootloader boot targets are tested only with a fake kernel images. Only Linux is tested among the payloads using Linux protocols.
</p>
<p>Following variables must be defined:
</p>
<table>
<tr><td width="30%">GRUB_PAYLOADS_DIR</td><td width="65%">directory containing the required kernels</td></tr>
<tr><td width="30%">GRUB_CBFSTOOL</td><td width="65%">cbfstool from Coreboot package (for coreboot platform only)</td></tr>
<tr><td width="30%">GRUB_COREBOOT_ROM</td><td width="65%">empty Coreboot ROM</td></tr>
<tr><td width="30%">GRUB_QEMU_OPTS</td><td width="65%">additional options to be supplied to QEMU</td></tr>
</table>

<p>Required files are:
</p>
<table>
<tr><td width="40%">kfreebsd_env.i386</td><td width="55%">32-bit kFreeBSD device hints</td></tr>
<tr><td width="40%">kfreebsd.i386</td><td width="55%">32-bit FreeBSD kernel image</td></tr>
<tr><td width="40%">kfreebsd.x86_64, kfreebsd_env.x86_64</td><td width="55%">same from 64-bit kFreeBSD</td></tr>
<tr><td width="40%">knetbsd.i386</td><td width="55%">32-bit NetBSD kernel image</td></tr>
<tr><td width="40%">knetbsd.miniroot.i386</td><td width="55%">32-bit kNetBSD miniroot.kmod.</td></tr>
<tr><td width="40%">knetbsd.x86_64, knetbsd.miniroot.x86_64</td><td width="55%">same from 64-bit kNetBSD</td></tr>
<tr><td width="40%">kopenbsd.i386</td><td width="55%">32-bit OpenBSD kernel bsd.rd image</td></tr>
<tr><td width="40%">kopenbsd.x86_64</td><td width="55%">same from 64-bit kOpenBSD</td></tr>
<tr><td width="40%">linux.i386</td><td width="55%">32-bit Linux</td></tr>
<tr><td width="40%">linux.x86_64</td><td width="55%">64-bit Linux</td></tr>
</table>

<hr>
<span id="Troubleshooting"></span><div class="header">
<p>
Next: <a href="#Invoking-grub2_002dinstall" accesskey="n" rel="next">Invoking grub2-install</a>, Previous: <a href="#Supported-kernels" accesskey="p" rel="prev">Supported kernels</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Error-messages-produced-by-GRUB"></span><h2 class="chapter">22 Error messages produced by GRUB</h2>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#GRUB-only-offers-a-rescue-shell" accesskey="1">GRUB only offers a rescue shell</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Firmware-stalls-instead-of-booting-GRUB" accesskey="2">Firmware stalls instead of booting GRUB</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr>
<span id="GRUB-only-offers-a-rescue-shell"></span><div class="header">
<p>
Next: <a href="#Firmware-stalls-instead-of-booting-GRUB" accesskey="n" rel="next">Firmware stalls instead of booting GRUB</a>, Up: <a href="#Troubleshooting" accesskey="u" rel="up">Troubleshooting</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="GRUB-only-offers-a-rescue-shell-1"></span><h3 class="section">22.1 GRUB only offers a rescue shell</h3>

<p>GRUB&rsquo;s normal start-up procedure involves setting the &lsquo;<samp>prefix</samp>&rsquo;
environment variable to a value set in the core image by
<code>grub2-install</code>, setting the &lsquo;<samp>root</samp>&rsquo; variable to match, loading
the &lsquo;<samp>normal</samp>&rsquo; module from the prefix, and running the &lsquo;<samp>normal</samp>&rsquo;
command (see <a href="#normal">normal</a>).  This command is responsible for reading
<samp>/boot/grub2/grub.cfg</samp>, running the menu, and doing all the useful
things GRUB is supposed to do.
</p>
<p>If, instead, you only get a rescue shell, this usually means that GRUB
failed to load the &lsquo;<samp>normal</samp>&rsquo; module for some reason.  It may be possible
to work around this temporarily: for instance, if the reason for the failure
is that &lsquo;<samp>prefix</samp>&rsquo; is wrong (perhaps it refers to the wrong device, or
perhaps the path to <samp>/boot/grub</samp> was not correctly made relative to the
device), then you can correct this and enter normal mode manually:
</p>
<div class="example">
<pre class="example"># Inspect the current prefix (and other preset variables):
set
# Find out which devices are available:
ls
# Set to the correct value, which might be something like this:
set prefix=(hd0,1)/grub
set root=(hd0,1)
insmod normal
normal
</pre></div>

<p>However, any problem that leaves you in the rescue shell probably means that
GRUB was not correctly installed.  It may be more useful to try to reinstall
it properly using <kbd>grub2-install <var>device</var></kbd> (see <a href="#Invoking-grub2_002dinstall">Invoking grub2-install</a>).  When doing this, there are a few things to remember:
</p>
<ul>
<li> Drive ordering in your operating system may not be the same as the boot
drive ordering used by your firmware.  Do not assume that your first hard
drive (e.g. &lsquo;<samp>/dev/sda</samp>&rsquo;) is the one that your firmware will boot from.
<samp>device.map</samp> (see <a href="#Device-map">Device map</a>) can be used to override this, but it
is usually better to use UUIDs or file system labels and avoid depending on
drive ordering entirely.

</li><li> At least on BIOS systems, if you tell <code>grub2-install</code> to install GRUB
to a partition but GRUB has already been installed in the master boot
record, then the GRUB installation in the partition will be ignored.

</li><li> If possible, it is generally best to avoid installing GRUB to a partition
(unless it is a special partition for the use of GRUB alone, such as the
BIOS Boot Partition used on GPT).  Doing this means that GRUB may stop being
able to read its core image due to a file system moving blocks around, such
as while defragmenting, running checks, or even during normal operation.
Installing to the whole disk device is normally more robust.

</li><li> Check that GRUB actually knows how to read from the device and file system
containing <samp>/boot/grub</samp>.  It will not be able to read from encrypted
devices with unsupported encryption scheme, nor from file systems for which
support has not yet been added to GRUB.
</li></ul>


<hr>
<span id="Firmware-stalls-instead-of-booting-GRUB"></span><div class="header">
<p>
Previous: <a href="#GRUB-only-offers-a-rescue-shell" accesskey="p" rel="prev">GRUB only offers a rescue shell</a>, Up: <a href="#Troubleshooting" accesskey="u" rel="up">Troubleshooting</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Firmware-stalls-instead-of-booting-GRUB-1"></span><h3 class="section">22.2 Firmware stalls instead of booting GRUB</h3>

<p>The EFI implementation of some older MacBook laptops stalls when it gets
presented a grub-mkrescue ISO image for x86_64-efi target on an USB stick.
Affected are models of year 2010 or earlier. Workaround is to zeroize the
bytes 446 to 461 of the EFI partition, where mformat has put a partition table
entry which claims partition start at block 0. This change will not hamper
bootability on other machines.
</p>

<hr>
<span id="Invoking-grub2_002dinstall"></span><div class="header">
<p>
Next: <a href="#Invoking-grub2_002dmkconfig" accesskey="n" rel="next">Invoking grub2-mkconfig</a>, Previous: <a href="#Troubleshooting" accesskey="p" rel="prev">Troubleshooting</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Invoking-grub2_002dinstall-1"></span><h2 class="chapter">23 Invoking grub2-install</h2>

<p>The program <code>grub2-install</code> generates a GRUB core image using
<code>grub2-mkimage</code> and installs it on your system.  You must specify the
device name on which you want to install GRUB, like this:
</p>
<div class="example">
<pre class="example">grub2-install <var>install_device</var>
</pre></div>

<p>The device name <var>install_device</var> is an OS device name or a GRUB
device name.
</p>
<p>In order to support UEFI Secure Boot, the resulting GRUB EFI binary must
be signed by a recognized private key. For this reason, for EFI
platforms, most distributions also ship prebuilt GRUB EFI binaries
signed by a distribution-specific private key. In this case, however,
<code>grub2-install</code> should not be used because it would overwrite
the signed EFI binary.
</p>
<p><code>grub2-install</code> accepts the following options:
</p>
<dl compact="compact">
<dt><samp>--help</samp></dt>
<dd><p>Print a summary of the command-line options and exit.
</p>
</dd>
<dt><samp>--version</samp></dt>
<dd><p>Print the version number of GRUB and exit.
</p>
</dd>
<dt><samp>--boot-directory=<var>dir</var></samp></dt>
<dd><p>Install GRUB images under the directory <samp><var>dir</var>/grub/</samp>
This option is useful when you want to install GRUB into a
separate partition or a removable disk.
If this option is not specified then it defaults to <samp>/boot</samp>, so
</p>
<div class="example">
<pre class="example"><kbd>grub2-install /dev/sda</kbd>
</pre></div>

<p>is equivalent to
</p>
<div class="example">
<pre class="example"><kbd>grub2-install --boot-directory=/boot/ /dev/sda</kbd>
</pre></div>

<p>Here is an example in which you have a separate <em>boot</em> partition which is 
mounted on
<samp>/mnt/boot</samp>:
</p>
<div class="example">
<pre class="example"><kbd>grub2-install --boot-directory=/mnt/boot /dev/sdb</kbd>
</pre></div>

</dd>
<dt><samp>--recheck</samp></dt>
<dd><p>Recheck the device map, even if <samp>/boot/grub2/device.map</samp> already
exists. You should use this option whenever you add/remove a disk
into/from your computer.
</p>
</dd>
<dt><samp>--no-rs-codes</samp></dt>
<dd><p>By default on x86 BIOS systems, <code>grub2-install</code> will use some
extra space in the bootloader embedding area for Reed-Solomon
error-correcting codes. This enables GRUB to still boot successfully
if some blocks are corrupted.  The exact amount of protection offered
is dependent on available space in the embedding area.  R sectors of
redundancy can tolerate up to R/2 corrupted sectors. This
redundancy may be cumbersome if attempting to cryptographically
validate the contents of the bootloader embedding area, or in more
modern systems with GPT-style partition tables (see <a href="#BIOS-installation">BIOS installation</a>) where GRUB does not reside in any unpartitioned space
outside of the MBR.  Disable the Reed-Solomon codes with this option.
</p></dd>
</dl>

<hr>
<span id="Invoking-grub2_002dmkconfig"></span><div class="header">
<p>
Next: <a href="#Invoking-grub2_002dmkpasswd_002dpbkdf2" accesskey="n" rel="next">Invoking grub2-mkpasswd-pbkdf2</a>, Previous: <a href="#Invoking-grub2_002dinstall" accesskey="p" rel="prev">Invoking grub2-install</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Invoking-grub2_002dmkconfig-1"></span><h2 class="chapter">24 Invoking grub2-mkconfig</h2>

<p>The program <code>grub2-mkconfig</code> generates a configuration file for GRUB
(see <a href="#Simple-configuration">Simple configuration</a>).
</p>
<div class="example">
<pre class="example">grub-mkconfig -o /boot/grub2/grub.cfg
</pre></div>

<p><code>grub2-mkconfig</code> accepts the following options:
</p>
<dl compact="compact">
<dt><samp>--help</samp></dt>
<dd><p>Print a summary of the command-line options and exit.
</p>
</dd>
<dt><samp>--version</samp></dt>
<dd><p>Print the version number of GRUB and exit.
</p>
</dd>
<dt><samp>-o <var>file</var></samp></dt>
<dt><samp>--output=<var>file</var></samp></dt>
<dd><p>Send the generated configuration file to <var>file</var>.  The default is to send
it to standard output.
</p></dd>
</dl>


<hr>
<span id="Invoking-grub2_002dmkpasswd_002dpbkdf2"></span><div class="header">
<p>
Next: <a href="#Invoking-grub2_002dmkrelpath" accesskey="n" rel="next">Invoking grub2-mkrelpath</a>, Previous: <a href="#Invoking-grub2_002dmkconfig" accesskey="p" rel="prev">Invoking grub2-mkconfig</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Invoking-grub2_002dmkpasswd_002dpbkdf2-1"></span><h2 class="chapter">25 Invoking grub2-mkpasswd-pbkdf2</h2>

<p>The program <code>grub2-mkpasswd-pbkdf2</code> generates password hashes for
GRUB (see <a href="#Security">Security</a>).
</p>
<div class="example">
<pre class="example">grub-mkpasswd-pbkdf2
</pre></div>

<p><code>grub2-mkpasswd-pbkdf2</code> accepts the following options:
</p>
<dl compact="compact">
<dt><samp>-c <var>number</var></samp></dt>
<dt><samp>--iteration-count=<var>number</var></samp></dt>
<dd><p>Number of iterations of the underlying pseudo-random function.  Defaults to
10000.
</p>
</dd>
<dt><samp>-l <var>number</var></samp></dt>
<dt><samp>--buflen=<var>number</var></samp></dt>
<dd><p>Length of the generated hash.  Defaults to 64.
</p>
</dd>
<dt><samp>-s <var>number</var></samp></dt>
<dt><samp>--salt=<var>number</var></samp></dt>
<dd><p>Length of the salt.  Defaults to 64.
</p></dd>
</dl>


<hr>
<span id="Invoking-grub2_002dmkrelpath"></span><div class="header">
<p>
Next: <a href="#Invoking-grub2_002dmkrescue" accesskey="n" rel="next">Invoking grub2-mkrescue</a>, Previous: <a href="#Invoking-grub2_002dmkpasswd_002dpbkdf2" accesskey="p" rel="prev">Invoking grub2-mkpasswd-pbkdf2</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Invoking-grub2_002dmkrelpath-1"></span><h2 class="chapter">26 Invoking grub2-mkrelpath</h2>

<p>The program <code>grub2-mkrelpath</code> makes a file system path relative to
the root of its containing file system.  For instance, if <samp>/usr</samp> is a
mount point, then:
</p>
<div class="example">
<pre class="example">$ <kbd>grub2-mkrelpath /usr/share/grub/unicode.pf2</kbd>
&lsquo;<samp>/share/grub/unicode.pf2</samp>&rsquo;
</pre></div>

<p>This is mainly used internally by other GRUB utilities such as
<code>grub2-mkconfig</code> (see <a href="#Invoking-grub2_002dmkconfig">Invoking grub2-mkconfig</a>), but may
occasionally also be useful for debugging.
</p>
<p><code>grub2-mkrelpath</code> accepts the following options:
</p>
<dl compact="compact">
<dt><samp>--help</samp></dt>
<dd><p>Print a summary of the command-line options and exit.
</p>
</dd>
<dt><samp>--version</samp></dt>
<dd><p>Print the version number of GRUB and exit.
</p></dd>
</dl>


<hr>
<span id="Invoking-grub2_002dmkrescue"></span><div class="header">
<p>
Next: <a href="#Invoking-grub2_002dmount" accesskey="n" rel="next">Invoking grub2-mount</a>, Previous: <a href="#Invoking-grub2_002dmkrelpath" accesskey="p" rel="prev">Invoking grub2-mkrelpath</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Invoking-grub2_002dmkrescue-1"></span><h2 class="chapter">27 Invoking grub2-mkrescue</h2>

<p>The program <code>grub2-mkrescue</code> generates a bootable GRUB rescue image
(see <a href="#Making-a-GRUB-bootable-CD_002dROM">Making a GRUB bootable CD-ROM</a>).
</p>
<div class="example">
<pre class="example">grub-mkrescue -o grub.iso
</pre></div>

<p>All arguments not explicitly listed as <code>grub2-mkrescue</code> options are
passed on directly to <code>xorriso</code> in <code>mkisofs</code> emulation mode.
Options passed to <code>xorriso</code> will normally be interpreted as
<code>mkisofs</code> options; if the option &lsquo;<samp>--</samp>&rsquo; is used, then anything
after that will be interpreted as native <code>xorriso</code> options.
</p>
<p>Non-option arguments specify additional source directories.  This is
commonly used to add extra files to the image:
</p>
<div class="example">
<pre class="example">mkdir -p disk/boot/grub
<span class="roman">(add extra files to <samp>disk/boot/grub</samp>)</span>
grub-mkrescue -o grub.iso disk
</pre></div>

<p><code>grub2-mkrescue</code> accepts the following options:
</p>
<dl compact="compact">
<dt><samp>--help</samp></dt>
<dd><p>Print a summary of the command-line options and exit.
</p>
</dd>
<dt><samp>--version</samp></dt>
<dd><p>Print the version number of GRUB and exit.
</p>
</dd>
<dt><samp>-o <var>file</var></samp></dt>
<dt><samp>--output=<var>file</var></samp></dt>
<dd><p>Save output in <var>file</var>.  This &quot;option&quot; is required.
</p>
</dd>
<dt><samp>--modules=<var>modules</var></samp></dt>
<dd><p>Pre-load the named GRUB modules in the image.  Multiple entries in
<var>modules</var> should be separated by whitespace (so you will probably need
to quote this for your shell).
</p>
</dd>
<dt><samp>--rom-directory=<var>dir</var></samp></dt>
<dd><p>If generating images for the QEMU or Coreboot platforms, copy the resulting
<samp>qemu.img</samp> or <samp>coreboot.elf</samp> files respectively to the <var>dir</var>
directory as well as including them in the image.
</p>
</dd>
<dt><samp>--xorriso=<var>file</var></samp></dt>
<dd><p>Use <var>file</var> as the <code>xorriso</code> program, rather than the built-in
default.
</p>
</dd>
<dt><samp>--grub-mkimage=<var>file</var></samp></dt>
<dd><p>Use <var>file</var> as the <code>grub2-mkimage</code> program, rather than the
built-in default.
</p></dd>
</dl>


<hr>
<span id="Invoking-grub2_002dmount"></span><div class="header">
<p>
Next: <a href="#Invoking-grub2_002dprobe" accesskey="n" rel="next">Invoking grub2-probe</a>, Previous: <a href="#Invoking-grub2_002dmkrescue" accesskey="p" rel="prev">Invoking grub2-mkrescue</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Invoking-grub2_002dmount-1"></span><h2 class="chapter">28 Invoking grub2-mount</h2>

<p>The program <code>grub2-mount</code> performs a read-only mount of any file
system or file system image that GRUB understands, using GRUB&rsquo;s file system
drivers via FUSE.  (It is only available if FUSE development files were
present when GRUB was built.)  This has a number of uses:
</p>
<ul>
<li> It provides a convenient way to check how GRUB will view a file system at
boot time.  You can use normal command-line tools to compare that view with
that of your operating system, making it easy to find bugs.

</li><li> It offers true read-only mounts.  Linux does not have these for journalling
file systems, because it will always attempt to replay the journal at mount
time; while you can temporarily mark the block device read-only to avoid
this, that causes the mount to fail.  Since GRUB intentionally contains no
code for writing to file systems, it can easily provide a guaranteed
read-only mount mechanism.

</li><li> It allows you to examine any file system that GRUB understands without
needing to load additional modules into your running kernel, which may be
useful in constrained environments such as installers.

</li><li> Since it can examine file system images (contained in regular files) just as
easily as file systems on block devices, you can use it to inspect any file
system image that GRUB understands with only enough privileges to use FUSE,
even if nobody has yet written a FUSE module specifically for that file
system type.
</li></ul>

<p>Using <code>grub2-mount</code> is normally as simple as:
</p>
<div class="example">
<pre class="example">grub-mount /dev/sda1 /mnt
</pre></div>

<p><code>grub2-mount</code> must be given one or more images and a mount point as
non-option arguments (if it is given more than one image, it will treat them
as a RAID set), and also accepts the following options:
</p>
<dl compact="compact">
<dt><samp>--help</samp></dt>
<dd><p>Print a summary of the command-line options and exit.
</p>
</dd>
<dt><samp>--version</samp></dt>
<dd><p>Print the version number of GRUB and exit.
</p>
</dd>
<dt><samp>-C</samp></dt>
<dt><samp>--crypto</samp></dt>
<dd><p>Mount encrypted devices, prompting for a passphrase if necessary.
</p>
</dd>
<dt><samp>-d <var>string</var></samp></dt>
<dt><samp>--debug=<var>string</var></samp></dt>
<dd><p>Show debugging output for conditions matching <var>string</var>.
</p>
</dd>
<dt><samp>-K prompt|<var>file</var></samp></dt>
<dt><samp>--zfs-key=prompt|<var>file</var></samp></dt>
<dd><p>Load a ZFS encryption key.  If you use &lsquo;<samp>prompt</samp>&rsquo; as the argument,
<code>grub2-mount</code> will read a passphrase from the terminal; otherwise, it
will read key material from the specified file.
</p>
</dd>
<dt><samp>-r <var>device</var></samp></dt>
<dt><samp>--root=<var>device</var></samp></dt>
<dd><p>Set the GRUB root device to <var>device</var>.  You do not normally need to set
this; <code>grub2-mount</code> will automatically set the root device to the
root of the supplied file system.
</p>
<p>If <var>device</var> is just a number, then it will be treated as a partition
number within the supplied image.  This means that, if you have an image of
an entire disk in <samp>disk.img</samp>, then you can use this command to mount
its second partition:
</p>
<div class="example">
<pre class="example">grub-mount -r 2 disk.img mount-point
</pre></div>

</dd>
<dt><samp>-v</samp></dt>
<dt><samp>--verbose</samp></dt>
<dd><p>Print verbose messages.
</p></dd>
</dl>


<hr>
<span id="Invoking-grub2_002dprobe"></span><div class="header">
<p>
Next: <a href="#Invoking-grub2_002dscript_002dcheck" accesskey="n" rel="next">Invoking grub2-script-check</a>, Previous: <a href="#Invoking-grub2_002dmount" accesskey="p" rel="prev">Invoking grub2-mount</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Invoking-grub2_002dprobe-1"></span><h2 class="chapter">29 Invoking grub2-probe</h2>

<p>The program <code>grub2-probe</code> probes device information for a given path
or device.
</p>
<div class="example">
<pre class="example">grub-probe --target=fs /boot/grub
grub-probe --target=drive --device /dev/sda1
</pre></div>

<p><code>grub2-probe</code> must be given a path or device as a non-option
argument, and also accepts the following options:
</p>
<dl compact="compact">
<dt><samp>--help</samp></dt>
<dd><p>Print a summary of the command-line options and exit.
</p>
</dd>
<dt><samp>--version</samp></dt>
<dd><p>Print the version number of GRUB and exit.
</p>
</dd>
<dt><samp>-d</samp></dt>
<dt><samp>--device</samp></dt>
<dd><p>If this option is given, then the non-option argument is a system device
name (such as &lsquo;<samp>/dev/sda1</samp>&rsquo;), and <code>grub2-probe</code> will print
information about that device.  If it is not given, then the non-option
argument is a filesystem path (such as &lsquo;<samp>/boot/grub</samp>&rsquo;), and
<code>grub2-probe</code> will print information about the device containing that
part of the filesystem.
</p>
</dd>
<dt><samp>-m <var>file</var></samp></dt>
<dt><samp>--device-map=<var>file</var></samp></dt>
<dd><p>Use <var>file</var> as the device map (see <a href="#Device-map">Device map</a>) rather than the
default, usually &lsquo;<samp>/boot/grub2/device.map</samp>&rsquo;.
</p>
</dd>
<dt><samp>-t <var>target</var></samp></dt>
<dt><samp>--target=<var>target</var></samp></dt>
<dd><p>Print information about the given path or device as defined by <var>target</var>.
The available targets and their meanings are:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>fs</samp>&rsquo;</dt>
<dd><p>GRUB filesystem module.
</p></dd>
<dt>&lsquo;<samp>fs_uuid</samp>&rsquo;</dt>
<dd><p>Filesystem Universally Unique Identifier (UUID).
</p></dd>
<dt>&lsquo;<samp>fs_label</samp>&rsquo;</dt>
<dd><p>Filesystem label.
</p></dd>
<dt>&lsquo;<samp>drive</samp>&rsquo;</dt>
<dd><p>GRUB device name.
</p></dd>
<dt>&lsquo;<samp>device</samp>&rsquo;</dt>
<dd><p>System device name.
</p></dd>
<dt>&lsquo;<samp>partmap</samp>&rsquo;</dt>
<dd><p>GRUB partition map module.
</p></dd>
<dt>&lsquo;<samp>abstraction</samp>&rsquo;</dt>
<dd><p>GRUB abstraction module (e.g. &lsquo;<samp>lvm</samp>&rsquo;).
</p></dd>
<dt>&lsquo;<samp>cryptodisk_uuid</samp>&rsquo;</dt>
<dd><p>Crypto device UUID.
</p></dd>
<dt>&lsquo;<samp>msdos_parttype</samp>&rsquo;</dt>
<dd><p>MBR partition type code (two hexadecimal digits).
</p></dd>
<dt>&lsquo;<samp>hints_string</samp>&rsquo;</dt>
<dd><p>A string of platform search hints suitable for passing to the
<code>search</code> command (see <a href="#search">search</a>).
</p></dd>
<dt>&lsquo;<samp>bios_hints</samp>&rsquo;</dt>
<dd><p>Search hints for the PC BIOS platform.
</p></dd>
<dt>&lsquo;<samp>ieee1275_hints</samp>&rsquo;</dt>
<dd><p>Search hints for the IEEE1275 platform.
</p></dd>
<dt>&lsquo;<samp>baremetal_hints</samp>&rsquo;</dt>
<dd><p>Search hints for platforms where disks are addressed directly rather than
via firmware.
</p></dd>
<dt>&lsquo;<samp>efi_hints</samp>&rsquo;</dt>
<dd><p>Search hints for the EFI platform.
</p></dd>
<dt>&lsquo;<samp>arc_hints</samp>&rsquo;</dt>
<dd><p>Search hints for the ARC platform.
</p></dd>
<dt>&lsquo;<samp>compatibility_hint</samp>&rsquo;</dt>
<dd><p>A guess at a reasonable GRUB drive name for this device, which may be
used as a fallback if the <code>search</code> command fails.
</p></dd>
<dt>&lsquo;<samp>disk</samp>&rsquo;</dt>
<dd><p>System device name for the whole disk.
</p></dd>
</dl>

</dd>
<dt><samp>-v</samp></dt>
<dt><samp>--verbose</samp></dt>
<dd><p>Print verbose messages.
</p></dd>
</dl>


<hr>
<span id="Invoking-grub2_002dscript_002dcheck"></span><div class="header">
<p>
Next: <a href="#Obtaining-and-Building-GRUB" accesskey="n" rel="next">Obtaining and Building GRUB</a>, Previous: <a href="#Invoking-grub2_002dprobe" accesskey="p" rel="prev">Invoking grub2-probe</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Invoking-grub2_002dscript_002dcheck-1"></span><h2 class="chapter">30 Invoking grub2-script-check</h2>

<p>The program <code>grub2-script-check</code> takes a GRUB script file
(see <a href="#Shell_002dlike-scripting">Shell-like scripting</a>) and checks it for syntax errors, similar to
commands such as <code>sh -n</code>.  It may take a <var>path</var> as a non-option
argument; if none is supplied, it will read from standard input.
</p>
<div class="example">
<pre class="example">grub-script-check /boot/grub2/grub.cfg
</pre></div>

<p><code>grub2-script-check</code> accepts the following options:
</p>
<dl compact="compact">
<dt><samp>--help</samp></dt>
<dd><p>Print a summary of the command-line options and exit.
</p>
</dd>
<dt><samp>--version</samp></dt>
<dd><p>Print the version number of GRUB and exit.
</p>
</dd>
<dt><samp>-v</samp></dt>
<dt><samp>--verbose</samp></dt>
<dd><p>Print each line of input after reading it.
</p></dd>
</dl>


<hr>
<span id="Obtaining-and-Building-GRUB"></span><div class="header">
<p>
Next: <a href="#Reporting-bugs" accesskey="n" rel="next">Reporting bugs</a>, Previous: <a href="#Invoking-grub2_002dscript_002dcheck" accesskey="p" rel="prev">Invoking grub2-script-check</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="How-to-obtain-and-build-GRUB"></span><h2 class="appendix">Appendix A How to obtain and build GRUB</h2>

<blockquote>
<p><strong>Caution:</strong> GRUB requires binutils-2.9.1.0.23 or later because the
GNU assembler has been changed so that it can produce real 16bits
machine code between 2.9.1 and 2.9.1.0.x. See
<a href="http://sources.redhat.com/binutils/">http://sources.redhat.com/binutils/</a>, to obtain information on
how to get the latest version.
</p></blockquote>

<p>GRUB is available from the GNU alpha archive site
<a href="ftp://ftp.gnu.org/gnu/grub">ftp://ftp.gnu.org/gnu/grub</a> or any of its mirrors. The file
will be named grub-version.tar.gz. The current version is
2.06, so the file you should grab is:
</p>
<p><a href="ftp://ftp.gnu.org/gnu/grub/grub-2.06.tar.gz">ftp://ftp.gnu.org/gnu/grub/grub-2.06.tar.gz</a>
</p>
<p>To unbundle GRUB use the instruction:
</p>
<div class="example">
<pre class="example"><kbd>zcat grub-2.06.tar.gz | tar xvf -</kbd>
</pre></div>

<p>which will create a directory called <samp>grub-2.06</samp> with
all the sources. You can look at the file <samp>INSTALL</samp> for detailed
instructions on how to build and install GRUB, but you should be able to
just do:
</p>
<div class="example">
<pre class="example"><kbd>cd grub-2.06</kbd>
<kbd>./configure</kbd>
<kbd>make install</kbd>
</pre></div>

<p>Also, the latest version is available using Git. See
<a href="http://www.gnu.org/software/grub/grub-download.html">http://www.gnu.org/software/grub/grub-download.html</a> for more
information.
</p>
<hr>
<span id="Reporting-bugs"></span><div class="header">
<p>
Next: <a href="#Future" accesskey="n" rel="next">Future</a>, Previous: <a href="#Obtaining-and-Building-GRUB" accesskey="p" rel="prev">Obtaining and Building GRUB</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Reporting-bugs-1"></span><h2 class="appendix">Appendix B Reporting bugs</h2>

<p>These are the guideline for how to report bugs. Take a look at this
list below before you submit bugs:
</p>
<ol>
<li> Before getting unsettled, read this manual through and through. Also,
see the <a href="http://www.gnu.org/software/grub/grub-faq.html">GNU GRUB FAQ</a>.

</li><li> Always mention the information on your GRUB. The version number and the
configuration are quite important. If you build it yourself, write the
options specified to the configure script and your operating system,
including the versions of gcc and binutils.

</li><li> If you have trouble with the installation, inform us of how you
installed GRUB. Don&rsquo;t omit error messages, if any. Just &lsquo;<samp>GRUB hangs
up when it boots</samp>&rsquo; is not enough.

<p>The information on your hardware is also essential. These are especially
important: the geometries and the partition tables of your hard disk
drives and your BIOS.
</p>
</li><li> If GRUB cannot boot your operating system, write down
<em>everything</em> you see on the screen. Don&rsquo;t paraphrase them, like
&lsquo;<samp>The foo OS crashes with GRUB, even though it can boot with the
bar boot loader just fine</samp>&rsquo;. Mention the commands you executed, the
messages printed by them, and information on your operating system
including the version number.

</li><li> Explain what you wanted to do. It is very useful to know your purpose
and your wish, and how GRUB didn&rsquo;t satisfy you.

</li><li> If you can investigate the problem yourself, please do. That will give
you and us much more information on the problem. Attaching a patch is
even better.

<p>When you attach a patch, make the patch in unified diff format, and
write ChangeLog entries. But, even when you make a patch, don&rsquo;t forget
to explain the problem, so that we can understand what your patch is
for.
</p>
</li><li> Write down anything that you think might be related. Please understand
that we often need to reproduce the same problem you encountered in our
environment. So your information should be sufficient for us to do the
same thing&mdash;Don&rsquo;t forget that we cannot see your computer directly. If
you are not sure whether to state a fact or leave it out, state it!
Reporting too many things is much better than omitting something
important.
</li></ol>

<p>If you follow the guideline above, submit a report to the
<a href="http://savannah.gnu.org/bugs/?group=grub">Bug Tracking System</a>.
Alternatively, you can submit a report via electronic mail to
<a href="mailto:bug-grub@gnu.org">bug-grub@gnu.org</a>, but we strongly recommend that you use the
Bug Tracking System, because e-mail can be passed over easily.
</p>
<p>Once we get your report, we will try to fix the bugs.
</p>

<hr>
<span id="Future"></span><div class="header">
<p>
Next: <a href="#Copying-This-Manual" accesskey="n" rel="next">Copying This Manual</a>, Previous: <a href="#Reporting-bugs" accesskey="p" rel="prev">Reporting bugs</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Where-GRUB-will-go"></span><h2 class="appendix">Appendix C Where GRUB will go</h2>

<p>GRUB 2 is now quite stable and used in many production systems.  We are
currently working towards a 2.0 release.
</p>
<p>If you are interested in the development of GRUB 2, take a look at
<a href="http://www.gnu.org/software/grub/grub.html">the homepage</a>.
</p>




<hr>
<span id="Copying-This-Manual"></span><div class="header">
<p>
Next: <a href="#Index" accesskey="n" rel="next">Index</a>, Previous: <a href="#Future" accesskey="p" rel="prev">Future</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Copying-This-Manual-1"></span><h2 class="appendix">Appendix D Copying This Manual</h2>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#GNU-Free-Documentation-License" accesskey="1">GNU Free Documentation License</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">License for copying this manual.
</td></tr>
</table>


<hr>
<span id="GNU-Free-Documentation-License"></span><div class="header">
<p>
Up: <a href="#Copying-This-Manual" accesskey="u" rel="up">Copying This Manual</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="GNU-Free-Documentation-License-1"></span><h3 class="appendixsec">D.1 GNU Free Documentation License</h3>

<span id="index-FDL_002c-GNU-Free-Documentation-License"></span>
<div align="center">Version 1.2, November 2002
</div>
<div class="display">
<pre class="display">Copyright &copy; 2000,2001,2002 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
</pre></div>

<ol start="0">
<li> PREAMBLE

<p>The purpose of this License is to make a manual, textbook, or other
functional and useful document <em>free</em> in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
</p>
<p>This License is a kind of &ldquo;copyleft&rdquo;, which means that derivative
works of the document must themselves be free in the same sense.  It
complements the GNU General Public License, which is a copyleft
license designed for free software.
</p>
<p>We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does.  But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book.  We recommend this License
principally for works whose purpose is instruction or reference.
</p>
</li><li> APPLICABILITY AND DEFINITIONS

<p>This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License.  Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein.  The &ldquo;Document&rdquo;, below,
refers to any such manual or work.  Any member of the public is a
licensee, and is addressed as &ldquo;you&rdquo;.  You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
</p>
<p>A &ldquo;Modified Version&rdquo; of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
</p>
<p>A &ldquo;Secondary Section&rdquo; is a named appendix or a front-matter section
of the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document&rsquo;s overall
subject (or to related matters) and contains nothing that could fall
directly within that overall subject.  (Thus, if the Document is in
part a textbook of mathematics, a Secondary Section may not explain
any mathematics.)  The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
</p>
<p>The &ldquo;Invariant Sections&rdquo; are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.  If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant.  The Document may contain zero
Invariant Sections.  If the Document does not identify any Invariant
Sections then there are none.
</p>
<p>The &ldquo;Cover Texts&rdquo; are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.  A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
</p>
<p>A &ldquo;Transparent&rdquo; copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters.  A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text.  A copy that is not &ldquo;Transparent&rdquo; is called &ldquo;Opaque&rdquo;.
</p>
<p>Examples of suitable formats for Transparent copies include plain
<small>ASCII</small> without markup, Texinfo input format, LaTeX input
format, <acronym>SGML</acronym> or <acronym>XML</acronym> using a publicly available
<acronym>DTD</acronym>, and standard-conforming simple <acronym>HTML</acronym>,
PostScript or <acronym>PDF</acronym> designed for human modification.  Examples
of transparent image formats include <acronym>PNG</acronym>, <acronym>XCF</acronym> and
<acronym>JPG</acronym>.  Opaque formats include proprietary formats that can be
read and edited only by proprietary word processors, <acronym>SGML</acronym> or
<acronym>XML</acronym> for which the <acronym>DTD</acronym> and/or processing tools are
not generally available, and the machine-generated <acronym>HTML</acronym>,
PostScript or <acronym>PDF</acronym> produced by some word processors for
output purposes only.
</p>
<p>The &ldquo;Title Page&rdquo; means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page.  For works in
formats which do not have any title page as such, &ldquo;Title Page&rdquo; means
the text near the most prominent appearance of the work&rsquo;s title,
preceding the beginning of the body of the text.
</p>
<p>A section &ldquo;Entitled XYZ&rdquo; means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language.  (Here XYZ stands for a
specific section name mentioned below, such as &ldquo;Acknowledgements&rdquo;,
&ldquo;Dedications&rdquo;, &ldquo;Endorsements&rdquo;, or &ldquo;History&rdquo;.)  To &ldquo;Preserve the Title&rdquo;
of such a section when you modify the Document means that it remains a
section &ldquo;Entitled XYZ&rdquo; according to this definition.
</p>
<p>The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document.  These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
</p>
</li><li> VERBATIM COPYING

<p>You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License.  You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute.  However, you may accept
compensation in exchange for copies.  If you distribute a large enough
number of copies you must also follow the conditions in section 3.
</p>
<p>You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
</p>
</li><li> COPYING IN QUANTITY

<p>If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document&rsquo;s license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover.  Both covers must also clearly and legibly identify
you as the publisher of these copies.  The front cover must present
the full title with all words of the title equally prominent and
visible.  You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
</p>
<p>If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
</p>
<p>If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
</p>
<p>It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
</p>
</li><li> MODIFICATIONS

<p>You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it.  In addition, you must do these things in the Modified Version:
</p>
<ol type="A" start="1">
<li> Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document).  You may use the same title as a previous version
if the original publisher of that version gives permission.

</li><li> List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.

</li><li> State on the Title page the name of the publisher of the
Modified Version, as the publisher.

</li><li> Preserve all the copyright notices of the Document.

</li><li> Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.

</li><li> Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.

</li><li> Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document&rsquo;s license notice.

</li><li> Include an unaltered copy of this License.

</li><li> Preserve the section Entitled &ldquo;History&rdquo;, Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page.  If
there is no section Entitled &ldquo;History&rdquo; in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.

</li><li> Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on.  These may be placed in the &ldquo;History&rdquo; section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.

</li><li> For any section Entitled &ldquo;Acknowledgements&rdquo; or &ldquo;Dedications&rdquo;, Preserve
the Title of the section, and preserve in the section all the
substance and tone of each of the contributor acknowledgements and/or
dedications given therein.

</li><li> Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles.  Section numbers
or the equivalent are not considered part of the section titles.

</li><li> Delete any section Entitled &ldquo;Endorsements&rdquo;.  Such a section
may not be included in the Modified Version.

</li><li> Do not retitle any existing section to be Entitled &ldquo;Endorsements&rdquo; or
to conflict in title with any Invariant Section.

</li><li> Preserve any Warranty Disclaimers.
</li></ol>

<p>If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant.  To do this, add their titles to the
list of Invariant Sections in the Modified Version&rsquo;s license notice.
These titles must be distinct from any other section titles.
</p>
<p>You may add a section Entitled &ldquo;Endorsements&rdquo;, provided it contains
nothing but endorsements of your Modified Version by various
parties&mdash;for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
</p>
<p>You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version.  Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity.  If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
</p>
<p>The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
</p>
</li><li> COMBINING DOCUMENTS

<p>You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
</p>
<p>The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy.  If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
</p>
<p>In the combination, you must combine any sections Entitled &ldquo;History&rdquo;
in the various original documents, forming one section Entitled
&ldquo;History&rdquo;; likewise combine any sections Entitled &ldquo;Acknowledgements&rdquo;,
and any sections Entitled &ldquo;Dedications&rdquo;.  You must delete all
sections Entitled &ldquo;Endorsements.&rdquo;
</p>
</li><li> COLLECTIONS OF DOCUMENTS

<p>You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
</p>
<p>You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
</p>
</li><li> AGGREGATION WITH INDEPENDENT WORKS

<p>A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an &ldquo;aggregate&rdquo; if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation&rsquo;s users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
</p>
<p>If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document&rsquo;s Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
</p>
</li><li> TRANSLATION

<p>Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections.  You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers.  In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
</p>
<p>If a section in the Document is Entitled &ldquo;Acknowledgements&rdquo;,
&ldquo;Dedications&rdquo;, or &ldquo;History&rdquo;, the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
</p>
</li><li> TERMINATION

<p>You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License.  Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License.  However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
</p>
</li><li> FUTURE REVISIONS OF THIS LICENSE

<p>The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time.  Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.  See
<a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
</p>
<p>Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License &ldquo;or any later version&rdquo; applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation.  If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
</p></li></ol>

<span id="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></span><h4 class="appendixsubsec">D.1.1 ADDENDUM: How to use this License for your documents</h4>

<p>To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
</p>
<div class="example">
<pre class="example">  Copyright (C)  <var>year</var>  <var>your name</var>.
  Permission is granted to copy, distribute and/or modify this document
  under the terms of the GNU Free Documentation License, Version 1.2
  or any later version published by the Free Software Foundation;
  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  Texts.  A copy of the license is included in the section entitled ``GNU
  Free Documentation License''.
</pre></div>

<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the &ldquo;with...Texts.&rdquo; line with this:
</p>
<div class="example">
<pre class="example">    with the Invariant Sections being <var>list their titles</var>, with
    the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
    being <var>list</var>.
</pre></div>

<p>If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
</p>
<p>If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
</p>



<hr>
<span id="Index"></span><div class="header">
<p>
Previous: <a href="#Copying-This-Manual" accesskey="p" rel="prev">Copying This Manual</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<span id="Index-1"></span><h2 class="unnumbered">Index</h2>

<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Index_cp_symbol-1"><b>[</b></a>
 &nbsp; 
<br>
<a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-K"><b>K</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-U"><b>U</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
 &nbsp; 
</td></tr></table>
<table class="index-cp" border="0">
<tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_symbol-1">[</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005b"><code><code>[</code></code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#g_t_005b">[</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-acpi"><code>acpi</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#acpi">acpi</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-authenticate"><code>authenticate</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#authenticate">authenticate</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-B">B</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-background_005fcolor"><code>background_color</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#background_005fcolor">background_color</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-background_005fimage"><code>background_image</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#background_005fimage">background_image</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-badram"><code>badram</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#badram">badram</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-blocklist"><code>blocklist</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#blocklist">blocklist</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-boot"><code>boot</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#boot">boot</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-cat"><code>cat</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#cat">cat</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-chainloader"><code>chainloader</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#chainloader">chainloader</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-clear"><code>clear</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#clear">clear</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-CMOS"><code>CMOS</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#cmosdump">cmosdump</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cmosclean"><code>cmosclean</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#cmosclean">cmosclean</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cmostest"><code>cmostest</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#cmostest">cmostest</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cmp"><code>cmp</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#cmp">cmp</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-configfile"><code>configfile</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#configfile">configfile</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cpuid"><code>cpuid</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#cpuid">cpuid</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-crc"><code>crc</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#crc">crc</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cryptomount"><code>cryptomount</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#cryptomount">cryptomount</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cutmem"><code>cutmem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#cutmem">cutmem</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-date"><code>date</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#date">date</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-devicetree"><code>devicetree</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#devicetree">devicetree</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-distrust"><code>distrust</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#distrust">distrust</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-distrust_005fcertificate"><code>distrust_certificate</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#distrust_005fcertificate">distrust_certificate</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-drivemap"><code>drivemap</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#drivemap">drivemap</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-E">E</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-echo"><code>echo</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#echo">echo</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-eval"><code>eval</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#eval">eval</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-export"><code>export</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#export">export</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-F">F</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-false"><code>false</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#false">false</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-FDL_002c-GNU-Free-Documentation-License">FDL, GNU Free Documentation License</a>:</td><td>&nbsp;</td><td valign="top"><a href="#GNU-Free-Documentation-License">GNU Free Documentation License</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-gettext"><code>gettext</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#gettext">gettext</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-gptsync"><code>gptsync</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#gptsync">gptsync</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-H">H</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-halt"><code>halt</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#halt">halt</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-hashsum"><code>hashsum</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#hashsum">hashsum</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-help"><code>help</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#help">help</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-initrd"><code>initrd</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#initrd">initrd</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-initrd16"><code>initrd16</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#initrd16">initrd16</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-insmod"><code>insmod</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#insmod">insmod</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-K">K</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-keystatus"><code>keystatus</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#keystatus">keystatus</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-L">L</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-linux"><code>linux</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#linux">linux</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-linux16"><code>linux16</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#linux16">linux16</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-list_005fcertificates"><code>list_certificates</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#list_005fcertificates">list_certificates</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-list_005fenv"><code>list_env</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#list_005fenv">list_env</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-list_005ftrusted"><code>list_trusted</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#list_005ftrusted">list_trusted</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-loadfont"><code>loadfont</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#loadfont">loadfont</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-load_005fenv"><code>load_env</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#load_005fenv">load_env</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-loopback"><code>loopback</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#loopback">loopback</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-ls"><code>ls</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#ls">ls</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-lsfonts"><code>lsfonts</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#lsfonts">lsfonts</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-lsmod"><code>lsmod</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#lsmod">lsmod</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-M">M</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-md5sum"><code>md5sum</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#md5sum">md5sum</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-menuentry"><code>menuentry</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#menuentry">menuentry</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-module"><code>module</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#module">module</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-multiboot"><code>multiboot</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#multiboot">multiboot</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-N">N</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-nativedisk"><code>nativedisk</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#nativedisk">nativedisk</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fadd_005faddr"><code>net_add_addr</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fadd_005faddr">net_add_addr</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fadd_005fdns"><code>net_add_dns</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fadd_005fdns">net_add_dns</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fadd_005froute"><code>net_add_route</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fadd_005froute">net_add_route</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fbootp"><code>net_bootp</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fbootp">net_bootp</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fbootp6"><code>net_bootp6</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fbootp6">net_bootp6</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fdel_005faddr"><code>net_del_addr</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fdel_005faddr">net_del_addr</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fdel_005fdns"><code>net_del_dns</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fdel_005fdns">net_del_dns</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fdel_005froute"><code>net_del_route</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fdel_005froute">net_del_route</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fdhcp"><code>net_dhcp</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fdhcp">net_dhcp</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fget_005fdhcp_005foption"><code>net_get_dhcp_option</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fget_005fdhcp_005foption">net_get_dhcp_option</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fipv6_005fautoconf"><code>net_ipv6_autoconf</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fipv6_005fautoconf">net_ipv6_autoconf</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fls_005faddr"><code>net_ls_addr</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fls_005faddr">net_ls_addr</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fls_005fcards"><code>net_ls_cards</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fls_005fcards">net_ls_cards</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fls_005fdns"><code>net_ls_dns</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fls_005fdns">net_ls_dns</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fls_005froutes"><code>net_ls_routes</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fls_005froutes">net_ls_routes</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-net_005fnslookup"><code>net_nslookup</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#net_005fnslookup">net_nslookup</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-normal"><code>normal</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#normal">normal</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-normal_005fexit"><code>normal_exit</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#normal_005fexit">normal_exit</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-P">P</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-parttool"><code>parttool</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#parttool">parttool</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-password"><code>password</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#password">password</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-password_005fpbkdf2"><code>password_pbkdf2</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#password_005fpbkdf2">password_pbkdf2</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-play"><code>play</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#play">play</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-probe"><code>probe</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#probe">probe</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-R">R</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-rdmsr"><code>rdmsr</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#rdmsr">rdmsr</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-read"><code>read</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#read">read</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-reboot"><code>reboot</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#reboot">reboot</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-regexp"><code>regexp</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#regexp">regexp</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-rmmod"><code>rmmod</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#rmmod">rmmod</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-S">S</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-save_005fenv"><code>save_env</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#save_005fenv">save_env</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-search"><code>search</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#search">search</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-sendkey"><code>sendkey</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sendkey">sendkey</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-serial"><code>serial</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#serial">serial</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-set"><code>set</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#set">set</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-sha1sum"><code>sha1sum</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sha1sum">sha1sum</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-sha256sum"><code>sha256sum</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sha256sum">sha256sum</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-sha512sum"><code>sha512sum</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sha512sum">sha512sum</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-sleep"><code>sleep</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sleep">sleep</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-smbios"><code>smbios</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#smbios">smbios</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-source"><code>source</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#source">source</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-submenu"><code>submenu</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#submenu">submenu</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-T">T</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-terminal_005finput"><code>terminal_input</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#terminal_005finput">terminal_input</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-terminal_005foutput"><code>terminal_output</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#terminal_005foutput">terminal_output</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-terminfo"><code>terminfo</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#terminfo">terminfo</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-test"><code>test</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#test">test</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-true"><code>true</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#true">true</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-trust"><code>trust</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#trust">trust</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-trust_005fcertificate"><code>trust_certificate</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#trust_005fcertificate">trust_certificate</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-U">U</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-unset"><code>unset</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#unset">unset</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-V">V</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-verify_005fappended"><code>verify_appended</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#verify_005fappended">verify_appended</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-verify_005fdetached"><code>verify_detached</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#verify_005fdetached">verify_detached</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-videoinfo"><code>videoinfo</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#videoinfo">videoinfo</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-W">W</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-wrmsr"><code>wrmsr</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#wrmsr">wrmsr</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-xen_005fhypervisor"><code>xen_hypervisor</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#xen_005fhypervisor">xen_hypervisor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-xen_005fmodule"><code>xen_module</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#xen_005fmodule">xen_module</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Index_cp_symbol-1"><b>[</b></a>
 &nbsp; 
<br>
<a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-K"><b>K</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-U"><b>U</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
 &nbsp; 
<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
 &nbsp; 
</td></tr></table>


<hr>
<span id="SEC_Foot"></span>
<div class="header">
<p>
 &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="footnotes-heading">Footnotes</h4>

<h5><a id="FOOT1" href="#DOCF1">(1)</a></h3>
<p><em>chain-load</em> is the mechanism for loading
unsupported operating systems by loading another boot loader. It is
typically used for loading DOS or Windows.</p>
<h5><a id="FOOT2" href="#DOCF2">(2)</a></h3>
<p>The NetBSD/i386 kernel
is Multiboot-compliant, but lacks support for Multiboot modules.</p>
<h5><a id="FOOT3" href="#DOCF3">(3)</a></h3>
<p>Only CRC32 data integrity check is supported (xz default
is CRC64 so one should use &ndash;check=crc32 option). LZMA BCJ filters are
supported.</p>
<h5><a id="FOOT4" href="#DOCF4">(4)</a></h3>
<p>There are a few
pathological cases where loading a very badly organized ELF kernel might
take longer, but in practice this never happen.</p>
<h5><a id="FOOT5" href="#DOCF5">(5)</a></h3>
<p>The LInux LOader,
a boot loader that everybody uses, but nobody likes.</p>
<h5><a id="FOOT6" href="#DOCF6">(6)</a></h3>
<p>El Torito is a specification for bootable CD
using BIOS functions.</p>
<h5><a id="FOOT7" href="#DOCF7">(7)</a></h3>
<p>Currently a
backslash-newline pair within a variable name is not handled properly, so
use this feature with some care.</p>
<h5><a id="FOOT8" href="#DOCF8">(8)</a></h3>
<p>However, this
behavior will be changed in the future version, in a user-invisible
way.</p>
<hr>



</body>
</html>

Zerion Mini Shell 1.0