Lines Matching refs:GRUB
6 * GRUB: (grub). The GRand Unified Bootloader
7 * grub-install: (grub)Invoking grub-install. Install GRUB on your drive
36 GRUB manual
39 This is the documentation of GNU GRUB, the GRand Unified Bootloader, a
46 * Introduction:: Capturing the spirit of GRUB
47 * Naming convention:: Names of your drives in GRUB
48 * Installation:: Installing GRUB on your drive
52 * Serial terminal:: Using GRUB via a serial line
53 * Preset Menu:: Embedding a configuration file into GRUB
55 * Images:: GRUB image files
59 * Troubleshooting:: Error messages produced by GRUB
61 * Invoking grub-install:: How to use the GRUB installer
66 * Obtaining and Building GRUB:: How to obtain and build GRUB
68 * Future:: Some future plans on GRUB
69 * Internals:: Hacking GRUB
75 1 Introduction to GRUB
80 * Overview:: What exactly GRUB is and how to use it
82 * Features:: GRUB features
97 GNU GRUB is a very powerful boot loader, which can load a wide
99 systems with chain-loading(1) (*note Overview-Footnote-1::). GRUB is
104 One of the important features in GRUB is flexibility; GRUB
111 When booting with GRUB, you can use either a command-line interface
121 partition, and a file name (*note Naming convention::) to GRUB, how to
122 install GRUB on your drive (*note Installation::), and how to boot your
125 Besides the GRUB boot loader itself, there is a "grub shell" `grub'
140 1.2 History of GRUB
143 GRUB originated in 1995 when Erich Boleyn was trying to boot the GNU
153 FreeBSD boot loader, and so GRUB was born.
155 Erich added many features to GRUB, but other priorities prevented him
157 1999, Gordon Matzigkeit and Yoshinori K. Okuji adopted GRUB as an
160 GRUB::, for more information.
165 1.3 GRUB features
168 The primary requirement for GRUB is that it be compliant with the
189 In addition to the requirements above, GRUB has the following
191 features that GRUB supports):
208 and embed a preset configuration file in a GRUB image file. The
223 GRUB drops to the command-line.
256 Unlike many other boot loaders, GRUB makes the particular drive
259 adverse effects or changes in GRUB's configuration.
262 GRUB can generally find all the installed RAM on a PC-compatible
266 use of this information, but GRUB provides it for those who do.
272 and to at most 8GB. GRUB can't universally solve this problem, as
275 Address ("LBA") mode. GRUB automatically detects if LBA mode is
276 available and uses it if available. In LBA mode, GRUB can access
280 GRUB is basically a disk-based boot loader but also has network
285 To support computers with no console, GRUB provides remote terminal
286 support, so that you can control GRUB from a remote host. Only
302 The following is a quotation from Gordon Matzigkeit, a GRUB fanatic:
313 boot loader-Footnote-1::) or "GRUB" systems.
316 now I just use the word "GNU" as a pseudonym for GRUB.
320 boot loader around... GRUB!
322 We, the GRUB maintainers, do not (usually) encourage Gordon's level
324 recognition. We hope that you enjoy using GNU GRUB as much as we did
339 The device syntax used in GRUB is a wee bit different from what you may
347 First of all, GRUB requires that the device name be enclosed with
350 means that GRUB will use the whole floppy disk.
360 this case, GRUB uses one partition of the disk, instead of the whole
374 like this: `(hd1,0,a)'. If the PC slice number is omitted, GRUB
377 Of course, to actually access the disks or partitions with GRUB, you
380 partition you want, the GRUB command-line (*note Command-line
386 followed by a <TAB>, and GRUB will display the list of drives,
391 Note that GRUB does _not_ distinguish IDE from SCSI - it simply
407 to actually install GRUB on your drive.
415 In order to install GRUB as your boot loader, you need to first install
416 the GRUB system and utilities under your UNIX-like operating system
417 (*note Obtaining and Building GRUB::). You can do this either from the
423 UNIX-like OS, or by running GRUB itself from a floppy. These are quite
427 Also, if you install GRUB on a UNIX-like OS, please make sure that
432 GRUB comes with boot images, which are normally put in the directory
438 GRUB images are initially placed (normally `/usr/lib/grub/i386-pc')
445 * Creating a GRUB boot floppy::
446 * Installing GRUB natively::
447 * Installing GRUB using grub-install::
448 * Making a GRUB bootable CD-ROM::
451 File: grub.info, Node: Creating a GRUB boot floppy, Next: Installing GRUB natively, Up: Installa…
453 3.1 Creating a GRUB boot floppy
456 To create a GRUB boot floppy, you need to take the files `stage1' and
479 File: grub.info, Node: Installing GRUB natively, Next: Installing GRUB using grub-install, Prev:…
481 3.2 Installing GRUB natively
484 *Caution:* Installing GRUB's stage1 in this manner will erase the
487 GRUB can currently boot GNU Mach, Linux, FreeBSD, NetBSD, and OpenBSD
491 GRUB's stage1. This isn't as important if you are installing GRUB on
495 If you decide to install GRUB in the native environment, which is
496 definitely desirable, you'll need to create a GRUB boot disk, and
497 reboot your computer with it. Otherwise, see *Note Installing GRUB
500 Once started, GRUB will show the command-line interface (*note
501 Command-line interface::). First, set the GRUB's "root device"(1)
502 (*note Installing GRUB natively-Footnote-1::) to the partition
520 This command will install the GRUB boot loader on the Master Boot
521 Record (MBR) of the first drive. If you want to put GRUB into the boot
523 partition into which you want to install GRUB:
527 If you install GRUB into a partition or a drive other than the first
528 one, you must chain-load GRUB from another boot loader. Refer to the
529 manual for the boot loader to know how to chain-load GRUB.
531 After using the setup command, you will boot into GRUB without the
532 GRUB floppy. See the chapter *Note Booting:: to find out how to boot
533 your operating systems from GRUB.
536 File: grub.info, Node: Installing GRUB natively-Footnotes, Up: Installing GRUB natively
538 (1) Note that GRUB's root device doesn't necessarily mean your OS's
543 …ile: grub.info, Node: Installing GRUB using grub-install, Next: Making a GRUB bootable CD-ROM, …
545 3.3 Installing GRUB using grub-install
550 most operating systems don't tell GRUB how to map BIOS drives to OS
551 devices correctly--GRUB merely "guesses" the mapping. This will succeed
552 in most cases, but not always. Therefore, GRUB provides you with a map
556 If you still do want to install GRUB under a UNIX-like OS (such as
563 specified in GRUB's notation. For example, under Linux the following
564 will install GRUB into the MBR of the first IDE disk:
580 But all the above examples assume that GRUB should use images under
581 the root directory. If you want GRUB to use images under a directory
583 `--root-directory'. The typical usage is that you create a GRUB boot
592 mounted at `/boot'. Since GRUB is a boot loader, it doesn't know
607 shell::). Therefore, you may run `grub' directly to install GRUB,
609 very familiar with the internals of GRUB. Installing a boot loader on a
613 File: grub.info, Node: Making a GRUB bootable CD-ROM, Prev: Installing GRUB using grub-install, …
615 3.4 Making a GRUB bootable CD-ROM
618 GRUB supports the "no emulation mode" in the El Torito specification(1)
619 (*note Making a GRUB bootable CD-ROM-Footnote-1::). This means that you
620 can use the whole CD-ROM from GRUB and you don't have to make a floppy
623 For booting from a CD-ROM, GRUB uses a special Stage 2 called
624 `stage2_eltorito'. The only GRUB files you need to have in your
634 Make a directory for GRUB:
653 the `boot/grub/stage2_eltorito' file, so there is no need to setup GRUB
658 file. This is not required; GRUB automatically sets the root device to
663 File: grub.info, Node: Making a GRUB bootable CD-ROM-Footnotes, Up: Making a GRUB bootable CD-ROM
674 GRUB can load Multiboot-compliant kernels in a consistent way, but for
679 * General boot methods:: How to boot OSes with GRUB generally
689 GRUB has two distinct boot methods. One of the two is to load an
693 install or maintain other boot loaders and GRUB is flexible enough to
695 latter is sometimes required, since GRUB doesn't support all the
706 4.1.1 How to boot an OS directly with GRUB
710 native format supported by GRUB. For the sake of convenience, there is
715 Generally, GRUB can boot any Multiboot-compliant OS in the following
718 1. Set GRUB's root device to the drive where the OS images are stored
746 1. Set GRUB's root device to the partition by the command
762 `+1' indicates that GRUB should read one sector from the start of
806 1. Set GRUB's root device to the same drive as GNU/Hurd's. Probably
823 It is relatively easy to boot GNU/Linux from GRUB, because it somewhat
826 1. Set GRUB's root device to the same drive as GNU/Linux's. Probably
850 to specify the same memory size to GRUB. To let GRUB know the size, run
860 GRUB can load the kernel directly, either in ELF or a.out format. But
862 changes heavily, so GRUB can't guarantee to pass kernel parameters
878 GRUB can load NetBSD a.out and ELF directly, follow these steps:
880 1. Set GRUB's root device with `root' (*note root::).
890 For now, however, GRUB doesn't allow you to pass kernel parameters,
909 GRUB cannot boot DOS or Windows directly, so you must chain-load them
912 the problems, GRUB provides you with two helper functions.
916 from any disks but the first one. The workaround used in GRUB is the
935 If GRUB "hide"s a DOS (or Windows) partition (*note hide::), DOS (or
936 Windows) will ignore the partition. If GRUB "unhide"s a DOS (or
994 2. You must direct GRUB to boot a working system when the new system
995 fails. This is possible with the "fallback" system in GRUB.
1001 So let's see the GRUB part. There are two possibilities: one of them
1004 start as long as GRUB itself is bootable.
1017 You can teach GRUB to boot an entry only at next boot time. Suppose
1023 new kernel fails (e.g. it panics), you can specify that GRUB should try
1043 entry for the new kernel. This means that GRUB boots a saved entry by
1047 With this configuration file, after all, GRUB always tries to boot
1051 The next step is to tell GRUB to boot the new kernel at next boot
1059 This method is useful, but still not very robust, because GRUB stops
1062 the "fallback" mechanism of GRUB. Look at next subsection for this
1071 GRUB supports a fallback mechanism of booting one or more other entries
1080 Then you may want GRUB to boot the first system which is bootable
1103 `savedefault fallback' are used. GRUB will boot a saved entry by
1107 When GRUB tries to boot `A', GRUB saves `1' as next boot entry,
1109 entry. The entry `1' is `B', so GRUB will try to boot `B' at next boot
1112 Likewise, when GRUB tries to boot `B', GRUB saves `2' as next boot
1114 makes sure that GRUB will boot `C' after booting `B'.
1116 It is noteworthy that GRUB uses fallback entries both when GRUB
1119 even if GRUB cannot find your kernel or if your kernel panics.
1123 crashes, since GRUB always sets next boot entry to a fallback entry.
1134 strongly recommended *not to modify this file directly*, because GRUB
1146 your OS. There's a solution to that - GRUB provides a menu interface
1163 with a hash character (`#'), and blank lines, are ignored by GRUB.
1174 As the comment says, GRUB will boot automatically in 30 seconds,
1190 boot::) at the end of each item. That is because GRUB automatically
1220 cause GRUB to display a prompt and delay, before actually executing the
1252 # For installing GRUB into the hard disk
1253 title Install GRUB into the hard disk
1257 This will just (re)install GRUB onto the hard disk.
1265 because it can be used both in the command-line and in the menu. GRUB
1269 GRUB. To learn more about GRUB, see the following chapters.
1277 Although GRUB is a disk-based boot loader, it does provide network
1279 network driver in the GRUB build process. For more information please
1293 GRUB requires a file server and optionally a server that will assign an
1294 IP address to the machine on which GRUB is running. For the former, only
1352 GRUB provides two second stage images, `nbgrub' and `pxegrub' (*note
1362 However, there is one thing specific to GRUB. Namely, how to specify
1363 a configuration file in a BOOTP/DHCP server. For now, GRUB uses the tag
1389 7 Using GRUB via a serial line
1392 This chapter describes how to use the serial terminal support in GRUB.
1403 As for GRUB, the instruction to set up a serial terminal is quite
1405 `--disable-serial' to the configure script when you built your GRUB
1409 Then, initialize your serial terminal after GRUB starts up. Here is
1424 any key will be selected as a GRUB terminal.
1426 However, note that GRUB assumes that your terminal emulator is
1430 few VT100 escape sequences. If you specify this option then GRUB
1437 8 Embedding a configuration file into GRUB
1440 GRUB supports a "preset menu" which is to be always loaded before
1450 1. GRUB checks if the preset menu feature is used, and loads the
1454 2. GRUB checks if the configuration file is available. Note that this
1462 in the preset menu are used only when GRUB fails in loading the
1465 To enable the preset menu feature, you must rebuild GRUB specifying a
1496 this chapter describes how to improve the security of GRUB.
1499 many things with GRUB, because GRUB allows one to modify its
1505 Thus, GRUB provides a "password" feature, so that only administrators
1513 If this is specified, GRUB disallows any interactive control, until
1515 tells GRUB that `PASSWORD' is in MD5 format. If it is omitted, GRUB
1534 In this case, GRUB will load `/boot/grub/menu-admin.lst' as a
1542 GRUB provides the command `lock' (*note lock::). This command always
1552 execute commands in an entry until GRUB encounters `lock'.
1563 10 GRUB image files
1566 GRUB consists of several images: two essential stages, optional stages
1572 This is an essential image used for booting up GRUB. Usually, this
1583 This is the core image of GRUB. It does everything but booting up
1601 image to another location safely, even after GRUB has been
1630 GRUB uses a special syntax for specifying disk drives which can be
1631 accessed by BIOS. Because of BIOS limitations, GRUB cannot distinguish
1667 `(DEVICE,BSD-SUBPART-LETTER)', in this case, GRUB searches for the
1674 installing GRUB), while the syntax `(hd0,0)' represents using the first
1676 installing GRUB).
1682 If you boot GRUB from a CD-ROM, `(cd)' is available. *Note Making a
1683 GRUB bootable CD-ROM::, for details.
1698 name in an absolute file name, GRUB uses GRUB's "root device"
1715 This represents that GRUB should read blocks 0 through 99, block 200,
1716 and blocks 300 through 599. If you omit an offset, then GRUB assumes
1720 does not contain a device name, then GRUB uses GRUB's "root device". So
1726 12 GRUB's user interface
1729 GRUB has both a simple menu interface for choosing preset entries from a
1733 GRUB looks for its configuration file as soon as it is loaded. If one
1736 option, or if the configuration file was not found, then GRUB drops to
1837 (which operates exactly like the non-config-file version of GRUB, but
1859 special version of the GRUB command-line to edit that line. When the
1860 user hits <RET>, GRUB replaces the line in question in the boot entry
1867 To delete a line, hit the key <d>. Although GRUB unfortunately does
1877 When your terminal is dumb or you request GRUB to hide the menu
1879 hiddenmenu::), GRUB doesn't show the menu interface (*note Menu
1883 When you interrupt the timeout and your terminal is dumb, GRUB falls
1892 In this chapter, we list all commands that are available in GRUB.
1967 the machine was rebooted by a kernel that GRUB loaded. You can
2039 is only available if GRUB is compiled with netboot support. See
2042 If you specify `--with-configfile' to this command, GRUB will
2119 and/or to fix the drives guessed by GRUB when GRUB fails to
2137 are very similar. This command is only available if GRUB is
2140 If you specify `--with-configfile' to this command, GRUB will
2189 in GRUB syntax (*note Naming convention::); TYPE is the partition
2201 specification in GRUB syntax (*note Naming convention::); TYPE is
2215 file and restarts the GRUB Stage 2, if NEW-CONFIG-FILE is
2216 specified. Otherwise, GRUB will just unlock the privileged
2219 continuing. The option `--md5' tells GRUB that PASSWD is
2230 is only available if GRUB is compiled with netboot support. See
2257 This command is only available if GRUB is compiled with serial
2397 `console' and `serial' are specified, then GRUB will use the one
2400 reported. This command is only available if GRUB is compiled with
2403 This may not make sense for most users, but GRUB supports Hercules
2416 The option `--no-echo' has GRUB not to echo back input characters.
2451 `192.168.0.15'. This command is only available if GRUB is compiled
2494 * install:: Install GRUB
2507 * root:: Set GRUB's root device
2508 * rootnoverify:: Set GRUB's root device without mounting
2510 * setup:: Set up GRUB's installation automatically
2601 debug flag is mainly useful for GRUB developers when testing new
2620 Display what GRUB thinks the system address space map of the
2621 machine is, including all regions of physical RAM installed. GRUB's
2751 unless you are familiar with GRUB. Use `setup' (*note setup::)
2759 it is a GRUB Stage 1 of the right version number, install in it a
2765 present, GRUB will determine the address automatically. It then
2791 bitmap even if they do have the support. So GRUB provides a
2835 if you want to load a NetBSD ELF kernel, because GRUB can
2840 option is specified, GRUB doesn't pass the option `mem=' to the
2870 Set the active partition on the root disk to GRUB's root device.
2995 the disk that GRUB can read, but setting the correct root device
3023 With this configuration, GRUB will choose the entry booted
3041 Set up the installation of GRUB automatically. This command uses
3043 backend and installs GRUB into the device INSTALL_DEVICE. If
3044 IMAGE_DEVICE is specified, then find the GRUB images (*note
3050 The option `--prefix' specifies the directory under which GRUB
3051 images are put. If it is not specified, GRUB automatically
3090 Force GRUB to assume that only KBYTES kilobytes of upper memory
3094 be necessary on some old machines. GRUB's BIOS probe can pick up
3113 14 Error messages reported by GRUB
3116 This chapter describes error messages reported by GRUB when you
3157 installation, or GRUB was not installed using itself (if it was,
3222 This error is returned if GRUB is told to execute the boot sequence
3233 GRUB is probably unable to provide.
3250 Some of the filesystem reading code in GRUB has limits on the
3262 corrupt filesystem or bugs in the code handling it in GRUB.
3266 filesystem type cannot be recognized by GRUB.
3281 anyway, as GRUB has no idea how to communicate the presence of
3295 This error is returned if GRUB was expecting to read a number and
3301 filesystem on the disk or a bug in the code handling it in GRUB
3360 native GRUB environment, especially when it guesses a wrong map between
3366 * Installation under UNIX:: How to install GRUB via `grub'
3375 You can use the command `grub' for installing GRUB under your operating
3376 systems and for a testbed when you add a new feature into GRUB or when
3388 Print the version number of GRUB and exit.
3409 The format is the same as the normal GRUB syntax. See *Note
3440 15.2 How to install GRUB via `grub'
3452 * If you can unmount drives to which GRUB may write any amount of
3470 If you want to install GRUB non-interactively, specify `--batch'
3497 DEVICE is a drive specified in the GRUB syntax (*note Device
3515 The program `grub-install' installs GRUB on your drive using the grub
3517 name on which you want to install GRUB, like this:
3521 The device name INSTALL_DEVICE is an OS device name or a GRUB device
3530 Print the version number of GRUB and exit.
3533 Force GRUB to use LBA mode even for a buggy BIOS. Use this option
3538 Install GRUB images under the directory DIR instead of the root
3539 directory. This option is useful when you want to install GRUB
3587 configuration file, to define escape sequences. Because GRUB assumes
3609 The program `grub-set-default' sets the default boot entry for GRUB.
3610 This automatically creates a file named `default' under your GRUB
3612 to determine the default boot entry when GRUB boots up your system when
3659 File: grub.info, Node: Invoking mbchk, Next: Obtaining and Building GRUB, Prev: Invoking grub-se…
3665 recommend using this program before booting your own kernel by GRUB.
3673 Print the version number of GRUB and exit.
3679 File: grub.info, Node: Obtaining and Building GRUB, Next: Reporting bugs, Prev: Invoking mbchk, …
3681 Appendix A How to obtain and build GRUB
3684 *Caution:* GRUB requires binutils-2.9.1.0.23 or later because the
3690 GRUB is available from the GNU alpha archive site
3697 To unbundle GRUB use the instruction:
3703 on how to build and install GRUB, but you should be able to just do:
3711 the GRUB images. This will also install the GRUB manual.
3717 File: grub.info, Node: Reporting bugs, Next: Future, Prev: Obtaining and Building GRUB, Up: Top
3726 Also, see the GNU GRUB FAQ
3729 2. Always mention the information on your GRUB. The version number
3735 installed GRUB. Don't omit error messages, if any. Just `GRUB hangs
3742 4. If GRUB cannot boot your operating system, write down _everything_
3744 crashes with GRUB, even though it can boot with the bar boot
3750 purpose and your wish, and how GRUB didn't satisfy you.
3780 Appendix C Where GRUB will go
3783 We started the next generation of GRUB, GRUB 2. This will include
3786 nice feature. If you are interested in the development of GRUB 2, take
3792 Appendix D Hacking GRUB
3795 This chapter documents the user-invisible aspect of GRUB.
3806 * Embedded data:: Embedded variables in GRUB
3809 * Bootstrap tricks:: The bootstrap mechanism used in GRUB
3823 GRUB consists of two distinct components, called "stages", which are
3882 D.2 Embedded variables in GRUB
3892 The version number (not GRUB's, but the installation mechanism's).
3946 The version string (GRUB's).
4054 GRUB built-in commands are defined in a uniformal interface, whether
4079 D.5 The bootstrap mechanism used in GRUB
4087 However, GRUB is a very large program, so we break GRUB into 2 (or 3)
4101 GRUB should support both the CHS mode and the LBA mode (*note Low-level
4104 The solution used by GRUB is that Stage 1 loads only the first
4177 When you write patches for GRUB, please send them to the mailing list
4187 Building GRUB::).
4199 GRUB is under GNU General Public License, you may not steal code
4202 copyrights. Feel free to ask GRUB maintainers, whenever you are
4310 Node: Creating a GRUB boot floppy19363
4311 Node: Installing GRUB natively20181
4312 Node: Installing GRUB natively-Footnotes22461
4313 Ref: Installing GRUB natively-Footnote-122554
4314 Node: Installing GRUB using grub-install22739
4315 Node: Making a GRUB bootable CD-ROM25685
4316 Node: Making a GRUB bootable CD-ROM-Footnotes27730
4317 Ref: Making a GRUB bootable CD-ROM-Footnote-127833
4438 Node: Obtaining and Building GRUB135214