{
    "mode": "info",
    "parameter": "grub",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/grub/json",
    "generated": "2026-06-08T15:10:21Z",
    "sections": {
        "GNU GRUB manual": {
            "content": "This is the documentation of GNU GRUB, the GRand Unified Bootloader, a\nflexible and powerful boot loader program for a wide range of\narchitectures.\n\nThis edition documents version 2.06.\n\nThis manual is for GNU GRUB (version 2.06, 2 February 2023).\n\nCopyright (C)\n1999,2000,2001,2002,2004,2006,2008,2009,2010,2011,2012,2013 Free\nSoftware Foundation, Inc.\n\nPermission is granted to copy, distribute and/or modify this\ndocument under the terms of the GNU Free Documentation License,\nVersion 1.2 or any later version published by the Free Software\nFoundation; with no Invariant Sections.\n\n* Menu:\n\n* Introduction::                Capturing the spirit of GRUB\n* Naming convention::           Names of your drives in GRUB\n* OS-specific notes about grub tools::\nSome notes about OS-specific behaviour of GRUB\ntools\n* Installation::                Installing GRUB on your drive\n* Booting::                     How to boot different operating systems\n* Configuration::               Writing your own configuration file\n* Theme file format::           Format of GRUB theme files\n* Network::                     Downloading OS images from a network\n* Serial terminal::             Using GRUB via a serial line\n* Vendor power-on keys::        Changing GRUB behaviour on vendor power-on keys\n* Images::                      GRUB image files\n* Core image size limitation::  GRUB image files size limitations\n* Filesystem::                  Filesystem syntax and semantics\n* Interface::                   The menu and the command-line\n* Environment::                 GRUB environment variables\n* Commands::                    The list of available builtin commands\n* Internationalisation::        Topics relating to language support\n* Security::                    Authentication, authorisation, and signatures\n* Platform limitations::        The list of platform-specific limitations\n* Platform-specific operations:: Platform-specific operations\n* Supported kernels::           The list of supported kernels\n* Troubleshooting::             Error messages produced by GRUB\n* Invoking grub-install::       How to use the GRUB installer\n* Invoking grub-mkconfig::      Generate a GRUB configuration file\n* Invoking grub-mkpasswd-pbkdf2::\nGenerate GRUB password hashes\n* Invoking grub-mkrelpath::     Make system path relative to its root\n* Invoking grub-mkrescue::      Make a GRUB rescue image\n* Invoking grub-mount::         Mount a file system using GRUB\n* Invoking grub-probe::         Probe device information for GRUB\n* Invoking grub-script-check::  Check GRUB script file for syntax errors\n* Obtaining and Building GRUB:: How to obtain and build GRUB\n* Reporting bugs::              Where you should send a bug report\n* Future::                      Some future plans on GRUB\n* Copying This Manual::         Copying This Manual\n* Index::\n\nFile: grub.info,  Node: Introduction,  Next: Naming convention,  Prev: Top,  Up: Top\n",
            "subsections": []
        },
        "1 Introduction to GRUB": {
            "content": "* Menu:\n\n* Overview::                    What exactly GRUB is and how to use it\n* History::                     From maggot to house fly\n* Changes from GRUB Legacy::    Differences from previous versions\n* Features::                    GRUB features\n* Role of a boot loader::       The role of a boot loader\n\nFile: grub.info,  Node: Overview,  Next: History,  Up: Introduction\n",
            "subsections": [
                {
                    "name": "1.1 Overview",
                    "content": "Briefly, a \"boot loader\" is the first software program that runs when a\ncomputer starts.  It is responsible for loading and transferring control\nto an operating system \"kernel\" software (such as Linux or GNU Mach).\nThe kernel, in turn, initializes the rest of the operating system (e.g.\na GNU system).\n\nGNU GRUB is a very powerful boot loader, which can load a wide\nvariety of free operating systems, as well as proprietary operating\nsystems with chain-loading(1) (*note Overview-Footnote-1::).  GRUB is\ndesigned to address the complexity of booting a personal computer; both\nthe program and this manual are tightly bound to that computer platform,\nalthough porting to other platforms may be addressed in the future.\n\nOne of the important features in GRUB is flexibility; GRUB\nunderstands filesystems and kernel executable formats, so you can load\nan arbitrary operating system the way you like, without recording the\nphysical position of your kernel on the disk.  Thus you can load the\nkernel just by specifying its file name and the drive and partition\nwhere the kernel resides.\n\nWhen booting with GRUB, you can use either a command-line interface\n(*note Command-line interface::), or a menu interface (*note Menu\ninterface::).  Using the command-line interface, you type the drive\nspecification and file name of the kernel manually.  In the menu\ninterface, you just select an OS using the arrow keys.  The menu is\nbased on a configuration file which you prepare beforehand (*note\nConfiguration::).  While in the menu, you can switch to the command-line\nmode, and vice-versa.  You can even edit menu entries before using them.\n\nIn the following chapters, you will learn how to specify a drive, a\npartition, and a file name (*note Naming convention::) to GRUB, how to\ninstall GRUB on your drive (*note Installation::), and how to boot your\nOSes (*note Booting::), step by step.\n\nFile: grub.info,  Node: History,  Next: Changes from GRUB Legacy,  Prev: Overview,  Up: Introduction\n"
                },
                {
                    "name": "1.2 History of GRUB",
                    "content": "GRUB originated in 1995 when Erich Boleyn was trying to boot the GNU\nHurd with the University of Utah's Mach 4 microkernel (now known as GNU\nMach).  Erich and Brian Ford designed the Multiboot Specification (*note\nMultiboot Specification: (multiboot)Top.), because they were determined\nnot to add to the large number of mutually-incompatible PC boot methods.\n\nErich then began modifying the FreeBSD boot loader so that it would\nunderstand Multiboot.  He soon realized that it would be a lot easier to\nwrite his own boot loader from scratch than to keep working on the\nFreeBSD boot loader, and so GRUB was born.\n\nErich added many features to GRUB, but other priorities prevented him\nfrom keeping up with the demands of its quickly-expanding user base.  In\n1999, Gordon Matzigkeit and Yoshinori K. Okuji adopted GRUB as an\nofficial GNU package, and opened its development by making the latest\nsources available via anonymous CVS. *Note Obtaining and Building\nGRUB::, for more information.\n\nOver the next few years, GRUB was extended to meet many needs, but it\nquickly became clear that its design was not keeping up with the\nextensions being made to it, and we reached the point where it was very\ndifficult to make any further changes without breaking existing\nfeatures.  Around 2002, Yoshinori K. Okuji started work on PUPA\n(Preliminary Universal Programming Architecture for GNU GRUB), aiming to\nrewrite the core of GRUB to make it cleaner, safer, more robust, and\nmore powerful.  PUPA was eventually renamed to GRUB 2, and the original\nversion of GRUB was renamed to GRUB Legacy.  Small amounts of\nmaintenance continued to be done on GRUB Legacy, but the last release\n(0.97) was made in 2005 and at the time of writing it seems unlikely\nthat there will be another.\n\nBy around 2007, GNU/Linux distributions started to use GRUB 2 to\nlimited extents, and by the end of 2009 multiple major distributions\nwere installing it by default.\n\nFile: grub.info,  Node: Changes from GRUB Legacy,  Next: Features,  Prev: History,  Up: Introduction\n"
                },
                {
                    "name": "1.3 Differences from previous versions",
                    "content": "GRUB 2 is a rewrite of GRUB (*note History::), although it shares many\ncharacteristics with the previous version, now known as GRUB Legacy.\nUsers of GRUB Legacy may need some guidance to find their way around\nthis new version.\n\n* The configuration file has a new name ('grub.cfg' rather than\n'menu.lst' or 'grub.conf'), new syntax (*note Configuration::) and\nmany new commands (*note Commands::).  Configuration cannot be\ncopied over directly, although most GRUB Legacy users should not\nfind the syntax too surprising.\n\n* 'grub.cfg' is typically automatically generated by 'grub-mkconfig'\n(*note Simple configuration::).  This makes it easier to handle\nversioned kernel upgrades.\n\n* Partition numbers in GRUB device names now start at 1, not 0 (*note\nNaming convention::).\n\n* The configuration file is now written in something closer to a full\nscripting language: variables, conditionals, and loops are\navailable.\n\n* A small amount of persistent storage is available across reboots,\nusing the 'saveenv' and 'loadenv' commands in GRUB and the\n'grub-editenv' utility.  This is not available in all\nconfigurations (*note Environment block::).\n\n* GRUB 2 has more reliable ways to find its own files and those of\ntarget kernels on multiple-disk systems, and has commands (*note\nsearch::) to find devices using file system labels or Universally\nUnique Identifiers (UUIDs).\n\n* GRUB 2 is available for several other types of system in addition\nto the PC BIOS systems supported by GRUB Legacy: PC EFI, PC\ncoreboot, PowerPC, SPARC, and MIPS Lemote Yeeloong are all\nsupported.\n\n* Many more file systems are supported, including but not limited to\next4, HFS+, and NTFS.\n\n* GRUB 2 can read files directly from LVM and RAID devices.\n\n* A graphical terminal and a graphical menu system are available.\n\n* GRUB 2's interface can be translated, including menu entry names.\n\n* The image files (*note Images::) that make up GRUB have been\nreorganised; Stage 1, Stage 1.5, and Stage 2 are no more.\n\n* GRUB 2 puts many facilities in dynamically loaded modules, allowing\nthe core image to be smaller, and allowing the core image to be\nbuilt in more flexible ways.\n\nFile: grub.info,  Node: Features,  Next: Role of a boot loader,  Prev: Changes from GRUB Legacy,  Up: Introduction\n"
                },
                {
                    "name": "1.4 GRUB features",
                    "content": "The primary requirement for GRUB is that it be compliant with the\n\"Multiboot Specification\", which is described in *note Multiboot\nSpecification: (multiboot)Top.\n\nThe other goals, listed in approximate order of importance, are:\n\n* Basic functions must be straightforward for end-users.\n\n* Rich functionality to support kernel experts and designers.\n\n* Backward compatibility for booting FreeBSD, NetBSD, OpenBSD, and\nLinux.  Proprietary kernels (such as DOS, Windows NT, and OS/2) are\nsupported via a chain-loading function.\n\nExcept for specific compatibility modes (chain-loading and the Linux\n\"piggyback\" format), all kernels will be started in much the same state\nas in the Multiboot Specification.  Only kernels loaded at 1 megabyte or\nabove are presently supported.  Any attempt to load below that boundary\nwill simply result in immediate failure and an error message reporting\nthe problem.\n\nIn addition to the requirements above, GRUB has the following\nfeatures (note that the Multiboot Specification doesn't require all the\nfeatures that GRUB supports):\n\nRecognize multiple executable formats\nSupport many of the \"a.out\" variants plus \"ELF\". Symbol tables are\nalso loaded.\n\nSupport non-Multiboot kernels\nSupport many of the various free 32-bit kernels that lack Multiboot\ncompliance (primarily FreeBSD, NetBSD(1) (*note\nFeatures-Footnote-1::), OpenBSD, and Linux).  Chain-loading of\nother boot loaders is also supported.\n\nLoad multiples modules\nFully support the Multiboot feature of loading multiple modules.\n\nLoad a configuration file\nSupport a human-readable text configuration file with preset boot\ncommands.  You can also load another configuration file dynamically\nand embed a preset configuration file in a GRUB image file.  The\nlist of commands (*note Commands::) are a superset of those\nsupported on the command-line.  An example configuration file is\nprovided in *note Configuration::.\n\nProvide a menu interface\nA menu interface listing preset boot commands, with a programmable\ntimeout, is available.  There is no fixed limit on the number of\nboot entries, and the current implementation has space for several\nhundred.\n\nHave a flexible command-line interface\nA fairly flexible command-line interface, accessible from the menu,\nis available to edit any preset commands, or write a new boot\ncommand set from scratch.  If no configuration file is present,\nGRUB drops to the command-line.\n\nThe list of commands (*note Commands::) are a subset of those\nsupported for configuration files.  Editing commands closely\nresembles the Bash command-line (*note Bash: (features)Command Line\nEditing.), with <TAB>-completion of commands, devices, partitions,\nand files in a directory depending on context.\n\nSupport multiple filesystem types\nSupport multiple filesystem types transparently, plus a useful\nexplicit blocklist notation.  The currently supported filesystem\ntypes are \"Amiga Fast FileSystem (AFFS)\", \"AtheOS fs\", \"BeFS\",\n\"BtrFS\" (including raid0, raid1, raid10, gzip and lzo), \"cpio\"\n(little- and big-endian bin, odc and newc variants), \"Linux\next2/ext3/ext4\", \"DOS FAT12/FAT16/FAT32\", \"exFAT\", \"F2FS\", \"HFS\",\n\"HFS+\", \"ISO9660\" (including Joliet, Rock-ridge and multi-chunk\nfiles), \"JFS\", \"Minix fs\" (versions 1, 2 and 3), \"nilfs2\", \"NTFS\"\n(including compression), \"ReiserFS\", \"ROMFS\", \"Amiga Smart\nFileSystem (SFS)\", \"Squash4\", \"tar\", \"UDF\", \"BSD UFS/UFS2\", \"XFS\",\nand \"ZFS\" (including lzjb, gzip, zle, mirror, stripe, raidz1/2/3\nand encryption in AES-CCM and AES-GCM). *Note Filesystem::, for\nmore information.\n\nSupport automatic decompression\nCan decompress files which were compressed by 'gzip' or 'xz'(2)\n(*note Features-Footnote-2::).  This function is both automatic and\ntransparent to the user (i.e.  all functions operate upon the\nuncompressed contents of the specified files).  This greatly\nreduces a file size and loading time, a particularly great benefit\nfor floppies.(3)  (*note Features-Footnote-3::)\n\nIt is conceivable that some kernel modules should be loaded in a\ncompressed state, so a different module-loading command can be\nspecified to avoid uncompressing the modules.\n\nAccess data on any installed device\nSupport reading data from any or all floppies or hard disk(s)\nrecognized by the BIOS, independent of the setting of the root\ndevice.\n\nBe independent of drive geometry translations\nUnlike many other boot loaders, GRUB makes the particular drive\ntranslation irrelevant.  A drive installed and running with one\ntranslation may be converted to another translation without any\nadverse effects or changes in GRUB's configuration.\n\nDetect all installed RAM\nGRUB can generally find all the installed RAM on a PC-compatible\nmachine.  It uses an advanced BIOS query technique for finding all\nmemory regions.  As described on the Multiboot Specification (*note\nMultiboot Specification: (multiboot)Top.), not all kernels make use\nof this information, but GRUB provides it for those who do.\n\nSupport Logical Block Address mode\nIn traditional disk calls (called \"CHS mode\"), there is a geometry\ntranslation problem, that is, the BIOS cannot access over 1024\ncylinders, so the accessible space is limited to at least 508 MB\nand to at most 8GB. GRUB can't universally solve this problem, as\nthere is no standard interface used in all machines.  However,\nseveral newer machines have the new interface, Logical Block\nAddress (\"LBA\") mode.  GRUB automatically detects if LBA mode is\navailable and uses it if available.  In LBA mode, GRUB can access\nthe entire disk.\n\nSupport network booting\nGRUB is basically a disk-based boot loader but also has network\nsupport.  You can load OS images from a network by using the \"TFTP\"\nprotocol.\n\nSupport remote terminals\nTo support computers with no console, GRUB provides remote terminal\nsupport, so that you can control GRUB from a remote host.  Only\nserial terminal support is implemented at the moment.\n\nFile: grub.info,  Node: Role of a boot loader,  Prev: Features,  Up: Introduction\n"
                },
                {
                    "name": "1.5 The role of a boot loader",
                    "content": "The following is a quotation from Gordon Matzigkeit, a GRUB fanatic:\n\nSome people like to acknowledge both the operating system and\nkernel when they talk about their computers, so they might say they\nuse \"GNU/Linux\" or \"GNU/Hurd\".  Other people seem to think that the\nkernel is the most important part of the system, so they like to\ncall their GNU operating systems \"Linux systems.\"\n\nI, personally, believe that this is a grave injustice, because the\nboot loader is the most important software of all.  I used to\nrefer to the above systems as either \"LILO\"(1) (*note Role of a\nboot loader-Footnote-1::) or \"GRUB\" systems.\n\nUnfortunately, nobody ever understood what I was talking about; now\nI just use the word \"GNU\" as a pseudonym for GRUB.\n\nSo, if you ever hear people talking about their alleged \"GNU\"\nsystems, remember that they are actually paying homage to the best\nboot loader around... GRUB!\n\nWe, the GRUB maintainers, do not (usually) encourage Gordon's level\nof fanaticism, but it helps to remember that boot loaders deserve\nrecognition.  We hope that you enjoy using GNU GRUB as much as we did\nwriting it.\n\nFile: grub.info,  Node: Naming convention,  Next: OS-specific notes about grub tools,  Prev: Introduction,  Up: Top\n"
                }
            ]
        },
        "2 Naming convention": {
            "content": "The device syntax used in GRUB is a wee bit different from what you may\nhave seen before in your operating system(s), and you need to know it so\nthat you can specify a drive/partition.\n\nLook at the following examples and explanations:\n\n(fd0)\n\nFirst of all, GRUB requires that the device name be enclosed with '('\nand ')'.  The 'fd' part means that it is a floppy disk.  The number '0'\nis the drive number, which is counted from zero.  This expression\nmeans that GRUB will use the whole floppy disk.\n\n(hd0,msdos2)\n\nHere, 'hd' means it is a hard disk drive.  The first integer '0'\nindicates the drive number, that is, the first hard disk, the string\n'msdos' indicates the partition scheme, while the second integer, '2',\nindicates the partition number (or the PC slice number in the BSD\nterminology).  The partition numbers are counted from one, not from\nzero (as was the case in previous versions of GRUB). This expression\nmeans the second partition of the first hard disk drive.  In this case,\nGRUB uses one partition of the disk, instead of the whole disk.\n\n(hd0,msdos5)\n\nThis specifies the first \"extended partition\" of the first hard disk\ndrive.  Note that the partition numbers for extended partitions are\ncounted from '5', regardless of the actual number of primary partitions\non your hard disk.\n\n(hd1,msdos1,bsd1)\n\nThis means the BSD 'a' partition on first PC slice number of the\nsecond hard disk.\n\nOf course, to actually access the disks or partitions with GRUB, you\nneed to use the device specification in a command, like 'set root=(fd0)'\nor 'parttool (hd0,msdos3) hidden-'.  To help you find out which number\nspecifies a partition you want, the GRUB command-line (*note\nCommand-line interface::) options have argument completion.  This means\nthat, for example, you only need to type\n\nset root=(\n\nfollowed by a <TAB>, and GRUB will display the list of drives,\npartitions, or file names.  So it should be quite easy to determine the\nname of your target partition, even with minimal knowledge of the\nsyntax.\n\nNote that GRUB does not distinguish IDE from SCSI - it simply\ncounts the drive numbers from zero, regardless of their type.  Normally,\nany IDE drive number is less than any SCSI drive number, although that\nis not true if you change the boot sequence by swapping IDE and SCSI\ndrives in your BIOS.\n\nNow the question is, how to specify a file?  Again, consider an\nexample:\n\n(hd0,msdos1)/vmlinuz\n\nThis specifies the file named 'vmlinuz', found on the first partition\nof the first hard disk drive.  Note that the argument completion works\nwith file names, too.\n\nThat was easy, admit it.  Now read the next chapter, to find out how\nto actually install GRUB on your drive.\n\nFile: grub.info,  Node: OS-specific notes about grub tools,  Next: Installation,  Prev: Naming convention,  Up: Top\n",
            "subsections": []
        },
        "3 OS-specific notes about grub tools": {
            "content": "On OS which have device nodes similar to Unix-like OS GRUB tools use the\nOS name.  E.g.  for GNU/Linux:\n\n# grub-install /dev/sda\n\nOn AROS we use another syntax.  For volumes:\n\n//:<volume name>\n\nE.g.\n\n//:DH0\n\nFor disks we use syntax:\n//:<driver name>/unit/flags\n\nE.g.\n\n# grub-install //:ata.device/0/0\n\nOn Windows we use UNC path.  For volumes it's typically\n\n\\\\?\\Volume{<GUID>}\n\\\\?\\<drive letter>:\n\nE.g.\n\n\\\\?\\Volume{17f34d50-cf64-4b02-800e-51d79c3aa2ff}\n\\\\?\\C:\n\nFor disks it's\n\n\\\\?\\PhysicalDrive<number>\n\nE.g.\n\n# grub-install \\\\?\\PhysicalDrive0\n\nBeware that you may need to further escape the backslashes depending\non your shell.\n\nWhen compiled with cygwin support then cygwin drive names are\nautomatically when needed.  E.g.\n\n# grub-install /dev/sda\n\nFile: grub.info,  Node: Installation,  Next: Booting,  Prev: OS-specific notes about grub tools,  Up: Top\n",
            "subsections": []
        },
        "4 Installation": {
            "content": "In order to install GRUB as your boot loader, you need to first install\nthe GRUB system and utilities under your UNIX-like operating system\n(*note Obtaining and Building GRUB::).  You can do this either from the\nsource tarball, or as a package for your OS.\n\nAfter you have done that, you need to install the boot loader on a\ndrive (floppy or hard disk) by using the utility 'grub-install' (*note\nInvoking grub-install::) on a UNIX-like OS.\n\nGRUB comes with boot images, which are normally put in the directory\n'/usr/lib/grub/<cpu>-<platform>' (for BIOS-based machines\n'/usr/lib/grub/i386-pc').  Hereafter, the directory where GRUB images\nare initially placed (normally '/usr/lib/grub/<cpu>-<platform>') will be\ncalled the \"image directory\", and the directory where the boot loader\nneeds to find them (usually '/boot') will be called the \"boot\ndirectory\".\n\n* Menu:\n\n* Installing GRUB using grub-install::\n* Making a GRUB bootable CD-ROM::\n* Device map::\n* BIOS installation::\n\nFile: grub.info,  Node: Installing GRUB using grub-install,  Next: Making a GRUB bootable CD-ROM,  Up: Installation\n",
            "subsections": [
                {
                    "name": "4.1 Installing GRUB using grub-install",
                    "content": "For information on where GRUB should be installed on PC BIOS platforms,\n*note BIOS installation::.\n\nIn order to install GRUB under a UNIX-like OS (such as GNU), invoke\nthe program 'grub-install' (*note Invoking grub-install::) as the\nsuperuser (\"root\").\n\nThe usage is basically very simple.  You only need to specify one\nargument to the program, namely, where to install the boot loader.  The\nargument has to be either a device file (like '/dev/hda').  For example,\nunder Linux the following will install GRUB into the MBR of the first\nIDE disk:\n\n# grub-install /dev/sda\n\nLikewise, under GNU/Hurd, this has the same effect:\n\n# grub-install /dev/hd0\n\nBut all the above examples assume that GRUB should put images under\nthe '/boot' directory.  If you want GRUB to put images under a directory\nother than '/boot', you need to specify the option '--boot-directory'.\nThe typical usage is that you create a GRUB boot floppy with a\nfilesystem.  Here is an example:\n\n# mke2fs /dev/fd0\n# mount -t ext2 /dev/fd0 /mnt\n# mkdir /mnt/boot\n# grub-install --boot-directory=/mnt/boot /dev/fd0\n# umount /mnt\n\nSome BIOSes have a bug of exposing the first partition of a USB drive\nas a floppy instead of exposing the USB drive as a hard disk (they call\nit \"USB-FDD\" boot).  In such cases, you need to install like this:\n\n# losetup /dev/loop0 /dev/sdb1\n# mount /dev/loop0 /mnt/usb\n# grub-install --boot-directory=/mnt/usb/bugbios --force --allow-floppy /dev/loop0\n\nThis install doesn't conflict with standard install as long as they\nare in separate directories.\n\nOn EFI systems for fixed disk install you have to mount EFI System\nPartition.  If you mount it at '/boot/efi' then you don't need any\nspecial arguments:\n\n# grub-install\n\nOtherwise you need to specify where your EFI System partition is\nmounted:\n\n# grub-install --efi-directory=/mnt/efi\n\nFor removable installs you have to use '--removable' and specify both\n'--boot-directory' and '--efi-directory':\n\n# grub-install --efi-directory=/mnt/usb --boot-directory=/mnt/usb/boot --removable\n\nFile: grub.info,  Node: Making a GRUB bootable CD-ROM,  Next: Device map,  Prev: Installing GRUB using grub-install,  Up: Installation\n"
                },
                {
                    "name": "4.2 Making a GRUB bootable CD-ROM",
                    "content": "GRUB supports the \"no emulation mode\" in the El Torito specification(1)\n(*note Making a GRUB bootable CD-ROM-Footnote-1::).  This means that you\ncan use the whole CD-ROM from GRUB and you don't have to make a floppy\nor hard disk image file, which can cause compatibility problems.\n\nFor booting from a CD-ROM, GRUB uses a special image called\n'cdboot.img', which is concatenated with 'core.img'.  The 'core.img'\nused for this should be built with at least the 'iso9660' and 'biosdisk'\nmodules.  Your bootable CD-ROM will usually also need to include a\nconfiguration file 'grub.cfg' and some other GRUB modules.\n\nTo make a simple generic GRUB rescue CD, you can use the\n'grub-mkrescue' program (*note Invoking grub-mkrescue::):\n\n$ grub-mkrescue -o grub.iso\n\nYou will often need to include other files in your image.  To do\nthis, first make a top directory for the bootable image, say, 'iso':\n\n$ mkdir iso\n\nMake a directory for GRUB:\n\n$ mkdir -p iso/boot/grub\n\nIf desired, make the config file 'grub.cfg' under 'iso/boot/grub'\n(*note Configuration::), and copy any files and directories for the disc\nto the directory 'iso/'.\n\nFinally, make the image:\n\n$ grub-mkrescue -o grub.iso iso\n\nThis produces a file named 'grub.iso', which then can be burned into\na CD (or a DVD), or written to a USB mass storage device.\n\nThe root device will be set up appropriately on entering your\n'grub.cfg' configuration file, so you can refer to file names on the CD\nwithout needing to use an explicit device name.  This makes it easier to\nproduce rescue images that will work on both optical drives and USB mass\nstorage devices.\n\nFile: grub.info,  Node: Device map,  Next: BIOS installation,  Prev: Making a GRUB bootable CD-ROM,  Up: Installation\n"
                },
                {
                    "name": "4.3 The map between BIOS drives and OS devices",
                    "content": "If the device map file exists, the GRUB utilities ('grub-probe', etc.)\nread it to map BIOS drives to OS devices.  This file consists of lines\nlike this:\n\n(DEVICE) FILE\n\nDEVICE is a drive specified in the GRUB syntax (*note Device\nsyntax::), and FILE is an OS file, which is normally a device file.\n\nHistorically, the device map file was used because GRUB device names\nhad to be used in the configuration file, and they were derived from\nBIOS drive numbers.  The map between BIOS drives and OS devices cannot\nalways be guessed correctly: for example, GRUB will get the order wrong\nif you exchange the boot sequence between IDE and SCSI in your BIOS.\n\nUnfortunately, even OS device names are not always stable.  Modern\nversions of the Linux kernel may probe drives in a different order from\nboot to boot, and the prefix ('/dev/hd*' versus '/dev/sd*') may change\ndepending on the driver subsystem in use.  As a result, the device map\nfile required frequent editing on some systems.\n\nGRUB avoids this problem nowadays by using UUIDs or file system\nlabels when generating 'grub.cfg', and we advise that you do the same\nfor any custom menu entries you write.  If the device map file does not\nexist, then the GRUB utilities will assume a temporary device map on the\nfly.  This is often good enough, particularly in the common case of\nsingle-disk systems.\n\nHowever, the device map file is not entirely obsolete yet, and it is\nused for overriding when current environment is different from the one\non boot.  Most common case is if you use a partition or logical volume\nas a disk for virtual machine.  You can put any comments in the file if\nneeded, as the GRUB utilities assume that a line is just a comment if\nthe first character is '#'.\n\nFile: grub.info,  Node: BIOS installation,  Prev: Device map,  Up: Installation\n"
                },
                {
                    "name": "4.4 BIOS installation",
                    "content": ""
                },
                {
                    "name": "MBR",
                    "content": "The partition table format traditionally used on PC BIOS platforms is\ncalled the Master Boot Record (MBR) format; this is the format that\nallows up to four primary partitions and additional logical partitions.\nWith this partition table format, there are two ways to install GRUB: it\ncan be embedded in the area between the MBR and the first partition\n(called by various names, such as the \"boot track\", \"MBR gap\", or\n\"embedding area\", and which is usually at least 1000 KiB), or the core\nimage can be installed in a file system and a list of the blocks that\nmake it up can be stored in the first sector of that partition.\n\nModern tools usually leave MBR gap of at least 1023 KiB. This amount\nis sufficient to cover most configurations.  Hence this value is\nrecommended by the GRUB team.\n\nHistorically many tools left only 31 KiB of space.  This is not\nenough to parse reliably difficult structures like Btrfs, ZFS, RAID or\nLVM, or to use difficult disk access methods like ahci.  Hence GRUB will\nwarn if attempted to install into small MBR gap except in a small number\nof configurations that were grandfathered.  The grandfathered config\nmust:\n\n* use biosdisk as disk access module for '/boot' * not use any\nadditional partition maps to access '/boot' * '/boot' must be on one of\nfollowing filesystems: * AFFS, AFS, BFS, cpio, newc, odc, ext2/3/4, FAT,\nexFAT, F2FS, HFS, uncompressed HFS+, ISO9660, JFS, Minix, Minix2,\nMinix3, NILFS2, NTFS, ReiserFS, ROMFS, SFS, tar, UDF, UFS1, UFS2, XFS\n\nMBR gap has few technical problems.  There is no way to reserve space\nin the embedding area with complete safety, and some proprietary\nsoftware is known to use it to make it difficult for users to work\naround licensing restrictions.  GRUB works it around by detecting\nsectors by other software and avoiding them and protecting its own\nsectors using Reed-Solomon encoding.\n\nGRUB team recommends having MBR gap of at least 1000 KiB\n\nShould it be not possible GRUB has support for a fallback solution\nwhich is heavily recommended against.  Installing to a filesystem means\nthat GRUB is vulnerable to its blocks being moved around by filesystem\nfeatures such as tail packing, or even by aggressive fsck\nimplementations, so this approach is quite fragile; and this approach\ncan only be used if the '/boot' filesystem is on the same disk that the\nBIOS boots from, so that GRUB does not have to rely on guessing BIOS\ndrive numbers.\n\nThe GRUB development team generally recommends embedding GRUB before\nthe first partition, unless you have special requirements.  You must\nensure that the first partition starts at least 1000 KiB (2000 sectors)\nfrom the start of the disk; on modern disks, it is often a performance\nadvantage to align partitions on larger boundaries anyway, so the first\npartition might start 1 MiB from the start of the disk.\n"
                },
                {
                    "name": "GPT",
                    "content": "Some newer systems use the GUID Partition Table (GPT) format.  This was\nspecified as part of the Extensible Firmware Interface (EFI), but it can\nalso be used on BIOS platforms if system software supports it; for\nexample, GRUB and GNU/Linux can be used in this configuration.  With\nthis format, it is possible to reserve a whole partition for GRUB,\ncalled the BIOS Boot Partition.  GRUB can then be embedded into that\npartition without the risk of being overwritten by other software and\nwithout being contained in a filesystem which might move its blocks\naround.\n\nWhen creating a BIOS Boot Partition on a GPT system, you should make\nsure that it is at least 31 KiB in size.  (GPT-formatted disks are not\nusually particularly small, so we recommend that you make it larger than\nthe bare minimum, such as 1 MiB, to allow plenty of room for growth.)\nYou must also make sure that it has the proper partition type.  Using\nGNU Parted, you can set this using a command such as the following:\n\n# parted /dev/DISK set PARTITION-NUMBER biosgrub on\n\nIf you are using gdisk, set the partition type to '0xEF02'.  With\npartitioning programs that require setting the GUID directly, it should\nbe '21686148-6449-6e6f-744e656564454649'.\n\n*Caution:* Be very careful which partition you select!  When GRUB\nfinds a BIOS Boot Partition during installation, it will automatically\noverwrite part of it.  Make sure that the partition does not contain any\nother data.\n\nFile: grub.info,  Node: Booting,  Next: Configuration,  Prev: Installation,  Up: Top\n"
                }
            ]
        },
        "5 Booting": {
            "content": "GRUB can load Multiboot-compliant kernels in a consistent way, but for\nsome free operating systems you need to use some OS-specific magic.\n\n* Menu:\n\n* General boot methods::        How to boot OSes with GRUB generally\n* Loopback booting::            Notes on booting from loopbacks\n* LVM cache booting::           Notes on booting from LVM cache logical volume\n* OS-specific notes::           Notes on some operating systems\n\nFile: grub.info,  Node: General boot methods,  Next: Loopback booting,  Up: Booting\n",
            "subsections": [
                {
                    "name": "5.1 How to boot operating systems",
                    "content": "GRUB has two distinct boot methods.  One of the two is to load an\noperating system directly, and the other is to chain-load another boot\nloader which then will load an operating system actually.  Generally\nspeaking, the former is more desirable, because you don't need to\ninstall or maintain other boot loaders and GRUB is flexible enough to\nload an operating system from an arbitrary disk/partition.  However, the\nlatter is sometimes required, since GRUB doesn't support all the\nexisting operating systems natively.\n\n* Menu:\n\n* Loading an operating system directly::\n* Chain-loading::\n\nFile: grub.info,  Node: Loading an operating system directly,  Next: Chain-loading,  Up: General boot methods\n\n\nMultiboot (*note Multiboot Specification: (multiboot)Top.) is the native\nformat supported by GRUB. For the sake of convenience, there is also\nsupport for Linux, FreeBSD, NetBSD and OpenBSD. If you want to boot\nother operating systems, you will have to chain-load them (*note\nChain-loading::).\n\nFIXME: this section is incomplete.\n\n1. Run the command 'boot' (*note boot::).\n\nHowever, DOS and Windows have some deficiencies, so you might have to\nuse more complicated instructions.  *Note DOS/Windows::, for more\ninformation.\n\nFile: grub.info,  Node: Chain-loading,  Prev: Loading an operating system directly,  Up: General boot methods\n\n\nOperating systems that do not support Multiboot and do not have specific\nsupport in GRUB (specific support is available for Linux, FreeBSD,\nNetBSD and OpenBSD) must be chain-loaded, which involves loading another\nboot loader and jumping to it in real mode.\n\nThe 'chainloader' command (*note chainloader::) is used to set this\nup.  It is normally also necessary to load some GRUB modules and set the\nappropriate root device.  Putting this together, we get something like\nthis, for a Windows system on the first partition of the first hard\ndisk:\n\nmenuentry \"Windows\" {\ninsmod chain\ninsmod ntfs\nset root=(hd0,1)\nchainloader +1\n}\n\nOn systems with multiple hard disks, an additional workaround may be\nrequired.  *Note DOS/Windows::.\n\nChain-loading is only supported on PC BIOS and EFI platforms.\n\nFile: grub.info,  Node: Loopback booting,  Next: LVM cache booting,  Prev: General boot methods,  Up: Booting\n"
                },
                {
                    "name": "5.2 Loopback booting",
                    "content": "GRUB is able to read from an image (be it one of CD or HDD) stored on\nany of its accessible storages (refer to *note loopback:: command).\nHowever the OS itself should be able to find its root.  This usually\ninvolves running a userspace program running before the real root is\ndiscovered.  This is achieved by GRUB loading a specially made small\nimage and passing it as ramdisk to the kernel.  This is achieved by\ncommands 'kfreebsdmodule', 'knetbsdmoduleelf', 'kopenbsdramdisk',\n'initrd' (*note initrd::), 'initrd16' (*note initrd::),\n'multibootmodule', 'multiboot2module' or 'xnuramdisk' depending on\nthe loader.  Note that for knetbsd the image must be put inside\nminiroot.kmod and the whole miniroot.kmod has to be loaded.  In kopenbsd\npayload this is disabled by default.  Aditionally behaviour of initial\nramdisk depends on command line options.  Several distributors provide\nthe image for this purpose or it's integrated in their standard ramdisk\nand activated by special option.  Consult your kernel and distribution\nmanual for more details.  Other loaders like appleloader, chainloader\n(BIOS, EFI, coreboot), freedos, ntldr and plan9 provide no possibility\nof loading initial ramdisk and as far as author is aware the payloads in\nquestion don't support either initial ramdisk or discovering loopback\nboot in other way and as such not bootable this way.  Please consider\nalternative boot methods like copying all files from the image to actual\npartition.  Consult your OS documentation for more details\n\nFile: grub.info,  Node: LVM cache booting,  Next: OS-specific notes,  Prev: Loopback booting,  Up: Booting\n"
                },
                {
                    "name": "5.3 Booting from LVM cache logical volume",
                    "content": "The LVM cache logical volume is the logical volume consisting of the\noriginal and the cache pool logical volume.  The original is usually on\na larger and slower storage device while the cache pool is on a smaller\nand faster one.  The performance of the original volume can be improved\nby storing the frequently used data on the cache pool to utilize the\ngreater performance of faster device.\n\nGRUB boots from LVM cache logical volume merely by reading it's\noriginal logical volume so that dirty data in cache pool volume is\ndisregarded.  This is not a problem for \"writethrough\" cache mode as it\nensures that any data written will be stored both on the cache and the\norigin LV. For the other cache mode \"writeback\", which delays writing\nfrom the cache pool back to the origin LV to boost performance, GRUB may\nfail to boot in the wake of accidental power outage due to it's\ninability to assemble the cache device for reading the required dirty\ndata left behind.  The situation will be improved after adding full\nsupport to the LVM cache logical volume in the future.\n\nFile: grub.info,  Node: OS-specific notes,  Prev: LVM cache booting,  Up: Booting\n"
                },
                {
                    "name": "5.4 Some caveats on OS-specific issues",
                    "content": "Here, we describe some caveats on several operating systems.\n\n* Menu:\n\n* GNU/Hurd::\n* GNU/Linux::\n* NetBSD::\n* DOS/Windows::\n\nFile: grub.info,  Node: GNU/Hurd,  Next: GNU/Linux,  Up: OS-specific notes\n\n\nSince GNU/Hurd is Multiboot-compliant, it is easy to boot it; there is\nnothing special about it.  But do not forget that you have to specify a\nroot partition to the kernel.\n\n1. Set GRUB's root device to the same drive as GNU/Hurd's.  The\ncommand 'search --set=root --file /boot/gnumach.gz' or similar may\nhelp you (*note search::).\n\n2. Load the kernel and the modules, like this:\n\ngrub> multiboot /boot/gnumach.gz root=device:hd0s1\ngrub> module  /hurd/ext2fs.static ext2fs --readonly \\\n--multiboot-command-line='${kernel-command-line}' \\\n--host-priv-port='${host-port}' \\\n--device-master-port='${device-port}' \\\n--exec-server-task='${exec-task}' -T typed '${root}' \\\n'$(task-create)' '$(task-resume)'\ngrub> module /lib/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'\n\n3. Finally, run the command 'boot' (*note boot::).\n\nFile: grub.info,  Node: GNU/Linux,  Next: NetBSD,  Prev: GNU/Hurd,  Up: OS-specific notes\n\n\nIt is relatively easy to boot GNU/Linux from GRUB, because it somewhat\nresembles to boot a Multiboot-compliant OS.\n\n1. Set GRUB's root device to the same drive as GNU/Linux's.  The\ncommand 'search --set=root --file /vmlinuz' or similar may help you\n(*note search::).\n\n2. Load the kernel using the command 'linux' (*note linux::):\n\ngrub> linux /vmlinuz root=/dev/sda1\n\nIf you need to specify some kernel parameters, just append them to\nthe command.  For example, to set 'acpi' to 'off', do this:\n\ngrub> linux /vmlinuz root=/dev/sda1 acpi=off\n\nSee the documentation in the Linux source tree for complete\ninformation on the available options.\n\nWith 'linux' GRUB uses 32-bit protocol.  Some BIOS services like\nAPM or EDD aren't available with this protocol.  In this case you\nneed to use 'linux16'\n\ngrub> linux16 /vmlinuz root=/dev/sda1 acpi=off\n\n3. If you use an initrd, execute the command 'initrd' (*note initrd::)\nafter 'linux':\n\ngrub> initrd /initrd\n\nIf you used 'linux16' you need to use 'initrd16':\n\ngrub> initrd16 /initrd\n\n4. Finally, run the command 'boot' (*note boot::).\n\nFile: grub.info,  Node: NetBSD,  Next: DOS/Windows,  Prev: GNU/Linux,  Up: OS-specific notes\n\n\nBooting a NetBSD kernel from GRUB is also relatively easy: first set\nGRUB's root device, then load the kernel and the modules, and finally\nrun 'boot'.\n\n1. Set GRUB's root device to the partition holding the NetBSD root\nfile system.  For a disk with a NetBSD disk label, this is usually\nthe first partition (a:).  In that case, and assuming that the\npartition is on the first hard disk, set GRUB's root device as\nfollows:\n\ngrub> insmod partbsd\ngrub> set root=(hd0,netbsd1)\n\nFor a disk with a GUID Partition Table (GPT), and assuming that the\nNetBSD root partition is the third GPT partition, do this:\n\ngrub> insmod partgpt\ngrub> set root=(hd0,gpt3)\n\n2. Load the kernel using the command 'knetbsd':\n\ngrub> knetbsd /netbsd\n\nVarious options may be given to 'knetbsd'.  These options are, for\nthe most part, the same as in the NetBSD boot loader.  For\ninstance, to boot the system in single-user mode and with verbose\nmessages, do this:\n\ngrub> knetbsd /netbsd -s -v\n\n3. If needed, load kernel modules with the command\n'knetbsdmoduleelf'.  A typical example is the module for the root\nfile system:\n\ngrub> knetbsdmoduleelf /stand/amd64/6.0/modules/ffs/ffs.kmod\n\n4. Finally, run the command 'boot' (*note boot::).\n\nFile: grub.info,  Node: DOS/Windows,  Prev: NetBSD,  Up: OS-specific notes\n\n\nGRUB cannot boot DOS or Windows directly, so you must chain-load them\n(*note Chain-loading::).  However, their boot loaders have some critical\ndeficiencies, so it may not work to just chain-load them.  To overcome\nthe problems, GRUB provides you with two helper functions.\n\nIf you have installed DOS (or Windows) on a non-first hard disk, you\nhave to use the disk swapping technique, because that OS cannot boot\nfrom any disks but the first one.  The workaround used in GRUB is the\ncommand 'drivemap' (*note drivemap::), like this:\n\ndrivemap -s (hd0) (hd1)\n\nThis performs a \"virtual\" swap between your first and second hard\ndrive.\n\n*Caution:* This is effective only if DOS (or Windows) uses BIOS to\naccess the swapped disks.  If that OS uses a special driver for the\ndisks, this probably won't work.\n\nAnother problem arises if you installed more than one set of\nDOS/Windows onto one disk, because they could be confused if there are\nmore than one primary partitions for DOS/Windows.  Certainly you should\navoid doing this, but there is a solution if you do want to do so.  Use\nthe partition hiding/unhiding technique.\n\nIf GRUB \"hides\" a DOS (or Windows) partition (*note parttool::), DOS\n(or Windows) will ignore the partition.  If GRUB \"unhides\" a DOS (or\nWindows) partition, DOS (or Windows) will detect the partition.  Thus,\nif you have installed DOS (or Windows) on the first and the second\npartition of the first hard disk, and you want to boot the copy on the\nfirst partition, do the following:\n\nparttool (hd0,1) hidden-\nparttool (hd0,2) hidden+\nset root=(hd0,1)\nchainloader +1\nparttool ${root} boot+\nboot\n\nFile: grub.info,  Node: Configuration,  Next: Theme file format,  Prev: Booting,  Up: Top\n"
                }
            ]
        },
        "6 Writing your own configuration file": {
            "content": "GRUB is configured using 'grub.cfg', usually located under '/boot/grub'.\nThis file is quite flexible, but most users will not need to write the\nwhole thing by hand.\n\n* Menu:\n\n* Simple configuration::            Recommended for most users\n* Root Identifcation Heuristics::   Summary on how the root file system is identified.\n* Shell-like scripting::            For power users and developers\n* Multi-boot manual config::        For non-standard multi-OS scenarios\n* Embedded configuration::          Embedding a configuration file into GRUB\n\nFile: grub.info,  Node: Simple configuration,  Next: Root Identifcation Heuristics,  Up: Configuration\n",
            "subsections": [
                {
                    "name": "6.1 Simple configuration handling",
                    "content": "The program 'grub-mkconfig' (*note Invoking grub-mkconfig::) generates\n'grub.cfg' files suitable for most cases.  It is suitable for use when\nupgrading a distribution, and will discover available kernels and\nattempt to generate menu entries for them.\n\n'grub-mkconfig' does have some limitations.  While adding extra\ncustom menu entries to the end of the list can be done by editing\n'/etc/grub.d/40custom' or creating '/boot/grub/custom.cfg', changing\nthe order of menu entries or changing their titles may require making\ncomplex changes to shell scripts stored in '/etc/grub.d/'.  This may be\nimproved in the future.  In the meantime, those who feel that it would\nbe easier to write 'grub.cfg' directly are encouraged to do so (*note\nBooting::, and *note Shell-like scripting::), and to disable any system\nprovided by their distribution to automatically run 'grub-mkconfig'.\n\nThe file '/etc/default/grub' controls the operation of\n'grub-mkconfig'.  It is sourced by a shell script, and so must be valid\nPOSIX shell input; normally, it will just be a sequence of 'KEY=value'\nlines, but if the value contains spaces or other special characters then\nit must be quoted.  For example:\n\nGRUBTERMINALINPUT=\"console serial\"\n\nValid keys in '/etc/default/grub' are as follows:\n\n'GRUBDEFAULT'\nThe default menu entry.  This may be a number, in which case it\nidentifies the Nth entry in the generated menu counted from zero,\nor the title of a menu entry, or the special string 'saved'.  Using\nthe id may be useful if you want to set a menu entry as the default\neven though there may be a variable number of entries before it.\n\nFor example, if you have:\n\nmenuentry 'Example GNU/Linux distribution' --class gnu-linux --id example-gnu-linux {\n...\n}\n\nthen you can make this the default using:\n\nGRUBDEFAULT=example-gnu-linux\n\nPreviously it was documented the way to use entry title.  While\nthis still works it's not recommended since titles often contain\nunstable device names and may be translated\n\nIf you set this to 'saved', then the default menu entry will be\nthat saved by 'GRUBSAVEDEFAULT' or 'grub-set-default'.  This\nrelies on the environment block, which may not be available in all\nsituations (*note Environment block::).\n\nThe default is '0'.\n\n'GRUBSAVEDEFAULT'\nIf this option is set to 'true', then, when an entry is selected,\nsave it as a new default entry for use by future runs of GRUB. This\nis only useful if 'GRUBDEFAULT=saved'; it is a separate option\nbecause 'GRUBDEFAULT=saved' is useful without this option, in\nconjunction with 'grub-set-default'.  Unset by default.  This\noption relies on the environment block, which may not be available\nin all situations (*note Environment block::).\n\n'GRUBTIMEOUT'\nBoot the default entry this many seconds after the menu is\ndisplayed, unless a key is pressed.  The default is '5'.  Set to\n'0' to boot immediately without displaying the menu, or to '-1' to\nwait indefinitely.\n\nIf 'GRUBTIMEOUTSTYLE' is set to 'countdown' or 'hidden', the\ntimeout is instead counted before the menu is displayed.\n\n'GRUBTIMEOUTSTYLE'\nIf this option is unset or set to 'menu', then GRUB will display\nthe menu and then wait for the timeout set by 'GRUBTIMEOUT' to\nexpire before booting the default entry.  Pressing a key interrupts\nthe timeout.\n\nIf this option is set to 'countdown' or 'hidden', then, before\ndisplaying the menu, GRUB will wait for the timeout set by\n'GRUBTIMEOUT' to expire.  If <ESC> or <F4> are pressed, or <SHIFT>\nis held down during that time, it will display the menu and wait\nfor input.  If a hotkey associated with a menu entry is pressed, it\nwill boot the associated menu entry immediately.  If the timeout\nexpires before either of these happens, it will boot the default\nentry.  In the 'countdown' case, it will show a one-line indication\nof the remaining time.\n\n'GRUBDEFAULTBUTTON'\n'GRUBTIMEOUTBUTTON'\n'GRUBTIMEOUTSTYLEBUTTON'\n'GRUBBUTTONCMOSADDRESS'\nVariants of the corresponding variables without the 'BUTTON'\nsuffix, used to support vendor-specific power buttons.  *Note\nVendor power-on keys::.\n\n'GRUBDISTRIBUTOR'\nSet by distributors of GRUB to their identifying name.  This is\nused to generate more informative menu entry titles.\n\n'GRUBTERMINALINPUT'\nSelect the terminal input device.  You may select multiple devices\nhere, separated by spaces.\n\nValid terminal input names depend on the platform, but may include\n'console' (native platform console), 'serial' (serial terminal),\n'serial<port>' (serial terminal with explicit port selection),\n'atkeyboard' (PC AT keyboard), or 'usbkeyboard' (USB keyboard\nusing the HID Boot Protocol, for cases where the firmware does not\nhandle this).\n\nThe default is to use the platform's native terminal input.\n\n'GRUBTERMINALOUTPUT'\nSelect the terminal output device.  You may select multiple devices\nhere, separated by spaces.\n\nValid terminal output names depend on the platform, but may include\n'console' (native platform console), 'serial' (serial terminal),\n'serial<port>' (serial terminal with explicit port selection),\n'gfxterm' (graphics-mode output), 'vgatext' (VGA text output),\n'mdatext' (MDA text output), 'morse' (Morse-coding using system\nbeeper) or 'spkmodem' (simple data protocol using system speaker).\n\n'spkmodem' is useful when no serial port is available.  Connect the\noutput of sending system (where GRUB is running) to line-in of\nreceiving system (usually developer machine).  On receiving system\ncompile 'spkmodem-recv' from 'util/spkmodem-recv.c' and run:\n\nparecord --channels=1 --rate=48000 --format=s16le | ./spkmodem-recv\n\nThe default is to use the platform's native terminal output.\n\n'GRUBTERMINAL'\nIf this option is set, it overrides both 'GRUBTERMINALINPUT' and\n'GRUBTERMINALOUTPUT' to the same value.\n\n'GRUBSERIALCOMMAND'\nA command to configure the serial port when using the serial\nconsole.  *Note serial::.  Defaults to 'serial'.\n\n'GRUBCMDLINELINUX'\nCommand-line arguments to add to menu entries for the Linux kernel.\n\n'GRUBCMDLINELINUXDEFAULT'\nUnless 'GRUBDISABLERECOVERY' is set to 'true', two menu entries\nwill be generated for each Linux kernel: one default entry and one\nentry for recovery mode.  This option lists command-line arguments\nto add only to the default menu entry, after those listed in\n'GRUBCMDLINELINUX'.\n\n'GRUBCMDLINENETBSD'\n'GRUBCMDLINENETBSDDEFAULT'\nAs 'GRUBCMDLINELINUX' and 'GRUBCMDLINELINUXDEFAULT', but for\nNetBSD.\n\n'GRUBCMDLINEGNUMACH'\nAs 'GRUBCMDLINELINUX', but for GNU Mach.\n\n'GRUBCMDLINEXEN'\n'GRUBCMDLINEXENDEFAULT'\nThe values of these options are passed to Xen hypervisor Xen menu\nentries, for all respectively normal entries.\n\n'GRUBCMDLINELINUXXENREPLACE'\n'GRUBCMDLINELINUXXENREPLACEDEFAULT'\nThe values of these options replace the values of\n'GRUBCMDLINELINUX' and 'GRUBCMDLINELINUXDEFAULT' for Linux and\nXen menu entries.\n\n'GRUBEARLYINITRDLINUXCUSTOM'\n'GRUBEARLYINITRDLINUXSTOCK'\nList of space-separated early initrd images to be loaded from\n'/boot'.  This is for loading things like CPU microcode, firmware,\nACPI tables, crypto keys, and so on.  These early images will be\nloaded in the order declared, and all will be loaded before the\nactual functional initrd image.\n\n'GRUBEARLYINITRDLINUXSTOCK' is for your distribution to declare\nimages that are provided by the distribution.  It should not be\nmodified without understanding the consequences.  They will be\nloaded first.\n\n'GRUBEARLYINITRDLINUXCUSTOM' is for your custom created images.\n\nThe default stock images are as follows, though they may be\noverridden by your distribution:\nintel-uc.img intel-ucode.img amd-uc.img amd-ucode.img earlyucode.cpio microcode.cpio\n\n'GRUBDISABLELINUXUUID'\nNormally, 'grub-mkconfig' will generate menu entries that use\nuniversally-unique identifiers (UUIDs) to identify the root\nfilesystem to the Linux kernel, using a 'root=UUID=...' kernel\nparameter.  This is usually more reliable, but in some cases it may\nnot be appropriate.  To disable the use of UUIDs, set this option\nto 'true'.\n\n'GRUBDISABLELINUXPARTUUID'\nIf 'grub-mkconfig' cannot identify the root filesystem via its\nuniversally-unique indentifier (UUID), 'grub-mkconfig' can use the\nUUID of the partition containing the filesystem to identify the\nroot filesystem to the Linux kernel via a 'root=PARTUUID=...'\nkernel parameter.  This is not as reliable as using the filesystem\nUUID, but is more reliable than using the Linux device names.  When\n'GRUBDISABLELINUXPARTUUID' is set to 'false', the Linux kernel\nversion must be 2.6.37 (3.10 for systems using the MSDOS partition\nscheme) or newer.  This option defaults to 'true'.  To enable the\nuse of partition UUIDs, set this option to 'false'.\n\n'GRUBDISABLERECOVERY'\nIf this option is set to 'true', disable the generation of recovery\nmode menu entries.\n\n'GRUBDISABLEUUID'\nNormally, 'grub-mkconfig' will generate menu entries that use\nuniversally-unique identifiers (UUIDs) to identify various\nfilesystems to search for files.  This is usually more reliable,\nbut in some cases it may not be appropriate.  To disable this use\nof UUIDs, set this option to 'true'.  Setting this option to\n'true', will also set the options 'GRUBDISABLELINUXUUID' and\n'GRUBDISABLELINUXPARTUUID' to 'true', unless they have been\nexplicilty set to 'false'.\n\n'GRUBVIDEOBACKEND'\nIf graphical video support is required, either because the\n'gfxterm' graphical terminal is in use or because\n'GRUBGFXPAYLOADLINUX' is set, then 'grub-mkconfig' will normally\nload all available GRUB video drivers and use the one most\nappropriate for your hardware.  If you need to override this for\nsome reason, then you can set this option.\n\nAfter 'grub-install' has been run, the available video drivers are\nlisted in '/boot/grub/video.lst'.\n\n'GRUBGFXMODE'\nSet the resolution used on the 'gfxterm' graphical terminal.  Note\nthat you can only use modes which your graphics card supports via\nVESA BIOS Extensions (VBE), so for example native LCD panel\nresolutions may not be available.  The default is 'auto', which\ntries to select a preferred resolution.  *Note gfxmode::.\n\n'GRUBBACKGROUND'\nSet a background image for use with the 'gfxterm' graphical\nterminal.  The value of this option must be a file readable by GRUB\nat boot time, and it must end with '.png', '.tga', '.jpg', or\n'.jpeg'.  The image will be scaled if necessary to fit the screen.\n\n'GRUBTHEME'\nSet a theme for use with the 'gfxterm' graphical terminal.\n\n'GRUBGFXPAYLOADLINUX'\nSet to 'text' to force the Linux kernel to boot in normal text\nmode, 'keep' to preserve the graphics mode set using\n'GRUBGFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular\ngraphics mode, or a sequence of these separated by commas or\nsemicolons to try several modes in sequence.  *Note gfxpayload::.\n\nDepending on your kernel, your distribution, your graphics card,\nand the phase of the moon, note that using this option may cause\nGNU/Linux to suffer from various display problems, particularly\nduring the early part of the boot sequence.  If you have problems,\nset this option to 'text' and GRUB will tell Linux to boot in\nnormal text mode.\n\n'GRUBDISABLEOSPROBER'\nThe 'grub-mkconfig' has a feature to use the external 'os-prober'\nprogram to discover other operating systems installed on the same\nmachine and generate appropriate menu entries for them.  It is\ndisabled by default since automatic and silent execution of\n'os-prober', and creating boot entries based on that data, is a\npotential attack vector.  Set this option to 'false' to enable this\nfeature in the 'grub-mkconfig' command.\n\n'GRUBOSPROBERSKIPLIST'\nList of space-separated FS UUIDs of filesystems to be ignored from\nos-prober output.  For efi chainloaders it's <UUID>@<EFI FILE>\n\n'GRUBDISABLESUBMENU'\nNormally, 'grub-mkconfig' will generate top level menu entry for\nthe kernel with highest version number and put all other found\nkernels or alternative menu entries for recovery mode in submenu.\nFor entries returned by 'os-prober' first entry will be put on top\nlevel and all others in submenu.  If this option is set to 'true',\nflat menu with all entries on top level will be generated instead.\nChanging this option will require changing existing values of\n'GRUBDEFAULT', 'fallback' (*note fallback::) and 'default' (*note\ndefault::) environment variables as well as saved default entry\nusing 'grub-set-default' and value used with 'grub-reboot'.\n\n'GRUBENABLECRYPTODISK'\nIf set to 'y', 'grub-mkconfig' and 'grub-install' will check for\nencrypted disks and generate additional commands needed to access\nthem during boot.  Note that in this case unattended boot is not\npossible because GRUB will wait for passphrase to unlock encrypted\ncontainer.\n\n'GRUBINITTUNE'\nPlay a tune on the speaker when GRUB starts.  This is particularly\nuseful for users unable to see the screen.  The value of this\noption is passed directly to *note play::.\n\n'GRUBBADRAM'\nIf this option is set, GRUB will issue a *note badram:: command to\nfilter out specified regions of RAM.\n\n'GRUBPRELOADMODULES'\nThis option may be set to a list of GRUB module names separated by\nspaces.  Each module will be loaded as early as possible, at the\nstart of 'grub.cfg'.\n\n'GRUBRECORDFAILTIMEOUT'\nIf this option is set, it overrides the default recordfail setting.\nA setting of -1 causes GRUB to wait for user input indefinitely.\nHowever, a false positive in the recordfail mechanism may occur if\npower is lost during boot before boot success is recorded in\nuserspace.  The default setting is 30, which causes GRUB to wait\nfor user input for thirty seconds before continuing.  This default\nallows interactive users the opportunity to switch to a different,\nworking kernel, while avoiding a false positive causing the boot to\nblock indefinitely on headless and appliance systems where access\nto a console is restricted or limited.\n\nThis option is only effective when GRUB was configured with the\n'--enable-quick-boot' option.\n\n'GRUBRECOVERYTITLE'\nThis option sets the English text of the string that will be\ndisplayed in parentheses to indicate that a boot option is provided\nto help users recover a broken system.  The default is \"recovery\nmode\".\n\n'GRUBFORCEPARTUUID'\nThis option forces the root disk entry to be the specified PARTUUID\ninstead of whatever would be used instead.  This is useful when you\ncontrol the partitioning of the disk but cannot guarantee what the\nactual hardware will be, for example in virtual machine images.\nSetting this option to '12345678-01' will produce:\nroot=PARTUUID=12345678-01\n\n'GRUBDISABLEINITRD'\nThen set to 'true', this option prevents an initrd to be used at\nboot time, regardless of whether one is detected or not.\n'grub-mkconfig' will therefore not generate any initrd lines.\n\nThe following options are still accepted for compatibility with\nexisting configurations, but have better replacements:\n\n'GRUBHIDDENTIMEOUT'\nWait this many seconds before displaying the menu.  If <ESC> or\n<F4> are pressed, or <SHIFT> is held down during that time, display\nthe menu and wait for input according to 'GRUBTIMEOUT'.  If a\nhotkey associated with a menu entry is pressed, boot the associated\nmenu entry immediately.  If the timeout expires before either of\nthese happens, display the menu for the number of seconds specified\nin 'GRUBTIMEOUT' before booting the default entry.\n\nIf you set 'GRUBHIDDENTIMEOUT', you should also set\n'GRUBTIMEOUT=0' so that the menu is not displayed at all unless\n<ESC> or <F4> are pressed, or <SHIFT> is held down.\n\nThis option is unset by default, and is deprecated in favour of the\nless confusing 'GRUBTIMEOUTSTYLE=countdown' or\n'GRUBTIMEOUTSTYLE=hidden'.\n\n'GRUBHIDDENTIMEOUTQUIET'\nIn conjunction with 'GRUBHIDDENTIMEOUT', set this to 'true' to\nsuppress the verbose countdown while waiting for a key to be\npressed before displaying the menu.\n\nThis option is unset by default, and is deprecated in favour of the\nless confusing 'GRUBTIMEOUTSTYLE=countdown'.\n\n'GRUBHIDDENTIMEOUTBUTTON'\nVariant of 'GRUBHIDDENTIMEOUT', used to support vendor-specific\npower buttons.  *Note Vendor power-on keys::.\n\nThis option is unset by default, and is deprecated in favour of the\nless confusing 'GRUBTIMEOUTSTYLE=countdown' or\n'GRUBTIMEOUTSTYLE=hidden'.\n\nFor more detailed customisation of 'grub-mkconfig''s output, you may\nedit the scripts in '/etc/grub.d' directly.  '/etc/grub.d/40custom' is\nparticularly useful for adding entire custom menu entries; simply type\nthe menu entries you want to add at the end of that file, making sure to\nleave at least the first two lines intact.\n\nFile: grub.info,  Node: Root Identifcation Heuristics,  Next: Shell-like scripting,  Prev: Simple configuration,  Up: Configuration\n"
                },
                {
                    "name": "6.2 Root Identifcation Heuristics",
                    "content": "If the target operating system uses the Linux kernel, 'grub-mkconfig'\nattempts to identify the root file system via a heuristic algoirthm.\nThis algorithm selects the identification method of the root file system\nby considering three factors.  The first is if an initrd for the target\noperating system is also present.  The second is\n'GRUBDISABLELINUXUUID' and if set to 'true', prevents 'grub-mkconfig'\nfrom identifying the root file system by its UUID. The third is\n'GRUBDISABLELINUXPARTUUID' and if set to 'true', prevents\n'grub-mkconfig' from identifying the root file system via the UUID of\nits enclosing partition.  If the variables are assigned any other value,\nthat value is considered equivalent to 'false'.  The variables are also\nconsidered to be set to 'false' if they are not set.\n\nWhen booting, the Linux kernel will delegate the task of mounting the\nroot filesystem to the initrd.  Most initrd images determine the root\nfile system by checking the Linux kernel's command-line for the 'root'\nkey and use its value as the identification method of the root file\nsystem.  To improve the reliability of booting, most initrd images also\nallow the root file system to be identified by its UUID. Because of this\nbehavior, the 'grub-mkconfig' command will set 'root' to 'root=UUID=...'\nto provide the initrd with the filesystem UUID of the root file system.\n\nIf no initrd is detected or 'GRUBDISABLELINUXUUID' is set to\n'true' then 'grub-command' will identify the root filesystem by setting\nthe kernel command-line variable 'root' to 'root=PARTUUID=...' unless\n'GRUBDISABLELINUXPARTUUID' is also set to 'true'.  If\n'GRUBDISABLELINUXPARTUUID' is also set to 'true', 'grub-command' will\nidentify by its Linux device name.\n\nThe following table summarizes the behavior of the 'grub-mkconfig'\ncommand.\n\nInitrd     GRUBDISABLELINUXPARTUUID   GRUBDISABLELINUXUUID   Linux Root\nfalse      false                         false                     part UUID\nfalse      false                         true                      part UUID\nfalse      true                          false                     dev name\nfalse      true                          true                      dev name\ntrue       false                         false                     fs UUID\ntrue       false                         true                      part UUID\ntrue       true                          false                     fs UUID\ntrue       true                          true                      dev name\n\nRemember, 'GRUBDISABLELINUXPARTUUID' and 'GRUBDISABLELINUXUUID'\nare also considered to be set to 'false' when they are unset.\n\nFile: grub.info,  Node: Shell-like scripting,  Next: Multi-boot manual config,  Prev: Root Identifcation Heuristics,  Up: Configuration\n"
                },
                {
                    "name": "6.3 Writing full configuration files directly",
                    "content": "'grub.cfg' is written in GRUB's built-in scripting language, which has a\nsyntax quite similar to that of GNU Bash and other Bourne shell\nderivatives.\n"
                },
                {
                    "name": "Words",
                    "content": "A \"word\" is a sequence of characters considered as a single unit by\nGRUB. Words are separated by \"metacharacters\", which are the following\nplus space, tab, and newline:\n\n{ } | & $ ; < >\n\nQuoting may be used to include metacharacters in words; see below.\n"
                },
                {
                    "name": "Reserved words",
                    "content": "Reserved words have a special meaning to GRUB. The following words are\nrecognised as reserved when unquoted and either the first word of a\nsimple command or the third word of a 'for' command:\n\n! [[ ]] { }\ncase do done elif else esac fi for function\nif in menuentry select then time until while\n\nNot all of these reserved words have a useful purpose yet; some are\nreserved for future expansion.\n"
                },
                {
                    "name": "Quoting",
                    "content": "Quoting is used to remove the special meaning of certain characters or\nwords.  It can be used to treat metacharacters as part of a word, to\nprevent reserved words from being recognised as such, and to prevent\nvariable expansion.\n\nThere are three quoting mechanisms: the escape character, single\nquotes, and double quotes.\n\nA non-quoted backslash (\\) is the \"escape character\".  It preserves\nthe literal value of the next character that follows, with the exception\nof newline.\n\nEnclosing characters in single quotes preserves the literal value of\neach character within the quotes.  A single quote may not occur between\nsingle quotes, even when preceded by a backslash.\n\nEnclosing characters in double quotes preserves the literal value of\nall characters within the quotes, with the exception of '$' and '\\'.\nThe '$' character retains its special meaning within double quotes.  The\nbackslash retains its special meaning only when followed by one of the\nfollowing characters: '$', '\"', '\\', or newline.  A backslash-newline\npair is treated as a line continuation (that is, it is removed from the\ninput stream and effectively ignored(1) (*note Shell-like\nscripting-Footnote-1::)).  A double quote may be quoted within double\nquotes by preceding it with a backslash.\n"
                },
                {
                    "name": "Variable expansion",
                    "content": "The '$' character introduces variable expansion.  The variable name to\nbe expanded may be enclosed in braces, which are optional but serve to\nprotect the variable to be expanded from characters immediately\nfollowing it which could be interpreted as part of the name.\n\nNormal variable names begin with an alphabetic character, followed by\nzero or more alphanumeric characters.  These names refer to entries in\nthe GRUB environment (*note Environment::).\n\nPositional variable names consist of one or more digits.  They\nrepresent parameters passed to function calls, with '$1' representing\nthe first parameter, and so on.\n\nThe special variable name '?' expands to the exit status of the most\nrecently executed command.  When positional variable names are active,\nother special variable names '@', '*' and '#' are defined and they\nexpand to all positional parameters with necessary quoting, positional\nparameters without any quoting, and positional parameter count\nrespectively.\n"
                },
                {
                    "name": "Comments",
                    "content": "A word beginning with '#' causes that word and all remaining characters\non that line to be ignored.\n"
                },
                {
                    "name": "Simple commands",
                    "content": "A \"simple command\" is a sequence of words separated by spaces or tabs\nand terminated by a semicolon or a newline.  The first word specifies\nthe command to be executed.  The remaining words are passed as arguments\nto the invoked command.\n\nThe return value of a simple command is its exit status.  If the\nreserved word '!' precedes the command, then the return value is instead\nthe logical negation of the command's exit status.\n"
                },
                {
                    "name": "Compound commands",
                    "content": "A \"compound command\" is one of the following:\n\nfor NAME in WORD ...; do LIST; done\nThe list of words following 'in' is expanded, generating a list of\nitems.  The variable NAME is set to each element of this list in\nturn, and LIST is executed each time.  The return value is the exit\nstatus of the last command that executes.  If the expansion of the\nitems following 'in' results in an empty list, no commands are\nexecuted, and the return status is 0.\n\nif LIST; then LIST; [elif LIST; then LIST;] ... [else LIST;] fi\nThe 'if' LIST is executed.  If its exit status is zero, the 'then'\nLIST is executed.  Otherwise, each 'elif' LIST is executed in turn,\nand if its exit status is zero, the corresponding 'then' LIST is\nexecuted and the command completes.  Otherwise, the 'else' LIST is\nexecuted, if present.  The exit status is the exit status of the\nlast command executed, or zero if no condition tested true.\n\nwhile COND; do LIST; done\nuntil COND; do LIST; done\nThe 'while' command continuously executes the 'do' LIST as long as\nthe last command in COND returns an exit status of zero.  The\n'until' command is identical to the 'while' command, except that\nthe test is negated; the 'do' LIST is executed as long as the last\ncommand in COND returns a non-zero exit status.  The exit status of\nthe 'while' and 'until' commands is the exit status of the last\n'do' LIST command executed, or zero if none was executed.\n\nfunction NAME { COMMAND; ... }\nThis defines a function named NAME.  The \"body\" of the function is\nthe list of commands within braces, each of which must be\nterminated with a semicolon or a newline.  This list of commands\nwill be executed whenever NAME is specified as the name of a simple\ncommand.  Function definitions do not affect the exit status in\n'$?'.  When executed, the exit status of a function is the exit\nstatus of the last command executed in the body.\n\nmenuentry TITLE ['--class=class' ...] ['--users=users'] ['--unrestricted'] ['--hotkey=key'] ['--id=id'] { COMMAND; ... }\n*Note menuentry::.\n"
                },
                {
                    "name": "Built-in Commands",
                    "content": "Some built-in commands are also provided by GRUB script to help script\nwriters perform actions that are otherwise not possible.  For example,\nthese include commands to jump out of a loop without fully completing\nit, etc.\n\nbreak ['n']\nExit from within a 'for', 'while', or 'until' loop.  If 'n' is\nspecified, break 'n' levels.  'n' must be greater than or equal to\n1.  If 'n' is greater than the number of enclosing loops, all\nenclosing loops are exited.  The return value is 0 unless 'n' is\nnot greater than or equal to 1.\n\ncontinue ['n']\nResume the next iteration of the enclosing 'for', 'while' or\n'until' loop.  If 'n' is specified, resume at the 'n'th enclosing\nloop.  'n' must be greater than or equal to 1.  If 'n' is greater\nthan the number of enclosing loops, the last enclosing loop (the\n\"top-level\" loop) is resumed.  The return value is 0 unless 'n' is\nnot greater than or equal to 1.\n\nreturn ['n']\nCauses a function to exit with the return value specified by 'n'.\nIf 'n' is omitted, the return status is that of the last command\nexecuted in the function body.  If used outside a function the\nreturn status is false.\n\nsetparams ['arg'] ...\nReplace positional parameters starting with '$1' with arguments to\n'setparams'.\n\nshift ['n']\nThe positional parameters from 'n'+1 ... are renamed to '$1'....\nParameters represented by the numbers '$#' down to '$#'-'n'+1 are\nunset.  'n' must be a non-negative number less than or equal to\n'$#'.  If 'n' is 0, no parameters are changed.  If 'n' is not\ngiven, it is assumed to be 1.  If 'n' is greater than '$#', the\npositional parameters are not changed.  The return status is\ngreater than zero if 'n' is greater than '$#' or less than zero;\notherwise 0.\n\nFile: grub.info,  Node: Multi-boot manual config,  Next: Embedded configuration,  Prev: Shell-like scripting,  Up: Configuration\n"
                },
                {
                    "name": "6.4 Multi-boot manual config",
                    "content": "Currently autogenerating config files for multi-boot environments\ndepends on os-prober and has several shortcomings.  Due to that it is\ndisabled by default.  It is advised to use the power of GRUB syntax and\ndo it yourself.  A possible configuration is detailed here, feel free to\nadjust to your needs.\n\nFirst create a separate GRUB partition, big enough to hold GRUB. Some\nof the following entries show how to load OS installer images from this\nsame partition, for that you obviously need to make the partition large\nenough to hold those images as well.  Mount this partition on/mnt/boot\nand disable GRUB in all OSes and manually install self-compiled latest\nGRUB with:\n\n'grub-install --boot-directory=/mnt/boot /dev/sda'\n\nIn all the OSes install GRUB tools but disable installing GRUB in\nbootsector, so you'll have menu.lst and grub.cfg available for use.\nAlso disable os-prober use by setting:\n\n'GRUBDISABLEOSPROBER=true'\n\nin /etc/default/grub\n\nThen write a grub.cfg (/mnt/boot/grub/grub.cfg):\n\n\nmenuentry \"OS using grub2\" {\ninsmod xfs\nsearch --set=root --label OS1 --hint hd0,msdos8\nconfigfile /boot/grub/grub.cfg\n}\n\nmenuentry \"OS using grub2-legacy\" {\ninsmod ext2\nsearch --set=root --label OS2 --hint hd0,msdos6\nlegacyconfigfile /boot/grub/menu.lst\n}\n\nmenuentry \"Windows XP\" {\ninsmod ntfs\nsearch --set=root --label WINDOWSXP --hint hd0,msdos1\nntldr /ntldr\n}\n\nmenuentry \"Windows 7\" {\ninsmod ntfs\nsearch --set=root --label WINDOWS7 --hint hd0,msdos2\nntldr /bootmgr\n}\n\nmenuentry \"FreeBSD\" {\ninsmod zfs\nsearch --set=root --label freepool --hint hd0,msdos7\nkfreebsd /freebsd@/boot/kernel/kernel\nkfreebsdmoduleelf /freebsd@/boot/kernel/opensolaris.ko\nkfreebsdmoduleelf /freebsd@/boot/kernel/zfs.ko\nkfreebsdmodule /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache\nset kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd\nset kFreeBSD.hw.psm.synapticssupport=1\n}\n\nmenuentry \"experimental GRUB\" {\nsearch --set=root --label GRUB --hint hd0,msdos5\nmultiboot /experimental/grub/i386-pc/core.img\n}\n\nmenuentry \"Fedora 16 installer\" {\nsearch --set=root --label GRUB --hint hd0,msdos5\nlinux /fedora/vmlinuz lang=enUS keymap=sg resolution=1280x800\ninitrd /fedora/initrd.img\n}\n\nmenuentry \"Fedora rawhide installer\" {\nsearch --set=root --label GRUB --hint hd0,msdos5\nlinux /fedora/vmlinuz repo=ftp://mirror.switch.ch/mirror/fedora/linux/development/rawhide/x8664 lang=enUS keymap=sg resolution=1280x800\ninitrd /fedora/initrd.img\n}\n\nmenuentry \"Debian sid installer\" {\nsearch --set=root --label GRUB --hint hd0,msdos5\nlinux /debian/dists/sid/main/installer-amd64/current/images/hd-media/vmlinuz\ninitrd /debian/dists/sid/main/installer-amd64/current/images/hd-media/initrd.gz\n}\n\n\nNotes:\n* Argument to search after -label is FS LABEL. You can also use UUIDs\nwith -fs-uuid UUID instead of -label LABEL. You could also use\ndirect 'root=hd0,msdosX' but this is not recommended due to device\nname instability.\n\nFile: grub.info,  Node: Embedded configuration,  Prev: Multi-boot manual config,  Up: Configuration\n"
                },
                {
                    "name": "6.5 Embedding a configuration file into GRUB",
                    "content": "GRUB supports embedding a configuration file directly into the core\nimage, so that it is loaded before entering normal mode.  This is\nuseful, for example, when it is not straightforward to find the real\nconfiguration file, or when you need to debug problems with loading that\nfile.  'grub-install' uses this feature when it is not using BIOS disk\nfunctions or when installing to a different disk from the one containing\n'/boot/grub', in which case it needs to use the 'search' command (*note\nsearch::) to find '/boot/grub'.\n\nTo embed a configuration file, use the '-c' option to 'grub-mkimage'.\nThe file is copied into the core image, so it may reside anywhere on the\nfile system, and may be removed after running 'grub-mkimage'.\n\nAfter the embedded configuration file (if any) is executed, GRUB will\nload the 'normal' module (*note normal::), which will then read the real\nconfiguration file from '$prefix/grub.cfg'.  By this point, the 'root'\nvariable will also have been set to the root device name.  For example,\n'prefix' might be set to '(hd0,1)/boot/grub', and 'root' might be set to\n'hd0,1'.  Thus, in most cases, the embedded configuration file only\nneeds to set the 'prefix' and 'root' variables, and then drop through to\nGRUB's normal processing.  A typical example of this might look like\nthis:\n\nsearch.fsuuid 01234567-89ab-cdef-0123-456789abcdef root\nset prefix=($root)/boot/grub\n\n(The 'searchfsuuid' module must be included in the core image for\nthis example to work.)\n\nIn more complex cases, it may be useful to read other configuration\nfiles directly from the embedded configuration file.  This allows such\nthings as reading files not called 'grub.cfg', or reading files from a\ndirectory other than that where GRUB's loadable modules are installed.\nTo do this, include the 'configfile' and 'normal' modules in the core\nimage, and embed a configuration file that uses the 'configfile' command\nto load another file.  The following example of this also requires the\n'echo', 'searchlabel', and 'test' modules to be included in the core\nimage:\n\nsearch.fslabel grub root\nif [ -e /boot/grub/example/test1.cfg ]; then\nset prefix=($root)/boot/grub\nconfigfile /boot/grub/example/test1.cfg\nelse\nif [ -e /boot/grub/example/test2.cfg ]; then\nset prefix=($root)/boot/grub\nconfigfile /boot/grub/example/test2.cfg\nelse\necho \"Could not find an example configuration file!\"\nfi\nfi\n\nThe embedded configuration file may not contain menu entries\ndirectly, but may only read them from elsewhere using 'configfile'.\n\nFile: grub.info,  Node: Theme file format,  Next: Network,  Prev: Configuration,  Up: Top\n"
                }
            ]
        },
        "7 Theme file format": {
            "content": "",
            "subsections": [
                {
                    "name": "7.1 Introduction",
                    "content": "The GRUB graphical menu supports themes that can customize the layout\nand appearance of the GRUB boot menu.  The theme is configured through a\nplain text file that specifies the layout of the various GUI components\n(including the boot menu, timeout progress bar, and text messages) as\nwell as the appearance using colors, fonts, and images.  Example is\navailable in docs/exampletheme.txt\n"
                },
                {
                    "name": "7.2 Theme Elements",
                    "content": "Colors can be specified in several ways:\n\n* HTML-style \"#RRGGBB\" or \"#RGB\" format, where *R*, *G*, and *B* are\nhexadecimal digits (e.g., \"#8899FF\")\n* as comma-separated decimal RGB values (e.g., \"128, 128, 255\")\n* with \"SVG 1.0 color names\" (e.g., \"cornflowerblue\") which must be\nspecified in lowercase.\n\n\nThe fonts GRUB uses \"PFF2 font format\" bitmap fonts.  Fonts are\nspecified with full font names.  Currently there is no provision for a\npreference list of fonts, or deriving one font from another.  Fonts are\nloaded with the \"loadfont\" command in GRUB (*note loadfont::).  To see\nthe list of loaded fonts, execute the \"lsfonts\" command (*note\nlsfonts::).  If there are too many fonts to fit on screen, do \"set\npager=1\" before executing \"lsfonts\".\n\n\nFigure 7.1\n\nFigure 7.2\n\nProgress bars are used to display the remaining time before GRUB boots\nthe default menu entry.  To create a progress bar that will display the\nremaining time before automatic boot, simply create a \"progressbar\"\ncomponent with the id \"timeout\".  This indicates to GRUB that the\nprogress bar should be updated as time passes, and it should be made\ninvisible if the countdown to automatic boot is interrupted by the user.\n\nProgress bars may optionally have text displayed on them.  This text\nis controlled by variable \"text\" which contains a printf template with\nthe only argument %d is the number of seconds remaining.  Additionally\nspecial values \"@TIMEOUTNOTIFICATIONSHORT@\",\n\"@TIMEOUTNOTIFICATIONMIDDLE@\", \"@TIMEOUTNOTIFICATIONLONG@\" are\nreplaced with standard and translated templates.\n\n\nThe circular progress indicator functions similarly to the progress bar.\nWhen given an id of \"timeout\", GRUB updates the circular progress\nindicator's value to indicate the time remaining.  For the circular\nprogress indicator, there are two images used to render it: the *center*\nimage, and the *tick* image.  The center image is rendered in the center\nof the component, while the tick image is used to render each mark along\nthe circumference of the indicator.\n\n\nText labels can be placed on the boot screen.  The font, color, and\nhorizontal alignment can be specified for labels.  If a label is given\nthe id \"timeout\", then the \"text\" property for that label is also\nupdated with a message informing the user of the number of seconds\nremaining until automatic boot.  This is useful in case you want the\ntext displayed somewhere else instead of directly on the progress bar.\n\n\nThe boot menu where GRUB displays the menu entries from the \"grub.cfg\"\nfile.  It is a list of items, where each item has a title and an\noptional icon.  The icon is selected based on the *classes* specified\nfor the menu entry.  If there is a PNG file named \"myclass.png\" in the\n\"grub/themes/icons\" directory, it will be displayed for items which have\nthe class *myclass*.  The boot menu can be customized in several ways,\nsuch as the font and color used for the menu entry title, and by\nspecifying styled boxes for the menu itself and for the selected item\nhighlight.\n\n\nOne of the most important features for customizing the layout is the use\nof *styled boxes*.  A styled box is composed of 9 rectangular (and\npotentially empty) regions, which are used to seamlessly draw the styled\nbox on screen:\n\nNorthwest (nw)         North (n)              Northeast (ne)\nWest (w)               Center (c)             East (e)\nSouthwest (sw)         South (s)              Southeast (se)\n\nTo support any size of box on screen, the center slice and the slices\nfor the top, bottom, and sides are all scaled to the correct size for\nthe component on screen, using the following rules:\n\n1. The edge slices (north, south, east, and west) are scaled in the\ndirection of the edge they are adjacent to.  For instance, the west\nslice is scaled vertically.\n2. The corner slices (northwest, northeast, southeast, and southwest)\nare not scaled.\n3. The center slice is scaled to fill the remaining space in the\nmiddle.\n\nAs an example of how an image might be sliced up, consider the styled\nbox used for a terminal view.\n\nFigure 7.3\n\n\nThe Inkscape scalable vector graphics editor is a very useful tool for\ncreating styled box images.  One process that works well for slicing a\ndrawing into the necessary image slices is:\n\n1. Create or open the drawing you'd like use.\n2. Create a new layer on the top of the layer stack.  Make it visible.\nSelect this layer as the current layer.\n3. Draw 9 rectangles on your drawing where you'd like the slices to\nbe.  Clear the fill option, and set the stroke to 1 pixel wide\nsolid stroke.  The corners of the slices must meet precisely; if it\nis off by a single pixel, it will probably be evident when the\nstyled box is rendered in the GRUB menu.  You should probably go to\nFile | Document Properties | Grids and enable a grid or create a\nguide (click on one of the rulers next to the drawing and drag over\nthe drawing; release the mouse button to place the guide) to help\nplace the rectangles precisely.\n4. Right click on the center slice rectangle and choose Object\nProperties.  Change the \"Id\" to \"slicec\" and click Set.  Repeat\nthis for the remaining 8 rectangles, giving them Id values of\n\"slicen\", \"slicene\", \"slicee\", and so on according to the\nlocation.\n5. Save the drawing.\n6. Select all the slice rectangles.  With the slice layer selected,\nyou can simply press Ctrl+A to select all rectangles.  The status\nbar should indicate that 9 rectangles are selected.\n7. Click the layer hide icon for the slice layer in the layer palette.\nThe rectangles will remain selected, even though they are hidden.\n8. Choose File | Export Bitmap and check the *Batch export 9 selected\nobjects* box.  Make sure that *Hide all except selected* is\nunchecked.  click *Export*.  This will create PNG files in the same\ndirectory as the drawing, named after the slices.  These can now be\nused for a styled box in a GRUB theme.\n"
                },
                {
                    "name": "7.3 Theme File Manual",
                    "content": "The theme file is a plain text file.  Lines that begin with \"#\" are\nignored and considered comments.  (Note: This may not be the case if the\nprevious line ended where a value was expected.)\n\nThe theme file contains two types of statements:\n1. Global properties.\n2. Component construction.\n\n\n\nGlobal properties are specified with the simple format:\n* name1: value1\n* name2: \"value which may contain spaces\"\n* name3: #88F\n\nIn this example, name3 is assigned a color value.\n\n\ntitle-text             Specifies the text to display at the top\ncenter of the screen as a title.\ntitle-font             Defines the font used for the title\nmessage at the top of the screen.\ntitle-color            Defines the color of the title message.\nmessage-font           Currently unused.  Left for backward\ncompatibility.\nmessage-color          Currently unused.  Left for backward\ncompatibility.\nmessage-bg-color       Currently unused.  Left for backward\ncompatibility.\ndesktop-image          Specifies the image to use as the\nbackground.  It will be scaled to fit the\nscreen size or proportionally scaled\ndepending on the scale method.\ndesktop-image-scale-methodSpecifies the scaling method for the\n*desktop-image*.  Options are \"stretch\",\n\"crop\", \"padding\", \"fitwidth\",\n\"fitheight\".  \"stretch\" for fitting the\nscreen size.  Otherwise it is\nproportional scaling of a part of\n*desktop-image* to the part of the\nscreen.  \"crop\" part of the\n*desktop-image* will be proportionally\nscaled to fit the screen sizes.\n\"padding\" the entire *desktop-image* will\nbe contained on the screen.  \"fitwidth\"\nfor fitting the *desktop-image*'s width\nwith screen width.  \"fitheight\" for\nfitting the *desktop-image*'s height with\nthe screen height.  Default is \"stretch\".\ndesktop-image-h-align  Specifies the horizontal alignment of the\n*desktop-image* if\n*desktop-image-scale-method* isn't equeal\nto \"stretch\".  Options are \"left\",\n\"center\", \"right\".  Default is \"center\".\ndesktop-image-v-align  Specifies the vertical alignment of the\n*desktop-image* if\n*desktop-image-scale-method* isn't equeal\nto \"stretch\".  Options are \"top\",\n\"center\", \"bottom\".  Default is \"center\".\ndesktop-color          Specifies the color for the background if\n*desktop-image* is not specified.\nterminal-box           Specifies the file name pattern for the\nstyled box slices used for the command\nline terminal window.  For example,\n\"terminal-box: terminal*.png\" will use\nthe images \"terminalc.png\" as the center\narea, \"terminaln.png\" as the north (top)\nedge, \"terminalnw.png\" as the northwest\n(upper left) corner, and so on.  If the\nimage for any slice is not found, it will\nsimply be left empty.\nterminal-border        Specifies the border width of the\nterminal window.\nterminal-left          Specifies the left coordinate of the\nterminal window.\nterminal-top           Specifies the top coordinate of the\nterminal window.\nterminal-width         Specifies the width of the terminal\nwindow.\nterminal-height        Specifies the height of the terminal\nwindow.\n\n\nGreater customizability comes is provided by components.  A tree of\ncomponents forms the user interface.  *Containers* are components that\ncan contain other components, and there is always a single root\ncomponent which is an instance of a *canvas* container.\n\nComponents are created in the theme file by prefixing the type of\ncomponent with a '+' sign:\n\n' + label { text=\"GRUB\" font=\"aqui 11\" color=\"#8FF\" } '\n\nproperties of a component are specified as \"name = value\" (whitespace\nsurrounding tokens is optional and is ignored) where *value* may be:\n* a single word (e.g., \"align = center\", \"color = #FF8080\"),\n* a quoted string (e.g., \"text = \"Hello, World!\"\"), or\n* a tuple (e.g., \"preferredsize = (120, 80)\").\n\n\nThe following is a list of the components and the properties they\nsupport.\n\n* label A label displays a line of text.\n\nProperties:\nid             Set to \"timeout\" to display the time elapsed\nto an automatical boot of the default entry.\ntext           The text to display.  If \"id\" is set to\n\"timeout\" and no \"text\" property is set then\nthe amount of seconds will be shown.  If set to\n\"@KEYMAPSHORT@\", \"@KEYMAPMIDDLE@\" or\n\"@KEYMAPLONG@\" then predefined hotkey\ninformation will be shown.\nfont           The font to use for text display.\ncolor          The color of the text.\nalign          The horizontal alignment of the text within the\ncomponent.  Options are \"left\", \"center\" and\n\"right\".\nvisible        Set to \"false\" to hide the label.\n\n* image A component that displays an image.  The image is scaled to\nfit the component.\n\nProperties:\n\nfile           The full path to the image file to load.\n\n* progressbar Displays a horizontally oriented progress bar.  It can\nbe rendered using simple solid filled rectangles, or using a pair\nof pixmap styled boxes.\n\nProperties:\n\nid             Set to \"timeout\" to display the time elapsed\nto an automatical boot of the default entry.\nfgcolor       The foreground color for plain solid color\nrendering.\nbgcolor       The background color for plain solid color\nrendering.\nbordercolor   The border color for plain solid color\nrendering.\ntextcolor     The text color.\nbarstyle      The styled box specification for the frame of\nthe progress bar.  Example:\n\"progressframe*.png\" If the value is equal to\n\"highlightstyle\" then no styled boxes will be\nshown.\nhighlightstyleThe styled box specification for the highlighted\nregion of the progress bar.  This box will be\nused to paint just the highlighted region of the\nbar, and will be increased in size as the bar\nnears completion.  Example: \"progresshl*.png\".\nIf the value is equal to \"barstyle\" then no\nstyled boxes will be shown.\nhighlightoverlayIf this option is set to \"true\" then the\nhighlight box side slices (every slice except\nthe center slice) will overlay the frame box\nside slices.  And the center slice of the\nhighlight box can move all the way (from top to\nbottom), being drawn on the center slice of the\nframe box.  That way we can make a progress bar\nwith round-shaped edges so there won't be a free\nspace from the highlight to the frame in top and\nbottom scrollbar positions.  Default is \"false\".\nfont           The font to use for progress bar.\ntext           The text to display on the progress bar.  If the\nprogress bar's ID is set to \"timeout\" and\nthe value of this property is set to\n\"@TIMEOUTNOTIFICATIONSHORT@\",\n\"@TIMEOUTNOTIFICATIONMIDDLE@\" or\n\"@TIMEOUTNOTIFICATIONLONG@\", then GRUB will\nupdate this property with an informative message\nas the timeout approaches.\n\n* circularprogress Displays a circular progress indicator.  The\nappearance of this component is determined by two images: the\n*center* image and the *tick* image.  The center image is generally\nlarger and will be drawn in the center of the component.  Around\nthe circumference of a circle within the component, the tick image\nwill be drawn a certain number of times, depending on the\nproperties of the component.\n\nProperties:\n\nid                     Set to \"timeout\" to display the time\nelapsed to an automatical boot of the\ndefault entry.\ncenterbitmap          The file name of the image to draw in the\ncenter of the component.\ntickbitmap            The file name of the image to draw for\nthe tick marks.\nnumticks              The number of ticks that make up a full\ncircle.\nticksdisappear        Boolean value indicating whether tick\nmarks should progressively appear, or\nprogressively disappear as *value*\napproaches *end*.  Specify \"true\" or\n\"false\".  Default is \"false\".\nstartangle            The position of the first tick mark to\nappear or disappear.  Measured in\n\"parrots\", 1 \"parrot\" = 1 / 256 of the\nfull circle.  Use values \"xxx deg\" or\n\"xxx \\xc2\\xb0\" to set the angle in\ndegrees.\n\n* bootmenu Displays the GRUB boot menu.  It allows selecting items\nand executing them.\n\nProperties:\n\nitemfont                     The font to use for the menu item\ntitles.\nselecteditemfont            The font to use for the selected\nmenu item, or \"inherit\" (the\ndefault) to use \"itemfont\" for\nthe selected menu item as well.\nitemcolor                    The color to use for the menu item\ntitles.\nselecteditemcolor           The color to use for the selected\nmenu item, or \"inherit\" (the\ndefault) to use \"itemcolor\" for\nthe selected menu item as well.\niconwidth                    The width of menu item icons.\nIcons are scaled to the specified\nsize.\niconheight                   The height of menu item icons.\nitemheight                   The height of each menu item in\npixels.\nitempadding                  The amount of space in pixels to\nleave on each side of the menu\nitem contents.\nitemiconspace               The space between an item's icon\nand the title text, in pixels.\nitemspacing                  The amount of space to leave\nbetween menu items, in pixels.\nmenupixmapstyle             The image file pattern for the\nmenu frame styled box.  Example:\n\"menu*.png\" (this will use images\nsuch as \"menuc.png\",\n\"menuw.png\", 'menunw.png\", etc.)\nitempixmapstyle             The image file pattern for the\nitem styled box.\nselecteditempixmapstyle    The image file pattern for the\nselected item highlight styled\nbox.\nscrollbar                     Boolean value indicating whether\nthe scroll bar should be drawn if\nthe frame and thumb styled boxes\nare configured.\nscrollbarframe               The image file pattern for the\nentire scroll bar.  Example:\n\"scrollbar*.png\"\nscrollbarthumb               The image file pattern for the\nscroll bar thumb (the part of the\nscroll bar that moves as scrolling\noccurs).  Example:\n\"scrollbarthumb*.png\"\nscrollbarthumboverlay       If this option is set to \"true\"\nthen the scrollbar thumb side\nslices (every slice except the\ncenter slice) will overlay the\nscrollbar frame side slices.  And\nthe center slice of the\nscrollbarthumb can move all the\nway (from top to bottom), being\ndrawn on the center slice of the\nscrollbar frame.  That way we can\nmake a scrollbar with round-shaped\nedges so there won't be a free\nspace from the thumb to the frame\nin top and bottom scrollbar\npositions.  Default is \"false\".\nscrollbarslice               The menu frame styled box's slice\nin which the scrollbar will be\ndrawn.  Possible values are\n\"west\", \"center\", \"east\"\n(default).  \"west\" - the scrollbar\nwill be drawn in the west slice\n(right-aligned).  \"east\" - the\nscrollbar will be drawn in the\neast slice (left-aligned).\n\"center\" - the scrollbar will be\ndrawn in the center slice.  Note:\nin case of \"center\" slice: a) If\nthe scrollbar should be drawn then\nboot menu entry's width is\ndecreased by the scrollbar's width\nand the scrollbar is drawn at the\nright side of the center slice.\nb) If the scrollbar won't be drawn\nthen the boot menu entry's width\nis the width of the center slice.\nc) We don't necessary need the\nmenu pixmap box to display the\nscrollbar.\nscrollbarleftpad            The left scrollbar padding in\npixels.  Unused if\n\"scrollbarslice\" is \"west\".\nscrollbarrightpad           The right scrollbar padding in\npixels.  Unused if\n\"scrollbarslice\" is \"east\".\nscrollbartoppad             The top scrollbar padding in\npixels.\nscrollbarbottompad          The bottom scrollbar padding in\npixels.\nvisible                       Set to \"false\" to hide the boot\nmenu.\n\n* canvas Canvas is a container that allows manual placement of\ncomponents within it.  It does not alter the positions of its child\ncomponents.  It assigns all child components their preferred sizes.\n\n* hbox The *hbox* container lays out its children from left to right,\ngiving each one its preferred width.  The height of each child is\nset to the maximum of the preferred heights of all children.\n\n* vbox The *vbox* container lays out its children from top to bottom,\ngiving each one its preferred height.  The width of each child is\nset to the maximum of the preferred widths of all children.\n\n\nThe following properties are supported by all components:\n'left'\nThe distance from the left border of container to left border of\nthe object in either of three formats:\nx              Value in pixels\np%             Percentage\np%+x           mixture of both\n'top'\nThe distance from the left border of container to left border of\nthe object in same format.\n'width'\nThe width of object in same format.\n'height'\nThe height of object in same format.\n'id'\nThe identifier for the component.  This can be any arbitrary\nstring.  The ID can be used by scripts to refer to various\ncomponents in the GUI component tree.  Currently, there is one\nspecial ID value that GRUB recognizes:\n\n\"timeout\"  Component with this ID will be updated by GRUB\nand will indicate time elapsed to an automatical\nboot of the default entry.  Affected components:\n\"label\", \"circularprogress\", \"progressbar\".\n\nFile: grub.info,  Node: Network,  Next: Serial terminal,  Prev: Theme file format,  Up: Top\n"
                }
            ]
        },
        "8 Booting GRUB from the network": {
            "content": "The following instructions don't work for *-emu, i386-qemu,\ni386-coreboot, i386-multiboot, mipsloongson, mips-arc and\nmipsqemumips\n\nTo generate a netbootable directory, run:\n\ngrub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/<platform>\n\nE.g.  for i386-pc:\n\ngrub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i386-pc\n\nThen follow instructions printed out by grub-mknetdir on configuring\nyour DHCP server.\n\nThe grub.cfg file is placed in the same directory as the path output\nby grub-mknetdir hereafter referred to as FWPATH. GRUB will search for\nits configuration files in order using the following rules where the\nappended value corresponds to a value on the client machine.\n\n'(FWPATH)'/grub.cfg-'(UUID OF MACHINE)'\n'(FWPATH)'/grub.cfg-'(MAC ADDRESS OF NIC)'\n'(FWPATH)'/grub.cfg-'(IPv4 OR IPv6 ADDRESS)'\n'(FWPATH)'/grub.cfg\n\nThe UUID is the Client Machine Identifier Option Definition as\nspecified in RFC 4578.  The client will only attempt to loouk up a UUID\nconfig file if it was provided by the DHCP server.\n\nThe client will only attempt to look up an IPv6 address config once,\nhowever, it will try the IPv4 multiple times.  The concrete example\nbelow shows what would happen under the IPv4 case.\n\nUUID: 7726a678-7fc0-4853-a4f6-c85ac36a120a\nMAC:  52:54:00:ec:33:81\nIPV4: 10.0.0.130 (0A000082)\n\n'(FWPATH)'/grub.cfg-7726a678-7fc0-4853-a4f6-c85ac36a120a\n'(FWPATH)'/grub.cfg-52-54-00-ec-33-81\n'(FWPATH)'/grub.cfg-0A000082\n'(FWPATH)'/grub.cfg-0A00008\n'(FWPATH)'/grub.cfg-0A0000\n'(FWPATH)'/grub.cfg-0A000\n'(FWPATH)'/grub.cfg-0A00\n'(FWPATH)'/grub.cfg-0A0\n'(FWPATH)'/grub.cfg-0A\n'(FWPATH)'/grub.cfg-0\n'(FWPATH)'/grub.cfg\n\nThis feature is enabled by default but it can be disabled by setting\nthe 'featurenetsearchcfg' to 'n'.  Since this happens before the\nconfiguration file is read by GRUB, this option has to be disabled in an\nembedded configuration file (*note Embedded configuration::).\n\nAfter GRUB has started, files on the TFTP server will be accessible\nvia the '(tftp)' device.\n\nThe server IP address can be controlled by changing the '(tftp)'\ndevice name to '(tftp,SERVER-IP)'.  Note that this should be changed\nboth in the prefix and in any references to the device name in the\nconfiguration file.\n\nGRUB provides several environment variables which may be used to\ninspect or change the behaviour of the PXE device.  In the following\ndescription <INTERFACE> is placeholder for the name of network interface\n(platform dependent):\n\n'net<INTERFACE>ip'\nThe network interface's IP address.  Read-only.\n\n'net<INTERFACE>mac'\nThe network interface's MAC address.  Read-only.\n\n'net<INTERFACE>hostname'\nThe client host name provided by DHCP. Read-only.\n\n'net<INTERFACE>domain'\nThe client domain name provided by DHCP. Read-only.\n\n'net<INTERFACE>rootpath'\nThe path to the client's root disk provided by DHCP. Read-only.\n\n'net<INTERFACE>extensionspath'\nThe path to additional DHCP vendor extensions provided by DHCP.\nRead-only.\n\n'net<INTERFACE>bootfile'\nThe boot file name provided by DHCP. Read-only.\n\n'net<INTERFACE>dhcpservername'\nThe name of the DHCP server responsible for these boot parameters.\nRead-only.\n\n'net<INTERFACE>nextserver'\nThe IP address of the next (usually, TFTP) server provided by DHCP.\nRead-only.\n\n'netdefaultinterface'\nInitially set to name of network interface that was used to load\ngrub.  Read-write, although setting it affects only interpretation\nof 'netdefaultip' and 'netdefaultmac'\n\n'netdefaultip'\nThe IP address of default interface.  Read-only.  This is alias for\nthe 'net${netdefaultinterface}ip'.\n\n'netdefaultmac'\nThe default interface's MAC address.  Read-only.  This is alias for\nthe 'net${netdefaultinterface}mac'.\n\n'netdefaultserver'\nThe default server used by network drives (*note Device syntax::).\nRead-write, although setting this is only useful before opening a\nnetwork device.\n\nFile: grub.info,  Node: Serial terminal,  Next: Vendor power-on keys,  Prev: Network,  Up: Top\n",
            "subsections": []
        },
        "9 Using GRUB via a serial line": {
            "content": "This chapter describes how to use the serial terminal support in GRUB.\n\nIf you have many computers or computers with no display/keyboard, it\ncould be very useful to control the computers through serial\ncommunications.  To connect one computer with another via a serial line,\nyou need to prepare a null-modem (cross) serial cable, and you may need\nto have multiport serial boards, if your computer doesn't have extra\nserial ports.  In addition, a terminal emulator is also required, such\nas minicom.  Refer to a manual of your operating system, for more\ninformation.\n\nAs for GRUB, the instruction to set up a serial terminal is quite\nsimple.  Here is an example:\n\ngrub> serial --unit=0 --speed=9600\ngrub> terminalinput serial; terminaloutput serial\n\nThe command 'serial' initializes the serial unit 0 with the speed\n9600bps.  The serial unit 0 is usually called 'COM1', so, if you want to\nuse COM2, you must specify '--unit=1' instead.  This command accepts\nmany other options, so please refer to *note serial::, for more details.\n\nThe commands 'terminalinput' (*note terminalinput::) and\n'terminaloutput' (*note terminaloutput::) choose which type of\nterminal you want to use.  In the case above, the terminal will be a\nserial terminal, but you can also pass 'console' to the command, as\n'terminalinput serial console'.  In this case, a terminal in which you\npress any key will be selected as a GRUB terminal.  In the example\nabove, note that you need to put both commands on the same command line,\nas you will lose the ability to type commands on the console after the\nfirst command.\n\nHowever, note that GRUB assumes that your terminal emulator is\ncompatible with VT100 by default.  This is true for most terminal\nemulators nowadays, but you should pass the option '--dumb' to the\ncommand if your terminal emulator is not VT100-compatible or implements\nfew VT100 escape sequences.  If you specify this option then GRUB\nprovides you with an alternative menu interface, because the normal menu\nrequires several fancy features of your terminal.\n\nFile: grub.info,  Node: Vendor power-on keys,  Next: Images,  Prev: Serial terminal,  Up: Top\n",
            "subsections": []
        },
        "10 Using GRUB with vendor power-on keys": {
            "content": "Some laptop vendors provide an additional power-on button which boots\nanother OS. GRUB supports such buttons with the 'GRUBTIMEOUTBUTTON',\n'GRUBTIMEOUTSTYLEBUTTON', 'GRUBDEFAULTBUTTON', and\n'GRUBBUTTONCMOSADDRESS' variables in default/grub (*note Simple\nconfiguration::).  'GRUBTIMEOUTBUTTON', 'GRUBTIMEOUTSTYLEBUTTON',\nand 'GRUBDEFAULTBUTTON' are used instead of the corresponding\nvariables without the 'BUTTON' suffix when powered on using the special\nbutton.  'GRUBBUTTONCMOSADDRESS' is vendor-specific and partially\nmodel-specific.  Values known to the GRUB team are:\n\n<Dell XPS M1330M>\n121:3\n<Dell XPS M1530>\n85:3\n<Dell Latitude E4300>\n85:3\n<Asus EeePC 1005PE>\n84:1 (unconfirmed)\n<LENOVO ThinkPad T410s (2912W1C)>\n101:3\n\nTo take full advantage of this function, install GRUB into the MBR\n(*note Installing GRUB using grub-install::).\n\nIf you have a laptop which has a similar feature and not in the above\nlist could you figure your address and contribute?  To discover the\naddress do the following:\n* boot normally\n*      sudo modprobe nvram\nsudo cat /dev/nvram | xxd > normalbutton.txt\n* boot using vendor button\n*      sudo modprobe nvram\nsudo cat /dev/nvram | xxd > normalvendor.txt\n\nThen compare these text files and find where a bit was toggled.  E.g.\nin case of Dell XPS it was:\nbyte 0x47: 20 --> 28\nIt's a bit number 3 as seen from following table:\n0              01\n1              02\n2              04\n3              08\n4              10\n5              20\n6              40\n7              80\n\n0x47 is decimal 71.  Linux nvram implementation cuts first 14 bytes\nof CMOS. So the real byte address in CMOS is 71+14=85 So complete\naddress is 85:3\n\nFile: grub.info,  Node: Images,  Next: Core image size limitation,  Prev: Vendor power-on keys,  Up: Top\n",
            "subsections": []
        },
        "11 GRUB image files": {
            "content": "GRUB consists of several images: a variety of bootstrap images for\nstarting GRUB in various ways, a kernel image, and a set of modules\nwhich are combined with the kernel image to form a core image.  Here is\na short overview of them.\n\n'boot.img'\nOn PC BIOS systems, this image is the first part of GRUB to start.\nIt is written to a master boot record (MBR) or to the boot sector\nof a partition.  Because a PC boot sector is 512 bytes, the size of\nthis image is exactly 512 bytes.\n\nThe sole function of 'boot.img' is to read the first sector of the\ncore image from a local disk and jump to it.  Because of the size\nrestriction, 'boot.img' cannot understand any file system\nstructure, so 'grub-install' hardcodes the location of the first\nsector of the core image into 'boot.img' when installing GRUB.\n\n'diskboot.img'\nThis image is used as the first sector of the core image when\nbooting from a hard disk.  It reads the rest of the core image into\nmemory and starts the kernel.  Since file system handling is not\nyet available, it encodes the location of the core image using a\nblock list format.\n\n'cdboot.img'\nThis image is used as the first sector of the core image when\nbooting from a CD-ROM drive.  It performs a similar function to\n'diskboot.img'.\n\n'pxeboot.img'\nThis image is used as the start of the core image when booting from\nthe network using PXE. *Note Network::.\n\n'lnxboot.img'\nThis image may be placed at the start of the core image in order to\nmake GRUB look enough like a Linux kernel that it can be booted by\nLILO using an 'image=' section.\n\n'kernel.img'\nThis image contains GRUB's basic run-time facilities: frameworks\nfor device and file handling, environment variables, the rescue\nmode command-line parser, and so on.  It is rarely used directly,\nbut is built into all core images.\n\n'core.img'\nThis is the core image of GRUB. It is built dynamically from the\nkernel image and an arbitrary list of modules by the 'grub-mkimage'\nprogram.  Usually, it contains enough modules to access\n'/boot/grub', and loads everything else (including menu handling,\nthe ability to load target operating systems, and so on) from the\nfile system at run-time.  The modular design allows the core image\nto be kept small, since the areas of disk where it must be\ninstalled are often as small as 32KB.\n\n*Note BIOS installation::, for details on where the core image can\nbe installed on PC systems.\n\n'*.mod'\nEverything else in GRUB resides in dynamically loadable modules.\nThese are often loaded automatically, or built into the core image\nif they are essential, but may also be loaded manually using the\n'insmod' command (*note insmod::).\n",
            "subsections": [
                {
                    "name": "For GRUB Legacy users",
                    "content": "GRUB 2 has a different design from GRUB Legacy, and so correspondences\nwith the images it used cannot be exact.  Nevertheless, GRUB Legacy\nusers often ask questions in the terms they are familiar with, and so\nhere is a brief guide to how GRUB 2's images relate to that.\n\n'stage1'\nStage 1 from GRUB Legacy was very similar to 'boot.img' in GRUB 2,\nand they serve the same function.\n\n'*stage15'\nIn GRUB Legacy, Stage 1.5's function was to include enough\nfilesystem code to allow the much larger Stage 2 to be read from an\nordinary filesystem.  In this respect, its function was similar to\n'core.img' in GRUB 2.  However, 'core.img' is much more capable\nthan Stage 1.5 was; since it offers a rescue shell, it is sometimes\npossible to recover manually in the event that it is unable to load\nany other modules, for example if partition numbers have changed.\n'core.img' is built in a more flexible way, allowing GRUB 2 to\nsupport reading modules from advanced disk types such as LVM and\nRAID.\n\nGRUB Legacy could run with only Stage 1 and Stage 2 in some limited\nconfigurations, while GRUB 2 requires 'core.img' and cannot work\nwithout it.\n\n'stage2'\nGRUB 2 has no single Stage 2 image.  Instead, it loads modules from\n'/boot/grub' at run-time.\n\n'stage2eltorito'\nIn GRUB 2, images for booting from CD-ROM drives are now\nconstructed using 'cdboot.img' and 'core.img', making sure that the\ncore image contains the 'iso9660' module.  It is usually best to\nuse the 'grub-mkrescue' program for this.\n\n'nbgrub'\nThere is as yet no equivalent for 'nbgrub' in GRUB 2; it was used\nby Etherboot and some other network boot loaders.\n\n'pxegrub'\nIn GRUB 2, images for PXE network booting are now constructed using\n'pxeboot.img' and 'core.img', making sure that the core image\ncontains the 'pxe' and 'pxecmd' modules.  *Note Network::.\n\nFile: grub.info,  Node: Core image size limitation,  Next: Filesystem,  Prev: Images,  Up: Top\n"
                }
            ]
        },
        "12 Core image size limitation": {
            "content": "Heavily limited platforms:\n* i386-pc (normal and PXE): the core image size (compressed) is\nlimited by 458240 bytes.  kernel.img (.text + .data + .bss,\nuncompressed) is limited by 392704 bytes.  module size\n(uncompressed) + kernel.img (.text + .data, uncompressed) is\nlimited by the size of contiguous chunk at 1M address.\n* sparc64-ieee1275: kernel.img (.text + .data + .bss) + modules +\n256K (stack) + 2M (heap) is limited by space available at 0x4400.\nOn most platforms it's just 3 or 4M since ieee1275 maps only so\nmuch.\n* i386-ieee1275: kernel.img (.text + .data + .bss) + modules is\nlimited by memory available at 0x10000, at most 596K\n\nLightly limited platforms:\n\n* *-xen: limited only by adress space and RAM size.\n* i386-qemu: kernel.img (.text + .data + .bss) is limited by 392704\nbytes.  (core.img would be limited by ROM size but it's unlimited\non qemu\n* All EFI platforms: limited by contiguous RAM size and possibly\nfirmware bugs\n* Coreboot and multiboot.  kernel.img (.text + .data + .bss) is\nlimited by 392704 bytes.  module size is limited by the size of\ncontiguous chunk at 1M address.\n* mipsel-loongson (ELF), mips(el)-qemumips (ELF): if uncompressed:\nkernel.img (.text + .data) + modules is limited by the space from\n80200000 forward if compressed: kernel.img (.text + .data,\nuncompressed) + modules (uncompressed) + (modules + kernel.img\n(.text + .data)) (compressed) + decompressor is limited by the\nspace from 80200000 forward\n* mipsel-loongson (Flash), mips(el)-qemumips (Flash): kernel.img\n(.text + .data) + modules is limited by the space from 80200000\nforward core.img (final) is limited by flash size (512K on yeeloong\nand fulooong)\n* mips-arc: if uncompressed: kernel.img (.text + .data) is limited by\nthe space from 8bd00000 forward modules + dummy decompressor is\nlimited by the space from 8bd00000 backward if compressed:\nkernel.img (.text + .data, uncompressed) is limited by the space\nfrom 8bd00000 forward modules (uncompressed) + (modules +\nkernel.img (.text + .data)) (compressed, aligned to 1M) + 1M\n(decompressor + scratch space) is limited by the space from\n8bd00000 backward\n* powerpc-ieee1275: kernel.img (.text + .data + .bss) + modules is\nlimited by space available at 0x200000\n\nFile: grub.info,  Node: Filesystem,  Next: Interface,  Prev: Core image size limitation,  Up: Top\n",
            "subsections": []
        },
        "13 Filesystem syntax and semantics": {
            "content": "GRUB uses a special syntax for specifying disk drives which can be\naccessed by BIOS. Because of BIOS limitations, GRUB cannot distinguish\nbetween IDE, ESDI, SCSI, or others.  You must know yourself which BIOS\ndevice is equivalent to which OS device.  Normally, that will be clear\nif you see the files in a device or use the command 'search' (*note\nsearch::).\n\n* Menu:\n\n* Device syntax::               How to specify devices\n* File name syntax::            How to specify files\n* Block list syntax::           How to specify block lists\n\nFile: grub.info,  Node: Device syntax,  Next: File name syntax,  Up: Filesystem\n",
            "subsections": [
                {
                    "name": "13.1 How to specify devices",
                    "content": "The device syntax is like this:\n\n(DEVICE[,PARTMAP-NAME1PART-NUM1[,PARTMAP-NAME2PART-NUM2[,...]]])\n\n'[]' means the parameter is optional.  DEVICE depends on the disk\ndriver in use.  BIOS and EFI disks use either 'fd' or 'hd' followed by a\ndigit, like 'fd0', or 'cd'.  AHCI, PATA (ata), crypto, USB use the name\nof driver followed by a number.  Memdisk and host are limited to one\ndisk and so it's refered just by driver name.  RAID (md), ofdisk\n(ieee1275 and nand), LVM (lvm), LDM, virtio (vdsk) and arcdisk (arc) use\nintrinsic name of disk prefixed by driver name.  Additionally just\n\"nand\" refers to the disk aliased as \"nand\".  Conflicts are solved by\nsuffixing a number if necessarry.  Commas need to be escaped.  Loopback\nuses whatever name specified to 'loopback' command.  Hostdisk uses names\nspecified in device.map as long as it's of the form [fhc]d[0-9]* or\nhostdisk/<OS DEVICE>.  For crypto and RAID (md) additionally you can use\nthe syntax <driver name>uuid/<uuid>.  For LVM additionally you can use\nthe syntax lvmid/<volume-group-uuid>/<volume-uuid>.\n\n(fd0)\n(hd0)\n(cd)\n(ahci0)\n(ata0)\n(crypto0)\n(usb0)\n(cryptouuid/123456789abcdef0123456789abcdef0)\n(mduuid/123456789abcdef0123456789abcdef0)\n(lvm/system-root)\n(lvmid/F1ikgD-2RES-306G-il9M-7iwa-4NKW-EbV1NV/eLGuCQ-L4Ka-XUgR-sjtJ-ffch-bajr-fCNfz5)\n(md/myraid)\n(md/0)\n(ieee1275/disk2)\n(ieee1275//pci@1f\\,0/ide@d/disk@2)\n(nand)\n(memdisk)\n(host)\n(myloop)\n(hostdisk//dev/sda)\n\nPART-NUM represents the partition number of DEVICE, starting from\none.  PARTNAME is optional but is recommended since disk may have\nseveral top-level partmaps.  Specifying third and later component you\ncan access to subpartitions.\n\nThe syntax '(hd0)' represents using the entire disk (or the MBR when\ninstalling GRUB), while the syntax '(hd0,1)' represents using the first\npartition of the disk (or the boot sector of the partition when\ninstalling GRUB).\n\n(hd0,msdos1)\n(hd0,msdos1,msdos5)\n(hd0,msdos1,bsd3)\n(hd0,netbsd1)\n(hd0,gpt1)\n(hd0,1,3)\n\nIf you enabled the network support, the special drives\n'(PROTOCOL[,SERVER])' are also available.  Supported protocols are\n'http' and 'tftp'.  If SERVER is omitted, value of environment variable\n'netdefaultserver' is used.  Before using the network drive, you must\ninitialize the network.  *Note Network::, for more information.\n\nIf you boot GRUB from a CD-ROM, '(cd)' is available.  *Note Making a\nGRUB bootable CD-ROM::, for details.\n\nFile: grub.info,  Node: File name syntax,  Next: Block list syntax,  Prev: Device syntax,  Up: Filesystem\n"
                },
                {
                    "name": "13.2 How to specify files",
                    "content": "There are two ways to specify files, by \"absolute file name\" and by\n\"block list\".\n\nAn absolute file name resembles a Unix absolute file name, using '/'\nfor the directory separator (not '\\' as in DOS). One example is\n'(hd0,1)/boot/grub/grub.cfg'.  This means the file '/boot/grub/grub.cfg'\nin the first partition of the first hard disk.  If you omit the device\nname in an absolute file name, GRUB uses GRUB's \"root device\"\nimplicitly.  So if you set the root device to, say, '(hd1,1)' by the\ncommand 'set root=(hd1,1)' (*note set::), then '/boot/kernel' is the\nsame as '(hd1,1)/boot/kernel'.\n\nOn ZFS filesystem the first path component must be\nVOLUME'@'[SNAPSHOT].  So '/rootvol@snap-129/boot/grub/grub.cfg' refers\nto file '/boot/grub/grub.cfg' in snapshot of volume 'rootvol' with name\n'snap-129'.  Trailing '@' after volume name is mandatory even if\nsnapshot name is omitted.\n\nFile: grub.info,  Node: Block list syntax,  Prev: File name syntax,  Up: Filesystem\n"
                },
                {
                    "name": "13.3 How to specify block lists",
                    "content": "A block list is used for specifying a file that doesn't appear in the\nfilesystem, like a chainloader.  The syntax is\n'[OFFSET]+LENGTH[,[OFFSET]+LENGTH]...'.  Here is an example:\n\n0+100,200+1,300+300\n\nThis represents that GRUB should read blocks 0 through 99, block 200,\nand blocks 300 through 599.  If you omit an offset, then GRUB assumes\nthe offset is zero.\n\nLike the file name syntax (*note File name syntax::), if a blocklist\ndoes not contain a device name, then GRUB uses GRUB's \"root device\".  So\n'(hd0,2)+1' is the same as '+1' when the root device is '(hd0,2)'.\n\nFile: grub.info,  Node: Interface,  Next: Environment,  Prev: Filesystem,  Up: Top\n"
                }
            ]
        },
        "14 GRUB's user interface": {
            "content": "GRUB has both a simple menu interface for choosing preset entries from a\nconfiguration file, and a highly flexible command-line for performing\nany desired combination of boot commands.\n\nGRUB looks for its configuration file as soon as it is loaded.  If\none is found, then the full menu interface is activated using whatever\nentries were found in the file.  If you choose the \"command-line\" menu\noption, or if the configuration file was not found, then GRUB drops to\nthe command-line interface.\n\n* Menu:\n\n* Command-line interface::      The flexible command-line interface\n* Menu interface::              The simple menu interface\n* Menu entry editor::           Editing a menu entry\n\nFile: grub.info,  Node: Command-line interface,  Next: Menu interface,  Up: Interface\n",
            "subsections": [
                {
                    "name": "14.1 The flexible command-line interface",
                    "content": "The command-line interface provides a prompt and after it an editable\ntext area much like a command-line in Unix or DOS. Each command is\nimmediately executed after it is entered(1) (*note Command-line\ninterface-Footnote-1::).  The commands (*note Command-line and menu\nentry commands::) are a subset of those available in the configuration\nfile, used with exactly the same syntax.\n\nCursor movement and editing of the text on the line can be done via a\nsubset of the functions available in the Bash shell:\n\n<C-f>\n<PC right key>\nMove forward one character.\n\n<C-b>\n<PC left key>\nMove back one character.\n\n<C-a>\n<HOME>\nMove to the start of the line.\n\n<C-e>\n<END>\nMove the the end of the line.\n\n<C-d>\n<DEL>\nDelete the character underneath the cursor.\n\n<C-h>\n<BS>\nDelete the character to the left of the cursor.\n\n<C-k>\nKill the text from the current cursor position to the end of the\nline.\n\n<C-u>\nKill backward from the cursor to the beginning of the line.\n\n<C-y>\nYank the killed text back into the buffer at the cursor.\n\n<C-p>\n<PC up key>\nMove up through the history list.\n\n<C-n>\n<PC down key>\nMove down through the history list.\n\nWhen typing commands interactively, if the cursor is within or before\nthe first word in the command-line, pressing the <TAB> key (or <C-i>)\nwill display a listing of the available commands, and if the cursor is\nafter the first word, the '<TAB>' will provide a completion listing of\ndisks, partitions, and file names depending on the context.  Note that\nto obtain a list of drives, one must open a parenthesis, as 'root ('.\n\nNote that you cannot use the completion functionality in the TFTP\nfilesystem.  This is because TFTP doesn't support file name listing for\nthe security.\n\nFile: grub.info,  Node: Menu interface,  Next: Menu entry editor,  Prev: Command-line interface,  Up: Interface\n"
                },
                {
                    "name": "14.2 The simple menu interface",
                    "content": "The menu interface is quite easy to use.  Its commands are both\nreasonably intuitive and described on screen.\n\nBasically, the menu interface provides a list of \"boot entries\" to\nthe user to choose from.  Use the arrow keys to select the entry of\nchoice, then press <RET> to run it.  An optional timeout is available to\nboot the default entry (the first one if not set), which is aborted by\npressing any key.\n\nCommands are available to enter a bare command-line by pressing <c>\n(which operates exactly like the non-config-file version of GRUB, but\nallows one to return to the menu if desired by pressing <ESC>) or to\nedit any of the \"boot entries\" by pressing <e>.\n\nIf you protect the menu interface with a password (*note Security::),\nall you can do is choose an entry by pressing <RET>, or press <p> to\nenter the password.\n\nFile: grub.info,  Node: Menu entry editor,  Prev: Menu interface,  Up: Interface\n"
                },
                {
                    "name": "14.3 Editing a menu entry",
                    "content": "The menu entry editor looks much like the main menu interface, but the\nlines in the menu are individual commands in the selected entry instead\nof entry names.\n\nIf an <ESC> is pressed in the editor, it aborts all the changes made\nto the configuration entry and returns to the main menu interface.\n\nEach line in the menu entry can be edited freely, and you can add new\nlines by pressing <RET> at the end of a line.  To boot the edited entry,\npress <Ctrl-x>.\n\nAlthough GRUB unfortunately does not support \"undo\", you can do\nalmost the same thing by just returning to the main menu using <ESC>.\n\nFile: grub.info,  Node: Environment,  Next: Commands,  Prev: Interface,  Up: Top\n"
                }
            ]
        },
        "15 GRUB environment variables": {
            "content": "GRUB supports environment variables which are rather like those offered\nby all Unix-like systems.  Environment variables have a name, which is\nunique and is usually a short identifier, and a value, which is an\narbitrary string of characters.  They may be set (*note set::), unset\n(*note unset::), or looked up (*note Shell-like scripting::) by name.\n\nA number of environment variables have special meanings to various\nparts of GRUB. Others may be used freely in GRUB configuration files.\n\n* Menu:\n\n* Special environment variables::\n* Environment block::\n\nFile: grub.info,  Node: Special environment variables,  Next: Environment block,  Up: Environment\n",
            "subsections": [
                {
                    "name": "15.1 Special environment variables",
                    "content": "These variables have special meaning to GRUB.\n\n* Menu:\n\n* biosnum::\n* checksignatures::\n* chosen::\n* cmdpath::\n* colorhighlight::\n* colornormal::\n* configdirectory::\n* configfile::\n* debug::\n* default::\n* fallback::\n* gfxmode::\n* gfxpayload::\n* gfxtermfont::\n* grubcpu::\n* grubplatform::\n* icondir::\n* lang::\n* localedir::\n* menucolorhighlight::\n* menucolornormal::\n* net<INTERFACE>bootfile::\n* net<INTERFACE>dhcpservername::\n* net<INTERFACE>domain::\n* net<INTERFACE>extensionspath::\n* net<INTERFACE>hostname::\n* net<INTERFACE>ip::\n* net<INTERFACE>mac::\n* net<INTERFACE>nextserver::\n* net<INTERFACE>rootpath::\n* netdefaultinterface::\n* netdefaultip::\n* netdefaultmac::\n* netdefaultserver::\n* pager::\n* prefix::\n* pxeblksize::\n* pxedefaultgateway::\n* pxedefaultserver::\n* root::\n* superusers::\n* theme::\n* timeout::\n* timeoutstyle::\n\nFile: grub.info,  Node: biosnum,  Next: checksignatures,  Up: Special environment variables\n\n\nWhen chain-loading another boot loader (*note Chain-loading::), GRUB may\nneed to know what BIOS drive number corresponds to the root device\n(*note root::) so that it can set up registers properly.  If the BIOSNUM\nvariable is set, it overrides GRUB's own means of guessing this.\n\nFor an alternative approach which also changes BIOS drive mappings\nfor the chain-loaded system, *note drivemap::.\n\nFile: grub.info,  Node: checksignatures,  Next: chosen,  Prev: biosnum,  Up: Special environment variables\n\n\nThis variable controls whether GRUB enforces digital signature\nvalidation on loaded files.  *Note Using digital signatures::.\n\nFile: grub.info,  Node: chosen,  Next: cmdpath,  Prev: checksignatures,  Up: Special environment variables\n\n\nWhen executing a menu entry, GRUB sets the CHOSEN variable to the title\nof the entry being executed.\n\nIf the menu entry is in one or more submenus, then CHOSEN is set to\nthe titles of each of the submenus starting from the top level followed\nby the title of the menu entry itself, separated by '>'.\n\nFile: grub.info,  Node: cmdpath,  Next: colorhighlight,  Prev: chosen,  Up: Special environment variables\n\n\nThe location from which 'core.img' was loaded as an absolute directory\nname (*note File name syntax::).  This is set by GRUB at startup based\non information returned by platform firmware.  Not every platform\nprovides this information and some may return only device without path\nname.\n\nFile: grub.info,  Node: colorhighlight,  Next: colornormal,  Prev: cmdpath,  Up: Special environment variables\n\n\nThis variable contains the \"highlight\" foreground and background\nterminal colors, separated by a slash ('/').  Setting this variable\nchanges those colors.  For the available color names, *note\ncolornormal::.\n\nThe default is 'black/light-gray'.\n\nFile: grub.info,  Node: colornormal,  Next: configdirectory,  Prev: colorhighlight,  Up: Special environment variables\n\n\nThis variable contains the \"normal\" foreground and background terminal\ncolors, separated by a slash ('/').  Setting this variable changes those\ncolors.  Each color must be a name from the following list:\n\n* black\n* blue\n* green\n* cyan\n* red\n* magenta\n* brown\n* light-gray\n* dark-gray\n* light-blue\n* light-green\n* light-cyan\n* light-red\n* light-magenta\n* yellow\n* white\n\nThe default is 'light-gray/black'.\n\nThe color support support varies from terminal to terminal.\n\n'morse' has no color support at all.\n\n'mdatext' color support is limited to highlighting by black/white\nreversal.\n\n'console' on ARC, EMU and IEEE1275, 'serial*' and 'spkmodem' are\ngoverned by terminfo and support only 8 colors if in modes 'vt100-color'\n(default for console on emu), 'arc' (default for console on ARC),\n'ieee1275' (default for console on IEEE1275).  When in mode 'vt100' then\nthe color support is limited to highlighting by black/white reversal.\nWhen in mode 'dumb' there is no color support.\n\nWhen console supports no colors this setting is ignored.  When\nconsole supports 8 colors, then the colors from the second half of the\nprevious list are mapped to the matching colors of first half.\n\n'console' on EFI and BIOS and 'vgatext' support all 16 colors.\n\n'gfxterm' supports all 16 colors and would be theoretically\nextendable to support whole rgb24 palette but currently there is no\ncompelling reason to go beyond the current 16 colors.\n\nFile: grub.info,  Node: configdirectory,  Next: configfile,  Prev: colornormal,  Up: Special environment variables\n\n\nThis variable is automatically set by GRUB to the directory part of\ncurrent configuration file name (*note configfile::).\n\nFile: grub.info,  Node: configfile,  Next: debug,  Prev: configdirectory,  Up: Special environment variables\n\n\nThis variable is automatically set by GRUB to the name of configuration\nfile that is being processed by commands 'configfile' (*note\nconfigfile::) or 'normal' (*note normal::).  It is restored to the\nprevious value when command completes.\n\nFile: grub.info,  Node: debug,  Next: default,  Prev: configfile,  Up: Special environment variables\n\n\nThis variable may be set to enable debugging output from various\ncomponents of GRUB. The value is a list of debug facility names\nseparated by whitespace or ',', or 'all' to enable all available\ndebugging output.  The facility names are the first argument to\ngrubdprintf.  Consult source for more details.\n\nFile: grub.info,  Node: default,  Next: fallback,  Prev: debug,  Up: Special environment variables\n\n\nIf this variable is set, it identifies a menu entry that should be\nselected by default, possibly after a timeout (*note timeout::).  The\nentry may be identified by number (starting from 0 at each level of the\nhierarchy), by title, or by id.\n\nFor example, if you have:\n\nmenuentry 'Example GNU/Linux distribution' --class gnu-linux --id example-gnu-linux {\n...\n}\n\nthen you can make this the default using:\n\ndefault=example-gnu-linux\n\nIf the entry is in a submenu, then it must be identified using the\nnumber, title, or id of each of the submenus starting from the top\nlevel, followed by the number, title, or id of the menu entry itself,\nwith each element separated by '>'.  For example, take the following\nmenu structure:\n\nGNU/Hurd --id gnu-hurd\nStandard Boot --id=gnu-hurd-std\nRescue shell --id=gnu-hurd-rescue\nOther platforms --id=other\nMinix --id=minix\nVersion 3.4.0 --id=minix-3.4.0\nVersion 3.3.0 --id=minix-3.3.0\nGRUB Invaders --id=grub-invaders\n\nThe more recent release of Minix would then be identified as 'Other\nplatforms>Minix>Version 3.4.0', or as '1>0>0', or as\n'other>minix>minix-3.4.0'.\n\nThis variable is often set by 'GRUBDEFAULT' (*note Simple\nconfiguration::), 'grub-set-default', or 'grub-reboot'.\n\nFile: grub.info,  Node: fallback,  Next: gfxmode,  Prev: default,  Up: Special environment variables\n\n\nIf this variable is set, it identifies a menu entry that should be\nselected if the default menu entry fails to boot.  Entries are\nidentified in the same way as for 'default' (*note default::).\n\nFile: grub.info,  Node: gfxmode,  Next: gfxpayload,  Prev: fallback,  Up: Special environment variables\n\n\nIf this variable is set, it sets the resolution used on the 'gfxterm'\ngraphical terminal.  Note that you can only use modes which your\ngraphics card supports via VESA BIOS Extensions (VBE), so for example\nnative LCD panel resolutions may not be available.  The default is\n'auto', which selects a platform-specific default that should look\nreasonable.  Supported modes can be listed by 'videoinfo' command in\nGRUB.\n\nThe resolution may be specified as a sequence of one or more modes,\nseparated by commas (',') or semicolons (';'); each will be tried in\nturn until one is found.  Each mode should be either 'auto',\n'WIDTHxHEIGHT', or 'WIDTHxHEIGHTxDEPTH'.\n\nFile: grub.info,  Node: gfxpayload,  Next: gfxtermfont,  Prev: gfxmode,  Up: Special environment variables\n\n\nIf this variable is set, it controls the video mode in which the Linux\nkernel starts up, replacing the 'vga=' boot option (*note linux::).  It\nmay be set to 'text' to force the Linux kernel to boot in normal text\nmode, 'keep' to preserve the graphics mode set using 'gfxmode', or any\nof the permitted values for 'gfxmode' to set a particular graphics mode\n(*note gfxmode::).\n\nDepending on your kernel, your distribution, your graphics card, and\nthe phase of the moon, note that using this option may cause GNU/Linux\nto suffer from various display problems, particularly during the early\npart of the boot sequence.  If you have problems, set this variable to\n'text' and GRUB will tell Linux to boot in normal text mode.\n\nThe default is platform-specific.  On platforms with a native text\nmode (such as PC BIOS platforms), the default is 'text'.  Otherwise the\ndefault may be 'auto' or a specific video mode.\n\nThis variable is often set by 'GRUBGFXPAYLOADLINUX' (*note Simple\nconfiguration::).\n\nFile: grub.info,  Node: gfxtermfont,  Next: grubcpu,  Prev: gfxpayload,  Up: Special environment variables\n\n\nIf this variable is set, it names a font to use for text on the\n'gfxterm' graphical terminal.  Otherwise, 'gfxterm' may use any\navailable font.\n\nFile: grub.info,  Node: grubcpu,  Next: grubplatform,  Prev: gfxtermfont,  Up: Special environment variables\n\n\nIn normal mode (*note normal::), GRUB sets the 'grubcpu' variable to\nthe CPU type for which GRUB was built (e.g.  'i386' or 'powerpc').\n\nFile: grub.info,  Node: grubplatform,  Next: icondir,  Prev: grubcpu,  Up: Special environment variables\n\n\nIn normal mode (*note normal::), GRUB sets the 'grubplatform' variable\nto the platform for which GRUB was built (e.g.  'pc' or 'efi').\n\nFile: grub.info,  Node: icondir,  Next: lang,  Prev: grubplatform,  Up: Special environment variables\n\n\nIf this variable is set, it names a directory in which the GRUB\ngraphical menu should look for icons after looking in the theme's\n'icons' directory.  *Note Theme file format::.\n\nFile: grub.info,  Node: lang,  Next: localedir,  Prev: icondir,  Up: Special environment variables\n\n\nIf this variable is set, it names the language code that the 'gettext'\ncommand (*note gettext::) uses to translate strings.  For example,\nFrench would be named as 'fr', and Simplified Chinese as 'zhCN'.\n\n'grub-mkconfig' (*note Simple configuration::) will try to set a\nreasonable default for this variable based on the system locale.\n\nFile: grub.info,  Node: localedir,  Next: menucolorhighlight,  Prev: lang,  Up: Special environment variables\n\n\nIf this variable is set, it names the directory where translation files\nmay be found (*note gettext::), usually '/boot/grub/locale'.  Otherwise,\ninternationalization is disabled.\n\n'grub-mkconfig' (*note Simple configuration::) will set a reasonable\ndefault for this variable if internationalization is needed and any\ntranslation files are available.\n\nFile: grub.info,  Node: menucolorhighlight,  Next: menucolornormal,  Prev: localedir,  Up: Special environment variables\n\n\nThis variable contains the foreground and background colors to be used\nfor the highlighted menu entry, separated by a slash ('/').  Setting\nthis variable changes those colors.  For the available color names,\n*note colornormal::.\n\nThe default is the value of 'colorhighlight' (*note\ncolorhighlight::).\n\nFile: grub.info,  Node: menucolornormal,  Next: net<INTERFACE>bootfile,  Prev: menucolorhighlight,  Up: Special environment variables\n\n\nThis variable contains the foreground and background colors to be used\nfor non-highlighted menu entries, separated by a slash ('/').  Setting\nthis variable changes those colors.  For the available color names,\n*note colornormal::.\n\nThe default is the value of 'colornormal' (*note colornormal::).\n\nFile: grub.info,  Node: net<INTERFACE>bootfile,  Next: net<INTERFACE>dhcpservername,  Prev: menucolornormal,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: net<INTERFACE>dhcpservername,  Next: net<INTERFACE>domain,  Prev: net<INTERFACE>bootfile,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: net<INTERFACE>domain,  Next: net<INTERFACE>extensionspath,  Prev: net<INTERFACE>dhcpservername,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: net<INTERFACE>extensionspath,  Next: net<INTERFACE>hostname,  Prev: net<INTERFACE>domain,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: net<INTERFACE>hostname,  Next: net<INTERFACE>ip,  Prev: net<INTERFACE>extensionspath,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: net<INTERFACE>ip,  Next: net<INTERFACE>mac,  Prev: net<INTERFACE>hostname,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: net<INTERFACE>mac,  Next: net<INTERFACE>nextserver,  Prev: net<INTERFACE>ip,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: net<INTERFACE>nextserver,  Next: net<INTERFACE>rootpath,  Prev: net<INTERFACE>mac,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: net<INTERFACE>rootpath,  Next: netdefaultinterface,  Prev: net<INTERFACE>nextserver,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: netdefaultinterface,  Next: netdefaultip,  Prev: net<INTERFACE>rootpath,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: netdefaultip,  Next: netdefaultmac,  Prev: netdefaultinterface,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: netdefaultmac,  Next: netdefaultserver,  Prev: netdefaultip,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: netdefaultserver,  Next: pager,  Prev: netdefaultmac,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: pager,  Next: prefix,  Prev: netdefaultserver,  Up: Special environment variables\n\n\nIf set to '1', pause output after each screenful and wait for keyboard\ninput.  The default is not to pause output.\n\nFile: grub.info,  Node: prefix,  Next: pxeblksize,  Prev: pager,  Up: Special environment variables\n\n\nThe location of the '/boot/grub' directory as an absolute file name\n(*note File name syntax::).  This is normally set by GRUB at startup\nbased on information provided by 'grub-install'.  GRUB modules are\ndynamically loaded from this directory, so it must be set correctly in\norder for many parts of GRUB to work.\n\nFile: grub.info,  Node: pxeblksize,  Next: pxedefaultgateway,  Prev: prefix,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: pxedefaultgateway,  Next: pxedefaultserver,  Prev: pxeblksize,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: pxedefaultserver,  Next: root,  Prev: pxedefaultgateway,  Up: Special environment variables\n\n\n*Note Network::.\n\nFile: grub.info,  Node: root,  Next: superusers,  Prev: pxedefaultserver,  Up: Special environment variables\n\n\nThe root device name (*note Device syntax::).  Any file names that do\nnot specify an explicit device name are read from this device.  The\ndefault is normally set by GRUB at startup based on the value of\n'prefix' (*note prefix::).\n\nFor example, if GRUB was installed to the first partition of the\nfirst hard disk, then 'prefix' might be set to '(hd0,msdos1)/boot/grub'\nand 'root' to 'hd0,msdos1'.\n\nFile: grub.info,  Node: superusers,  Next: theme,  Prev: root,  Up: Special environment variables\n\n\nThis variable may be set to a list of superuser names to enable\nauthentication support.  *Note Security::.\n\nFile: grub.info,  Node: theme,  Next: timeout,  Prev: superusers,  Up: Special environment variables\n\n\nThis variable may be set to a directory containing a GRUB graphical menu\ntheme.  *Note Theme file format::.\n\nThis variable is often set by 'GRUBTHEME' (*note Simple\nconfiguration::).\n\nFile: grub.info,  Node: timeout,  Next: timeoutstyle,  Prev: theme,  Up: Special environment variables\n\n\nIf this variable is set, it specifies the time in seconds to wait for\nkeyboard input before booting the default menu entry.  A timeout of '0'\nmeans to boot the default entry immediately without displaying the menu;\na timeout of '-1' (or unset) means to wait indefinitely.\n\nIf 'timeoutstyle' (*note timeoutstyle::) is set to 'countdown' or\n'hidden', the timeout is instead counted before the menu is displayed.\n\nThis variable is often set by 'GRUBTIMEOUT' (*note Simple\nconfiguration::).\n\nFile: grub.info,  Node: timeoutstyle,  Prev: timeout,  Up: Special environment variables\n\n\nThis variable may be set to 'menu', 'countdown', or 'hidden' to control\nthe way in which the timeout (*note timeout::) interacts with displaying\nthe menu.  See the documentation of 'GRUBTIMEOUTSTYLE' (*note Simple\nconfiguration::) for details.\n\nFile: grub.info,  Node: Environment block,  Prev: Special environment variables,  Up: Environment\n"
                },
                {
                    "name": "15.2 The GRUB environment block",
                    "content": "It is often useful to be able to remember a small amount of information\nfrom one boot to the next.  For example, you might want to set the\ndefault menu entry based on what was selected the last time.  GRUB\ndeliberately does not implement support for writing files in order to\nminimise the possibility of the boot loader being responsible for file\nsystem corruption, so a GRUB configuration file cannot just create a\nfile in the ordinary way.  However, GRUB provides an \"environment block\"\nwhich can be used to save a small amount of state.\n\nThe environment block is a preallocated 1024-byte file, which\nnormally lives in '/boot/grub/grubenv' (although you should not assume\nthis).  At boot time, the 'loadenv' command (*note loadenv::) loads\nenvironment variables from it, and the 'saveenv' (*note saveenv::)\ncommand saves environment variables to it.  From a running system, the\n'grub-editenv' utility can be used to edit the environment block.\n\nFor safety reasons, this storage is only available when installed on\na plain disk (no LVM or RAID), using a non-checksumming filesystem (no\nZFS), and using BIOS or EFI functions (no ATA, USB or IEEE1275).\n\n'grub-mkconfig' uses this facility to implement 'GRUBSAVEDEFAULT'\n(*note Simple configuration::).\n\nFile: grub.info,  Node: Commands,  Next: Internationalisation,  Prev: Environment,  Up: Top\n"
                }
            ]
        },
        "16 The list of available commands": {
            "content": "In this chapter, we list all commands that are available in GRUB.\n\nCommands belong to different groups.  A few can only be used in the\nglobal section of the configuration file (or \"menu\"); most of them can\nbe entered on the command-line and can be used either anywhere in the\nmenu or specifically in the menu entries.\n\nIn rescue mode, only the 'insmod' (*note insmod::), 'ls' (*note\nls::), 'set' (*note set::), and 'unset' (*note unset::) commands are\nnormally available.  If you end up in rescue mode and do not know what\nto do, then *note GRUB only offers a rescue shell::.\n\n* Menu:\n\n* Menu-specific commands::\n* General commands::\n* Command-line and menu entry commands::\n* Networking commands::\n\nFile: grub.info,  Node: Menu-specific commands,  Next: General commands,  Up: Commands\n",
            "subsections": [
                {
                    "name": "16.1 The list of commands for the menu only",
                    "content": "The semantics used in parsing the configuration file are the following:\n\n* The files must be in plain-text format.\n\n* '#' at the beginning of a line in a configuration file means it is\nonly a comment.\n\n* Options are separated by spaces.\n\n* All numbers can be either decimal or hexadecimal.  A hexadecimal\nnumber must be preceded by '0x', and is case-insensitive.\n\nThese commands can only be used in the menu:\n\n* Menu:\n\n* menuentry::                   Start a menu entry\n* submenu::                     Group menu entries\n\nFile: grub.info,  Node: menuentry,  Next: submenu,  Up: Menu-specific commands\n\n\n-- Command: menuentry TITLE [--class=class ...] [--users=users]\n[--unrestricted] [--hotkey=key] [--id=id] [ARG ...] { COMMAND;\n... }\nThis defines a GRUB menu entry named TITLE.  When this entry is\nselected from the menu, GRUB will set the CHOSEN environment\nvariable to value of '--id' if '--id' is given, execute the list of\ncommands given within braces, and if the last command in the list\nreturned successfully and a kernel was loaded it will execute the\n'boot' command.\n\nThe '--class' option may be used any number of times to group menu\nentries into classes.  Menu themes may display different classes\nusing different styles.\n\nThe '--users' option grants specific users access to specific menu\nentries.  *Note Security::.\n\nThe '--unrestricted' option grants all users access to specific\nmenu entries.  *Note Security::.\n\nThe '--hotkey' option associates a hotkey with a menu entry.  KEY\nmay be a single letter, or one of the aliases 'backspace', 'tab',\nor 'delete'.\n\nThe '--id' may be used to associate unique identifier with a menu\nentry.  ID is string of ASCII aphanumeric characters, underscore\nand hyphen and should not start with a digit.\n\nAll other arguments including TITLE are passed as positional\nparameters when list of commands is executed with TITLE always\nassigned to '$1'.\n\nFile: grub.info,  Node: submenu,  Prev: menuentry,  Up: Menu-specific commands\n\n\n-- Command: submenu TITLE [--class=class ...] [--users=users]\n[--unrestricted] [--hotkey=key] [--id=id] { MENU ENTRIES ... }\nThis defines a submenu.  An entry called TITLE will be added to the\nmenu; when that entry is selected, a new menu will be displayed\nshowing all the entries within this submenu.\n\nAll options are the same as in the 'menuentry' command (*note\nmenuentry::).\n\nFile: grub.info,  Node: General commands,  Next: Command-line and menu entry commands,  Prev: Menu-specific commands,  Up: Commands\n"
                },
                {
                    "name": "16.2 The list of general commands",
                    "content": "Commands usable anywhere in the menu and in the command-line.\n\n* Menu:\n\n* serial::                      Set up a serial device\n* terminalinput::              Manage input terminals\n* terminaloutput::             Manage output terminals\n* terminfo::                    Define terminal type\n\nFile: grub.info,  Node: serial,  Next: terminalinput,  Up: General commands\n\n\n-- Command: serial [--unit=unit] [--port=port] [--speed=speed]\n[--word=word] [--parity=parity] [--stop=stop]\nInitialize a serial device.  UNIT is a number in the range 0-3\nspecifying which serial port to use; default is 0, which\ncorresponds to the port often called COM1.  PORT is the I/O port\nwhere the UART is to be found; if specified it takes precedence\nover UNIT.  SPEED is the transmission speed; default is 9600.  WORD\nand STOP are the number of data bits and stop bits.  Data bits must\nbe in the range 5-8 and stop bits must be 1 or 2.  Default is 8\ndata bits and one stop bit.  PARITY is one of 'no', 'odd', 'even'\nand defaults to 'no'.\n\nThe serial port is not used as a communication channel unless the\n'terminalinput' or 'terminaloutput' command is used (*note\nterminalinput::, *note terminaloutput::).\n\nSee also *note Serial terminal::.\n\nFile: grub.info,  Node: terminalinput,  Next: terminaloutput,  Prev: serial,  Up: General commands\n\n\n-- Command: terminalinput [--append|--remove] [terminal1] [terminal2]\n...\nList or select an input terminal.\n\nWith no arguments, list the active and available input terminals.\n\nWith '--append', add the named terminals to the list of active\ninput terminals; any of these may be used to provide input to GRUB.\n\nWith '--remove', remove the named terminals from the active list.\n\nWith no options but a list of terminal names, make only the listed\nterminal names active.\n\nFile: grub.info,  Node: terminaloutput,  Next: terminfo,  Prev: terminalinput,  Up: General commands\n\n\n-- Command: terminaloutput [--append|--remove] [terminal1] [terminal2]\n...\nList or select an output terminal.\n\nWith no arguments, list the active and available output terminals.\n\nWith '--append', add the named terminals to the list of active\noutput terminals; all of these will receive output from GRUB.\n\nWith '--remove', remove the named terminals from the active list.\n\nWith no options but a list of terminal names, make only the listed\nterminal names active.\n\nFile: grub.info,  Node: terminfo,  Prev: terminaloutput,  Up: General commands\n\n\n-- Command: terminfo [-a|-u|-v] [-g WxH] [term] [type]\nDefine the capabilities of your terminal by giving the name of an\nentry in the terminfo database, which should correspond roughly to\na 'TERM' environment variable in Unix.\n\nThe currently available terminal types are 'vt100', 'vt100-color',\n'ieee1275', and 'dumb'.  If you need other terminal types, please\ncontact us to discuss the best way to include support for these in\nGRUB.\n\nThe '-a' ('--ascii'), '-u' ('--utf8'), and '-v' ('--visual-utf8')\noptions control how non-ASCII text is displayed.  '-a' specifies an\nASCII-only terminal; '-u' specifies logically-ordered UTF-8; and\n'-v' specifies \"visually-ordered UTF-8\" (in other words, arranged\nsuch that a terminal emulator without bidirectional text support\nwill display right-to-left text in the proper order; this is not\nreally proper UTF-8, but a workaround).\n\nThe '-g' ('--geometry') can be used to specify terminal geometry.\n\nIf no option or terminal type is specified, the current terminal\ntype is printed.\n\nFile: grub.info,  Node: Command-line and menu entry commands,  Next: Networking commands,  Prev: General commands,  Up: Commands\n"
                },
                {
                    "name": "16.3 The list of command-line and menu entry commands",
                    "content": "These commands are usable in the command-line and in menu entries.  If\nyou forget a command, you can run the command 'help' (*note help::).\n\n* Menu:\n\n* [::                           Check file types and compare values\n* acpi::                        Load ACPI tables\n* authenticate::                Check whether user is in user list\n* backgroundcolor::            Set background color for active terminal\n* backgroundimage::            Load background image for active terminal\n* badram::                      Filter out bad regions of RAM\n* blocklist::                   Print a block list\n* boot::                        Start up your operating system\n* cat::                         Show the contents of a file\n* chainloader::                 Chain-load another boot loader\n* clear::                       Clear the screen\n* cmosclean::                   Clear bit in CMOS\n* cmosdump::                    Dump CMOS contents\n* cmostest::                    Test bit in CMOS\n* cmp::                         Compare two files\n* configfile::                  Load a configuration file\n* cpuid::                       Check for CPU features\n* crc::                         Compute or check CRC32 checksums\n* cryptomount::                 Mount a crypto device\n* cutmem::                      Remove memory regions\n* date::                        Display or set current date and time\n* devicetree::                  Load a device tree blob\n* distrust::                    Remove a pubkey from trusted keys\n* drivemap::                    Map a drive to another\n* echo::                        Display a line of text\n* eval::                        Evaluate agruments as GRUB commands\n* export::                      Export an environment variable\n* false::                       Do nothing, unsuccessfully\n* gettext::                     Translate a string\n* gptsync::                     Fill an MBR based on GPT entries\n* halt::                        Shut down your computer\n* hashsum::                     Compute or check hash checksum\n* help::                        Show help messages\n* initrd::                      Load a Linux initrd\n* initrd16::                    Load a Linux initrd (16-bit mode)\n* insmod::                      Insert a module\n* keystatus::                   Check key modifier status\n* linux::                       Load a Linux kernel\n* linux16::                     Load a Linux kernel (16-bit mode)\n* listenv::                    List variables in environment block\n* listtrusted::                List trusted public keys\n* loadenv::                    Load variables from environment block\n* loadfont::                    Load font files\n* loopback::                    Make a device from a filesystem image\n* ls::                          List devices or files\n* lsfonts::                     List loaded fonts\n* lsmod::                       Show loaded modules\n* md5sum::                      Compute or check MD5 hash\n* module::                      Load module for multiboot kernel\n* multiboot::                   Load multiboot compliant kernel\n* nativedisk::                  Switch to native disk drivers\n* normal::                      Enter normal mode\n* normalexit::                 Exit from normal mode\n* parttool::                    Modify partition table entries\n* password::                    Set a clear-text password\n* passwordpbkdf2::             Set a hashed password\n* play::                        Play a tune\n* probe::                       Retrieve device info\n* rdmsr::                       Read values from model-specific registers\n* read::                        Read user input\n* reboot::                      Reboot your computer\n* regexp::                      Test if regular expression matches string\n* rmmod::                       Remove a module\n* saveenv::                    Save variables to environment block\n* search::                      Search devices by file, label, or UUID\n* sendkey::                     Emulate keystrokes\n* set::                         Set an environment variable\n* sha1sum::                     Compute or check SHA1 hash\n* sha256sum::                   Compute or check SHA256 hash\n* sha512sum::                   Compute or check SHA512 hash\n* sleep::                       Wait for a specified number of seconds\n* smbios::                      Retrieve SMBIOS information\n* source::                      Read a configuration file in same context\n* test::                        Check file types and compare values\n* true::                        Do nothing, successfully\n* trust::                       Add public key to list of trusted keys\n* unset::                       Unset an environment variable\n* verifydetached::             Verify detached digital signature\n* videoinfo::                   List available video modes\n* wrmsr::                       Write values to model-specific registers\n* xenhypervisor::              Load xen hypervisor binary (only on AArch64)\n* xenmodule::                  Load xen modules for xen hypervisor (only on AArch64)\n\nFile: grub.info,  Node: [,  Next: acpi,  Up: Command-line and menu entry commands\n\n\n-- Command: [ expression ]\nAlias for 'test EXPRESSION' (*note test::).\n\nFile: grub.info,  Node: acpi,  Next: authenticate,  Prev: [,  Up: Command-line and menu entry commands\n\n\n-- Command: acpi [-1|-2] [--exclude=table1,...|--load-only=table1,...]\n[--oemid=id] [--oemtable=table] [--oemtablerev=rev]\n[--oemtablecreator=creator] [--oemtablecreatorrev=rev]\n[--no-ebda] filename ...\nModern BIOS systems normally implement the Advanced Configuration\nand Power Interface (ACPI), and define various tables that describe\nthe interface between an ACPI-compliant operating system and the\nfirmware.  In some cases, the tables provided by default only work\nwell with certain operating systems, and it may be necessary to\nreplace some of them.\n\nNormally, this command will replace the Root System Description\nPointer (RSDP) in the Extended BIOS Data Area to point to the new\ntables.  If the '--no-ebda' option is used, the new tables will be\nknown only to GRUB, but may be used by GRUB's EFI emulation.\n\nNote: The command is not allowed when lockdown is enforced (*note\nLockdown::).  Otherwise an attacker can instruct the GRUB to load\nan SSDT table to overwrite the kernel lockdown configuration and\nlater load and execute unsigned code.\n\nFile: grub.info,  Node: authenticate,  Next: backgroundcolor,  Prev: acpi,  Up: Command-line and menu entry commands\n\n\n-- Command: authenticate [userlist]\nCheck whether user is in USERLIST or listed in the value of\nvariable 'superusers'.  See *note superusers:: for valid user list\nformat.  If 'superusers' is empty, this command returns true.\n*Note Security::.\n\nFile: grub.info,  Node: backgroundcolor,  Next: backgroundimage,  Prev: authenticate,  Up: Command-line and menu entry commands\n\n\n-- Command: backgroundcolor color\nSet background color for active terminal.  For valid color\nspecifications see *note Colors: Theme file format.  Background\ncolor can be changed only when using 'gfxterm' for terminal output.\n\nThis command sets color of empty areas without text.  Text\nbackground color is controlled by environment variables\nCOLORNORMAL, COLORHIGHLIGHT, MENUCOLORNORMAL,\nMENUCOLORHIGHLIGHT.  *Note Special environment variables::.\n\nFile: grub.info,  Node: backgroundimage,  Next: badram,  Prev: backgroundcolor,  Up: Command-line and menu entry commands\n\n\n-- Command: backgroundimage [[--mode stretch|normal] file]\nLoad background image for active terminal from FILE.  Image is\nstretched to fill up entire screen unless option '--mode' 'normal'\nis given.  Without arguments remove currently loaded background\nimage.  Background image can be changed only when using 'gfxterm'\nfor terminal output.\n\nFile: grub.info,  Node: badram,  Next: blocklist,  Prev: backgroundimage,  Up: Command-line and menu entry commands\n\n\n-- Command: badram addr,mask[,addr,mask...]\nFilter out bad RAM.\n\nThis command notifies the memory manager that specified regions of\nRAM ought to be filtered out (usually, because they're damaged).\nThis remains in effect after a payload kernel has been loaded by\nGRUB, as long as the loaded kernel obtains its memory map from\nGRUB. Kernels that support this include Linux, GNU Mach, the kernel\nof FreeBSD and Multiboot kernels in general.\n\nSyntax is the same as provided by the Memtest86+ utility\n(http://www.memtest.org/): a list of address/mask pairs.  Given a\npage-aligned address and a base address / mask pair, if all the\nbits of the page-aligned address that are enabled by the mask match\nwith the base address, it means this page is to be filtered.  This\nsyntax makes it easy to represent patterns that are often result of\nmemory damage, due to physical distribution of memory cells.\n\nThe command is similar to 'cutmem' command.\n\nNote: The command is not allowed when lockdown is enforced (*note\nLockdown::).  This prevents removing EFI memory regions to\npotentially subvert the security mechanisms provided by the UEFI\nsecure boot.\n\nFile: grub.info,  Node: blocklist,  Next: boot,  Prev: badram,  Up: Command-line and menu entry commands\n\n\n-- Command: blocklist file\nPrint a block list (*note Block list syntax::) for FILE.\n\nFile: grub.info,  Node: boot,  Next: cat,  Prev: blocklist,  Up: Command-line and menu entry commands\n\n\n-- Command: boot\nBoot the OS or chain-loader which has been loaded.  Only necessary\nif running the fully interactive command-line (it is implicit at\nthe end of a menu entry).\n\nFile: grub.info,  Node: cat,  Next: chainloader,  Prev: boot,  Up: Command-line and menu entry commands\n\n\n-- Command: cat [--dos] file\nDisplay the contents of the file FILE.  This command may be useful\nto remind you of your OS's root partition:\n\ngrub> cat /etc/fstab\n\nIf the '--dos' option is used, then carriage return / new line\npairs will be displayed as a simple new line.  Otherwise, the\ncarriage return will be displayed as a control character ('<d>') to\nmake it easier to see when boot problems are caused by a file\nformatted using DOS-style line endings.\n\nFile: grub.info,  Node: chainloader,  Next: clear,  Prev: cat,  Up: Command-line and menu entry commands\n\n\n-- Command: chainloader [--force] file\nLoad FILE as a chain-loader.  Like any other file loaded by the\nfilesystem code, it can use the blocklist notation (*note Block\nlist syntax::) to grab the first sector of the current partition\nwith '+1'.  If you specify the option '--force', then load FILE\nforcibly, whether it has a correct signature or not.  This is\nrequired when you want to load a defective boot loader, such as SCO\nUnixWare 7.1.\n\nFile: grub.info,  Node: clear,  Next: cmosclean,  Prev: chainloader,  Up: Command-line and menu entry commands\n\n\n-- Command: clear\nClear the screen.\n\nFile: grub.info,  Node: cmosclean,  Next: cmosdump,  Prev: clear,  Up: Command-line and menu entry commands\n\n\n-- Command: cmosclean byte:bit\nClear value of bit in CMOS at location BYTE:BIT.  This command is\navailable only on platforms that support CMOS.\n\nFile: grub.info,  Node: cmosdump,  Next: cmostest,  Prev: cmosclean,  Up: Command-line and menu entry commands\n\n\n-- Dump: CMOS contents\nDump full CMOS contents as hexadecimal values.  This command is\navailable only on platforms that support CMOS.\n\nFile: grub.info,  Node: cmostest,  Next: cmp,  Prev: cmosdump,  Up: Command-line and menu entry commands\n\n\n-- Command: cmostest byte:bit\nTest value of bit in CMOS at location BYTE:BIT.  Exit status is\nzero if bit is set, non zero otherwise.  This command is available\nonly on platforms that support CMOS.\n\nFile: grub.info,  Node: cmp,  Next: configfile,  Prev: cmostest,  Up: Command-line and menu entry commands\n\n\n-- Command: cmp file1 file2\nCompare the file FILE1 with the file FILE2.  If they differ in\nsize, print the sizes like this:\n\nDiffer in size: 0x1234 [foo], 0x4321 [bar]\n\nIf the sizes are equal but the bytes at an offset differ, then\nprint the bytes like this:\n\nDiffer at the offset 777: 0xbe [foo], 0xef [bar]\n\nIf they are completely identical, nothing will be printed.\n\nFile: grub.info,  Node: configfile,  Next: cpuid,  Prev: cmp,  Up: Command-line and menu entry commands\n\n\n-- Command: configfile file\nLoad FILE as a configuration file.  If FILE defines any menu\nentries, then show a menu containing them immediately.  Any\nenvironment variable changes made by the commands in FILE will not\nbe preserved after 'configfile' returns.\n\nFile: grub.info,  Node: cpuid,  Next: crc,  Prev: configfile,  Up: Command-line and menu entry commands\n\n\n-- Command: cpuid [-l] [-p]\nCheck for CPU features.  This command is only available on x86\nsystems.\n\nWith the '-l' option, return true if the CPU supports long mode\n(64-bit).\n\nWith the '-p' option, return true if the CPU supports Physical\nAddress Extension (PAE).\n\nIf invoked without options, this command currently behaves as if it\nhad been invoked with '-l'.  This may change in the future.\n\nFile: grub.info,  Node: crc,  Next: cryptomount,  Prev: cpuid,  Up: Command-line and menu entry commands\n\n\n-- Command: crc arg ...\nAlias for 'hashsum --hash crc32 arg ...'.  See command 'hashsum'\n(*note hashsum::) for full description.\n\nFile: grub.info,  Node: cryptomount,  Next: cutmem,  Prev: crc,  Up: Command-line and menu entry commands\n\n\n-- Command: cryptomount device|-u uuid|-a|-b\nSetup access to encrypted device.  If necessary, passphrase is\nrequested interactively.  Option DEVICE configures specific grub\ndevice (*note Naming convention::); option '-u' UUID configures\ndevice with specified UUID; option '-a' configures all detected\nencrypted devices; option '-b' configures all geli containers that\nhave boot flag set.\n\nGRUB suports devices encrypted using LUKS, LUKS2 and geli.  Note\nthat necessary modules (LUKS, LUKS2 and GELI) have to be loaded\nmanually before this command can be used.  For LUKS2 only the\nPBKDF2 key derivation function is supported, as Argon2 is not yet\nsupported.\n\nAlso, note that, unlike filesystem UUIDs, UUIDs for encrypted\ndevices must be specified without dash separators.\n\nFile: grub.info,  Node: cutmem,  Next: date,  Prev: cryptomount,  Up: Command-line and menu entry commands\n\n\n-- Command: cutmem from[K|M|G] to[K|M|G]\nRemove any memory regions in specified range.\n\nThis command notifies the memory manager that specified regions of\nRAM ought to be filtered out.  This remains in effect after a\npayload kernel has been loaded by GRUB, as long as the loaded\nkernel obtains its memory map from GRUB. Kernels that support this\ninclude Linux, GNU Mach, the kernel of FreeBSD and Multiboot\nkernels in general.\n\nThe command is similar to 'badram' command.\n\nNote: The command is not allowed when lockdown is enforced (*note\nLockdown::).  This prevents removing EFI memory regions to\npotentially subvert the security mechanisms provided by the UEFI\nsecure boot.\n\nFile: grub.info,  Node: date,  Next: devicetree,  Prev: cutmem,  Up: Command-line and menu entry commands\n\n\n-- Command: date [[year-]month-day] [hour:minute[:second]]\nWith no arguments, print the current date and time.\n\nOtherwise, take the current date and time, change any elements\nspecified as arguments, and set the result as the new date and\ntime.  For example, 'date 01-01' will set the current month and day\nto January 1, but leave the year, hour, minute, and second\nunchanged.\n\nFile: grub.info,  Node: devicetree,  Next: distrust,  Prev: date,  Up: Command-line and menu entry commands\n\n\n-- Command: devicetree file\nLoad a device tree blob (.dtb) from a filesystem, for later use by\na Linux kernel.  Does not perform merging with any device tree\nsupplied by firmware, but rather replaces it completely.\n\nNote: The command is not allowed when lockdown is enforced (*note\nLockdown::).  This is done to prevent subverting various security\nmechanisms.\n\nFile: grub.info,  Node: distrust,  Next: drivemap,  Prev: devicetree,  Up: Command-line and menu entry commands\n\n\n-- Command: distrust pubkeyid\nRemove public key PUBKEYID from GRUB's keyring of trusted keys.\nPUBKEYID is the last four bytes (eight hexadecimal digits) of the\nGPG v4 key id, which is also the output of 'listtrusted' (*note\nlisttrusted::).  Outside of GRUB, the key id can be obtained using\n'gpg --fingerprint').  These keys are used to validate signatures\nwhen environment variable 'checksignatures' is set to 'enforce'\n(*note checksignatures::), and by some invocations of\n'verifydetached' (*note verifydetached::).  *Note Using digital\nsignatures::, for more information.\n\nFile: grub.info,  Node: drivemap,  Next: echo,  Prev: distrust,  Up: Command-line and menu entry commands\n\n\n-- Command: drivemap -l|-r|[-s] fromdrive todrive\nWithout options, map the drive FROMDRIVE to the drive TODRIVE.\nThis is necessary when you chain-load some operating systems, such\nas DOS, if such an OS resides at a non-first drive.  For\nconvenience, any partition suffix on the drive is ignored, so you\ncan safely use ${root} as a drive specification.\n\nWith the '-s' option, perform the reverse mapping as well, swapping\nthe two drives.\n\nWith the '-l' option, list the current mappings.\n\nWith the '-r' option, reset all mappings to the default values.\n\nFor example:\n\ndrivemap -s (hd0) (hd1)\n\nFile: grub.info,  Node: echo,  Next: eval,  Prev: drivemap,  Up: Command-line and menu entry commands\n\n\n-- Command: echo [-n] [-e] string ...\nDisplay the requested text and, unless the '-n' option is used, a\ntrailing new line.  If there is more than one string, they are\nseparated by spaces in the output.  As usual in GRUB commands,\nvariables may be substituted using '${var}'.\n\nThe '-e' option enables interpretation of backslash escapes.  The\nfollowing sequences are recognised:\n\n'\\\\'\nbackslash\n\n'\\a'\nalert (BEL)\n\n'\\c'\nsuppress trailing new line\n\n'\\f'\nform feed\n\n'\\n'\nnew line\n\n'\\r'\ncarriage return\n\n'\\t'\nhorizontal tab\n\n'\\v'\nvertical tab\n\nWhen interpreting backslash escapes, backslash followed by any\nother character will print that character.\n\nFile: grub.info,  Node: eval,  Next: export,  Prev: echo,  Up: Command-line and menu entry commands\n\n\n-- Command: eval string ...\nConcatenate arguments together using single space as separator and\nevaluate result as sequence of GRUB commands.\n\nFile: grub.info,  Node: export,  Next: false,  Prev: eval,  Up: Command-line and menu entry commands\n\n\n-- Command: export envvar\nExport the environment variable ENVVAR.  Exported variables are\nvisible to subsidiary configuration files loaded using\n'configfile'.\n\nFile: grub.info,  Node: false,  Next: gettext,  Prev: export,  Up: Command-line and menu entry commands\n\n\n-- Command: false\nDo nothing, unsuccessfully.  This is mainly useful in control\nconstructs such as 'if' and 'while' (*note Shell-like scripting::).\n\nFile: grub.info,  Node: gettext,  Next: gptsync,  Prev: false,  Up: Command-line and menu entry commands\n\n\n-- Command: gettext string\nTranslate STRING into the current language.\n\nThe current language code is stored in the 'lang' variable in\nGRUB's environment (*note lang::).  Translation files in MO format\nare read from 'localedir' (*note localedir::), usually\n'/boot/grub/locale'.\n\nFile: grub.info,  Node: gptsync,  Next: halt,  Prev: gettext,  Up: Command-line and menu entry commands\n\n\n-- Command: gptsync device [partition[+/-[type]]] ...\nDisks using the GUID Partition Table (GPT) also have a legacy\nMaster Boot Record (MBR) partition table for compatibility with the\nBIOS and with older operating systems.  The legacy MBR can only\nrepresent a limited subset of GPT partition entries.\n\nThis command populates the legacy MBR with the specified PARTITION\nentries on DEVICE.  Up to three partitions may be used.\n\nTYPE is an MBR partition type code; prefix with '0x' if you want to\nenter this in hexadecimal.  The separator between PARTITION and\nTYPE may be '+' to make the partition active, or '-' to make it\ninactive; only one partition may be active.  If both the separator\nand type are omitted, then the partition will be inactive.\n\nFile: grub.info,  Node: halt,  Next: hashsum,  Prev: gptsync,  Up: Command-line and menu entry commands\n\n\n-- Command: halt --no-apm\nThe command halts the computer.  If the '--no-apm' option is\nspecified, no APM BIOS call is performed.  Otherwise, the computer\nis shut down using APM.\n\nFile: grub.info,  Node: hashsum,  Next: help,  Prev: halt,  Up: Command-line and menu entry commands\n\n\n-- Command: hashsum --hash hash --keep-going --uncompress --check file\n[--prefix dir]|file ...\nCompute or verify file hashes.  Hash type is selected with option\n'--hash'.  Supported hashes are: 'adler32', 'crc64', 'crc32',\n'crc32rfc1510', 'crc24rfc2440', 'md4', 'md5', 'ripemd160', 'sha1',\n'sha224', 'sha256', 'sha512', 'sha384', 'tiger192', 'tiger',\n'tiger2', 'whirlpool'.  Option '--uncompress' uncompresses files\nbefore computing hash.\n\nWhen list of files is given, hash of each file is computed and\nprinted, followed by file name, each file on a new line.\n\nWhen option '--check' is given, it points to a file that contains\nlist of HASH NAME pairs in the same format as used by UNIX 'md5sum'\ncommand.  Option '--prefix' may be used to give directory where\nfiles are located.  Hash verification stops after the first\nmismatch was found unless option '--keep-going' was given.  The\nexit code '$?' is set to 0 if hash verification is successful.  If\nit fails, '$?' is set to a nonzero value.\n\nFile: grub.info,  Node: help,  Next: initrd,  Prev: hashsum,  Up: Command-line and menu entry commands\n\n\n-- Command: help [pattern ...]\nDisplay helpful information about builtin commands.  If you do not\nspecify PATTERN, this command shows short descriptions of all\navailable commands.\n\nIf you specify any PATTERNS, it displays longer information about\neach of the commands whose names begin with those PATTERNS.\n\nFile: grub.info,  Node: initrd,  Next: initrd16,  Prev: help,  Up: Command-line and menu entry commands\n\n\n-- Command: initrd file [file ...]\nLoad, in order, all initial ramdisks for a Linux kernel image, and\nset the appropriate parameters in the Linux setup area in memory.\nThis may only be used after the 'linux' command (*note linux::) has\nbeen run.  See also *note GNU/Linux::.\n\nFile: grub.info,  Node: initrd16,  Next: insmod,  Prev: initrd,  Up: Command-line and menu entry commands\n\n\n-- Command: initrd16 file [file ...]\nLoad, in order, all initial ramdisks for a Linux kernel image to be\nbooted in 16-bit mode, and set the appropriate parameters in the\nLinux setup area in memory.  This may only be used after the\n'linux16' command (*note linux16::) has been run.  See also *note\nGNU/Linux::.\n\nThis command is only available on x86 systems.\n\nFile: grub.info,  Node: insmod,  Next: keystatus,  Prev: initrd16,  Up: Command-line and menu entry commands\n\n\n-- Command: insmod module\nInsert the dynamic GRUB module called MODULE.\n\nFile: grub.info,  Node: keystatus,  Next: linux,  Prev: insmod,  Up: Command-line and menu entry commands\n\n\n-- Command: keystatus [--shift] [--ctrl] [--alt]\nReturn true if the Shift, Control, or Alt modifier keys are held\ndown, as requested by options.  This is useful in scripting, to\nallow some user control over behaviour without having to wait for a\nkeypress.\n\nChecking key modifier status is only supported on some platforms.\nIf invoked without any options, the 'keystatus' command returns\ntrue if and only if checking key modifier status is supported.\n\nFile: grub.info,  Node: linux,  Next: linux16,  Prev: keystatus,  Up: Command-line and menu entry commands\n\n\n-- Command: linux file ...\nLoad a Linux kernel image from FILE.  The rest of the line is\npassed verbatim as the \"kernel command-line\".  Any initrd must be\nreloaded after using this command (*note initrd::).\n\nOn x86 systems, the kernel will be booted using the 32-bit boot\nprotocol.  Note that this means that the 'vga=' boot option will\nnot work; if you want to set a special video mode, you will need to\nuse GRUB commands such as 'set gfxpayload=1024x768' or 'set\ngfxpayload=keep' (to keep the same mode as used in GRUB) instead.\nGRUB can automatically detect some uses of 'vga=' and translate\nthem to appropriate settings of 'gfxpayload'.  The 'linux16'\ncommand (*note linux16::) avoids this restriction.\n\nFile: grub.info,  Node: linux16,  Next: listenv,  Prev: linux,  Up: Command-line and menu entry commands\n\n\n-- Command: linux16 file ...\nLoad a Linux kernel image from FILE in 16-bit mode.  The rest of\nthe line is passed verbatim as the \"kernel command-line\".  Any\ninitrd must be reloaded after using this command (*note\ninitrd16::).\n\nThe kernel will be booted using the traditional 16-bit boot\nprotocol.  As well as bypassing problems with 'vga=' described in\n*note linux::, this permits booting some other programs that\nimplement the Linux boot protocol for the sake of convenience.\n\nThis command is only available on x86 systems.\n\nFile: grub.info,  Node: listenv,  Next: listtrusted,  Prev: linux16,  Up: Command-line and menu entry commands\n\n\n-- Command: listenv [--file file]\nList all variables in the environment block file.  *Note\nEnvironment block::.\n\nThe '--file' option overrides the default location of the\nenvironment block.\n\nFile: grub.info,  Node: listtrusted,  Next: loadenv,  Prev: listenv,  Up: Command-line and menu entry commands\n\n\n-- Command: listtrusted\nList all public keys trusted by GRUB for validating signatures.\nThe output is in GPG's v4 key fingerprint format (i.e., the output\nof 'gpg --fingerprint').  The least significant four bytes (last\neight hexadecimal digits) can be used as an argument to 'distrust'\n(*note distrust::).  *Note Using digital signatures::, for more\ninformation about uses for these keys.\n\nFile: grub.info,  Node: loadenv,  Next: loadfont,  Prev: listtrusted,  Up: Command-line and menu entry commands\n\n\n-- Command: loadenv [--file file] [--skip-sig]\n[whitelistedvariablename] ...\nLoad all variables from the environment block file into the\nenvironment.  *Note Environment block::.\n\nThe '--file' option overrides the default location of the\nenvironment block.\n\nThe '--skip-sig' option skips signature checking even when the\nvalue of environment variable 'checksignatures' is set to\n'enforce' (*note checksignatures::).\n\nIf one or more variable names are provided as arguments, they are\ninterpreted as a whitelist of variables to load from the\nenvironment block file.  Variables set in the file but not present\nin the whitelist are ignored.\n\nThe '--skip-sig' option should be used with care, and should always\nbe used in concert with a whitelist of acceptable variables whose\nvalues should be set.  Failure to employ a carefully constructed\nwhitelist could result in reading a malicious value into critical\nenvironment variables from the file, such as setting\n'checksignatures=no', modifying 'prefix' to boot from an\nunexpected location or not at all, etc.\n\nWhen used with care, '--skip-sig' and the whitelist enable an\nadministrator to configure a system to boot only signed\nconfigurations, but to allow the user to select from among multiple\nconfigurations, and to enable \"one-shot\" boot attempts and\n\"savedefault\" behavior.  *Note Using digital signatures::, for more\ninformation.\n\nFile: grub.info,  Node: loadfont,  Next: loopback,  Prev: loadenv,  Up: Command-line and menu entry commands\n\n\n-- Command: loadfont file ...\nLoad specified font files.  Unless absolute pathname is given, FILE\nis assumed to be in directory '$prefix/fonts' with suffix '.pf2'\nappended.  *Note Fonts: Theme file format.\n\nFile: grub.info,  Node: loopback,  Next: ls,  Prev: loadfont,  Up: Command-line and menu entry commands\n\n\n-- Command: loopback [-d] device file\nMake the device named DEVICE correspond to the contents of the\nfilesystem image in FILE.  For example:\n\nloopback loop0 /path/to/image\nls (loop0)/\n\nWith the '-d' option, delete a device previously created using this\ncommand.\n\nFile: grub.info,  Node: ls,  Next: lsfonts,  Prev: loopback,  Up: Command-line and menu entry commands\n\n\n-- Command: ls [arg ...]\nList devices or files.\n\nWith no arguments, print all devices known to GRUB.\n\nIf the argument is a device name enclosed in parentheses (*note\nDevice syntax::), then print the name of the filesystem of that\ndevice.\n\nIf the argument is a directory given as an absolute file name\n(*note File name syntax::), then list the contents of that\ndirectory.\n\nFile: grub.info,  Node: lsfonts,  Next: lsmod,  Prev: ls,  Up: Command-line and menu entry commands\n\n\n-- Command: lsfonts\nList loaded fonts.\n\nFile: grub.info,  Node: lsmod,  Next: md5sum,  Prev: lsfonts,  Up: Command-line and menu entry commands\n\n\n-- Command: lsmod\nShow list of loaded modules.\n\nFile: grub.info,  Node: md5sum,  Next: module,  Prev: lsmod,  Up: Command-line and menu entry commands\n\n\n-- Command: md5sum arg ...\nAlias for 'hashsum --hash md5 arg ...'.  See command 'hashsum'\n(*note hashsum::) for full description.\n\nFile: grub.info,  Node: module,  Next: multiboot,  Prev: md5sum,  Up: Command-line and menu entry commands\n\n\n-- Command: module [--nounzip] file [arguments]\nLoad a module for multiboot kernel image.  The rest of the line is\npassed verbatim as the module command line.\n\nFile: grub.info,  Node: multiboot,  Next: nativedisk,  Prev: module,  Up: Command-line and menu entry commands\n\n\n-- Command: multiboot [--quirk-bad-kludge]\n[--quirk-modules-after-kernel] file ...\nLoad a multiboot kernel image from FILE.  The rest of the line is\npassed verbatim as the \"kernel command-line\".  Any module must be\nreloaded after using this command (*note module::).\n\nSome kernels have known problems.  You need to specify -quirk-* for\nthose.  -quirk-bad-kludge is a problem seen in several products\nthat they include loading kludge information with invalid data in\nELF file.  GRUB prior to 0.97 and some custom builds preferred ELF\ninformation while 0.97 and GRUB 2 use kludge.  Use this option to\nignore kludge.  Known affected systems: old Solaris, SkyOS.\n\n-quirk-modules-after-kernel is needed for kernels which load at\nrelatively high address e.g.  16MiB mark and can't cope with\nmodules stuffed between 1MiB mark and beginning of the kernel.\nKnown afftected systems: VMWare.\n\nFile: grub.info,  Node: nativedisk,  Next: normal,  Prev: multiboot,  Up: Command-line and menu entry commands\n\n\n-- Command: nativedisk\nSwitch from firmware disk drivers to native ones.  Really useful\nonly on platforms where both firmware and native disk drives are\navailable.  Currently i386-pc, i386-efi, i386-ieee1275 and\nx8664-efi.\n\nFile: grub.info,  Node: normal,  Next: normalexit,  Prev: nativedisk,  Up: Command-line and menu entry commands\n\n\n-- Command: normal [file]\nEnter normal mode and display the GRUB menu.\n\nIn normal mode, commands, filesystem modules, and cryptography\nmodules are automatically loaded, and the full GRUB script parser\nis available.  Other modules may be explicitly loaded using\n'insmod' (*note insmod::).\n\nIf a FILE is given, then commands will be read from that file.\nOtherwise, they will be read from '$prefix/grub.cfg' if it exists.\n\n'normal' may be called from within normal mode, creating a nested\nenvironment.  It is more usual to use 'configfile' (*note\nconfigfile::) for this.\n\nFile: grub.info,  Node: normalexit,  Next: parttool,  Prev: normal,  Up: Command-line and menu entry commands\n\n\n-- Command: normalexit\nExit normal mode (*note normal::).  If this instance of normal mode\nwas not nested within another one, then return to rescue mode.\n\nFile: grub.info,  Node: parttool,  Next: password,  Prev: normalexit,  Up: Command-line and menu entry commands\n\n\n-- Command: parttool partition commands\nMake various modifications to partition table entries.\n\nEach COMMAND is either a boolean option, in which case it must be\nfollowed with '+' or '-' (with no intervening space) to enable or\ndisable that option, or else it takes a value in the form\n'COMMAND=VALUE'.\n\nCurrently, 'parttool' is only useful on DOS partition tables (also\nknown as Master Boot Record, or MBR). On these partition tables,\nthe following commands are available:\n\n'boot' (boolean)\nWhen enabled, this makes the selected partition be the active\n(bootable) partition on its disk, clearing the active flag on\nall other partitions.  This command is limited to primary\npartitions.\n\n'type' (value)\nChange the type of an existing partition.  The value must be a\nnumber in the range 0-0xFF (prefix with '0x' to enter it in\nhexadecimal).\n\n'hidden' (boolean)\nWhen enabled, this hides the selected partition by setting the\n\"hidden\" bit in its partition type code; when disabled,\nunhides the selected partition by clearing this bit.  This is\nuseful only when booting DOS or Windows and multiple primary\nFAT partitions exist in one disk.  See also *note\nDOS/Windows::.\n\nFile: grub.info,  Node: password,  Next: passwordpbkdf2,  Prev: parttool,  Up: Command-line and menu entry commands\n\n\n-- Command: password user clear-password\nDefine a user named USER with password CLEAR-PASSWORD.  *Note\nSecurity::.\n\nFile: grub.info,  Node: passwordpbkdf2,  Next: play,  Prev: password,  Up: Command-line and menu entry commands\n\n\n-- Command: passwordpbkdf2 user hashed-password\nDefine a user named USER with password hash HASHED-PASSWORD.  Use\n'grub-mkpasswd-pbkdf2' (*note Invoking grub-mkpasswd-pbkdf2::) to\ngenerate password hashes.  *Note Security::.\n\nFile: grub.info,  Node: play,  Next: probe,  Prev: passwordpbkdf2,  Up: Command-line and menu entry commands\n\n\n-- Command: play file | tempo [pitch1 duration1] [pitch2 duration2] ...\nPlays a tune\n\nIf the argument is a file name (*note File name syntax::), play the\ntune recorded in it.  The file format is first the tempo as an\nunsigned 32bit little-endian number, then pairs of unsigned 16bit\nlittle-endian numbers for pitch and duration pairs.\n\nIf the arguments are a series of numbers, play the inline tune.\n\nThe tempo is the base for all note durations.  60 gives a 1-second\nbase, 120 gives a half-second base, etc.  Pitches are Hz.  Set\npitch to 0 to produce a rest.\n\nFile: grub.info,  Node: probe,  Next: rdmsr,  Prev: play,  Up: Command-line and menu entry commands\n\n\n-- Command: probe [--set var]\n--driver|--partmap|--fs|--fs-uuid|--label|--part-uuid device\nRetrieve device information.  If option '--set' is given, assign\nresult to variable VAR, otherwise print information on the screen.\n\nThe option '--part-uuid' is currently only implemented for MSDOS\nand GPT formatted disks.\n\nFile: grub.info,  Node: rdmsr,  Next: read,  Prev: probe,  Up: Command-line and menu entry commands\n\n\n-- Command:: rdmsr 0xADDR [-v VARNAME]\nRead a model-specific register at address 0xADDR. If the parameter\n'-v' is used and an environment variable VARNAME is given, set that\nenvironment variable to the value that was read.\n\nPlease note that on SMP systems, reading from a MSR that has a\nscope per hardware thread, implies that the value that is returned\nonly applies to the particular cpu/core/thread that runs the\ncommand.\n\nAlso, if you specify a reserved or unimplemented MSR address, it\nwill cause a general protection exception (which is not currently\nbeing handled) and the system will reboot.\n\nFile: grub.info,  Node: read,  Next: reboot,  Prev: rdmsr,  Up: Command-line and menu entry commands\n\n\n-- Command: read [var]\nRead a line of input from the user.  If an environment variable VAR\nis given, set that environment variable to the line of input that\nwas read, with no terminating newline.\n\nFile: grub.info,  Node: reboot,  Next: regexp,  Prev: read,  Up: Command-line and menu entry commands\n\n\n-- Command: reboot\nReboot the computer.\n\nFile: grub.info,  Node: regexp,  Next: rmmod,  Prev: reboot,  Up: Command-line and menu entry commands\n\n\n-- Command: regexp [--set [number:]var] regexp string\nTest if regular expression REGEXP matches STRING.  Supported\nregular expressions are POSIX.2 Extended Regular Expressions.  If\noption '--set' is given, store NUMBERth matched subexpression in\nvariable VAR.  Subexpressions are numbered in order of their\nopening parentheses starting from '1'.  NUMBER defaults to '1'.\n\nFile: grub.info,  Node: rmmod,  Next: saveenv,  Prev: regexp,  Up: Command-line and menu entry commands\n\n\n-- Command: rmmod module\nRemove a loaded MODULE.\n\nFile: grub.info,  Node: saveenv,  Next: search,  Prev: rmmod,  Up: Command-line and menu entry commands\n\n\n-- Command: saveenv [--file file] var ...\nSave the named variables from the environment to the environment\nblock file.  *Note Environment block::.\n\nThe '--file' option overrides the default location of the\nenvironment block.\n\nThis command will operate successfully even when environment\nvariable 'checksignatures' is set to 'enforce' (*note\nchecksignatures::), since it writes to disk and does not alter the\nbehavior of GRUB based on any contents of disk that have been read.\nIt is possible to modify a digitally signed environment block file\nfrom within GRUB using this command, such that its signature will\nno longer be valid on subsequent boots.  Care should be taken in\nsuch advanced configurations to avoid rendering the system\nunbootable.  *Note Using digital signatures::, for more\ninformation.\n\nFile: grub.info,  Node: search,  Next: sendkey,  Prev: saveenv,  Up: Command-line and menu entry commands\n\n\n-- Command: search [--file|--label|--fs-uuid] [--set [var]]\n[--no-floppy] name\nSearch devices by file ('-f', '--file'), filesystem label ('-l',\n'--label'), or filesystem UUID ('-u', '--fs-uuid').\n\nIf the '--set' option is used, the first device found is set as the\nvalue of environment variable VAR.  The default variable is 'root'.\n\nThe '--no-floppy' option prevents searching floppy devices, which\ncan be slow.\n\nThe 'search.file', 'search.fslabel', and 'search.fsuuid' commands\nare aliases for 'search --file', 'search --label', and 'search\n--fs-uuid' respectively.\n\nFile: grub.info,  Node: sendkey,  Next: set,  Prev: search,  Up: Command-line and menu entry commands\n\n\n-- Command: sendkey\n[--num|--caps|--scroll|--insert|--pause|--left-shift|--right-shift|--sysrq|--numkey|--capskey|--scrollkey|--insertkey|--left-alt|--right-alt|--left-ctrl|--right-ctrl\non|off]... [no-led] keystroke\nInsert keystrokes into the keyboard buffer when booting.  Sometimes\nan operating system or chainloaded boot loader requires particular\nkeys to be pressed: for example, one might need to press a\nparticular key to enter \"safe mode\", or when chainloading another\nboot loader one might send keystrokes to it to navigate its menu.\n\nYou may provide up to 16 keystrokes (the length of the BIOS\nkeyboard buffer).  Keystroke names may be upper-case or lower-case\nletters, digits, or taken from the following table:\n\nescape                        Escape\nexclam                        !\nat                            @\nnumbersign                    #\ndollar                        $\npercent                       %\ncaret                         ^\nampersand                     &\nasterisk                      *\nparenleft                     (\nparenright                    )\nminus                         -\nunderscore\nequal                         =\nplus                          +\nbackspace                     Backspace\ntab                           Tab\nbracketleft                   [\nbraceleft                     {\nbracketright                  ]\nbraceright                    }\nenter                         Enter\ncontrol                       press and release Control\nsemicolon                     ;\ncolon                         :\nquote                         '\ndoublequote                   \"\nbackquote                     '\ntilde                         ~\nshift                         press and release left Shift\nbackslash                     \\\nbar                           |\ncomma                         ,\nless                          <\nperiod                        .\ngreater                       >\nslash                         /\nquestion                      ?\nrshift                        press and release right Shift\nalt                           press and release Alt\nspace                         space bar\ncapslock                      Caps Lock\nF1                            F1\nF2                            F2\nF3                            F3\nF4                            F4\nF5                            F5\nF6                            F6\nF7                            F7\nF8                            F8\nF9                            F9\nF10                           F10\nF11                           F11\nF12                           F12\nnum1                          1 (numeric keypad)\nnum2                          2 (numeric keypad)\nnum3                          3 (numeric keypad)\nnum4                          4 (numeric keypad)\nnum5                          5 (numeric keypad)\nnum6                          6 (numeric keypad)\nnum7                          7 (numeric keypad)\nnum8                          8 (numeric keypad)\nnum9                          9 (numeric keypad)\nnum0                          0 (numeric keypad)\nnumperiod                     .  (numeric keypad)\nnumend                        End (numeric keypad)\nnumdown                       Down (numeric keypad)\nnumpgdown                     Page Down (numeric keypad)\nnumleft                       Left (numeric keypad)\nnumcenter                     5 with Num Lock inactive (numeric\nkeypad)\nnumright                      Right (numeric keypad)\nnumhome                       Home (numeric keypad)\nnumup                         Up (numeric keypad)\nnumpgup                       Page Up (numeric keypad)\nnuminsert                     Insert (numeric keypad)\nnumdelete                     Delete (numeric keypad)\nnumasterisk                   * (numeric keypad)\nnumminus                      - (numeric keypad)\nnumplus                       + (numeric keypad)\nnumslash                      / (numeric keypad)\nnumenter                      Enter (numeric keypad)\ndelete                        Delete\ninsert                        Insert\nhome                          Home\nend                           End\npgdown                        Page Down\npgup                          Page Up\ndown                          Down\nup                            Up\nleft                          Left\nright                         Right\n\nAs well as keystrokes, the 'sendkey' command takes various options\nthat affect the BIOS keyboard status flags.  These options take an\n'on' or 'off' parameter, specifying that the corresponding status\nflag be set or unset; omitting the option for a given status flag\nwill leave that flag at its initial state at boot.  The '--num',\n'--caps', '--scroll', and '--insert' options emulate setting the\ncorresponding mode, while the '--numkey', '--capskey',\n'--scrollkey', and '--insertkey' options emulate pressing and\nholding the corresponding key.  The other status flag options are\nself-explanatory.\n\nIf the '--no-led' option is given, the status flag options will\nhave no effect on keyboard LEDs.\n\nIf the 'sendkey' command is given multiple times, then only the\nlast invocation has any effect.\n\nSince 'sendkey' manipulates the BIOS keyboard buffer, it may cause\nhangs, reboots, or other misbehaviour on some systems.  If the\noperating system or boot loader that runs after GRUB uses its own\nkeyboard driver rather than the BIOS keyboard functions, then\n'sendkey' will have no effect.\n\nThis command is only available on PC BIOS systems.\n\nFile: grub.info,  Node: set,  Next: sha1sum,  Prev: sendkey,  Up: Command-line and menu entry commands\n\n\n-- Command: set [envvar=value]\nSet the environment variable ENVVAR to VALUE.  If invoked with no\narguments, print all environment variables with their values.\n\nFile: grub.info,  Node: sha1sum,  Next: sha256sum,  Prev: set,  Up: Command-line and menu entry commands\n\n\n-- Command: sha1sum arg ...\nAlias for 'hashsum --hash sha1 arg ...'.  See command 'hashsum'\n(*note hashsum::) for full description.\n\nFile: grub.info,  Node: sha256sum,  Next: sha512sum,  Prev: sha1sum,  Up: Command-line and menu entry commands\n\n\n-- Command: sha256sum arg ...\nAlias for 'hashsum --hash sha256 arg ...'.  See command 'hashsum'\n(*note hashsum::) for full description.\n\nFile: grub.info,  Node: sha512sum,  Next: sleep,  Prev: sha256sum,  Up: Command-line and menu entry commands\n\n\n-- Command: sha512sum arg ...\nAlias for 'hashsum --hash sha512 arg ...'.  See command 'hashsum'\n(*note hashsum::) for full description.\n\nFile: grub.info,  Node: sleep,  Next: smbios,  Prev: sha512sum,  Up: Command-line and menu entry commands\n\n\n-- Command: sleep [--verbose] [--interruptible] count\nSleep for COUNT seconds.  If option '--interruptible' is given,\nallow pressing <ESC>, <F4> or holding down <SHIFT> to interrupt\nsleep.  With '--verbose' show countdown of remaining seconds.  Exit\ncode is set to 0 if timeout expired and to 1 if timeout was\ninterrupted using any of the mentioned keys.\n\nFile: grub.info,  Node: smbios,  Next: source,  Prev: sleep,  Up: Command-line and menu entry commands\n\n\n-- Command: smbios [--type TYPE] [--handle HANDLE] [--match MATCH]\n(--get-byte | --get-word | --get-dword | --get-qword |\n--get-string | --get-uuid) OFFSET [--set VARIABLE]\nRetrieve SMBIOS information.\n\nThe 'smbios' command returns the value of a field in an SMBIOS\nstructure.  The following options determine which structure to\nselect.\n\n* Specifying '--type' will select structures with a matching\nTYPE.  The type can be any integer from 0 to 255.\n* Specifying '--handle' will select structures with a matching\nHANDLE.  The handle can be any integer from 0 to 65535.\n* Specifying '--match' will select structure number MATCH in the\nfiltered list of structures; e.g.  'smbios --type 4 --match 2'\nwill select the second Process Information (Type 4) structure.\nThe list is always ordered the same as the hardware's SMBIOS\ntable.  The match number must be a positive integer.  If\nunspecified, the first matching structure will be selected.\n\nThe remaining options determine which field in the selected SMBIOS\nstructure to return.  Only one of these options may be specified at\na time.\n\n* When given '--get-byte', return the value of the byte at\nOFFSET bytes into the selected SMBIOS structure.  It will be\nformatted as an unsigned decimal integer.\n* When given '--get-word', return the value of the word (two\nbytes) at OFFSET bytes into the selected SMBIOS structure.  It\nwill be formatted as an unsigned decimal integer.\n* When given '--get-dword', return the value of the dword (four\nbytes) at OFFSET bytes into the selected SMBIOS structure.  It\nwill be formatted as an unsigned decimal integer.\n* When given '--get-qword', return the value of the qword (eight\nbytes) at OFFSET bytes into the selected SMBIOS structure.  It\nwill be formatted as an unsigned decimal integer.\n* When given '--get-string', return the string with its index\nfound at OFFSET bytes into the selected SMBIOS structure.\n* When given '--get-uuid', return the value of the UUID (sixteen\nbytes) at OFFSET bytes into the selected SMBIOS structure.  It\nwill be formatted as lower-case hyphenated hexadecimal digits,\nwith the first three fields as little-endian, and the rest\nprinted byte-by-byte.\n\nThe default action is to print the value of the requested field to\nthe console, but a variable name can be specified with '--set' to\nstore the value instead of printing it.\n\nFor example, this will store and then display the system\nmanufacturer's name.\n\nsmbios --type 1 --get-string 4 --set systemmanufacturer\necho $systemmanufacturer\n\nFile: grub.info,  Node: source,  Next: test,  Prev: smbios,  Up: Command-line and menu entry commands\n\n\n-- Command: source file\nRead FILE as a configuration file, as if its contents had been\nincorporated directly into the sourcing file.  Unlike 'configfile'\n(*note configfile::), this executes the contents of FILE without\nchanging context: any environment variable changes made by the\ncommands in FILE will be preserved after 'source' returns, and the\nmenu will not be shown immediately.\n\nFile: grub.info,  Node: test,  Next: true,  Prev: source,  Up: Command-line and menu entry commands\n\n\n-- Command: test expression\nEvaluate EXPRESSION and return zero exit status if result is true,\nnon zero status otherwise.\n\nEXPRESSION is one of:\n\nSTRING1 '==' STRING2\nthe strings are equal\nSTRING1 '!=' STRING2\nthe strings are not equal\nSTRING1 '<' STRING2\nSTRING1 is lexicographically less than STRING2\nSTRING1 '<=' STRING2\nSTRING1 is lexicographically less or equal than STRING2\nSTRING1 '>' STRING2\nSTRING1 is lexicographically greater than STRING2\nSTRING1 '>=' STRING2\nSTRING1 is lexicographically greater or equal than STRING2\nINTEGER1 '-eq' INTEGER2\nINTEGER1 is equal to INTEGER2\nINTEGER1 '-ge' INTEGER2\nINTEGER1 is greater than or equal to INTEGER2\nINTEGER1 '-gt' INTEGER2\nINTEGER1 is greater than INTEGER2\nINTEGER1 '-le' INTEGER2\nINTEGER1 is less than or equal to INTEGER2\nINTEGER1 '-lt' INTEGER2\nINTEGER1 is less than INTEGER2\nINTEGER1 '-ne' INTEGER2\nINTEGER1 is not equal to INTEGER2\nPREFIXINTEGER1 '-pgt' PREFIXINTEGER2\nINTEGER1 is greater than INTEGER2 after stripping off common\nnon-numeric PREFIX.\nPREFIXINTEGER1 '-plt' PREFIXINTEGER2\nINTEGER1 is less than INTEGER2 after stripping off common\nnon-numeric PREFIX.\nFILE1 '-nt' FILE2\nFILE1 is newer than FILE2 (modification time).  Optionally\nnumeric BIAS may be directly appended to '-nt' in which case\nit is added to the first file modification time.\nFILE1 '-ot' FILE2\nFILE1 is older than FILE2 (modification time).  Optionally\nnumeric BIAS may be directly appended to '-ot' in which case\nit is added to the first file modification time.\n'-d' FILE\nFILE exists and is a directory\n'-e' FILE\nFILE exists\n'-f' FILE\nFILE exists and is not a directory\n'-s' FILE\nFILE exists and has a size greater than zero\n'-n' STRING\nthe length of STRING is nonzero\nSTRING\nSTRING is equivalent to '-n STRING'\n'-z' STRING\nthe length of STRING is zero\n'(' EXPRESSION ')'\nEXPRESSION is true\n'!' EXPRESSION\nEXPRESSION is false\nEXPRESSION1 '-a' EXPRESSION2\nboth EXPRESSION1 and EXPRESSION2 are true\nEXPRESSION1 EXPRESSION2\nboth EXPRESSION1 and EXPRESSION2 are true.  This syntax is not\nPOSIX-compliant and is not recommended.\nEXPRESSION1 '-o' EXPRESSION2\neither EXPRESSION1 or EXPRESSION2 is true\n\nFile: grub.info,  Node: true,  Next: trust,  Prev: test,  Up: Command-line and menu entry commands\n\n\n-- Command: true\nDo nothing, successfully.  This is mainly useful in control\nconstructs such as 'if' and 'while' (*note Shell-like scripting::).\n\nFile: grub.info,  Node: trust,  Next: unset,  Prev: true,  Up: Command-line and menu entry commands\n\n\n-- Command: trust [--skip-sig] pubkeyfile\nRead public key from PUBKEYFILE and add it to GRUB's internal list\nof trusted public keys.  These keys are used to validate digital\nsignatures when environment variable 'checksignatures' is set to\n'enforce'.  Note that if 'checksignatures' is set to 'enforce'\nwhen 'trust' executes, then PUBKEYFILE must itself be properly\nsigned.  The '--skip-sig' option can be used to disable\nsignature-checking when reading PUBKEYFILE itself.  It is expected\nthat '--skip-sig' is useful for testing and manual booting.  *Note\nUsing digital signatures::, for more information.\n\nFile: grub.info,  Node: unset,  Next: verifydetached,  Prev: trust,  Up: Command-line and menu entry commands\n\n\n-- Command: unset envvar\nUnset the environment variable ENVVAR.\n\nFile: grub.info,  Node: verifydetached,  Next: videoinfo,  Prev: unset,  Up: Command-line and menu entry commands\n\n\n-- Command: verifydetached [--skip-sig] file signaturefile\n[pubkeyfile]\nVerifies a GPG-style detached signature, where the signed file is\nFILE, and the signature itself is in file SIGNATUREFILE.\nOptionally, a specific public key to use can be specified using\nPUBKEYFILE.  When environment variable 'checksignatures' is set\nto 'enforce', then PUBKEYFILE must itself be properly signed by an\nalready-trusted key.  An unsigned PUBKEYFILE can be loaded by\nspecifying '--skip-sig'.  If PUBKEYFILE is omitted, then public\nkeys from GRUB's trusted keys (*note listtrusted::, *note trust::,\nand *note distrust::) are tried.\n\nExit code '$?' is set to 0 if the signature validates successfully.\nIf validation fails, it is set to a non-zero value.  *Note Using\ndigital signatures::, for more information.\n\nFile: grub.info,  Node: videoinfo,  Next: wrmsr,  Prev: verifydetached,  Up: Command-line and menu entry commands\n\n\n-- Command: videoinfo [[WxH]xD]\nList available video modes.  If resolution is given, show only\nmatching modes.\n\nFile: grub.info,  Node: wrmsr,  Next: xenhypervisor,  Prev: videoinfo,  Up: Command-line and menu entry commands\n\n\n-- Command:: wrmsr 0xADDR 0xVALUE\nWrite a 0xVALUE to a model-specific register at address 0xADDR.\n\nPlease note that on SMP systems, writing to a MSR that has a scope\nper hardware thread, implies that the value that is written only\napplies to the particular cpu/core/thread that runs the command.\n\nAlso, if you specify a reserved or unimplemented MSR address, it\nwill cause a general protection exception (which is not currently\nbeing handled) and the system will reboot.\n\nNote: The command is not allowed when lockdown is enforced (*note\nLockdown::).  This is done to prevent subverting various security\nmechanisms.\n\nFile: grub.info,  Node: xenhypervisor,  Next: xenmodule,  Prev: wrmsr,  Up: Command-line and menu entry commands\n\n\n-- Command: xenhypervisor file [arguments] ...\nLoad a Xen hypervisor binary from FILE.  The rest of the line is\npassed verbatim as the \"kernel command-line\".  Any other binaries\nmust be reloaded after using this command.  This command is only\navailable on AArch64 systems.\n\nFile: grub.info,  Node: xenmodule,  Prev: xenhypervisor,  Up: Command-line and menu entry commands\n\n\n-- Command: xenmodule [--nounzip] file [arguments]\nLoad a module for xen hypervisor at the booting process of xen.\nThe rest of the line is passed verbatim as the module command line.\nModules should be loaded in the following order: - dom0 kernel\nimage - dom0 ramdisk if present - XSM policy if present This\ncommand is only available on AArch64 systems.\n\nFile: grub.info,  Node: Networking commands,  Prev: Command-line and menu entry commands,  Up: Commands\n"
                },
                {
                    "name": "16.4 The list of networking commands",
                    "content": "* Menu:\n\n* netaddaddr::                Add a network address\n* netadddns::                 Add a DNS server\n* netaddroute::               Add routing entry\n* netbootp::                   Perform a bootp/DHCP autoconfiguration\n* netbootp6::                  Perform a DHCPv6 autoconfiguration\n* netdeladdr::                Remove IP address from interface\n* netdeldns::                 Remove a DNS server\n* netdelroute::               Remove a route entry\n* netdhcp::                    Perform a DHCP autoconfiguration\n* netgetdhcpoption::         Retrieve DHCP options\n* netipv6autoconf::           Perform IPv6 autoconfiguration\n* netlsaddr::                 List interfaces\n* netlscards::                List network cards\n* netlsdns::                  List DNS servers\n* netlsroutes::               List routing entries\n* netnslookup::                Perform a DNS lookup\n\nFile: grub.info,  Node: netaddaddr,  Next: netadddns,  Up: Networking commands\n\n\n-- Command: netaddaddr INTERFACE CARD ADDRESS\nConfigure additional network INTERFACE with ADDRESS on a network\nCARD.  ADDRESS can be either IP in dotted decimal notation, or\nsymbolic name which is resolved using DNS lookup.  If successful,\nthis command also adds local link routing entry to the default\nsubnet of ADDRESS with name INTERFACE':local' via INTERFACE.\n\nFile: grub.info,  Node: netadddns,  Next: netaddroute,  Prev: netaddaddr,  Up: Networking commands\n\n\n-- Command: netadddns SERVER\nResolve SERVER IP address and add to the list of DNS servers used\nduring name lookup.\n\nFile: grub.info,  Node: netaddroute,  Next: netbootp,  Prev: netadddns,  Up: Networking commands\n\n\n-- Command: netaddroute SHORTNAME IP[/PREFIX] [INTERFACE | gw\nGATEWAY]\nAdd route to network with address IP as modified by PREFIX via\neither local INTERFACE or GATEWAY.  PREFIX is optional and defaults\nto 32 for IPv4 address and 128 for IPv6 address.  Route is\nidentified by SHORTNAME which can be used to remove it (*note\nnetdelroute::).\n\nFile: grub.info,  Node: netbootp,  Next: netdeladdr,  Prev: netaddroute,  Up: Networking commands\n\n\n-- Command: netbootp [CARD]\nAlias for netdhcp, for compatibility with older Grub versions.\nWill perform the same DHCP handshake with potential fallback to\nBOOTP as the netdhcp command (*note netdhcp::).\n\nFile: grub.info,  Node: netbootp6,  Next: netgetdhcpoption,  Prev: netdhcp,  Up: Networking commands\n\n\n-- Command: netbootp6 [CARD]\nPerform configuration of CARD using DHCPv6 protocol.  If no card\nname is specified, try to configure all existing cards.  If\nconfiguration was successful, interface with name CARD':dhcp6' and\nconfigured address is added to CARD.\n\n'1 (Domain Name Server)'\nAdds all servers from option value to the list of servers used\nduring name resolution.\n\nFile: grub.info,  Node: netdeladdr,  Next: netdeldns,  Prev: netbootp,  Up: Networking commands\n\n\n-- Command: netdeladdr INTERFACE\nRemove configured INTERFACE with associated address.\n\nFile: grub.info,  Node: netdeldns,  Next: netdelroute,  Prev: netdeladdr,  Up: Networking commands\n\n\n-- Command: netdeldns ADDRESS\nRemove ADDRESS from list of servers used during name lookup.\n\nFile: grub.info,  Node: netdelroute,  Next: netdhcp,  Prev: netdeldns,  Up: Networking commands\n\n\n-- Command: netdelroute SHORTNAME\nRemove route entry identified by SHORTNAME.\n\nFile: grub.info,  Node: netdhcp,  Next: netbootp6,  Prev: netdelroute,  Up: Networking commands\n\n\n-- Command: netdhcp [CARD]\nPerform configuration of CARD using DHCP protocol.  If no card name\nis specified, try to configure all existing cards.  Falls back to\nthe BOOTP protocol, if needed.  If configuration was successful,\ninterface with name CARD':dhcp' and configured address is added to\nCARD.  Additionally the following DHCP options are recognized and\nprocessed:\n\n'1 (Subnet Mask)'\nUsed to calculate network local routing entry for interface\nCARD':dhcp'.\n'3 (Router)'\nAdds default route entry with the name CARD':dhcp:default' via\ngateway from DHCP option.  Note that only option with single\nroute is accepted.\n'6 (Domain Name Server)'\nAdds all servers from option value to the list of servers used\nduring name resolution.\n'12 (Host Name)'\nSets environment variable 'net'<CARD>'dhcphostname' (*note\nnet<INTERFACE>hostname::) to the value of option.\n'15 (Domain Name)'\nSets environment variable 'net'<CARD>'dhcpdomain' (*note\nnet<INTERFACE>domain::) to the value of option.\n'17 (Root Path)'\nSets environment variable 'net'<CARD>'dhcprootpath' (*note\nnet<INTERFACE>rootpath::) to the value of option.\n'18 (Extensions Path)'\nSets environment variable 'net'<CARD>'dhcpextensionspath'\n(*note net<INTERFACE>extensionspath::) to the value of\noption.\n'66 (TFTP Server Name)'\nSets environment variable 'net'<CARD>'dhcpservername'\n(*note net<INTERFACE>dhcpservername::) to the value of\noption.\n'67 (Filename)'\nSets environment variable 'net'<CARD>'bootfile' (*note\nnet<INTERFACE>bootfile::) to the value of option.\n\nFile: grub.info,  Node: netgetdhcpoption,  Next: netipv6autoconf,  Prev: netbootp6,  Up: Networking commands\n\n\n-- Command: netgetdhcpoption VAR INTERFACE NUMBER TYPE\nRequest DHCP option NUMBER of TYPE via INTERFACE.  TYPE can be one\nof 'string', 'number' or 'hex'.  If option is found, assign its\nvalue to variable VAR.  Values of types 'number' and 'hex' are\nconverted to string representation.\n\nFile: grub.info,  Node: netipv6autoconf,  Next: netlsaddr,  Prev: netgetdhcpoption,  Up: Networking commands\n\n\n-- Command: netipv6autoconf [CARD]\nPerform IPv6 autoconfiguration by adding to the CARD interface with\nname CARD':link' and link local MAC-based address.  If no card is\nspecified, perform autoconfiguration for all existing cards.\n\nFile: grub.info,  Node: netlsaddr,  Next: netlscards,  Prev: netipv6autoconf,  Up: Networking commands\n\n\n-- Command: netlsaddr\nList all configured interfaces with their MAC and IP addresses.\n\nFile: grub.info,  Node: netlscards,  Next: netlsdns,  Prev: netlsaddr,  Up: Networking commands\n\n\n-- Command: netlscards\nList all detected network cards with their MAC address.\n\nFile: grub.info,  Node: netlsdns,  Next: netlsroutes,  Prev: netlscards,  Up: Networking commands\n\n\n-- Command: netlsdns\nList addresses of DNS servers used during name lookup.\n\nFile: grub.info,  Node: netlsroutes,  Next: netnslookup,  Prev: netlsdns,  Up: Networking commands\n\n\n-- Command: netlsroutes\nList routing entries.\n\nFile: grub.info,  Node: netnslookup,  Prev: netlsroutes,  Up: Networking commands\n\n\n-- Command: netnslookup NAME [SERVER]\nResolve address of NAME using DNS server SERVER.  If no server is\ngiven, use default list of servers.\n\nFile: grub.info,  Node: Internationalisation,  Next: Security,  Prev: Commands,  Up: Top\n"
                }
            ]
        },
        "17 Internationalisation": {
            "content": "",
            "subsections": [
                {
                    "name": "17.1 Charset",
                    "content": "GRUB uses UTF-8 internally other than in rendering where some\nGRUB-specific appropriate representation is used.  All text files\n(including config) are assumed to be encoded in UTF-8.\n"
                },
                {
                    "name": "17.2 Filesystems",
                    "content": "NTFS, JFS, UDF, HFS+, exFAT, long filenames in FAT, Joliet part of\nISO9660 are treated as UTF-16 as per specification.  AFS and BFS are\nread as UTF-8, again according to specification.  BtrFS, cpio, tar,\nsquash4, minix, minix2, minix3, ROMFS, ReiserFS, XFS, ext2, ext3, ext4,\nFAT (short names), F2FS, RockRidge part of ISO9660, nilfs2, UFS1, UFS2\nand ZFS are assumed to be UTF-8.  This might be false on systems\nconfigured with legacy charset but as long as the charset used is\nsuperset of ASCII you should be able to access ASCII-named files.  And\nit's recommended to configure your system to use UTF-8 to access the\nfilesystem, convmv may help with migration.  ISO9660 (plain) filenames\nare specified as being ASCII or being described with unspecified escape\nsequences.  GRUB assumes that the ISO9660 names are UTF-8 (since any\nASCII is valid UTF-8).  There are some old CD-ROMs which use CP437 in\nnon-compliant way.  You're still able to access files with names\ncontaining only ASCII characters on such filesystems though.  You're\nalso able to access any file if the filesystem contains valid Joliet\n(UTF-16) or RockRidge (UTF-8).  AFFS, SFS and HFS never use unicode and\nGRUB assumes them to be in Latin1, Latin1 and MacRoman respectively.\nGRUB handles filesystem case-insensitivity however no attempt is\nperformed at case conversion of international characters so e.g.  a file\nnamed lowercase greek alpha is treated as different from the one named\nas uppercase alpha.  The filesystems in questions are NTFS (except POSIX\nnamespace), HFS+ (configurable at mkfs time, default insensitive), SFS\n(configurable at mkfs time, default insensitive), JFS (configurable at\nmkfs time, default sensitive), HFS, AFFS, FAT, exFAT and ZFS\n(configurable on per-subvolume basis by property \"casesensitivity\",\ndefault sensitive).  On ZFS subvolumes marked as case insensitive files\ncontaining lowercase international characters are inaccessible.  Also\nlike all supported filesystems except HFS+ and ZFS (configurable on\nper-subvolume basis by property \"normalization\", default none) GRUB\nmakes no attempt at check of canonical equivalence so a file name\nu-diaresis is treated as distinct from u+combining diaresis.  This\nhowever means that in order to access file on HFS+ its name must be\nspecified in normalisation form D. On normalized ZFS subvolumes\nfilenames out of normalisation are inaccessible.\n"
                },
                {
                    "name": "17.3 Output terminal",
                    "content": "Firmware output console \"console\" on ARC and IEEE1275 are limited to\nASCII.\n\nBIOS firmware console and VGA text are limited to ASCII and some\npseudographics.\n\nNone of above mentioned is appropriate for displaying international\nand any unsupported character is replaced with question mark except\npseudographics which we attempt to approximate with ASCII.\n\nEFI console on the other hand nominally supports UTF-16 but actual\nlanguage coverage depends on firmware and may be very limited.\n\nThe encoding used on serial can be chosen with 'terminfo' as either\nASCII, UTF-8 or \"visual UTF-8\".  Last one is against the specification\nbut results in correct rendering of right-to-left on some readers which\ndon't have own bidi implementation.\n\nOn emu GRUB checks if charset is UTF-8 and uses it if so and uses\nASCII otherwise.\n\nWhen using gfxterm or gfxmenu GRUB itself is responsible for\nrendering the text.  In this case GRUB is limited by loaded fonts.  If\nfonts contain all required characters then bidirectional text, cursive\nvariants and combining marks other than enclosing, half (e.g.  left half\ntilde or combining overline) and double ones.  Ligatures aren't\nsupported though.  This should cover European, Middle Eastern (if you\ndon't mind lack of lam-alif ligature in Arabic) and East Asian scripts.\nNotable unsupported scripts are Brahmic family and derived as well as\nMongolian, Tifinagh, Korean Jamo (precomposed characters have no\nproblem) and tonal writing (2e5-2e9).  GRUB also ignores deprecated (as\nspecified in Unicode) characters (e.g.  tags).  GRUB also doesn't handle\nso called \"annotation characters\" If you can complete either of two\nlists or, better, propose a patch to improve rendering, please contact\ndeveloper team.\n"
                },
                {
                    "name": "17.4 Input terminal",
                    "content": "Firmware console on BIOS, IEEE1275 and ARC doesn't allow you to enter\nnon-ASCII characters.  EFI specification allows for such but author is\nunaware of any actual implementations.  Serial input is currently\nlimited for latin1 (unlikely to change).  Own keyboard implementations\n(atkeyboard and usbkeyboard) supports any key but work on\none-char-per-keystroke.  So no dead keys or advanced input method.  Also\nthere is no keymap change hotkey.  In practice it makes difficult to\nenter any text using non-Latin alphabet.  Moreover all current input\nconsumers are limited to ASCII.\n"
                },
                {
                    "name": "17.5 Gettext",
                    "content": "GRUB supports being translated.  For this you need to have language *.mo\nfiles in $prefix/locale, load gettext module and set \"lang\" variable.\n"
                },
                {
                    "name": "17.6 Regexp",
                    "content": "Regexps work on unicode characters, however no attempt at checking\ncannonical equivalence has been made.  Moreover the classes like\n[:alpha:] match only ASCII subset.\n"
                },
                {
                    "name": "17.7 Other",
                    "content": "Currently GRUB always uses YEAR-MONTH-DAY HOUR:MINUTE:SECOND [WEEKDAY]\n24-hour datetime format but weekdays are translated.  GRUB always uses\nthe decimal number format with [0-9] as digits and .  as descimal\nseparator and no group separator.  IEEE1275 aliases are matched\ncase-insensitively except non-ASCII which is matched as binary.  Similar\nbehaviour is for matching OSBundleRequired.  Since IEEE1275 aliases and\nOSBundleRequired don't contain any non-ASCII it should never be a\nproblem in practice.  Case-sensitive identifiers are matched as raw\nstrings, no canonical equivalence check is performed.  Case-insenstive\nidentifiers are matched as RAW but additionally [a-z] is equivalent to\n[A-Z]. GRUB-defined identifiers use only ASCII and so should\nuser-defined ones.  Identifiers containing non-ASCII may work but aren't\nsupported.  Only the ASCII space characters (space U+0020, tab U+000b,\nCR U+000d and LF U+000a) are recognised.  Other unicode space characters\naren't a valid field separator.  'test' (*note test::) tests <, >, <=,\n>=, -pgt and -plt compare the strings in the lexicographical order of\nunicode codepoints, replicating the behaviour of test from coreutils.\nenvironment variables and commands are listed in the same order.\n\nFile: grub.info,  Node: Security,  Next: Platform limitations,  Prev: Internationalisation,  Up: Top\n"
                }
            ]
        },
        "18 Security": {
            "content": "* Menu:\n\n* Authentication and authorisation:: Users and access control\n* Using digital signatures::         Booting digitally signed code\n* UEFI secure boot and shim::        Booting digitally signed PE files\n* Secure Boot Advanced Targeting::   Embedded information for generation number based revocation\n* Measured Boot::                    Measuring boot components\n* Lockdown::                         Lockdown when booting on a secure setup\n\nFile: grub.info,  Node: Authentication and authorisation,  Next: Using digital signatures,  Up: Security\n",
            "subsections": [
                {
                    "name": "18.1 Authentication and authorisation in GRUB",
                    "content": "By default, the boot loader interface is accessible to anyone with\nphysical access to the console: anyone can select and edit any menu\nentry, and anyone can get direct access to a GRUB shell prompt.  For\nmost systems, this is reasonable since anyone with direct physical\naccess has a variety of other ways to gain full access, and requiring\nauthentication at the boot loader level would only serve to make it\ndifficult to recover broken systems.\n\nHowever, in some environments, such as kiosks, it may be appropriate\nto lock down the boot loader to require authentication before performing\ncertain operations.\n\nThe 'password' (*note password::) and 'passwordpbkdf2' (*note\npasswordpbkdf2::) commands can be used to define users, each of which\nhas an associated password.  'password' sets the password in plain text,\nrequiring 'grub.cfg' to be secure; 'passwordpbkdf2' sets the password\nhashed using the Password-Based Key Derivation Function (RFC 2898),\nrequiring the use of 'grub-mkpasswd-pbkdf2' (*note Invoking\ngrub-mkpasswd-pbkdf2::) to generate password hashes.\n\nIn order to enable authentication support, the 'superusers'\nenvironment variable must be set to a list of usernames, separated by\nany of spaces, commas, semicolons, pipes, or ampersands.  Superusers are\npermitted to use the GRUB command line, edit menu entries, and execute\nany menu entry.  If 'superusers' is set, then use of the command line\nand editing of menu entries are automatically restricted to superusers.\nSetting 'superusers' to empty string effectively disables both access to\nCLI and editing of menu entries.  Note: The environment variable needs\nto be exported to also affect the section defined by the 'submenu'\ncommand (*note submenu::).\n\nOther users may be allowed to execute specific menu entries by giving\na list of usernames (as above) using the '--users' option to the\n'menuentry' command (*note menuentry::).  If the '--unrestricted' option\nis used for a menu entry, then that entry is unrestricted.  If the\n'--users' option is not used for a menu entry, then that only superusers\nare able to use it.\n\nPutting this together, a typical 'grub.cfg' fragment might look like\nthis:\n\nset superusers=\"root\"\npasswordpbkdf2 root grub.pbkdf2.sha512.10000.biglongstring\npassword user1 insecure\n\nmenuentry \"May be run by any user\" --unrestricted {\nset root=(hd0,1)\nlinux /vmlinuz\n}\n\nmenuentry \"Superusers only\" --users \"\" {\nset root=(hd0,1)\nlinux /vmlinuz single\n}\n\nmenuentry \"May be run by user1 or a superuser\" --users user1 {\nset root=(hd0,2)\nchainloader +1\n}\n\nThe 'grub-mkconfig' program does not yet have built-in support for\ngenerating configuration files with authentication.  You can use\n'/etc/grub.d/40custom' to add simple superuser authentication, by\nadding 'set superusers=' and 'password' or 'passwordpbkdf2' commands.\n\nFile: grub.info,  Node: Using digital signatures,  Next: UEFI secure boot and shim,  Prev: Authentication and authorisation,  Up: Security\n"
                },
                {
                    "name": "18.2 Using digital signatures in GRUB",
                    "content": "GRUB's 'core.img' can optionally provide enforcement that all files\nsubsequently read from disk are covered by a valid digital signature.\nThis document does *not* cover how to ensure that your platform's\nfirmware (e.g., Coreboot) validates 'core.img'.\n\nIf environment variable 'checksignatures' (*note checksignatures::)\nis set to 'enforce', then every attempt by the GRUB 'core.img' to load\nanother file 'foo' implicitly invokes 'verifydetached foo foo.sig'\n(*note verifydetached::).  'foo.sig' must contain a valid digital\nsignature over the contents of 'foo', which can be verified with a\npublic key currently trusted by GRUB (*note listtrusted::, *note\ntrust::, and *note distrust::).  If validation fails, then file 'foo'\ncannot be opened.  This failure may halt or otherwise impact the boot\nprocess.\n\nAn initial trusted public key can be embedded within the GRUB\n'core.img' using the '--pubkey' option to 'grub-install' (*note Invoking\ngrub-install::).\n\nGRUB uses GPG-style detached signatures (meaning that a file\n'foo.sig' will be produced when file 'foo' is signed), and currently\nsupports the DSA and RSA signing algorithms.  A signing key can be\ngenerated as follows:\n\ngpg --gen-key\n\nAn individual file can be signed as follows:\n\ngpg --detach-sign /path/to/file\n\nFor successful validation of all of GRUB's subcomponents and the\nloaded OS kernel, they must all be signed.  One way to accomplish this\nis the following (after having already produced the desired 'grub.cfg'\nfile, e.g., by running 'grub-mkconfig' (*note Invoking grub-mkconfig::):\n\n# Edit /dev/shm/passphrase.txt to contain your signing key's passphrase\nfor i in `find /boot -name \"*.cfg\" -or -name \"*.lst\" -or \\\n-name \"*.mod\" -or -name \"vmlinuz*\" -or -name \"initrd*\" -or \\\n-name \"grubenv\"`;\ndo\ngpg --batch --detach-sign --passphrase-fd 0 $i < \\\n/dev/shm/passphrase.txt\ndone\nshred /dev/shm/passphrase.txt\n\nSee also: *note checksignatures::, *note verifydetached::, *note\ntrust::, *note listtrusted::, *note distrust::, *note loadenv::, *note\nsaveenv::.\n\nNote that internally signature enforcement is controlled by setting\nthe environment variable 'checksignatures' equal to 'enforce'.  Passing\none or more '--pubkey' options to 'grub-mkimage' implicitly defines\n'checksignatures' equal to 'enforce' in 'core.img' prior to processing\nany configuration files.\n\nNote that signature checking does *not* prevent an attacker with\n(serial, physical, ...)  console access from dropping manually to the\nGRUB console and executing:\n\nset checksignatures=no\n\nTo prevent this, password-protection (*note Authentication and\nauthorisation::) is essential.  Note that even with GRUB password\nprotection, GRUB itself cannot prevent someone with physical access to\nthe machine from altering that machine's firmware (e.g., Coreboot or\nBIOS) configuration to cause the machine to boot from a different\n(attacker-controlled) device.  GRUB is at best only one link in a secure\nboot chain.\n\nFile: grub.info,  Node: UEFI secure boot and shim,  Next: Secure Boot Advanced Targeting,  Prev: Using digital signatures,  Up: Security\n"
                },
                {
                    "name": "18.3 UEFI secure boot and shim support",
                    "content": "The GRUB, except the 'chainloader' command, works with the UEFI secure\nboot and the shim.  This functionality is provided by the shimlock\nverifier.  It is built into the 'core.img' and is registered if the UEFI\nsecure boot is enabled.  The 'shimlock' variable is set to 'y' when\nshimlock verifier is registered.  If it is desired to use UEFI secure\nboot without shim, one can disable shimlock by disabling shim\nverification with MokSbState UEFI variable or by building grub image\nwith '--disable-shim-lock' option.\n\nAll GRUB modules not stored in the 'core.img', OS kernels, ACPI\ntables, Device Trees, etc.  have to be signed, e.g, using PGP.\nAdditionally, the commands that can be used to subvert the UEFI secure\nboot mechanism, such as 'iorw' and 'memrw' will not be available when\nthe UEFI secure boot is enabled.  This is done for security reasons and\nare enforced by the GRUB Lockdown mechanism (*note Lockdown::).\n\nFile: grub.info,  Node: Secure Boot Advanced Targeting,  Next: Measured Boot,  Prev: UEFI secure boot and shim,  Up: Security\n"
                },
                {
                    "name": "18.4 Embedded information for generation number based revocation",
                    "content": "The Secure Boot Advanced Targeting (SBAT) is a mechanism to allow the\nrevocation of components in the boot path by using generation numbers\nembedded into the EFI binaries.  The SBAT metadata is located in an\n.sbat data section that has set of UTF-8 strings as comma-separated\nvalues (CSV). See <https://github.com/rhboot/shim/blob/main/SBAT.md> for\nmore details.\n\nTo add a data section containing the SBAT information into the\nbinary, the '--sbat' option of 'grub-mkimage' command should be used.\nThe content of a CSV file, encoded with UTF-8, is copied as is to the\n.sbat data section into the generated EFI binary.  The CSV file can be\nstored anywhere on the file system.\n\ngrub-mkimage -O x8664-efi -o grubx64.efi -p '(tftp)/grub' --sbat sbat.csv efinet tftp\n\nFile: grub.info,  Node: Measured Boot,  Next: Lockdown,  Prev: Secure Boot Advanced Targeting,  Up: Security\n"
                },
                {
                    "name": "18.5 Measuring boot components",
                    "content": "If the tpm module is loaded and the platform has a Trusted Platform\nModule installed, GRUB will log each command executed and each file\nloaded into the TPM event log and extend the PCR values in the TPM\ncorrespondingly.  All events will be logged into the PCR described below\nwith a type of EVIPL and an event description as described below.\n\nCommand                8       All executed commands (including those\nfrom configuration files) will be logged\nand measured as entered with a prefix of\n\"grubcmd: \"\nKernel command line    8       Any command line passed to a kernel will\nbe logged and measured as entered with a\nprefix of \"kernelcmdline: \"\nModule command line    8       Any command line passed to a kernel\nmodule will be logged and measured as\nentered with a prefix of \"modulecmdline:\n\"\nFiles                  9       Any file read by GRUB will be logged and\nmeasured with a descriptive text\ncorresponding to the filename.\n\nGRUB will not measure its own 'core.img' - it is expected that\nfirmware will carry this out.  GRUB will also not perform any\nmeasurements until the tpm module is loaded.  As such it is recommended\nthat the tpm module be built into 'core.img' in order to avoid a\npotential gap in measurement between 'core.img' being loaded and the tpm\nmodule being loaded.\n\nMeasured boot is currently only supported on EFI platforms.\n\nFile: grub.info,  Node: Lockdown,  Prev: Measured Boot,  Up: Security\n"
                },
                {
                    "name": "18.6 Lockdown when booting on a secure setup",
                    "content": "The GRUB can be locked down when booted on a secure boot environment,\nfor example if the UEFI secure boot is enabled.  On a locked down\nconfiguration, the GRUB will be restricted and some operations/commands\ncannot be executed.\n\nThe 'lockdown' variable is set to 'y' when the GRUB is locked down.\nOtherwise it does not exit.\n\nFile: grub.info,  Node: Platform limitations,  Next: Platform-specific operations,  Prev: Security,  Up: Top\n"
                }
            ]
        },
        "19 Platform limitations": {
            "content": "GRUB2 is designed to be portable and is actually ported across\nplatforms.  We try to keep all platforms at the level.  Unfortunately\nsome platforms are better supported than others.  This is detailed in\ncurrent and 2 following sections.\n\nAll platforms have an artificially GRUB imposed disk size restriction\nof 1 EiB. In some cases, larger disk sizes can be used, but access will\nnot be allowed beyond 1 EiB.\n\nLUKS2 devices with size larger than 16 EiB are currently not\nsupported.  They can not be created as crypto devices by cryptomount, so\ncan not even be partially read from.  LUKS have no limitations other\nthan those imposed by the format.\n\nARC platform is unable to change datetime (firmware doesn't seem to\nprovide a function for it).  EMU has similar limitation.\n\nOn EMU platform no serial port is available.\n\nConsole charset refers only to firmware-assisted console.  gfxterm is\nalways Unicode (see Internationalisation section for its limitations).\nSerial is configurable to UTF-8 or ASCII (see Internationalisation).  In\ncase of qemu and coreboot ports the refered console is vgatext.\nLoongson always uses gfxterm.\n\nMost limited one is ASCII. CP437 provides additionally\npseudographics.  GRUB2 doesn't use any language characters from CP437 as\noften CP437 is replaced by national encoding compatible only in\npseudographics.  Unicode is the most versatile charset which supports\nmany languages.  However the actual console may be much more limited\ndepending on firmware\n\nOn BIOS, network is supported only if the image is loaded through\nnetwork.  On sparc64, GRUB is unable to determine which server it was\nbooted from.\n\nDirect ATA/AHCI support allows to circumvent various firmware\nlimitations but isn't needed for normal operation except on baremetal\nports.\n\nAT keyboard support allows keyboard layout remapping and support for\nkeys not available through firmware.  It isn't needed for normal\noperation except baremetal ports.\n\nSpeaker allows morse and spkmodem communication.\n\nUSB support provides benefits similar to ATA (for USB disks) or AT\n(for USB keyboards).  In addition it allows USBserial.\n\nChainloading refers to the ability to load another bootloader through\nthe same protocol\n\nHints allow faster disk discovery by already knowing in advance which\nis the disk in question.  On some platforms hints are correct unless you\nmove the disk between boots.  On other platforms it's just an educated\nguess.  Note that hint failure results in just reduced performance, not\na failure\n\nBadRAM is the ability to mark some of the RAM as \"bad\".  Note: due to\nprotocol limitations mips-loongson (with Linux protocol) and\nmips-qemumips can use only memory up to first hole.\n\nBootlocation is ability of GRUB to automatically detect where it\nboots from.  \"disk\" means the detection is limited to detecting the disk\nwith partition being discovered on install time.  \"partition\" means that\ndisk and partiton can be automatically discovered.  \"file\" means that\nboot image file name as well as disk and partition can be discovered.\nFor consistency, default install ignores partition and relies solely on\ndisk detection.  If no bootlocation discovery is available or boot and\ngrub-root disks are different, UUID is used instead.  On ARC if no\ndevice to install to is specified, UUID is used instead as well.\n\nBIOS           Coreboot       Multiboot      Qemu\nvideo          yes            yes            yes            yes\nconsole        CP437          CP437          CP437          CP437\ncharset\nnetwork        yes (*)        no             no             no\nATA/AHCI       yes            yes            yes            yes\nAT keyboard    yes            yes            yes            yes\nSpeaker        yes            yes            yes            yes\nUSB            yes            yes            yes            yes\nchainloader    local          yes            yes            no\ncpuid          partial        partial        partial        partial\nrdmsr          partial        partial        partial        partial\nwrmsr          partial        partial        partial        partial\nhints          guess          guess          guess          guess\nPCI            yes            yes            yes            yes\nbadram         yes            yes            yes            yes\ncompression    always         pointless      no             no\nexit           yes            no             no             no\nbootlocation   disk           no             no             no\n\nia32 EFI       amd64 EFI      ia32           Itanium\nIEEE1275\nvideo          yes            yes            no             no\nconsole        Unicode        Unicode        ASCII          Unicode\ncharset\nnetwork        yes            yes            yes            yes\nATA/AHCI       yes            yes            yes            no\nAT keyboard    yes            yes            yes            no\nSpeaker        yes            yes            yes            no\nUSB            yes            yes            yes            no\nchainloader    local          local          no             local\ncpuid          partial        partial        partial        no\nrdmsr          partial        partial        partial        no\nwrmsr          partial        partial        partial        no\nhints          guess          guess          good           guess\nPCI            yes            yes            yes            no\nbadram         yes            yes            no             yes\ncompression    no             no             no             no\nexit           yes            yes            yes            yes\nbootlocation   file           file           file,          file\nignored\n\nLoongson       sparc64        Powerpc        ARC\nvideo          yes            no             yes            no\nconsole        N/A            ASCII          ASCII          ASCII\ncharset\nnetwork        no             yes (*)        yes            no\nATA/AHCI       yes            no             no             no\nAT keyboard    yes            no             no             no\nSpeaker        no             no             no             no\nUSB            yes            no             no             no\nchainloader    yes            no             no             no\ncpuid          no             no             no             no\nrdmsr          no             no             no             no\nwrmsr          no             no             no             no\nhints          good           good           good           no\nPCI            yes            no             no             no\nbadram         yes (*)        no             no             no\ncompression    configurable   no             no             configurable\nexit           no             yes            yes            yes\nbootlocation   no             partition      file           file (*)\n\nMIPS qemu      emu            xen\nvideo          no             yes            no\nconsole        CP437          Unicode (*)    ASCII\ncharset\nnetwork        no             yes            no\nATA/AHCI       yes            no             no\nAT keyboard    yes            no             no\nSpeaker        no             no             no\nUSB            N/A            yes            no\nchainloader    yes            no             yes\ncpuid          no             no             yes\nrdmsr          no             no             yes\nwrmsr          no             no             yes\nhints          guess          no             no\nPCI            no             no             no\nbadram         yes (*)        no             no\ncompression    configurable   no             no\nexit           no             yes            no\nbootlocation   no             file           no\n\nFile: grub.info,  Node: Platform-specific operations,  Next: Supported kernels,  Prev: Platform limitations,  Up: Top\n",
            "subsections": []
        },
        "20 Outline": {
            "content": "Some platforms have features which allows to implement some commands\nuseless or not implementable on others.\n\nQuick summary:\n\nInformation retrieval:\n\n* mipsel-loongson: lsspd\n* mips-arc: lsdev\n* efi: lsefisystab, lssal, lsefimmap, lsefi\n* i386-pc: lsapm\n* i386-coreboot: lscoreboot, corebootboottime, cbmemc\n* acpi-enabled (i386-pc, i386-coreboot, i386-multiboot, *-efi):\nlsacpi\n\nWorkarounds for platform-specific issues:\n* i386-efi/x8664-efi: loadbios, fakebios, fixvideo\n* acpi-enabled (i386-pc, i386-coreboot, i386-multiboot, *-efi): acpi\n(override ACPI tables)\n* i386-pc: drivemap\n* i386-pc: sendkey\n\nAdvanced operations for power users:\n* x86: iorw (direct access to I/O ports)\n\nMiscelaneous:\n* cmos (x86-*, ieee1275, mips-qemumips, mips-loongson): cmostest\n(used on some laptops to check for special power-on key), cmosclean\n* i386-pc: play\n\nFile: grub.info,  Node: Supported kernels,  Next: Troubleshooting,  Prev: Platform-specific operations,  Up: Top\n",
            "subsections": []
        },
        "21 Supported boot targets": {
            "content": "X86 support is summarised in the following table.  \"Yes\" means that the\nkernel works on the given platform, \"crashes\" means an early kernel\ncrash which we hope will be fixed by concerned kernel developers.  \"no\"\nmeans GRUB doesn't load the given kernel on a given platform.\n\"headless\" means that the kernel works but lacks console drivers (you\ncan still use serial or network console).  In case of \"no\" and \"crashes\"\nthe reason is given in footnote.\nBIOS             Coreboot\nBIOS chainloading                    yes              no (1)\nNTLDR                                yes              no (1)\nPlan9                                yes              no (1)\nFreedos                              yes              no (1)\nFreeBSD bootloader                   yes              crashes (1)\n32-bit kFreeBSD                      yes              crashes (5)\n64-bit kFreeBSD                      yes              crashes (5)\n32-bit kNetBSD                       yes              crashes (1)\n64-bit kNetBSD                       yes              crashes\n32-bit kOpenBSD                      yes              yes\n64-bit kOpenBSD                      yes              yes\nMultiboot                            yes              yes\nMultiboot2                           yes              yes\n32-bit Linux (legacy protocol)       yes              no (1)\n64-bit Linux (legacy protocol)       yes              no (1)\n32-bit Linux (modern protocol)       yes              yes\n64-bit Linux (modern protocol)       yes              yes\n32-bit XNU                           yes              ?\n64-bit XNU                           yes              ?\n32-bit EFI chainloader               no (2)           no (2)\n64-bit EFI chainloader               no (2)           no (2)\nAppleloader                          no (2)           no (2)\n\nMultiboot        Qemu\nBIOS chainloading                    no (1)           no (1)\nNTLDR                                no (1)           no (1)\nPlan9                                no (1)           no (1)\nFreeDOS                              no (1)           no (1)\nFreeBSD bootloader                   crashes (1)      crashes (1)\n32-bit kFreeBSD                      crashes (5)      crashes (5)\n64-bit kFreeBSD                      crashes (5)      crashes (5)\n32-bit kNetBSD                       crashes (1)      crashes (1)\n64-bit kNetBSD                       yes              yes\n32-bit kOpenBSD                      yes              yes\n64-bit kOpenBSD                      yes              yes\nMultiboot                            yes              yes\nMultiboot2                           yes              yes\n32-bit Linux (legacy protocol)       no (1)           no (1)\n64-bit Linux (legacy protocol)       no (1)           no (1)\n32-bit Linux (modern protocol)       yes              yes\n64-bit Linux (modern protocol)       yes              yes\n32-bit XNU                           ?                ?\n64-bit XNU                           ?                ?\n32-bit EFI chainloader               no (2)           no (2)\n64-bit EFI chainloader               no (2)           no (2)\nAppleloader                          no (2)           no (2)\n\nia32 EFI         amd64 EFI\nBIOS chainloading                    no (1)           no (1)\nNTLDR                                no (1)           no (1)\nPlan9                                no (1)           no (1)\nFreeDOS                              no (1)           no (1)\nFreeBSD bootloader                   crashes (1)      crashes (1)\n32-bit kFreeBSD                      headless         headless\n64-bit kFreeBSD                      headless         headless\n32-bit kNetBSD                       crashes (1)      crashes (1)\n64-bit kNetBSD                       yes              yes\n32-bit kOpenBSD                      headless         headless\n64-bit kOpenBSD                      headless         headless\nMultiboot                            yes              yes\nMultiboot2                           yes              yes\n32-bit Linux (legacy protocol)       no (1)           no (1)\n64-bit Linux (legacy protocol)       no (1)           no (1)\n32-bit Linux (modern protocol)       yes              yes\n64-bit Linux (modern protocol)       yes              yes\n32-bit XNU                           yes              yes\n64-bit XNU                           yes (4)          yes\n32-bit EFI chainloader               yes              no (3)\n64-bit EFI chainloader               no (3)           yes\nAppleloader                          yes              yes\n\nia32 IEEE1275\nBIOS chainloading                    no (1)\nNTLDR                                no (1)\nPlan9                                no (1)\nFreeDOS                              no (1)\nFreeBSD bootloader                   crashes (1)\n32-bit kFreeBSD                      crashes (5)\n64-bit kFreeBSD                      crashes (5)\n32-bit kNetBSD                       crashes (1)\n64-bit kNetBSD                       ?\n32-bit kOpenBSD                      ?\n64-bit kOpenBSD                      ?\nMultiboot                            ?\nMultiboot2                           ?\n32-bit Linux (legacy protocol)       no (1)\n64-bit Linux (legacy protocol)       no (1)\n32-bit Linux (modern protocol)       ?\n64-bit Linux (modern protocol)       ?\n32-bit XNU                           ?\n64-bit XNU                           ?\n32-bit EFI chainloader               no (2)\n64-bit EFI chainloader               no (2)\nAppleloader                          no (2)\n\n1. Requires BIOS\n2. EFI only\n3. 32-bit and 64-bit EFI have different structures and work in\ndifferent CPU modes so it's not possible to chainload 32-bit\nbootloader on 64-bit platform and vice-versa\n4. Some modules may need to be disabled\n5. Requires ACPI\n\nPowerPC, IA64 and Sparc64 ports support only Linux.  MIPS port\nsupports Linux and multiboot2.\n",
            "subsections": [
                {
                    "name": "21.1 Boot tests",
                    "content": "As you have seen in previous chapter the support matrix is pretty big\nand some of the configurations are only rarely used.  To ensure the\nquality bootchecks are available for all x86 targets except EFI\nchainloader, Appleloader and XNU. All x86 platforms have bootcheck\nfacility except ieee1275.  Multiboot, multiboot2, BIOS chainloader,\nntldr and freebsd-bootloader boot targets are tested only with a fake\nkernel images.  Only Linux is tested among the payloads using Linux\nprotocols.\n\nFollowing variables must be defined:\n\nGRUBPAYLOADSDIR      directory containing the required kernels\nGRUBCBFSTOOL          cbfstool from Coreboot package (for coreboot\nplatform only)\nGRUBCOREBOOTROM      empty Coreboot ROM\nGRUBQEMUOPTS         additional options to be supplied to QEMU\n\nRequired files are:\n\nkfreebsdenv.i386             32-bit kFreeBSD device hints\nkfreebsd.i386                 32-bit FreeBSD kernel image\nkfreebsd.x8664,              same from 64-bit kFreeBSD\nkfreebsdenv.x8664\nknetbsd.i386                  32-bit NetBSD kernel image\nknetbsd.miniroot.i386         32-bit kNetBSD miniroot.kmod.\nknetbsd.x8664,               same from 64-bit kNetBSD\nknetbsd.miniroot.x8664\nkopenbsd.i386                 32-bit OpenBSD kernel bsd.rd image\nkopenbsd.x8664               same from 64-bit kOpenBSD\nlinux.i386                    32-bit Linux\nlinux.x8664                  64-bit Linux\n\nFile: grub.info,  Node: Troubleshooting,  Next: Invoking grub-install,  Prev: Supported kernels,  Up: Top\n"
                }
            ]
        },
        "22 Error messages produced by GRUB": {
            "content": "* Menu:\n\n* GRUB only offers a rescue shell::\n* Firmware stalls instead of booting GRUB::\n\nFile: grub.info,  Node: GRUB only offers a rescue shell,  Next: Firmware stalls instead of booting GRUB,  Up: Troubleshooting\n",
            "subsections": [
                {
                    "name": "22.1 GRUB only offers a rescue shell",
                    "content": "GRUB's normal start-up procedure involves setting the 'prefix'\nenvironment variable to a value set in the core image by 'grub-install',\nsetting the 'root' variable to match, loading the 'normal' module from\nthe prefix, and running the 'normal' command (*note normal::).  This\ncommand is responsible for reading '/boot/grub/grub.cfg', running the\nmenu, and doing all the useful things GRUB is supposed to do.\n\nIf, instead, you only get a rescue shell, this usually means that\nGRUB failed to load the 'normal' module for some reason.  It may be\npossible to work around this temporarily: for instance, if the reason\nfor the failure is that 'prefix' is wrong (perhaps it refers to the\nwrong device, or perhaps the path to '/boot/grub' was not correctly made\nrelative to the device), then you can correct this and enter normal mode\nmanually:\n\n# Inspect the current prefix (and other preset variables):\nset\n# Find out which devices are available:\nls\n# Set to the correct value, which might be something like this:\nset prefix=(hd0,1)/grub\nset root=(hd0,1)\ninsmod normal\nnormal\n\nHowever, any problem that leaves you in the rescue shell probably\nmeans that GRUB was not correctly installed.  It may be more useful to\ntry to reinstall it properly using 'grub-install DEVICE' (*note Invoking\ngrub-install::).  When doing this, there are a few things to remember:\n\n* Drive ordering in your operating system may not be the same as the\nboot drive ordering used by your firmware.  Do not assume that your\nfirst hard drive (e.g.  '/dev/sda') is the one that your firmware\nwill boot from.  'device.map' (*note Device map::) can be used to\noverride this, but it is usually better to use UUIDs or file system\nlabels and avoid depending on drive ordering entirely.\n\n* At least on BIOS systems, if you tell 'grub-install' to install\nGRUB to a partition but GRUB has already been installed in the\nmaster boot record, then the GRUB installation in the partition\nwill be ignored.\n\n* If possible, it is generally best to avoid installing GRUB to a\npartition (unless it is a special partition for the use of GRUB\nalone, such as the BIOS Boot Partition used on GPT). Doing this\nmeans that GRUB may stop being able to read its core image due to a\nfile system moving blocks around, such as while defragmenting,\nrunning checks, or even during normal operation.  Installing to the\nwhole disk device is normally more robust.\n\n* Check that GRUB actually knows how to read from the device and file\nsystem containing '/boot/grub'.  It will not be able to read from\nencrypted devices with unsupported encryption scheme, nor from file\nsystems for which support has not yet been added to GRUB.\n\nFile: grub.info,  Node: Firmware stalls instead of booting GRUB,  Prev: GRUB only offers a rescue shell,  Up: Troubleshooting\n"
                },
                {
                    "name": "22.2 Firmware stalls instead of booting GRUB",
                    "content": "The EFI implementation of some older MacBook laptops stalls when it gets\npresented a grub-mkrescue ISO image for x8664-efi target on an USB\nstick.  Affected are models of year 2010 or earlier.  Workaround is to\nzeroize the bytes 446 to 461 of the EFI partition, where mformat has put\na partition table entry which claims partition start at block 0.  This\nchange will not hamper bootability on other machines.\n\nFile: grub.info,  Node: Invoking grub-install,  Next: Invoking grub-mkconfig,  Prev: Troubleshooting,  Up: Top\n"
                }
            ]
        },
        "23 Invoking grub-install": {
            "content": "The program 'grub-install' generates a GRUB core image using\n'grub-mkimage' and installs it on your system.  You must specify the\ndevice name on which you want to install GRUB, like this:\n\ngrub-install INSTALLDEVICE\n\nThe device name INSTALLDEVICE is an OS device name or a GRUB device\nname.\n\n'grub-install' accepts the following options:\n\n'--help'\nPrint a summary of the command-line options and exit.\n\n'--version'\nPrint the version number of GRUB and exit.\n\n'--boot-directory=DIR'\nInstall GRUB images under the directory 'DIR/grub/' This option is\nuseful when you want to install GRUB into a separate partition or a\nremovable disk.  If this option is not specified then it defaults\nto '/boot', so\n\ngrub-install /dev/sda\n\nis equivalent to\n\ngrub-install --boot-directory=/boot/ /dev/sda\n\nHere is an example in which you have a separate \"boot\" partition\nwhich is mounted on '/mnt/boot':\n\ngrub-install --boot-directory=/mnt/boot /dev/sdb\n\n'--recheck'\nRecheck the device map, even if '/boot/grub/device.map' already\nexists.  You should use this option whenever you add/remove a disk\ninto/from your computer.\n\n'--no-rs-codes'\nBy default on x86 BIOS systems, 'grub-install' will use some extra\nspace in the bootloader embedding area for Reed-Solomon\nerror-correcting codes.  This enables GRUB to still boot\nsuccessfully if some blocks are corrupted.  The exact amount of\nprotection offered is dependent on available space in the embedding\narea.  R sectors of redundancy can tolerate up to R/2 corrupted\nsectors.  This redundancy may be cumbersome if attempting to\ncryptographically validate the contents of the bootloader embedding\narea, or in more modern systems with GPT-style partition tables\n(*note BIOS installation::) where GRUB does not reside in any\nunpartitioned space outside of the MBR. Disable the Reed-Solomon\ncodes with this option.\n\nFile: grub.info,  Node: Invoking grub-mkconfig,  Next: Invoking grub-mkpasswd-pbkdf2,  Prev: Invoking grub-install,  Up: Top\n",
            "subsections": []
        },
        "24 Invoking grub-mkconfig": {
            "content": "The program 'grub-mkconfig' generates a configuration file for GRUB\n(*note Simple configuration::).\n\ngrub-mkconfig -o /boot/grub/grub.cfg\n\n'grub-mkconfig' accepts the following options:\n\n'--help'\nPrint a summary of the command-line options and exit.\n\n'--version'\nPrint the version number of GRUB and exit.\n\n'-o FILE'\n'--output=FILE'\nSend the generated configuration file to FILE.  The default is to\nsend it to standard output.\n\nFile: grub.info,  Node: Invoking grub-mkpasswd-pbkdf2,  Next: Invoking grub-mkrelpath,  Prev: Invoking grub-mkconfig,  Up: Top\n",
            "subsections": []
        },
        "25 Invoking grub-mkpasswd-pbkdf2": {
            "content": "The program 'grub-mkpasswd-pbkdf2' generates password hashes for GRUB\n(*note Security::).\n\ngrub-mkpasswd-pbkdf2\n\n'grub-mkpasswd-pbkdf2' accepts the following options:\n\n'-c NUMBER'\n'--iteration-count=NUMBER'\nNumber of iterations of the underlying pseudo-random function.\nDefaults to 10000.\n\n'-l NUMBER'\n'--buflen=NUMBER'\nLength of the generated hash.  Defaults to 64.\n\n'-s NUMBER'\n'--salt=NUMBER'\nLength of the salt.  Defaults to 64.\n\nFile: grub.info,  Node: Invoking grub-mkrelpath,  Next: Invoking grub-mkrescue,  Prev: Invoking grub-mkpasswd-pbkdf2,  Up: Top\n",
            "subsections": []
        },
        "26 Invoking grub-mkrelpath": {
            "content": "The program 'grub-mkrelpath' makes a file system path relative to the\nroot of its containing file system.  For instance, if '/usr' is a mount\npoint, then:\n\n$ grub-mkrelpath /usr/share/grub/unicode.pf2\n'/share/grub/unicode.pf2'\n\nThis is mainly used internally by other GRUB utilities such as\n'grub-mkconfig' (*note Invoking grub-mkconfig::), but may occasionally\nalso be useful for debugging.\n\n'grub-mkrelpath' accepts the following options:\n\n'--help'\nPrint a summary of the command-line options and exit.\n\n'--version'\nPrint the version number of GRUB and exit.\n\nFile: grub.info,  Node: Invoking grub-mkrescue,  Next: Invoking grub-mount,  Prev: Invoking grub-mkrelpath,  Up: Top\n",
            "subsections": []
        },
        "27 Invoking grub-mkrescue": {
            "content": "The program 'grub-mkrescue' generates a bootable GRUB rescue image\n(*note Making a GRUB bootable CD-ROM::).\n\ngrub-mkrescue -o grub.iso\n\nAll arguments not explicitly listed as 'grub-mkrescue' options are\npassed on directly to 'xorriso' in 'mkisofs' emulation mode.  Options\npassed to 'xorriso' will normally be interpreted as 'mkisofs' options;\nif the option '--' is used, then anything after that will be interpreted\nas native 'xorriso' options.\n\nNon-option arguments specify additional source directories.  This is\ncommonly used to add extra files to the image:\n\nmkdir -p disk/boot/grub\n(add extra files to 'disk/boot/grub')\ngrub-mkrescue -o grub.iso disk\n\n'grub-mkrescue' accepts the following options:\n\n'--help'\nPrint a summary of the command-line options and exit.\n\n'--version'\nPrint the version number of GRUB and exit.\n\n'-o FILE'\n'--output=FILE'\nSave output in FILE.  This \"option\" is required.\n\n'--modules=MODULES'\nPre-load the named GRUB modules in the image.  Multiple entries in\nMODULES should be separated by whitespace (so you will probably\nneed to quote this for your shell).\n\n'--rom-directory=DIR'\nIf generating images for the QEMU or Coreboot platforms, copy the\nresulting 'qemu.img' or 'coreboot.elf' files respectively to the\nDIR directory as well as including them in the image.\n\n'--xorriso=FILE'\nUse FILE as the 'xorriso' program, rather than the built-in\ndefault.\n\n'--grub-mkimage=FILE'\nUse FILE as the 'grub-mkimage' program, rather than the built-in\ndefault.\n\nFile: grub.info,  Node: Invoking grub-mount,  Next: Invoking grub-probe,  Prev: Invoking grub-mkrescue,  Up: Top\n",
            "subsections": []
        },
        "28 Invoking grub-mount": {
            "content": "The program 'grub-mount' performs a read-only mount of any file system\nor file system image that GRUB understands, using GRUB's file system\ndrivers via FUSE. (It is only available if FUSE development files were\npresent when GRUB was built.)  This has a number of uses:\n\n* It provides a convenient way to check how GRUB will view a file\nsystem at boot time.  You can use normal command-line tools to\ncompare that view with that of your operating system, making it\neasy to find bugs.\n\n* It offers true read-only mounts.  Linux does not have these for\njournalling file systems, because it will always attempt to replay\nthe journal at mount time; while you can temporarily mark the block\ndevice read-only to avoid this, that causes the mount to fail.\nSince GRUB intentionally contains no code for writing to file\nsystems, it can easily provide a guaranteed read-only mount\nmechanism.\n\n* It allows you to examine any file system that GRUB understands\nwithout needing to load additional modules into your running\nkernel, which may be useful in constrained environments such as\ninstallers.\n\n* Since it can examine file system images (contained in regular\nfiles) just as easily as file systems on block devices, you can use\nit to inspect any file system image that GRUB understands with only\nenough privileges to use FUSE, even if nobody has yet written a\nFUSE module specifically for that file system type.\n\nUsing 'grub-mount' is normally as simple as:\n\ngrub-mount /dev/sda1 /mnt\n\n'grub-mount' must be given one or more images and a mount point as\nnon-option arguments (if it is given more than one image, it will treat\nthem as a RAID set), and also accepts the following options:\n\n'--help'\nPrint a summary of the command-line options and exit.\n\n'--version'\nPrint the version number of GRUB and exit.\n\n'-C'\n'--crypto'\nMount encrypted devices, prompting for a passphrase if necessary.\n\n'-d STRING'\n'--debug=STRING'\nShow debugging output for conditions matching STRING.\n\n'-K prompt|FILE'\n'--zfs-key=prompt|FILE'\nLoad a ZFS encryption key.  If you use 'prompt' as the argument,\n'grub-mount' will read a passphrase from the terminal; otherwise,\nit will read key material from the specified file.\n\n'-r DEVICE'\n'--root=DEVICE'\nSet the GRUB root device to DEVICE.  You do not normally need to\nset this; 'grub-mount' will automatically set the root device to\nthe root of the supplied file system.\n\nIf DEVICE is just a number, then it will be treated as a partition\nnumber within the supplied image.  This means that, if you have an\nimage of an entire disk in 'disk.img', then you can use this\ncommand to mount its second partition:\n\ngrub-mount -r 2 disk.img mount-point\n\n'-v'\n'--verbose'\nPrint verbose messages.\n\nFile: grub.info,  Node: Invoking grub-probe,  Next: Invoking grub-script-check,  Prev: Invoking grub-mount,  Up: Top\n",
            "subsections": []
        },
        "29 Invoking grub-probe": {
            "content": "The program 'grub-probe' probes device information for a given path or\ndevice.\n\ngrub-probe --target=fs /boot/grub\ngrub-probe --target=drive --device /dev/sda1\n\n'grub-probe' must be given a path or device as a non-option argument,\nand also accepts the following options:\n\n'--help'\nPrint a summary of the command-line options and exit.\n\n'--version'\nPrint the version number of GRUB and exit.\n\n'-d'\n'--device'\nIf this option is given, then the non-option argument is a system\ndevice name (such as '/dev/sda1'), and 'grub-probe' will print\ninformation about that device.  If it is not given, then the\nnon-option argument is a filesystem path (such as '/boot/grub'),\nand 'grub-probe' will print information about the device containing\nthat part of the filesystem.\n\n'-m FILE'\n'--device-map=FILE'\nUse FILE as the device map (*note Device map::) rather than the\ndefault, usually '/boot/grub/device.map'.\n\n'-t TARGET'\n'--target=TARGET'\nPrint information about the given path or device as defined by\nTARGET.  The available targets and their meanings are:\n\n'fs'\nGRUB filesystem module.\n'fsuuid'\nFilesystem Universally Unique Identifier (UUID).\n'fslabel'\nFilesystem label.\n'drive'\nGRUB device name.\n'device'\nSystem device name.\n'partmap'\nGRUB partition map module.\n'abstraction'\nGRUB abstraction module (e.g.  'lvm').\n'cryptodiskuuid'\nCrypto device UUID.\n'msdosparttype'\nMBR partition type code (two hexadecimal digits).\n'hintsstring'\nA string of platform search hints suitable for passing to the\n'search' command (*note search::).\n'bioshints'\nSearch hints for the PC BIOS platform.\n'ieee1275hints'\nSearch hints for the IEEE1275 platform.\n'baremetalhints'\nSearch hints for platforms where disks are addressed directly\nrather than via firmware.\n'efihints'\nSearch hints for the EFI platform.\n'archints'\nSearch hints for the ARC platform.\n'compatibilityhint'\nA guess at a reasonable GRUB drive name for this device, which\nmay be used as a fallback if the 'search' command fails.\n'disk'\nSystem device name for the whole disk.\n\n'-v'\n'--verbose'\nPrint verbose messages.\n\nFile: grub.info,  Node: Invoking grub-script-check,  Next: Obtaining and Building GRUB,  Prev: Invoking grub-probe,  Up: Top\n",
            "subsections": []
        },
        "30 Invoking grub-script-check": {
            "content": "The program 'grub-script-check' takes a GRUB script file (*note\nShell-like scripting::) and checks it for syntax errors, similar to\ncommands such as 'sh -n'.  It may take a PATH as a non-option argument;\nif none is supplied, it will read from standard input.\n\ngrub-script-check /boot/grub/grub.cfg\n\n'grub-script-check' accepts the following options:\n\n'--help'\nPrint a summary of the command-line options and exit.\n\n'--version'\nPrint the version number of GRUB and exit.\n\n'-v'\n'--verbose'\nPrint each line of input after reading it.\n\nFile: grub.info,  Node: Obtaining and Building GRUB,  Next: Reporting bugs,  Prev: Invoking grub-script-check,  Up: Top\n",
            "subsections": []
        },
        "Appendix A How to obtain and build GRUB": {
            "content": "*Caution:* GRUB requires binutils-2.9.1.0.23 or later because the\nGNU assembler has been changed so that it can produce real 16bits\nmachine code between 2.9.1 and 2.9.1.0.x.  See\n<http://sources.redhat.com/binutils/>, to obtain information on how\nto get the latest version.\n\nGRUB is available from the GNU alpha archive site\n<ftp://ftp.gnu.org/gnu/grub> or any of its mirrors.  The file will be\nnamed grub-version.tar.gz.  The current version is 2.06, so the file you\nshould grab is:\n\n<ftp://ftp.gnu.org/gnu/grub/grub-2.06.tar.gz>\n\nTo unbundle GRUB use the instruction:\n\nzcat grub-2.06.tar.gz | tar xvf -\n\nwhich will create a directory called 'grub-2.06' with all the\nsources.  You can look at the file 'INSTALL' for detailed instructions\non how to build and install GRUB, but you should be able to just do:\n\ncd grub-2.06\n./configure\nmake install\n\nAlso, the latest version is available using Git.  See\n<http://www.gnu.org/software/grub/grub-download.html> for more\ninformation.\n\nFile: grub.info,  Node: Reporting bugs,  Next: Future,  Prev: Obtaining and Building GRUB,  Up: Top\n",
            "subsections": []
        },
        "Appendix B Reporting bugs": {
            "content": "These are the guideline for how to report bugs.  Take a look at this\nlist below before you submit bugs:\n\n1. Before getting unsettled, read this manual through and through.\nAlso, see the GNU GRUB FAQ\n(http://www.gnu.org/software/grub/grub-faq.html).\n\n2. Always mention the information on your GRUB. The version number and\nthe configuration are quite important.  If you build it yourself,\nwrite the options specified to the configure script and your\noperating system, including the versions of gcc and binutils.\n\n3. If you have trouble with the installation, inform us of how you\ninstalled GRUB. Don't omit error messages, if any.  Just 'GRUB\nhangs up when it boots' is not enough.\n\nThe information on your hardware is also essential.  These are\nespecially important: the geometries and the partition tables of\nyour hard disk drives and your BIOS.\n\n4. If GRUB cannot boot your operating system, write down everything\nyou see on the screen.  Don't paraphrase them, like 'The foo OS\ncrashes with GRUB, even though it can boot with the bar boot loader\njust fine'.  Mention the commands you executed, the messages\nprinted by them, and information on your operating system including\nthe version number.\n\n5. Explain what you wanted to do.  It is very useful to know your\npurpose and your wish, and how GRUB didn't satisfy you.\n\n6. If you can investigate the problem yourself, please do.  That will\ngive you and us much more information on the problem.  Attaching a\npatch is even better.\n\nWhen you attach a patch, make the patch in unified diff format, and\nwrite ChangeLog entries.  But, even when you make a patch, don't\nforget to explain the problem, so that we can understand what your\npatch is for.\n\n7. Write down anything that you think might be related.  Please\nunderstand that we often need to reproduce the same problem you\nencountered in our environment.  So your information should be\nsufficient for us to do the same thing--Don't forget that we cannot\nsee your computer directly.  If you are not sure whether to state a\nfact or leave it out, state it!  Reporting too many things is much\nbetter than omitting something important.\n\nIf you follow the guideline above, submit a report to the Bug\nTracking System (http://savannah.gnu.org/bugs/?group=grub).\nAlternatively, you can submit a report via electronic mail to\n<bug-grub@gnu.org>, but we strongly recommend that you use the Bug\nTracking System, because e-mail can be passed over easily.\n\nOnce we get your report, we will try to fix the bugs.\n\nFile: grub.info,  Node: Future,  Next: Copying This Manual,  Prev: Reporting bugs,  Up: Top\n",
            "subsections": []
        },
        "Appendix C Where GRUB will go": {
            "content": "GRUB 2 is now quite stable and used in many production systems.  We are\ncurrently working towards a 2.0 release.\n\nIf you are interested in the development of GRUB 2, take a look at\nthe homepage (http://www.gnu.org/software/grub/grub.html).\n\nFile: grub.info,  Node: Copying This Manual,  Next: Index,  Prev: Future,  Up: Top\n",
            "subsections": []
        },
        "Appendix D Copying This Manual": {
            "content": "* Menu:\n\n* GNU Free Documentation License::  License for copying this manual.\n\nFile: grub.info,  Node: GNU Free Documentation License,  Up: Copying This Manual\n",
            "subsections": [
                {
                    "name": "D.1 GNU Free Documentation License",
                    "content": "Version 1.2, November 2002\n\nCopyright (C) 2000,2001,2002 Free Software Foundation, Inc.\n51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA\n\nEveryone is permitted to copy and distribute verbatim copies\nof this license document, but changing it is not allowed.\n\n0. PREAMBLE\n\nThe purpose of this License is to make a manual, textbook, or other\nfunctional and useful document \"free\" in the sense of freedom: to\nassure everyone the effective freedom to copy and redistribute it,\nwith or without modifying it, either commercially or\nnoncommercially.  Secondarily, this License preserves for the\nauthor and publisher a way to get credit for their work, while not\nbeing considered responsible for modifications made by others.\n\nThis License is a kind of \"copyleft\", which means that derivative\nworks of the document must themselves be free in the same sense.\nIt complements the GNU General Public License, which is a copyleft\nlicense designed for free software.\n\nWe have designed this License in order to use it for manuals for\nfree software, because free software needs free documentation: a\nfree program should come with manuals providing the same freedoms\nthat the software does.  But this License is not limited to\nsoftware manuals; it can be used for any textual work, regardless\nof subject matter or whether it is published as a printed book.  We\nrecommend this License principally for works whose purpose is\ninstruction or reference.\n\n1. APPLICABILITY AND DEFINITIONS\n\nThis License applies to any manual or other work, in any medium,\nthat contains a notice placed by the copyright holder saying it can\nbe distributed under the terms of this License.  Such a notice\ngrants a world-wide, royalty-free license, unlimited in duration,\nto use that work under the conditions stated herein.  The\n\"Document\", below, refers to any such manual or work.  Any member\nof the public is a licensee, and is addressed as \"you\".  You accept\nthe license if you copy, modify or distribute the work in a way\nrequiring permission under copyright law.\n\nA \"Modified Version\" of the Document means any work containing the\nDocument or a portion of it, either copied verbatim, or with\nmodifications and/or translated into another language.\n\nA \"Secondary Section\" is a named appendix or a front-matter section\nof the Document that deals exclusively with the relationship of the\npublishers or authors of the Document to the Document's overall\nsubject (or to related matters) and contains nothing that could\nfall directly within that overall subject.  (Thus, if the Document\nis in part a textbook of mathematics, a Secondary Section may not\nexplain any mathematics.)  The relationship could be a matter of\nhistorical connection with the subject or with related matters, or\nof legal, commercial, philosophical, ethical or political position\nregarding them.\n\nThe \"Invariant Sections\" are certain Secondary Sections whose\ntitles are designated, as being those of Invariant Sections, in the\nnotice that says that the Document is released under this License.\nIf a section does not fit the above definition of Secondary then it\nis not allowed to be designated as Invariant.  The Document may\ncontain zero Invariant Sections.  If the Document does not identify\nany Invariant Sections then there are none.\n\nThe \"Cover Texts\" are certain short passages of text that are\nlisted, as Front-Cover Texts or Back-Cover Texts, in the notice\nthat says that the Document is released under this License.  A\nFront-Cover Text may be at most 5 words, and a Back-Cover Text may\nbe at most 25 words.\n\nA \"Transparent\" copy of the Document means a machine-readable copy,\nrepresented in a format whose specification is available to the\ngeneral public, that is suitable for revising the document\nstraightforwardly with generic text editors or (for images composed\nof pixels) generic paint programs or (for drawings) some widely\navailable drawing editor, and that is suitable for input to text\nformatters or for automatic translation to a variety of formats\nsuitable for input to text formatters.  A copy made in an otherwise\nTransparent file format whose markup, or absence of markup, has\nbeen arranged to thwart or discourage subsequent modification by\nreaders is not Transparent.  An image format is not Transparent if\nused for any substantial amount of text.  A copy that is not\n\"Transparent\" is called \"Opaque\".\n\nExamples of suitable formats for Transparent copies include plain\nASCII without markup, Texinfo input format, LaTeX input format,\nSGML or XML using a publicly available DTD, and standard-conforming\nsimple HTML, PostScript or PDF designed for human modification.\nExamples of transparent image formats include PNG, XCF and JPG.\nOpaque formats include proprietary formats that can be read and\nedited only by proprietary word processors, SGML or XML for which\nthe DTD and/or processing tools are not generally available, and\nthe machine-generated HTML, PostScript or PDF produced by some word\nprocessors for output purposes only.\n\nThe \"Title Page\" means, for a printed book, the title page itself,\nplus such following pages as are needed to hold, legibly, the\nmaterial this License requires to appear in the title page.  For\nworks in formats which do not have any title page as such, \"Title\nPage\" means the text near the most prominent appearance of the\nwork's title, preceding the beginning of the body of the text.\n\nA section \"Entitled XYZ\" means a named subunit of the Document\nwhose title either is precisely XYZ or contains XYZ in parentheses\nfollowing text that translates XYZ in another language.  (Here XYZ\nstands for a specific section name mentioned below, such as\n\"Acknowledgements\", \"Dedications\", \"Endorsements\", or \"History\".)\nTo \"Preserve the Title\" of such a section when you modify the\nDocument means that it remains a section \"Entitled XYZ\" according\nto this definition.\n\nThe Document may include Warranty Disclaimers next to the notice\nwhich states that this License applies to the Document.  These\nWarranty Disclaimers are considered to be included by reference in\nthis License, but only as regards disclaiming warranties: any other\nimplication that these Warranty Disclaimers may have is void and\nhas no effect on the meaning of this License.\n\n2. VERBATIM COPYING\n\nYou may copy and distribute the Document in any medium, either\ncommercially or noncommercially, provided that this License, the\ncopyright notices, and the license notice saying this License\napplies to the Document are reproduced in all copies, and that you\nadd no other conditions whatsoever to those of this License.  You\nmay not use technical measures to obstruct or control the reading\nor further copying of the copies you make or distribute.  However,\nyou may accept compensation in exchange for copies.  If you\ndistribute a large enough number of copies you must also follow the\nconditions in section 3.\n\nYou may also lend copies, under the same conditions stated above,\nand you may publicly display copies.\n\n3. COPYING IN QUANTITY\n\nIf you publish printed copies (or copies in media that commonly\nhave printed covers) of the Document, numbering more than 100, and\nthe Document's license notice requires Cover Texts, you must\nenclose the copies in covers that carry, clearly and legibly, all\nthese Cover Texts: Front-Cover Texts on the front cover, and\nBack-Cover Texts on the back cover.  Both covers must also clearly\nand legibly identify you as the publisher of these copies.  The\nfront cover must present the full title with all words of the title\nequally prominent and visible.  You may add other material on the\ncovers in addition.  Copying with changes limited to the covers, as\nlong as they preserve the title of the Document and satisfy these\nconditions, can be treated as verbatim copying in other respects.\n\nIf the required texts for either cover are too voluminous to fit\nlegibly, you should put the first ones listed (as many as fit\nreasonably) on the actual cover, and continue the rest onto\nadjacent pages.\n\nIf you publish or distribute Opaque copies of the Document\nnumbering more than 100, you must either include a machine-readable\nTransparent copy along with each Opaque copy, or state in or with\neach Opaque copy a computer-network location from which the general\nnetwork-using public has access to download using public-standard\nnetwork protocols a complete Transparent copy of the Document, free\nof added material.  If you use the latter option, you must take\nreasonably prudent steps, when you begin distribution of Opaque\ncopies in quantity, to ensure that this Transparent copy will\nremain thus accessible at the stated location until at least one\nyear after the last time you distribute an Opaque copy (directly or\nthrough your agents or retailers) of that edition to the public.\n\nIt is requested, but not required, that you contact the authors of\nthe Document well before redistributing any large number of copies,\nto give them a chance to provide you with an updated version of the\nDocument.\n\n4. MODIFICATIONS\n\nYou may copy and distribute a Modified Version of the Document\nunder the conditions of sections 2 and 3 above, provided that you\nrelease the Modified Version under precisely this License, with the\nModified Version filling the role of the Document, thus licensing\ndistribution and modification of the Modified Version to whoever\npossesses a copy of it.  In addition, you must do these things in\nthe Modified Version:\n\nA. Use in the Title Page (and on the covers, if any) a title\ndistinct from that of the Document, and from those of previous\nversions (which should, if there were any, be listed in the\nHistory section of the Document).  You may use the same title\nas a previous version if the original publisher of that\nversion gives permission.\n\nB. List on the Title Page, as authors, one or more persons or\nentities responsible for authorship of the modifications in\nthe Modified Version, together with at least five of the\nprincipal authors of the Document (all of its principal\nauthors, if it has fewer than five), unless they release you\nfrom this requirement.\n\nC. State on the Title page the name of the publisher of the\nModified Version, as the publisher.\n\nD. Preserve all the copyright notices of the Document.\n\nE. Add an appropriate copyright notice for your modifications\nadjacent to the other copyright notices.\n\nF. Include, immediately after the copyright notices, a license\nnotice giving the public permission to use the Modified\nVersion under the terms of this License, in the form shown in\nthe Addendum below.\n\nG. Preserve in that license notice the full lists of Invariant\nSections and required Cover Texts given in the Document's\nlicense notice.\n\nH. Include an unaltered copy of this License.\n\nI. Preserve the section Entitled \"History\", Preserve its Title,\nand add to it an item stating at least the title, year, new\nauthors, and publisher of the Modified Version as given on the\nTitle Page.  If there is no section Entitled \"History\" in the\nDocument, create one stating the title, year, authors, and\npublisher of the Document as given on its Title Page, then add\nan item describing the Modified Version as stated in the\nprevious sentence.\n\nJ. Preserve the network location, if any, given in the Document\nfor public access to a Transparent copy of the Document, and\nlikewise the network locations given in the Document for\nprevious versions it was based on.  These may be placed in the\n\"History\" section.  You may omit a network location for a work\nthat was published at least four years before the Document\nitself, or if the original publisher of the version it refers\nto gives permission.\n\nK. For any section Entitled \"Acknowledgements\" or \"Dedications\",\nPreserve the Title of the section, and preserve in the section\nall the substance and tone of each of the contributor\nacknowledgements and/or dedications given therein.\n\nL. Preserve all the Invariant Sections of the Document, unaltered\nin their text and in their titles.  Section numbers or the\nequivalent are not considered part of the section titles.\n\nM. Delete any section Entitled \"Endorsements\".  Such a section\nmay not be included in the Modified Version.\n\nN. Do not retitle any existing section to be Entitled\n\"Endorsements\" or to conflict in title with any Invariant\nSection.\n\nO. Preserve any Warranty Disclaimers.\n\nIf the Modified Version includes new front-matter sections or\nappendices that qualify as Secondary Sections and contain no\nmaterial copied from the Document, you may at your option designate\nsome or all of these sections as invariant.  To do this, add their\ntitles to the list of Invariant Sections in the Modified Version's\nlicense notice.  These titles must be distinct from any other\nsection titles.\n\nYou may add a section Entitled \"Endorsements\", provided it contains\nnothing but endorsements of your Modified Version by various\nparties--for example, statements of peer review or that the text\nhas been approved by an organization as the authoritative\ndefinition of a standard.\n\nYou may add a passage of up to five words as a Front-Cover Text,\nand a passage of up to 25 words as a Back-Cover Text, to the end of\nthe list of Cover Texts in the Modified Version.  Only one passage\nof Front-Cover Text and one of Back-Cover Text may be added by (or\nthrough arrangements made by) any one entity.  If the Document\nalready includes a cover text for the same cover, previously added\nby you or by arrangement made by the same entity you are acting on\nbehalf of, you may not add another; but you may replace the old\none, on explicit permission from the previous publisher that added\nthe old one.\n\nThe author(s) and publisher(s) of the Document do not by this\nLicense give permission to use their names for publicity for or to\nassert or imply endorsement of any Modified Version.\n\n5. COMBINING DOCUMENTS\n\nYou may combine the Document with other documents released under\nthis License, under the terms defined in section 4 above for\nmodified versions, provided that you include in the combination all\nof the Invariant Sections of all of the original documents,\nunmodified, and list them all as Invariant Sections of your\ncombined work in its license notice, and that you preserve all\ntheir Warranty Disclaimers.\n\nThe combined work need only contain one copy of this License, and\nmultiple identical Invariant Sections may be replaced with a single\ncopy.  If there are multiple Invariant Sections with the same name\nbut different contents, make the title of each such section unique\nby adding at the end of it, in parentheses, the name of the\noriginal author or publisher of that section if known, or else a\nunique number.  Make the same adjustment to the section titles in\nthe list of Invariant Sections in the license notice of the\ncombined work.\n\nIn the combination, you must combine any sections Entitled\n\"History\" in the various original documents, forming one section\nEntitled \"History\"; likewise combine any sections Entitled\n\"Acknowledgements\", and any sections Entitled \"Dedications\".  You\nmust delete all sections Entitled \"Endorsements.\"\n\n6. COLLECTIONS OF DOCUMENTS\n\nYou may make a collection consisting of the Document and other\ndocuments released under this License, and replace the individual\ncopies of this License in the various documents with a single copy\nthat is included in the collection, provided that you follow the\nrules of this License for verbatim copying of each of the documents\nin all other respects.\n\nYou may extract a single document from such a collection, and\ndistribute it individually under this License, provided you insert\na copy of this License into the extracted document, and follow this\nLicense in all other respects regarding verbatim copying of that\ndocument.\n\n7. AGGREGATION WITH INDEPENDENT WORKS\n\nA compilation of the Document or its derivatives with other\nseparate and independent documents or works, in or on a volume of a\nstorage or distribution medium, is called an \"aggregate\" if the\ncopyright resulting from the compilation is not used to limit the\nlegal rights of the compilation's users beyond what the individual\nworks permit.  When the Document is included in an aggregate, this\nLicense does not apply to the other works in the aggregate which\nare not themselves derivative works of the Document.\n\nIf the Cover Text requirement of section 3 is applicable to these\ncopies of the Document, then if the Document is less than one half\nof the entire aggregate, the Document's Cover Texts may be placed\non covers that bracket the Document within the aggregate, or the\nelectronic equivalent of covers if the Document is in electronic\nform.  Otherwise they must appear on printed covers that bracket\nthe whole aggregate.\n\n8. TRANSLATION\n\nTranslation is considered a kind of modification, so you may\ndistribute translations of the Document under the terms of section\n4.  Replacing Invariant Sections with translations requires special\npermission from their copyright holders, but you may include\ntranslations of some or all Invariant Sections in addition to the\noriginal versions of these Invariant Sections.  You may include a\ntranslation of this License, and all the license notices in the\nDocument, and any Warranty Disclaimers, provided that you also\ninclude the original English version of this License and the\noriginal versions of those notices and disclaimers.  In case of a\ndisagreement between the translation and the original version of\nthis License or a notice or disclaimer, the original version will\nprevail.\n\nIf a section in the Document is Entitled \"Acknowledgements\",\n\"Dedications\", or \"History\", the requirement (section 4) to\nPreserve its Title (section 1) will typically require changing the\nactual title.\n\n9. TERMINATION\n\nYou may not copy, modify, sublicense, or distribute the Document\nexcept as expressly provided for under this License.  Any other\nattempt to copy, modify, sublicense or distribute the Document is\nvoid, and will automatically terminate your rights under this\nLicense.  However, parties who have received copies, or rights,\nfrom you under this License will not have their licenses terminated\nso long as such parties remain in full compliance.\n\n10. FUTURE REVISIONS OF THIS LICENSE\n\nThe Free Software Foundation may publish new, revised versions of\nthe GNU Free Documentation License from time to time.  Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.  See\n<http://www.gnu.org/copyleft/>.\n\nEach version of the License is given a distinguishing version\nnumber.  If the Document specifies that a particular numbered\nversion of this License \"or any later version\" applies to it, you\nhave the option of following the terms and conditions either of\nthat specified version or of any later version that has been\npublished (not as a draft) by the Free Software Foundation.  If the\nDocument does not specify a version number of this License, you may\nchoose any version ever published (not as a draft) by the Free\nSoftware Foundation.\n\n\nTo use this License in a document you have written, include a copy of\nthe License in the document and put the following copyright and license\nnotices just after the title page:\n\nCopyright (C)  YEAR  YOUR NAME.\nPermission is granted to copy, distribute and/or modify this document\nunder the terms of the GNU Free Documentation License, Version 1.2\nor any later version published by the Free Software Foundation;\nwith no Invariant Sections, no Front-Cover Texts, and no Back-Cover\nTexts.  A copy of the license is included in the section entitled ``GNU\nFree Documentation License''.\n\nIf you have Invariant Sections, Front-Cover Texts and Back-Cover\nTexts, replace the \"with...Texts.\"  line with this:\n\nwith the Invariant Sections being LIST THEIR TITLES, with\nthe Front-Cover Texts being LIST, and with the Back-Cover Texts\nbeing LIST.\n\nIf you have Invariant Sections without Cover Texts, or some other\ncombination of the three, merge those two alternatives to suit the\nsituation.\n\nIf your document contains nontrivial examples of program code, we\nrecommend releasing these examples in parallel under your choice of free\nsoftware license, such as the GNU General Public License, to permit\ntheir use in free software.\n\nFile: grub.info,  Node: Index,  Prev: Copying This Manual,  Up: Top\n"
                }
            ]
        },
        "Index": {
            "content": "* Menu:\n\n* [:                                     [.                     (line 6)\n* acpi:                                  acpi.                  (line 6)\n* authenticate:                          authenticate.          (line 6)\n* backgroundcolor:                      backgroundcolor.      (line 6)\n* backgroundimage:                      backgroundimage.      (line 6)\n* badram:                                badram.                (line 6)\n* blocklist:                             blocklist.             (line 6)\n* boot:                                  boot.                  (line 6)\n* cat:                                   cat.                   (line 6)\n* chainloader:                           chainloader.           (line 6)\n* clear:                                 clear.                 (line 6)\n* CMOS:                                  cmosdump.              (line 6)\n* cmosclean:                             cmosclean.             (line 6)\n* cmostest:                              cmostest.              (line 6)\n* cmp:                                   cmp.                   (line 6)\n* configfile:                            configfile.            (line 6)\n* cpuid:                                 cpuid.                 (line 6)\n* crc:                                   crc.                   (line 6)\n* cryptomount:                           cryptomount.           (line 6)\n* cutmem:                                cutmem.                (line 6)\n* date:                                  date.                  (line 6)\n* devicetree:                            devicetree.            (line 6)\n* distrust:                              distrust.              (line 6)\n* drivemap:                              drivemap.              (line 6)\n* echo:                                  echo.                  (line 6)\n* eval:                                  eval.                  (line 6)\n* export:                                export.                (line 6)\n* false:                                 false.                 (line 6)\n* FDL, GNU Free Documentation License:   GNU Free Documentation License.\n(line 6)\n* gettext:                               gettext.               (line 6)\n* gptsync:                               gptsync.               (line 6)\n* halt:                                  halt.                  (line 6)\n* hashsum:                               hashsum.               (line 6)\n* help:                                  help.                  (line 6)\n* initrd:                                initrd.                (line 6)\n* initrd16:                              initrd16.              (line 6)\n* insmod:                                insmod.                (line 6)\n* keystatus:                             keystatus.             (line 6)\n* linux:                                 linux.                 (line 6)\n* linux16:                               linux16.               (line 6)\n* listenv:                              listenv.              (line 6)\n* listtrusted:                          listtrusted.          (line 6)\n* loadfont:                              loadfont.              (line 6)\n* loadenv:                              loadenv.              (line 6)\n* loopback:                              loopback.              (line 6)\n* ls:                                    ls.                    (line 6)\n* lsfonts:                               lsfonts.               (line 6)\n* lsmod:                                 lsmod.                 (line 6)\n* md5sum:                                md5sum.                (line 6)\n* menuentry:                             menuentry.             (line 6)\n* module:                                module.                (line 6)\n* multiboot:                             multiboot.             (line 6)\n* nativedisk:                            nativedisk.            (line 6)\n* netaddaddr:                          netaddaddr.          (line 6)\n* netadddns:                           netadddns.           (line 6)\n* netaddroute:                         netaddroute.         (line 6)\n* netbootp:                             netbootp.             (line 6)\n* netbootp6:                            netbootp6.            (line 6)\n* netdeladdr:                          netdeladdr.          (line 6)\n* netdeldns:                           netdeldns.           (line 6)\n* netdelroute:                         netdelroute.         (line 6)\n* netdhcp:                              netdhcp.              (line 6)\n* netgetdhcpoption:                   netgetdhcpoption.   (line 6)\n* netipv6autoconf:                     netipv6autoconf.     (line 6)\n* netlsaddr:                           netlsaddr.           (line 6)\n* netlscards:                          netlscards.          (line 6)\n* netlsdns:                            netlsdns.            (line 6)\n* netlsroutes:                         netlsroutes.         (line 6)\n* netnslookup:                          netnslookup.          (line 6)\n* normal:                                normal.                (line 6)\n* normalexit:                           normalexit.           (line 6)\n* parttool:                              parttool.              (line 6)\n* password:                              password.              (line 6)\n* passwordpbkdf2:                       passwordpbkdf2.       (line 6)\n* play:                                  play.                  (line 6)\n* probe:                                 probe.                 (line 6)\n* rdmsr:                                 rdmsr.                 (line 6)\n* read:                                  read.                  (line 6)\n* reboot:                                reboot.                (line 6)\n* regexp:                                regexp.                (line 6)\n* rmmod:                                 rmmod.                 (line 6)\n* saveenv:                              saveenv.              (line 6)\n* search:                                search.                (line 6)\n* sendkey:                               sendkey.               (line 6)\n* serial:                                serial.                (line 6)\n* set:                                   set.                   (line 6)\n* sha1sum:                               sha1sum.               (line 6)\n* sha256sum:                             sha256sum.             (line 6)\n* sha512sum:                             sha512sum.             (line 6)\n* sleep:                                 sleep.                 (line 6)\n* smbios:                                smbios.                (line 6)\n* source:                                source.                (line 6)\n* submenu:                               submenu.               (line 6)\n* terminalinput:                        terminalinput.        (line 6)\n* terminaloutput:                       terminaloutput.       (line 6)\n* terminfo:                              terminfo.              (line 6)\n* test:                                  test.                  (line 6)\n* true:                                  true.                  (line 6)\n* trust:                                 trust.                 (line 6)\n* unset:                                 unset.                 (line 6)\n* verifydetached:                       verifydetached.       (line 6)\n* videoinfo:                             videoinfo.             (line 6)\n* wrmsr:                                 wrmsr.                 (line 6)\n* xenhypervisor:                        xenhypervisor.        (line 6)\n* xenmodule:                            xenmodule.            (line 6)\n",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}