The GNU GRUB Manual the Grand Unified Bootloader, Version 2.00, 23 June 2012
Total Page:16
File Type:pdf, Size:1020Kb
the GNU GRUB manual The GRand Unified Bootloader, version 2.00, 23 June 2012. Gordon Matzigkeit Yoshinori K. Okuji Colin Watson Colin D. Bennett This manual is for GNU GRUB (version 2.00, 23 June 2012). Copyright c 1999,2000,2001,2002,2004,2006,2008,2009,2010,2011,2012 Free Software Foun- dation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections. i Table of Contents 1 Introduction to GRUB ::::::::::::::::::::::::: 1 1.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.2 History of GRUB :::::::::::::::::::::::::::::::::::::::::::::: 1 1.3 Differences from previous versions :::::::::::::::::::::::::::::: 2 1.4 GRUB features::::::::::::::::::::::::::::::::::::::::::::::::: 3 1.5 The role of a boot loader ::::::::::::::::::::::::::::::::::::::: 5 2 Naming convention ::::::::::::::::::::::::::::: 7 3 Installation :::::::::::::::::::::::::::::::::::::: 9 3.1 Installing GRUB using grub-install ::::::::::::::::::::::::::::: 9 3.2 Making a GRUB bootable CD-ROM :::::::::::::::::::::::::: 10 3.3 The map between BIOS drives and OS devices :::::::::::::::: 10 3.4 BIOS installation ::::::::::::::::::::::::::::::::::::::::::::: 11 4 Booting::::::::::::::::::::::::::::::::::::::::: 13 4.1 How to boot operating systems :::::::::::::::::::::::::::::::: 13 4.1.1 How to boot an OS directly with GRUB :::::::::::::::::: 13 4.1.2 Chain-loading an OS ::::::::::::::::::::::::::::::::::::: 13 4.2 Loopback booting ::::::::::::::::::::::::::::::::::::::::::::: 14 4.3 Some caveats on OS-specific issues :::::::::::::::::::::::::::: 14 4.3.1 GNU/Hurd :::::::::::::::::::::::::::::::::::::::::::::: 14 4.3.2 GNU/Linux :::::::::::::::::::::::::::::::::::::::::::::: 14 4.3.3 DOS/Windows ::::::::::::::::::::::::::::::::::::::::::: 15 5 Writing your own configuration file :::::::::: 17 5.1 Simple configuration handling ::::::::::::::::::::::::::::::::: 17 5.2 Writing full configuration files directly ::::::::::::::::::::::::: 21 5.3 Multi-boot manual config ::::::::::::::::::::::::::::::::::::: 24 5.4 Embedding a configuration file into GRUB :::::::::::::::::::: 25 6 Theme file format ::::::::::::::::::::::::::::: 27 6.1 Introduction :::::::::::::::::::::::::::::::::::::::::::::::::: 27 6.2 Theme Elements :::::::::::::::::::::::::::::::::::::::::::::: 27 6.2.1 Colors ::::::::::::::::::::::::::::::::::::::::::::::::::: 27 6.2.2 Fonts :::::::::::::::::::::::::::::::::::::::::::::::::::: 27 6.2.3 Progress Bar ::::::::::::::::::::::::::::::::::::::::::::: 27 6.2.4 Circular Progress Indicator ::::::::::::::::::::::::::::::: 27 6.2.5 Labels ::::::::::::::::::::::::::::::::::::::::::::::::::: 28 6.2.6 Boot Menu::::::::::::::::::::::::::::::::::::::::::::::: 28 6.2.7 Styled Boxes ::::::::::::::::::::::::::::::::::::::::::::: 28 ii GNU GRUB Manual 2.00 6.2.8 Creating Styled Box Images :::::::::::::::::::::::::::::: 28 6.3 Theme File Manual ::::::::::::::::::::::::::::::::::::::::::: 29 6.3.1 Global Properties :::::::::::::::::::::::::::::::::::::::: 29 6.3.2 Format::::::::::::::::::::::::::::::::::::::::::::::::::: 29 6.3.3 Global Property List ::::::::::::::::::::::::::::::::::::: 29 6.3.4 Component Construction ::::::::::::::::::::::::::::::::: 30 6.3.5 Component List :::::::::::::::::::::::::::::::::::::::::: 30 6.3.6 Common properties :::::::::::::::::::::::::::::::::::::: 33 7 Booting GRUB from the network:::::::::::: 35 8 Using GRUB via a serial line::::::::::::::::: 37 9 Using GRUB with vendor power-on keys ::: 39 10 GRUB image files :::::::::::::::::::::::::::: 41 11 Filesystem syntax and semantics:::::::::::: 43 11.1 How to specify devices ::::::::::::::::::::::::::::::::::::::: 43 11.2 How to specify files :::::::::::::::::::::::::::::::::::::::::: 44 11.3 How to specify block lists :::::::::::::::::::::::::::::::::::: 44 12 GRUB's user interface ::::::::::::::::::::::: 45 12.1 The flexible command-line interface :::::::::::::::::::::::::: 45 12.2 The simple menu interface ::::::::::::::::::::::::::::::::::: 46 12.3 Editing a menu entry :::::::::::::::::::::::::::::::::::::::: 46 13 GRUB environment variables ::::::::::::::: 47 13.1 Special environment variables :::::::::::::::::::::::::::::::: 47 13.1.1 biosnum :::::::::::::::::::::::::::::::::::::::::::::::: 47 13.1.2 chosen :::::::::::::::::::::::::::::::::::::::::::::::::: 47 13.1.3 color highlight :::::::::::::::::::::::::::::::::::::::::: 47 13.1.4 color normal :::::::::::::::::::::::::::::::::::::::::::: 47 13.1.5 debug ::::::::::::::::::::::::::::::::::::::::::::::::::: 48 13.1.6 default :::::::::::::::::::::::::::::::::::::::::::::::::: 48 13.1.7 fallback ::::::::::::::::::::::::::::::::::::::::::::::::: 48 13.1.8 gfxmode :::::::::::::::::::::::::::::::::::::::::::::::: 49 13.1.9 gfxpayload :::::::::::::::::::::::::::::::::::::::::::::: 49 13.1.10 gfxterm font ::::::::::::::::::::::::::::::::::::::::::: 49 13.1.11 icondir::::::::::::::::::::::::::::::::::::::::::::::::: 49 13.1.12 lang ::::::::::::::::::::::::::::::::::::::::::::::::::: 49 13.1.13 locale dir :::::::::::::::::::::::::::::::::::::::::::::: 49 13.1.14 menu color highlight ::::::::::::::::::::::::::::::::::: 50 13.1.15 menu color normal::::::::::::::::::::::::::::::::::::: 50 13.1.16 net pxe boot file::::::::::::::::::::::::::::::::::::::: 50 13.1.17 net pxe dhcp server name ::::::::::::::::::::::::::::: 50 iii 13.1.18 net pxe domain :::::::::::::::::::::::::::::::::::::::: 50 13.1.19 net pxe extensionspath :::::::::::::::::::::::::::::::: 50 13.1.20 net pxe hostname:::::::::::::::::::::::::::::::::::::: 50 13.1.21 net pxe ip ::::::::::::::::::::::::::::::::::::::::::::: 50 13.1.22 net pxe mac ::::::::::::::::::::::::::::::::::::::::::: 50 13.1.23 net pxe rootpath :::::::::::::::::::::::::::::::::::::: 50 13.1.24 pager :::::::::::::::::::::::::::::::::::::::::::::::::: 50 13.1.25 prefix :::::::::::::::::::::::::::::::::::::::::::::::::: 51 13.1.26 pxe blksize::::::::::::::::::::::::::::::::::::::::::::: 51 13.1.27 pxe default gateway ::::::::::::::::::::::::::::::::::: 51 13.1.28 pxe default server:::::::::::::::::::::::::::::::::::::: 51 13.1.29 root ::::::::::::::::::::::::::::::::::::::::::::::::::: 51 13.1.30 superusers ::::::::::::::::::::::::::::::::::::::::::::: 51 13.1.31 theme ::::::::::::::::::::::::::::::::::::::::::::::::: 51 13.1.32 timeout :::::::::::::::::::::::::::::::::::::::::::::::: 51 13.2 The GRUB environment block ::::::::::::::::::::::::::::::: 51 14 The list of available commands ::::::::::::: 53 14.1 The list of commands for the menu only :::::::::::::::::::::: 53 14.1.1 menuentry :::::::::::::::::::::::::::::::::::::::::::::: 53 14.1.2 submenu :::::::::::::::::::::::::::::::::::::::::::::::: 53 14.2 The list of general commands :::::::::::::::::::::::::::::::: 54 14.2.1 serial ::::::::::::::::::::::::::::::::::::::::::::::::::: 54 14.2.2 terminal input :::::::::::::::::::::::::::::::::::::::::: 54 14.2.3 terminal output ::::::::::::::::::::::::::::::::::::::::: 54 14.2.4 terminfo :::::::::::::::::::::::::::::::::::::::::::::::: 55 14.3 The list of command-line and menu entry commands ::::::::: 55 14.3.1 acpi::::::::::::::::::::::::::::::::::::::::::::::::::::: 55 14.3.2 badram ::::::::::::::::::::::::::::::::::::::::::::::::: 55 14.3.3 blocklist :::::::::::::::::::::::::::::::::::::::::::::::: 56 14.3.4 boot :::::::::::::::::::::::::::::::::::::::::::::::::::: 56 14.3.5 cat:::::::::::::::::::::::::::::::::::::::::::::::::::::: 56 14.3.6 chainloader ::::::::::::::::::::::::::::::::::::::::::::: 56 14.3.7 cmp :::::::::::::::::::::::::::::::::::::::::::::::::::: 56 14.3.8 configfile :::::::::::::::::::::::::::::::::::::::::::::::: 57 14.3.9 cpuid ::::::::::::::::::::::::::::::::::::::::::::::::::: 57 14.3.10 crc::::::::::::::::::::::::::::::::::::::::::::::::::::: 57 14.3.11 date ::::::::::::::::::::::::::::::::::::::::::::::::::: 57 14.3.12 drivemap :::::::::::::::::::::::::::::::::::::::::::::: 57 14.3.13 echo ::::::::::::::::::::::::::::::::::::::::::::::::::: 57 14.3.14 export ::::::::::::::::::::::::::::::::::::::::::::::::: 58 14.3.15 false ::::::::::::::::::::::::::::::::::::::::::::::::::: 58 14.3.16 gettext::::::::::::::::::::::::::::::::::::::::::::::::: 58 14.3.17 gptsync :::::::::::::::::::::::::::::::::::::::::::::::: 58 14.3.18 halt:::::::::::::::::::::::::::::::::::::::::::::::::::: 59 14.3.19 help ::::::::::::::::::::::::::::::::::::::::::::::::::: 59 14.3.20 initrd :::::::::::::::::::::::::::::::::::::::::::::::::: 59 14.3.21 initrd16:::::::::::::::::::::::::::::::::::::::::::::::: 59 iv GNU GRUB Manual 2.00 14.3.22 insmod :::::::::::::::::::::::::::::::::::::::::::::::: 59 14.3.23 keystatus :::::::::::::::::::::::::::::::::::::::::::::: 59 14.3.24 linux::::::::::::::::::::::::::::::::::::::::::::::::::: 60 14.3.25 linux16 :::::::::::::::::::::::::::::::::::::::::::::::: 60 14.3.26 list env :::::::::::::::::::::::::::::::::::::::::::::::: 60 14.3.27 load env ::::::::::::::::::::::::::::::::::::::::::::::: 60 14.3.28 loopback ::::::::::::::::::::::::::::::::::::::::::::::: 60 14.3.29 ls :::::::::::::::::::::::::::::::::::::::::::::::::::::: 61 14.3.30 normal::::::::::::::::::::::::::::::::::::::::::::::::: 61 14.3.31 normal exit :::::::::::::::::::::::::::::::::::::::::::: 61 14.3.32 parttool:::::::::::::::::::::::::::::::::::::::::::::::: 61 14.3.33 password :::::::::::::::::::::::::::::::::::::::::::::: 62 14.3.34 password pbkdf2 ::::::::::::::::::::::::::::::::::::::: 62 14.3.35 play :::::::::::::::::::::::::::::::::::::::::::::::::::