grub.info-1 revision 1
0N/AThis is grub.info, produced by makeinfo version 4.0 from grub.texi.
1879N/A
0N/AINFO-DIR-SECTION Kernel
0N/ASTART-INFO-DIR-ENTRY
0N/A* GRUB: (grub). The GRand Unified Bootloader
0N/A* grub-install: (grub)Invoking grub-install. Install GRUB on your drive
0N/A* grub-md5-crypt: (grub)Invoking grub-md5-crypt. Encrypt a password
0N/A in MD5 format
0N/A* grub-terminfo: (grub)Invoking grub-terminfo. Generate a terminfo
0N/A command from a
0N/A terminfo name
0N/A* grub-set-default: (grub)Invoking grub-set-default. Set a default boot
0N/A entry
0N/A* mbchk: (grub)Invoking mbchk. Check for the format of a Multiboot kernel
0N/AEND-INFO-DIR-ENTRY
0N/A
0N/A Copyright (C) 1999,2000,2001,2002,2004 Free Software Foundation, Inc.
0N/A
1472N/A Permission is granted to make and distribute verbatim copies of this
1472N/Amanual provided the copyright notice and this permission notice are
1472N/Apreserved on all copies.
0N/A
0N/A Permission is granted to copy and distribute modified versions of
0N/Athis manual under the conditions for verbatim copying, provided also
1879N/Athat the entire resulting derived work is distributed under the terms
1879N/Aof a permission notice identical to this one.
1879N/A
1879N/A Permission is granted to copy and distribute translations of this
0N/Amanual into another language, under the above conditions for modified
0N/Aversions.
0N/A
0N/A
0N/AFile: grub.info, Node: Top, Next: Introduction, Up: (dir)
0N/A
0N/AGRUB manual
0N/A***********
0N/A
0N/A This is the documentation of GNU GRUB, the GRand Unified Bootloader,
0N/Aa flexible and powerful boot loader program for PCs.
0N/A
0N/A This edition documents version 0.95.
0N/A
0N/A* Menu:
0N/A
0N/A* Introduction:: Capturing the spirit of GRUB
0N/A* Naming convention:: Names of your drives in GRUB
0N/A* Installation:: Installing GRUB on your drive
0N/A* Booting:: How to boot different operating systems
0N/A* Configuration:: Writing your own configuration file
0N/A* Network:: Downloading OS images from a network
0N/A* Serial terminal:: Using GRUB via a serial line
0N/A* Preset Menu:: Embedding a configuration file into GRUB
0N/A* Security:: Improving the security
0N/A* Images:: GRUB image files
0N/A* Filesystem:: Filesystem syntax and semantics
0N/A* Interface:: The menu and the command-line
0N/A* Commands:: The list of available builtin commands
0N/A* Troubleshooting:: Error messages produced by GRUB
0N/A* Invoking the grub shell:: How to use the grub shell
0N/A* Invoking grub-install:: How to use the GRUB installer
0N/A* Invoking grub-md5-crypt:: How to generate a cryptic password
0N/A* Invoking grub-terminfo:: How to generate a terminfo command
0N/A* Invoking grub-set-default:: How to set a default boot entry
0N/A* Invoking mbchk:: How to use the Multiboot checker
0N/A* Obtaining and Building GRUB:: How to obtain and build GRUB
1472N/A* Reporting bugs:: Where you should send a bug report
0N/A* Future:: Some future plans on GRUB
0N/A* Internals:: Hacking GRUB
0N/A* Index::
0N/A
0N/A
0N/AFile: grub.info, Node: Introduction, Next: Naming convention, Prev: Top, Up: Top
0N/A
0N/AIntroduction to GRUB
0N/A********************
0N/A
0N/A* Menu:
0N/A
0N/A* Overview:: What exactly GRUB is and how to use it
0N/A* History:: From maggot to house fly
0N/A* Features:: GRUB features
0N/A* Role of a boot loader:: The role of a boot loader
0N/A
0N/A
0N/AFile: grub.info, Node: Overview, Next: History, Up: Introduction
0N/A
0N/AOverview
0N/A========
0N/A
0N/A Briefly, a "boot loader" is the first software program that runs when
0N/Aa computer starts. It is responsible for loading and transferring
0N/Acontrol to an operating system "kernel" software (such as Linux or GNU
0N/AMach). The kernel, in turn, initializes the rest of the operating
0N/Asystem (e.g. a GNU system).
0N/A
0N/A GNU GRUB is a very powerful boot loader, which can load a wide
0N/Avariety of free operating systems, as well as proprietary operating
0N/Asystems with chain-loading(1) (*note Overview-Footnote-1::). GRUB is
0N/Adesigned to address the complexity of booting a personal computer; both
0N/Athe program and this manual are tightly bound to that computer platform,
0N/Aalthough porting to other platforms may be addressed in the future.
0N/A
0N/A One of the important features in GRUB is flexibility; GRUB
0N/Aunderstands filesystems and kernel executable formats, so you can load
0N/Aan arbitrary operating system the way you like, without recording the
0N/Aphysical position of your kernel on the disk. Thus you can load the
0N/Akernel just by specifying its file name and the drive and partition
0N/Awhere the kernel resides.
0N/A
0N/A When booting with GRUB, you can use either a command-line interface
0N/A(*note Command-line interface::), or a menu interface (*note Menu
0N/Ainterface::). Using the command-line interface, you type the drive
0N/Aspecification and file name of the kernel manually. In the menu
0N/Ainterface, you just select an OS using the arrow keys. The menu is
0N/Abased on a configuration file which you prepare beforehand (*note
0N/AConfiguration::). While in the menu, you can switch to the command-line
0N/Amode, and vice-versa. You can even edit menu entries before using them.
0N/A
0N/A In the following chapters, you will learn how to specify a drive, a
0N/Apartition, and a file name (*note Naming convention::) to GRUB, how to
0N/Ainstall GRUB on your drive (*note Installation::), and how to boot your
0N/AOSes (*note Booting::), step by step.
0N/A
0N/A Besides the GRUB boot loader itself, there is a "grub shell" `grub'
0N/A(*note Invoking the grub shell::) which can be run when you are in your
0N/Aoperating system. It emulates the boot loader and can be used for
0N/Ainstalling the boot loader.
0N/A
0N/A
0N/AFile: grub.info, Node: Overview-Footnotes, Up: Overview
0N/A
0N/A (1) "chain-load" is the mechanism for loading unsupported operating
0N/Asystems by loading another boot loader. It is typically used for
0N/Aloading DOS or Windows.
0N/A
0N/A
0N/AFile: grub.info, Node: History, Next: Features, Prev: Overview, Up: Introduction
0N/A
0N/AHistory of GRUB
0N/A===============
0N/A
0N/A GRUB originated in 1995 when Erich Boleyn was trying to boot the GNU
0N/AHurd with the University of Utah's Mach 4 microkernel (now known as GNU
0N/AMach). Erich and Brian Ford designed the Multiboot Specification
0N/A(*note Multiboot Specification: (multiboot)Top.), because they were
0N/Adetermined not to add to the large number of mutually-incompatible PC
0N/Aboot methods.
0N/A
0N/A Erich then began modifying the FreeBSD boot loader so that it would
0N/Aunderstand Multiboot. He soon realized that it would be a lot easier to
0N/Awrite his own boot loader from scratch than to keep working on the
0N/AFreeBSD boot loader, and so GRUB was born.
0N/A
0N/A Erich added many features to GRUB, but other priorities prevented him
0N/Afrom keeping up with the demands of its quickly-expanding user base. In
0N/A1999, Gordon Matzigkeit and Yoshinori K. Okuji adopted GRUB as an
0N/Aofficial GNU package, and opened its development by making the latest
0N/Asources available via anonymous CVS. *Note Obtaining and Building
0N/AGRUB::, for more information.
0N/A
0N/A
0N/AFile: grub.info, Node: Features, Next: Role of a boot loader, Prev: History, Up: Introduction
0N/A
0N/AGRUB features
0N/A=============
0N/A
0N/A The primary requirement for GRUB is that it be compliant with the
0N/A"Multiboot Specification", which is described in *Note Multiboot
0N/ASpecification: (multiboot)Top.
0N/A
0N/A The other goals, listed in approximate order of importance, are:
0N/A
0N/A * Basic functions must be straightforward for end-users.
0N/A
0N/A * Rich functionality to support kernel experts and designers.
0N/A
0N/A * Backward compatibility for booting FreeBSD, NetBSD, OpenBSD, and
0N/A Linux. Proprietary kernels (such as DOS, Windows NT, and OS/2) are
0N/A supported via a chain-loading function.
0N/A
0N/A Except for specific compatibility modes (chain-loading and the Linux
0N/A"piggyback" format), all kernels will be started in much the same state
0N/Aas in the Multiboot Specification. Only kernels loaded at 1 megabyte or
0N/Aabove are presently supported. Any attempt to load below that boundary
0N/Awill simply result in immediate failure and an error message reporting
0N/Athe problem.
0N/A
0N/A In addition to the requirements above, GRUB has the following
0N/Afeatures (note that the Multiboot Specification doesn't require all the
0N/Afeatures that GRUB supports):
0N/A
0N/ARecognize multiple executable formats
0N/A Support many of the "a.out" variants plus "ELF". Symbol tables are
0N/A also loaded.
0N/A
0N/ASupport non-Multiboot kernels
0N/A Support many of the various free 32-bit kernels that lack Multiboot
0N/A compliance (primarily FreeBSD, NetBSD, OpenBSD, and Linux).
0N/A Chain-loading of other boot loaders is also supported.
0N/A
0N/ALoad multiples modules
0N/A Fully support the Multiboot feature of loading multiple modules.
0N/A
0N/ALoad a configuration file
0N/A Support a human-readable text configuration file with preset boot
0N/A commands. You can also load another configuration file dynamically
0N/A and embed a preset configuration file in a GRUB image file. The
0N/A list of commands (*note Commands::) are a superset of those
0N/A supported on the command-line. An example configuration file is
0N/A provided in *Note Configuration::.
0N/A
0N/AProvide a menu interface
0N/A A menu interface listing preset boot commands, with a programmable
0N/A timeout, is available. There is no fixed limit on the number of
0N/A boot entries, and the current implementation has space for several
0N/A hundred.
0N/A
0N/AHave a flexible command-line interface
0N/A A fairly flexible command-line interface, accessible from the menu,
0N/A is available to edit any preset commands, or write a new boot
0N/A command set from scratch. If no configuration file is present,
0N/A GRUB drops to the command-line.
0N/A
0N/A The list of commands (*note Commands::) are a subset of those
0N/A supported for configuration files. Editing commands closely
0N/A resembles the Bash command-line (*note Bash: (features)Command
0N/A Line Editing.), with <TAB>-completion of commands, devices,
0N/A partitions, and files in a directory depending on context.
0N/A
0N/ASupport multiple filesystem types
0N/A Support multiple filesystem types transparently, plus a useful
0N/A explicit blocklist notation. The currently supported filesystem
0N/A types are "BSD FFS", "DOS FAT16 and FAT32", "Minix fs", "Linux
0N/A ext2fs", "ReiserFS", "JFS", "XFS", and "VSTa fs". *Note
0N/A Filesystem::, for more information.
0N/A
0N/ASupport automatic decompression
0N/A Can decompress files which were compressed by `gzip'. This
0N/A function is both automatic and transparent to the user (i.e. all
0N/A functions operate upon the uncompressed contents of the specified
0N/A files). This greatly reduces a file size and loading time, a
0N/A particularly great benefit for floppies.(1) (*note
0N/A Features-Footnote-1::)
0N/A
0N/A It is conceivable that some kernel modules should be loaded in a
0N/A compressed state, so a different module-loading command can be
0N/A specified to avoid uncompressing the modules.
0N/A
0N/AAccess data on any installed device
0N/A Support reading data from any or all floppies or hard disk(s)
0N/A recognized by the BIOS, independent of the setting of the root
0N/A device.
0N/A
0N/ABe independent of drive geometry translations
0N/A Unlike many other boot loaders, GRUB makes the particular drive
0N/A translation irrelevant. A drive installed and running with one
0N/A translation may be converted to another translation without any
0N/A adverse effects or changes in GRUB's configuration.
0N/A
0N/ADetect all installed RAM
0N/A GRUB can generally find all the installed RAM on a PC-compatible
0N/A machine. It uses an advanced BIOS query technique for finding all
0N/A memory regions. As described on the Multiboot Specification (*note
0N/A Multiboot Specification: (multiboot)Top.), not all kernels make
0N/A use of this information, but GRUB provides it for those who do.
0N/A
0N/ASupport Logical Block Address mode
0N/A In traditional disk calls (called "CHS mode"), there is a geometry
0N/A translation problem, that is, the BIOS cannot access over 1024
0N/A cylinders, so the accessible space is limited to at least 508 MB
0N/A and to at most 8GB. GRUB can't universally solve this problem, as
0N/A there is no standard interface used in all machines. However,
0N/A several newer machines have the new interface, Logical Block
0N/A Address ("LBA") mode. GRUB automatically detects if LBA mode is
0N/A available and uses it if available. In LBA mode, GRUB can access
0N/A the entire disk.
0N/A
0N/ASupport network booting
0N/A GRUB is basically a disk-based boot loader but also has network
0N/A support. You can load OS images from a network by using the "TFTP"
0N/A protocol.
0N/A
0N/ASupport remote terminals
0N/A To support computers with no console, GRUB provides remote terminal
0N/A support, so that you can control GRUB from a remote host. Only
0N/A serial terminal support is implemented at the moment.
0N/A
0N/A
0N/AFile: grub.info, Node: Features-Footnotes, Up: Features
0N/A
0N/A (1) There are a few pathological cases where loading a very badly
0N/Aorganized ELF kernel might take longer, but in practice this never
0N/Ahappen.
0N/A
0N/A
0N/AFile: grub.info, Node: Role of a boot loader, Prev: Features, Up: Introduction
0N/A
0N/AThe role of a boot loader
0N/A=========================
0N/A
0N/A The following is a quotation from Gordon Matzigkeit, a GRUB fanatic:
0N/A
0N/A Some people like to acknowledge both the operating system and
0N/A kernel when they talk about their computers, so they might say
0N/A they use "GNU/Linux" or "GNU/Hurd". Other people seem to think
0N/A that the kernel is the most important part of the system, so they
0N/A like to call their GNU operating systems "Linux systems."
0N/A
0N/A I, personally, believe that this is a grave injustice, because the
0N/A _boot loader_ is the most important software of all. I used to
0N/A refer to the above systems as either "LILO"(1) (*note Role of a
0N/A boot loader-Footnote-1::) or "GRUB" systems.
0N/A
0N/A Unfortunately, nobody ever understood what I was talking about;
0N/A now I just use the word "GNU" as a pseudonym for GRUB.
0N/A
0N/A So, if you ever hear people talking about their alleged "GNU"
0N/A systems, remember that they are actually paying homage to the best
0N/A boot loader around... GRUB!
0N/A
0N/A We, the GRUB maintainers, do not (usually) encourage Gordon's level
0N/Aof fanaticism, but it helps to remember that boot loaders deserve
0N/Arecognition. We hope that you enjoy using GNU GRUB as much as we did
0N/Awriting it.
0N/A
0N/A
0N/AFile: grub.info, Node: Role of a boot loader-Footnotes, Up: Role of a boot loader
0N/A
0N/A (1) The LInux LOader, a boot loader that everybody uses, but nobody
0N/Alikes.
0N/A
0N/A
0N/AFile: grub.info, Node: Naming convention, Next: Installation, Prev: Introduction, Up: Top
0N/A
0N/ANaming convention
0N/A*****************
0N/A
0N/A The device syntax used in GRUB is a wee bit different from what you
0N/Amay have seen before in your operating system(s), and you need to know
0N/Ait so that you can specify a drive/partition.
0N/A
0N/A Look at the following examples and explanations:
0N/A
0N/A (fd0)
0N/A
0N/A First of all, GRUB requires that the device name be enclosed with
0N/A`(' and `)'. The `fd' part means that it is a floppy disk. The number
0N/A`0' is the drive number, which is counted from _zero_. This expression
0N/Ameans that GRUB will use the whole floppy disk.
0N/A
0N/A (hd0,1)
0N/A
0N/A Here, `hd' means it is a hard disk drive. The first integer `0'
0N/Aindicates the drive number, that is, the first hard disk, while the
0N/Asecond integer, `1', indicates the partition number (or the PC slice
0N/Anumber in the BSD terminology). Once again, please note that the
0N/Apartition numbers are counted from _zero_, not from one. This
0N/Aexpression means the second partition of the first hard disk drive. In
0N/Athis case, GRUB uses one partition of the disk, instead of the whole
0N/Adisk.
0N/A
0N/A (hd0,4)
0N/A
0N/A This specifies the first "extended partition" of the first hard disk
0N/Adrive. Note that the partition numbers for extended partitions are
0N/Acounted from `4', regardless of the actual number of primary partitions
0N/Aon your hard disk.
0N/A
0N/A (hd1,a)
0N/A
0N/A This means the BSD `a' partition of the second hard disk. If you
0N/Aneed to specify which PC slice number should be used, use something
0N/Alike this: `(hd1,0,a)'. If the PC slice number is omitted, GRUB
0N/Asearches for the first PC slice which has a BSD `a' partition.
0N/A
0N/A Of course, to actually access the disks or partitions with GRUB, you
0N/Aneed to use the device specification in a command, like `root (fd0)' or
0N/A`unhide (hd0,2)'. To help you find out which number specifies a
0N/Apartition you want, the GRUB command-line (*note Command-line
0N/Ainterface::) options have argument completion. This means that, for
0N/Aexample, you only need to type
0N/A
0N/A root (
0N/A
0N/A followed by a <TAB>, and GRUB will display the list of drives,
0N/Apartitions, or file names. So it should be quite easy to determine the
0N/Aname of your target partition, even with minimal knowledge of the
0N/Asyntax.
0N/A
0N/A Note that GRUB does _not_ distinguish IDE from SCSI - it simply
0N/Acounts the drive numbers from zero, regardless of their type. Normally,
0N/Aany IDE drive number is less than any SCSI drive number, although that
0N/Ais not true if you change the boot sequence by swapping IDE and SCSI
0N/Adrives in your BIOS.
0N/A
0N/A Now the question is, how to specify a file? Again, consider an
0N/Aexample:
0N/A
0N/A (hd0,0)/vmlinuz
0N/A
0N/A This specifies the file named `vmlinuz', found on the first
0N/Apartition of the first hard disk drive. Note that the argument
0N/Acompletion works with file names, too.
0N/A
0N/A That was easy, admit it. Now read the next chapter, to find out how
0N/Ato actually install GRUB on your drive.
0N/A
0N/A
0N/AFile: grub.info, Node: Installation, Next: Booting, Prev: Naming convention, Up: Top
0N/A
0N/AInstallation
0N/A************
0N/A
0N/A In order to install GRUB as your boot loader, you need to first
0N/Ainstall the GRUB system and utilities under your UNIX-like operating
0N/Asystem (*note Obtaining and Building GRUB::). You can do this either
0N/Afrom the source tarball, or as a package for your OS.
0N/A
0N/A After you have done that, you need to install the boot loader on a
0N/Adrive (floppy or hard disk). There are two ways of doing that - either
0N/Ausing the utility `grub-install' (*note Invoking grub-install::) on a
0N/AUNIX-like OS, or by running GRUB itself from a floppy. These are quite
0N/Asimilar, however the utility might probe a wrong BIOS drive, so you
0N/Ashould be careful.
0N/A
0N/A Also, if you install GRUB on a UNIX-like OS, please make sure that
0N/Ayou have an emergency boot disk ready, so that you can rescue your
0N/Acomputer if, by any chance, your hard drive becomes unusable
0N/A(unbootable).
0N/A
0N/A GRUB comes with boot images, which are normally put in the directory
0N/A`/usr/lib/grub/i386-pc'. If you do not use grub-install, then you need
0N/Ato copy the files `stage1', `stage2', and `*stage1_5' to the directory
0N/A`/boot/grub', and run the `grub-set-default' (*note Invoking
0N/Agrub-set-default::) if you intend to use `default saved' (*note
0N/Adefault::) in your configuration file. Hereafter, the directory where
0N/AGRUB images are initially placed (normally `/usr/lib/grub/i386-pc')
0N/Awill be called the "image directory", and the directory where the boot
0N/Aloader needs to find them (usually `/boot/grub') will be called the
0N/A"boot directory".
0N/A
0N/A* Menu:
0N/A
0N/A* Creating a GRUB boot floppy::
0N/A* Installing GRUB natively::
0N/A* Installing GRUB using grub-install::
0N/A* Making a GRUB bootable CD-ROM::
0N/A
0N/A
0N/AFile: grub.info, Node: Creating a GRUB boot floppy, Next: Installing GRUB natively, Up: Installation
0N/A
0N/ACreating a GRUB boot floppy
0N/A===========================
0N/A
0N/A To create a GRUB boot floppy, you need to take the files `stage1'
0N/Aand `stage2' from the image directory, and write them to the first and
0N/Athe second block of the floppy disk, respectively.
0N/A
0N/A *Caution:* This procedure will destroy any data currently stored on
0N/Athe floppy.
0N/A
0N/A On a UNIX-like operating system, that is done with the following
0N/Acommands:
0N/A
0N/A # cd /usr/lib/grub/i386-pc
0N/A # dd if=stage1 of=/dev/fd0 bs=512 count=1
0N/A 1+0 records in
0N/A 1+0 records out
0N/A # dd if=stage2 of=/dev/fd0 bs=512 seek=1
0N/A 153+1 records in
0N/A 153+1 records out
0N/A #
0N/A
0N/A The device file name may be different. Consult the manual for your
0N/AOS.
0N/A
0N/A
0N/AFile: grub.info, Node: Installing GRUB natively, Next: Installing GRUB using grub-install, Prev: Creating a GRUB boot floppy, Up: Installation
0N/A
0N/AInstalling GRUB natively
0N/A========================
0N/A
0N/A *Caution:* Installing GRUB's stage1 in this manner will erase the
0N/Anormal boot-sector used by an OS.
0N/A
0N/A GRUB can currently boot GNU Mach, Linux, FreeBSD, NetBSD, and OpenBSD
0N/Adirectly, so using it on a boot sector (the first sector of a
0N/Apartition) should be okay. But generally, it would be a good idea to
0N/Aback up the first sector of the partition on which you are installing
0N/AGRUB's stage1. This isn't as important if you are installing GRUB on
0N/Athe first sector of a hard disk, since it's easy to reinitialize it
0N/A(e.g. by running `FDISK /MBR' from DOS).
0N/A
0N/A If you decide to install GRUB in the native environment, which is
0N/Adefinitely desirable, you'll need to create a GRUB boot disk, and
0N/Areboot your computer with it. Otherwise, see *Note Installing GRUB
0N/Ausing grub-install::.
0N/A
0N/A Once started, GRUB will show the command-line interface (*note
0N/ACommand-line interface::). First, set the GRUB's "root device"(1)
0N/A(*note Installing GRUB natively-Footnote-1::) to the partition
0N/Acontaining the boot directory, like this:
0N/A
0N/A grub> root (hd0,0)
0N/A
0N/A If you are not sure which partition actually holds this directory,
0N/Ause the command `find' (*note find::), like this:
0N/A
0N/A grub> find /boot/grub/stage1
0N/A
0N/A This will search for the file name `/boot/grub/stage1' and show the
0N/Adevices which contain the file.
0N/A
0N/A Once you've set the root device correctly, run the command `setup'
0N/A(*note setup::):
0N/A
0N/A grub> setup (hd0)
0N/A
0N/A This command will install the GRUB boot loader on the Master Boot
0N/ARecord (MBR) of the first drive. If you want to put GRUB into the boot
0N/Asector of a partition instead of putting it in the MBR, specify the
0N/Apartition into which you want to install GRUB:
0N/A
0N/A grub> setup (hd0,0)
0N/A
0N/A If you install GRUB into a partition or a drive other than the first
0N/Aone, you must chain-load GRUB from another boot loader. Refer to the
0N/Amanual for the boot loader to know how to chain-load GRUB.
0N/A
0N/A After using the setup command, you will boot into GRUB without the
0N/AGRUB floppy. See the chapter *Note Booting:: to find out how to boot
0N/Ayour operating systems from GRUB.
0N/A
0N/A
0N/AFile: grub.info, Node: Installing GRUB natively-Footnotes, Up: Installing GRUB natively
0N/A
0N/A (1) Note that GRUB's root device doesn't necessarily mean your OS's
0N/Aroot partition; if you need to specify a root partition for your OS,
0N/Aadd the argument into the command `kernel'.
0N/A
0N/A
0N/AFile: grub.info, Node: Installing GRUB using grub-install, Next: Making a GRUB bootable CD-ROM, Prev: Installing GRUB natively, Up: Installation
0N/A
0N/AInstalling GRUB using grub-install
0N/A==================================
0N/A
0N/A *Caution:* This procedure is definitely less safe, because there are
0N/Aseveral ways in which your computer can become unbootable. For example,
0N/Amost operating systems don't tell GRUB how to map BIOS drives to OS
0N/Adevices correctly--GRUB merely "guesses" the mapping. This will succeed
0N/Ain most cases, but not always. Therefore, GRUB provides you with a map
0N/Afile called the "device map", which you must fix if it is wrong. *Note
0N/ADevice map::, for more details.
0N/A
0N/A If you still do want to install GRUB under a UNIX-like OS (such as
0N/AGNU), invoke the program `grub-install' (*note Invoking grub-install::)
0N/Aas the superuser ("root").
0N/A
0N/A The usage is basically very simple. You only need to specify one
0N/Aargument to the program, namely, where to install the boot loader. The
0N/Aargument can be either a device file (like `/dev/hda') or a partition
0N/Aspecified in GRUB's notation. For example, under Linux the following
0N/Awill install GRUB into the MBR of the first IDE disk:
0N/A
0N/A # grub-install /dev/hda
0N/A
0N/A Likewise, under GNU/Hurd, this has the same effect:
0N/A
0N/A # grub-install /dev/hd0
0N/A
0N/A If it is the first BIOS drive, this is the same as well:
0N/A
0N/A # grub-install '(hd0)'
0N/A
0N/A Or you can omit the parentheses:
0N/A
1601N/A # grub-install hd0
1601N/A
1601N/A But all the above examples assume that GRUB should use images under
0N/Athe root directory. If you want GRUB to use images under a directory
1601N/Aother than the root directory, you need to specify the option
0N/A`--root-directory'. The typical usage is that you create a GRUB boot
0N/Afloppy with a filesystem. Here is an example:
0N/A
0N/A # mke2fs /dev/fd0
0N/A # mount -t ext2 /dev/fd0 /mnt
0N/A # grub-install --root-directory=/mnt fd0
0N/A # umount /mnt
0N/A
0N/A Another example is when you have a separate boot partition which is
0N/Amounted at `/boot'. Since GRUB is a boot loader, it doesn't know
1601N/Aanything about mountpoints at all. Thus, you need to run `grub-install'
1601N/Alike this:
1601N/A
1601N/A # grub-install --root-directory=/boot /dev/hda
1601N/A
1601N/A By the way, as noted above, it is quite difficult to guess BIOS
0N/Adrives correctly under a UNIX-like OS. Thus, `grub-install' will prompt
0N/Ayou to check if it could really guess the correct mappings, after the
0N/Ainstallation. The format is defined in *Note Device map::. Please be
0N/Aquite careful. If the output is wrong, it is unlikely that your
0N/Acomputer will be able to boot with no problem.
0N/A
0N/A Note that `grub-install' is actually just a shell script and the
0N/Areal task is done by the grub shell `grub' (*note Invoking the grub
0N/Ashell::). Therefore, you may run `grub' directly to install GRUB,
0N/Awithout using `grub-install'. Don't do that, however, unless you are
0N/Avery familiar with the internals of GRUB. Installing a boot loader on a
0N/Arunning OS may be extremely dangerous.
0N/A
0N/A
0N/AFile: grub.info, Node: Making a GRUB bootable CD-ROM, Prev: Installing GRUB using grub-install, Up: Installation
0N/A
0N/AMaking a GRUB bootable CD-ROM
0N/A=============================
0N/A
0N/A GRUB supports the "no emulation mode" in the El Torito
0N/Aspecification(1) (*note Making a GRUB bootable CD-ROM-Footnote-1::).
0N/AThis means that you can use the whole CD-ROM from GRUB and you don't
0N/Ahave to make a floppy or hard disk image file, which can cause
0N/Acompatibility problems.
0N/A
0N/A For booting from a CD-ROM, GRUB uses a special Stage 2 called
0N/A`stage2_eltorito'. The only GRUB files you need to have in your
0N/Abootable CD-ROM are this `stage2_eltorito' and optionally a config file
0N/A`menu.lst'. You don't need to use `stage1' or `stage2', because El
0N/ATorito is quite different from the standard boot process.
0N/A
0N/A Here is an example of procedures to make a bootable CD-ROM image.
0N/AFirst, make a top directory for the bootable image, say, `iso':
0N/A
0N/A $ mkdir iso
0N/A
0N/A Make a directory for GRUB:
0N/A
0N/A $ mkdir -p iso/boot/grub
0N/A
0N/A Copy the file `stage2_eltorito':
0N/A
0N/A $ cp /usr/lib/grub/i386-pc/stage2_eltorito iso/boot/grub
0N/A
0N/A If desired, make the config file `menu.lst' under `iso/boot/grub'
0N/A(*note Configuration::), and copy any files and directories for the
0N/Adisc to the directory `iso/'.
0N/A
0N/A Finally, make a ISO9660 image file like this:
0N/A
0N/A $ mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
0N/A -boot-load-size 4 -boot-info-table -o grub.iso iso
0N/A
0N/A This produces a file named `grub.iso', which then can be burned into
0N/Aa CD (or a DVD). `mkisofs' has already set up the disc to boot from
0N/Athe `boot/grub/stage2_eltorito' file, so there is no need to setup GRUB
0N/Aon the disc. (Note that the `-boot-load-size 4' bit is required for
0N/Acompatibility with the BIOS on many older machines.)
0N/A
0N/A You can use the device `(cd)' to access a CD-ROM in your config
0N/Afile. This is not required; GRUB automatically sets the root device to
0N/A`(cd)' when booted from a CD-ROM. It is only necessary to refer to
0N/A`(cd)' if you want to access other drives as well.
0N/A
0N/A
0N/AFile: grub.info, Node: Making a GRUB bootable CD-ROM-Footnotes, Up: Making a GRUB bootable CD-ROM
0N/A
0N/A (1) El Torito is a specification for bootable CD using BIOS
0N/Afunctions.
0N/A
0N/A
0N/AFile: grub.info, Node: Booting, Next: Configuration, Prev: Installation, Up: Top
0N/A
0N/ABooting
0N/A*******
0N/A
0N/A GRUB can load Multiboot-compliant kernels in a consistent way, but
0N/Afor some free operating systems you need to use some OS-specific magic.
0N/A
0N/A* Menu:
0N/A
0N/A* General boot methods:: How to boot OSes with GRUB generally
0N/A* OS-specific notes:: Notes on some operating systems
0N/A* Making your system robust:: How to make your system robust
0N/A
0N/A
0N/AFile: grub.info, Node: General boot methods, Next: OS-specific notes, Up: Booting
0N/A
0N/AHow to boot operating systems
0N/A=============================
0N/A
0N/A GRUB has two distinct boot methods. One of the two is to load an
0N/Aoperating system directly, and the other is to chain-load another boot
0N/Aloader which then will load an operating system actually. Generally
0N/Aspeaking, the former is more desirable, because you don't need to
0N/Ainstall or maintain other boot loaders and GRUB is flexible enough to
0N/Aload an operating system from an arbitrary disk/partition. However, the
0N/Alatter is sometimes required, since GRUB doesn't support all the
0N/Aexisting operating systems natively.
0N/A
0N/A* Menu:
0N/A
0N/A* Loading an operating system directly::
0N/A* Chain-loading::
0N/A
0N/A
0N/AFile: grub.info, Node: Loading an operating system directly, Next: Chain-loading, Up: General boot methods
0N/A
0N/AHow to boot an OS directly with GRUB
0N/A------------------------------------
0N/A
0N/A Multiboot (*note Multiboot Specification: (multiboot)Top.) is the
0N/Anative format supported by GRUB. For the sake of convenience, there is
0N/Aalso support for Linux, FreeBSD, NetBSD and OpenBSD. If you want to
0N/Aboot other operating systems, you will have to chain-load them (*note
0N/AChain-loading::).
0N/A
0N/A Generally, GRUB can boot any Multiboot-compliant OS in the following
0N/Asteps:
0N/A
0N/A 1. Set GRUB's root device to the drive where the OS images are stored
0N/A with the command `root' (*note root::).
0N/A
0N/A 2. Load the kernel image with the command `kernel' (*note kernel::).
0N/A
0N/A 3. If you need modules, load them with the command `module' (*note
0N/A module::) or `modulenounzip' (*note modulenounzip::).
0N/A
0N/A 4. Run the command `boot' (*note boot::).
0N/A
0N/A Linux, FreeBSD, NetBSD and OpenBSD can be booted in a similar
0N/Amanner. You load a kernel image with the command `kernel' and then run
0N/Athe command `boot'. If the kernel requires some parameters, just append
the parameters to `kernel', after the file name of the kernel. Also,
please refer to *Note OS-specific notes::, for information on your
OS-specific issues.
File: grub.info, Node: Chain-loading, Prev: Loading an operating system directly, Up: General boot methods
Load another boot loader to boot unsupported operating systems
--------------------------------------------------------------
If you want to boot an unsupported operating system (e.g. Windows
95), chain-load a boot loader for the operating system. Normally, the
boot loader is embedded in the "boot sector" of the partition on which
the operating system is installed.
1. Set GRUB's root device to the partition by the command
`rootnoverify' (*note rootnoverify::):
grub> rootnoverify (hd0,0)
2. Set the "active" flag in the partition using the command
`makeactive'(1) (*note Chain-loading-Footnote-1::) (*note
makeactive::):
grub> makeactive
3. Load the boot loader with the command `chainloader' (*note
chainloader::):
grub> chainloader +1
`+1' indicates that GRUB should read one sector from the start of
the partition. The complete description about this syntax can be
found in *Note Block list syntax::.
4. Run the command `boot' (*note boot::).
However, DOS and Windows have some deficiencies, so you might have to
use more complicated instructions. *Note DOS/Windows::, for more
information.
File: grub.info, Node: Chain-loading-Footnotes, Up: Chain-loading
(1) This is not necessary for most of the modern operating systems.
File: grub.info, Node: OS-specific notes, Next: Making your system robust, Prev: General boot methods, Up: Booting
Some caveats on OS-specific issues
==================================
Here, we describe some caveats on several operating systems.
* Menu:
* GNU/Hurd::
* GNU/Linux::
* FreeBSD::
* NetBSD::
* OpenBSD::
* DOS/Windows::
* SCO UnixWare::
* QNX::
File: grub.info, Node: GNU/Hurd, Next: GNU/Linux, Up: OS-specific notes
GNU/Hurd
--------
Since GNU/Hurd is Multiboot-compliant, it is easy to boot it; there
is nothing special about it. But do not forget that you have to specify
a root partition to the kernel.
1. Set GRUB's root device to the same drive as GNU/Hurd's. Probably
the command `find /boot/gnumach' or similar can help you (*note
find::).
2. Load the kernel and the module, like this:
grub> kernel /boot/gnumach root=hd0s1
grub> module /boot/serverboot
3. Run the command `boot' (*note boot::).
File: grub.info, Node: GNU/Linux, Next: FreeBSD, Prev: GNU/Hurd, Up: OS-specific notes
GNU/Linux
---------
It is relatively easy to boot GNU/Linux from GRUB, because it
somewhat resembles to boot a Multiboot-compliant OS.
1. Set GRUB's root device to the same drive as GNU/Linux's. Probably
the command `find /vmlinuz' or similar can help you (*note find::).
2. Load the kernel:
grub> kernel /vmlinuz root=/dev/hda1
If you need to specify some kernel parameters, just append them to
the command. For example, to set `vga' to `ext', do this:
grub> kernel /vmlinuz root=/dev/hda1 vga=ext
See the documentation in the Linux source tree for complete
information on the available options.
3. If you use an initrd, execute the command `initrd' (*note
initrd::) after `kernel':
grub> initrd /initrd
4. Finally, run the command `boot' (*note boot::).
*Caution:* If you use an initrd and specify the `mem=' option to the
kernel to let it use less than actual memory size, you will also have
to specify the same memory size to GRUB. To let GRUB know the size, run
the command `uppermem' _before_ loading the kernel. *Note uppermem::,
for more information.
File: grub.info, Node: FreeBSD, Next: NetBSD, Prev: GNU/Linux, Up: OS-specific notes
FreeBSD
-------
GRUB can load the kernel directly, either in ELF or a.out format. But
this is not recommended, since FreeBSD's bootstrap interface sometimes
changes heavily, so GRUB can't guarantee to pass kernel parameters
correctly.
Thus, we'd recommend loading the very flexible loader `/boot/loader'
instead. See this example:
grub> root (hd0,a)
grub> kernel /boot/loader
grub> boot
File: grub.info, Node: NetBSD, Next: OpenBSD, Prev: FreeBSD, Up: OS-specific notes
NetBSD
------
GRUB can load NetBSD a.out and ELF directly, follow these steps:
1. Set GRUB's root device with `root' (*note root::).
2. Load the kernel with `kernel' (*note kernel::). You should append
the ugly option `--type=netbsd', if you want to load an ELF
kernel, like this:
grub> kernel --type=netbsd /netbsd-elf
3. Run `boot' (*note boot::).
For now, however, GRUB doesn't allow you to pass kernel parameters,
so it may be better to chain-load it instead. For more information,
please see *Note Chain-loading::.
File: grub.info, Node: OpenBSD, Next: DOS/Windows, Prev: NetBSD, Up: OS-specific notes
OpenBSD
-------
The booting instruction is exactly the same as for NetBSD (*note
NetBSD::).
File: grub.info, Node: DOS/Windows, Next: SCO UnixWare, Prev: OpenBSD, Up: OS-specific notes
DOS/Windows
-----------
GRUB cannot boot DOS or Windows directly, so you must chain-load them
(*note Chain-loading::). However, their boot loaders have some critical
deficiencies, so it may not work to just chain-load them. To overcome
the problems, GRUB provides you with two helper functions.
If you have installed DOS (or Windows) on a non-first hard disk, you
have to use the disk swapping technique, because that OS cannot boot
from any disks but the first one. The workaround used in GRUB is the
command `map' (*note map::), like this:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
This performs a "virtual" swap between your first and second hard
drive.
*Caution:* This is effective only if DOS (or Windows) uses BIOS to
access the swapped disks. If that OS uses a special driver for the
disks, this probably won't work.
Another problem arises if you installed more than one set of
DOS/Windows onto one disk, because they could be confused if there are
more than one primary partitions for DOS/Windows. Certainly you should
avoid doing this, but there is a solution if you do want to do so. Use
the partition hiding/unhiding technique.
If GRUB "hide"s a DOS (or Windows) partition (*note hide::), DOS (or
Windows) will ignore the partition. If GRUB "unhide"s a DOS (or
Windows) partition (*note unhide::), DOS (or Windows) will detect the
partition. Thus, if you have installed DOS (or Windows) on the first
and the second partition of the first hard disk, and you want to boot
the copy on the first partition, do the following:
grub> unhide (hd0,0)
grub> hide (hd0,1)
grub> rootnoverify (hd0,0)
grub> chainloader +1
grub> makeactive
grub> boot
File: grub.info, Node: SCO UnixWare, Next: QNX, Prev: DOS/Windows, Up: OS-specific notes
SCO UnixWare
------------
It is known that the signature in the boot loader for SCO UnixWare is
wrong, so you will have to specify the option `--force' to
`chainloader' (*note chainloader::), like this:
grub> rootnoverify (hd1,0)
grub> chainloader --force +1
grub> makeactive
grub> boot
File: grub.info, Node: QNX, Prev: SCO UnixWare, Up: OS-specific notes
QNX
---
QNX seems to use a bigger boot loader, so you need to boot it up,
like this:
grub> rootnoverify (hd1,1)
grub> chainloader +4
grub> boot
File: grub.info, Node: Making your system robust, Prev: OS-specific notes, Up: Booting
How to make your system robust
==============================
When you test a new kernel or a new OS, it is important to make sure
that your computer can boot even if the new system is unbootable. This
is crucial especially if you maintain servers or remote systems. To
accomplish this goal, you need to set up two things:
1. You must maintain a system which is always bootable. For instance,
if you test a new kernel, you need to keep a working kernel in a
different place. And, it would sometimes be very nice to even have
a complete copy of a working system in a different partition or
disk.
2. You must direct GRUB to boot a working system when the new system
fails. This is possible with the "fallback" system in GRUB.
The former requirement is very specific to each OS, so this
documentation does not cover that topic. It is better to consult some
backup tools.
So let's see the GRUB part. There are two possibilities: one of them
is quite simple but not very robust, and the other is a bit complex to
set up but probably the best solution to make sure that your system can
start as long as GRUB itself is bootable.
* Menu:
* Booting once-only::
* Booting fallback systems::
File: grub.info, Node: Booting once-only, Next: Booting fallback systems, Up: Making your system robust
Booting once-only
-----------------
You can teach GRUB to boot an entry only at next boot time. Suppose
that your have an old kernel `old_kernel' and a new kernel
`new_kernel'. You know that `old_kernel' can boot your system
correctly, and you want to test `new_kernel'.
To ensure that your system will go back to the old kernel even if the
new kernel fails (e.g. it panics), you can specify that GRUB should try
the new kernel only once and boot the old kernel after that.
First, modify your configuration file. Here is an example:
default saved # This is important!!!
timeout 10
title the old kernel
root (hd0,0)
kernel /old_kernel
savedefault
title the new kernel
root (hd0,0)
kernel /new_kernel
savedefault 0 # This is important!!!
Note that this configuration file uses `default saved' (*note
default::) at the head and `savedefault 0' (*note savedefault::) in the
entry for the new kernel. This means that GRUB boots a saved entry by
default, and booting the entry for the new kernel saves `0' as the
saved entry.
With this configuration file, after all, GRUB always tries to boot
the old kernel after it booted the new one, because `0' is the entry of
`the old kernel'.
The next step is to tell GRUB to boot the new kernel at next boot
time. For this, execute `grub-set-default' (*note Invoking
grub-set-default::):
# grub-set-default 1
This command sets the saved entry to `1', that is, to the new kernel.
This method is useful, but still not very robust, because GRUB stops
booting, if there is any error in the boot entry, such that the new
kernel has an invalid executable format. Thus, it it even better to use
the "fallback" mechanism of GRUB. Look at next subsection for this
feature.
File: grub.info, Node: Booting fallback systems, Prev: Booting once-only, Up: Making your system robust
Booting fallback systems
------------------------
GRUB supports a fallback mechanism of booting one or more other
entries if a default boot entry fails. You can specify multiple
fallback entries if you wish.
Suppose that you have three systems, `A', `B' and `C'. `A' is a
system which you want to boot by default. `B' is a backup system which
is supposed to boot safely. `C' is another backup system which is used
in case where `B' is broken.
Then you may want GRUB to boot the first system which is bootable
among `A', `B' and `C'. A configuration file can be written in this way:
default saved # This is important!!!
timeout 10
fallback 1 2 # This is important!!!
title A
root (hd0,0)
kernel /kernel
savedefault fallback # This is important!!!
title B
root (hd1,0)
kernel /kernel
savedefault fallback # This is important!!!
title C
root (hd2,0)
kernel /kernel
savedefault
Note that `default saved' (*note default::), `fallback 1 2' and
`savedefault fallback' are used. GRUB will boot a saved entry by
default and save a fallback entry as next boot entry with this
configuration.
When GRUB tries to boot `A', GRUB saves `1' as next boot entry,
because the command `fallback' specifies that `1' is the first fallback
entry. The entry `1' is `B', so GRUB will try to boot `B' at next boot
time.
Likewise, when GRUB tries to boot `B', GRUB saves `2' as next boot
entry, because `fallback' specifies `2' as next fallback entry. This
makes sure that GRUB will boot `C' after booting `B'.
It is noteworthy that GRUB uses fallback entries both when GRUB
itself fails in booting an entry and when `A' or `B' fails in starting
up your system. So this solution ensures that your system is started
even if GRUB cannot find your kernel or if your kernel panics.
However, you need to run `grub-set-default' (*note Invoking
grub-set-default::) when `A' starts correctly or you fix `A' after it
crashes, since GRUB always sets next boot entry to a fallback entry.
You should run this command in a startup script such as `rc.local' to
boot `A' by default:
# grub-set-default 0
where `0' is the number of the boot entry for the system `A'.
If you want to see what is current default entry, you can look at the
file `/boot/grub/default' (or `/grub/default' in some systems). Because
this file is plain-text, you can just `cat' this file. But it is
strongly recommended *not to modify this file directly*, because GRUB
may fail in saving a default entry in this file, if you change this
file in an unintended manner. Therefore, you should use
`grub-set-default' when you need to change the default entry.
File: grub.info, Node: Configuration, Next: Network, Prev: Booting, Up: Top
Configuration
*************
You've probably noticed that you need to type several commands to
boot your OS. There's a solution to that - GRUB provides a menu
interface (*note Menu interface::) from which you can select an item
(using arrow keys) that will do everything to boot an OS.
To enable the menu, you need a configuration file, `menu.lst' under
the boot directory. We'll analyze an example file.
The file first contains some general settings, the menu interface
related options. You can put these commands (*note Menu-specific
commands::) before any of the items (starting with `title' (*note
title::)).
#
# Sample boot menu configuration file
#
As you may have guessed, these lines are comments. Lines starting
with a hash character (`#'), and blank lines, are ignored by GRUB.
# By default, boot the first entry.
default 0
The first entry (here, counting starts with number zero, not one!)
will be the default choice.
# Boot automatically after 30 secs.
timeout 30
As the comment says, GRUB will boot automatically in 30 seconds,
unless interrupted with a keypress.
# Fallback to the second entry.
fallback 1
If, for any reason, the default entry doesn't work, fall back to the
second one (this is rarely used, for obvious reasons).
Note that the complete descriptions of these commands, which are menu
interface specific, can be found in *Note Menu-specific commands::.
Other descriptions can be found in *Note Commands::.
Now, on to the actual OS definitions. You will see that each entry
begins with a special command, `title' (*note title::), and the action
is described after it. Note that there is no command `boot' (*note
boot::) at the end of each item. That is because GRUB automatically
executes `boot' if it loads other commands successfully.
The argument for the command `title' is used to display a short
title/description of the entry in the menu. Since `title' displays the
argument as is, you can write basically anything there.
# For booting GNU/Hurd
title GNU/Hurd
root (hd0,0)
kernel /boot/gnumach.gz root=hd0s1
module /boot/serverboot.gz
This boots GNU/Hurd from the first hard disk.
# For booting GNU/Linux
title GNU/Linux
kernel (hd1,0)/vmlinuz root=/dev/hdb1
This boots GNU/Linux, but from the second hard disk.
# For booting Mach (getting kernel from floppy)
title Utah Mach4 multiboot
root (hd0,2)
pause Insert the diskette now^G!!
kernel (fd0)/boot/kernel root=hd0s3
module (fd0)/boot/bootstrap
This boots Mach with a kernel on a floppy, but the root filesystem at
hd0s3. It also contains a `pause' line (*note pause::), which will
cause GRUB to display a prompt and delay, before actually executing the
rest of the commands and booting.
# For booting FreeBSD
title FreeBSD
root (hd0,2,a)
kernel /boot/loader
This item will boot FreeBSD kernel loaded from the `a' partition of
the third PC slice of the first hard disk.
# For booting OS/2
title OS/2
root (hd0,1)
makeactive
# chainload OS/2 bootloader from the first sector
chainloader +1
# This is similar to "chainload", but loads a specific file
#chainloader /boot/chain.os2
This will boot OS/2, using a chain-loader (*note Chain-loading::).
# For booting Windows NT or Windows95
title Windows NT / Windows 95 boot menu
root (hd0,0)
makeactive
chainloader +1
# For loading DOS if Windows NT is installed
# chainload /bootsect.dos
The same as the above, but for Windows.
# For installing GRUB into the hard disk
title Install GRUB into the hard disk
root (hd0,0)
setup (hd0)
This will just (re)install GRUB onto the hard disk.
# Change the colors.
title Change the colors
color light-green/brown blink-red/blue
In the last entry, the command `color' is used (*note color::), to
change the menu colors (try it!). This command is somewhat special,
because it can be used both in the command-line and in the menu. GRUB
has several such commands, see *Note General commands::.
We hope that you now understand how to use the basic features of
GRUB. To learn more about GRUB, see the following chapters.
File: grub.info, Node: Network, Next: Serial terminal, Prev: Configuration, Up: Top
Downloading OS images from a network
************************************
Although GRUB is a disk-based boot loader, it does provide network
support. To use the network support, you need to enable at least one
network driver in the GRUB build process. For more information please
see `netboot/README.netboot' in the source distribution.
* Menu:
* General usage of network support::
* Diskless::
File: grub.info, Node: General usage of network support, Next: Diskless, Up: Network
How to set up your network
==========================
GRUB requires a file server and optionally a server that will assign
an IP address to the machine on which GRUB is running. For the former,
only TFTP is supported at the moment. The latter is either BOOTP, DHCP
or a RARP server(1) (*note General usage of network
support-Footnote-1::). It is not necessary to run both the servers on
one computer. How to configure these servers is beyond the scope of this
document, so please refer to the manuals specific to those
protocols/servers.
If you decided to use a server to assign an IP address, set up the
server and run `bootp' (*note bootp::), `dhcp' (*note dhcp::) or `rarp'
(*note rarp::) for BOOTP, DHCP or RARP, respectively. Each command will
show an assigned IP address, a netmask, an IP address for your TFTP
server and a gateway. If any of the addresses is wrong or it causes an
error, probably the configuration of your servers isn't set up properly.
Otherwise, run `ifconfig', like this:
grub> ifconfig --address=192.168.110.23 --server=192.168.110.14
You can also use `ifconfig' in conjuction with `bootp', `dhcp' or
`rarp' (e.g. to reassign the server address manually). *Note
ifconfig::, for more details.
Finally, download your OS images from your network. The network can
be accessed using the network drive `(nd)'. Everything else is very
similar to the normal instructions (*note Booting::).
Here is an example:
grub> bootp
Probing... [NE*000]
NE2000 base ...
Address: 192.168.110.23 Netmask: 255.255.255.0
Server: 192.168.110.14 Gateway: 192.168.110.1
grub> root (nd)
grub> kernel /tftproot/gnumach.gz root=sd0s1
grub> module /tftproot/serverboot.gz
grub> boot
File: grub.info, Node: General usage of network support-Footnotes, Up: General usage of network support
(1) RARP is not advised, since it cannot serve much information