xref: /onnv-gate/usr/src/grub/grub-0.97/docs/grub.info (revision 8044:b3af80bbf173)
1*8044SWilliam.Kucharski@Sun.COMThis is ../../docs/grub.info, produced by makeinfo version 4.8 from
2*8044SWilliam.Kucharski@Sun.COM../../docs/grub.texi.
3*8044SWilliam.Kucharski@Sun.COM
4*8044SWilliam.Kucharski@Sun.COMINFO-DIR-SECTION Kernel
5*8044SWilliam.Kucharski@Sun.COMSTART-INFO-DIR-ENTRY
6*8044SWilliam.Kucharski@Sun.COM* GRUB: (grub).                 The GRand Unified Bootloader
7*8044SWilliam.Kucharski@Sun.COM* grub-install: (grub)Invoking grub-install.    Install GRUB on your drive
8*8044SWilliam.Kucharski@Sun.COM* grub-md5-crypt: (grub)Invoking grub-md5-crypt.        Encrypt a password
9*8044SWilliam.Kucharski@Sun.COM                                                        in MD5 format
10*8044SWilliam.Kucharski@Sun.COM* grub-terminfo: (grub)Invoking grub-terminfo.  Generate a terminfo
11*8044SWilliam.Kucharski@Sun.COM                                                command from a
12*8044SWilliam.Kucharski@Sun.COM                                                terminfo name
13*8044SWilliam.Kucharski@Sun.COM* grub-set-default: (grub)Invoking grub-set-default.    Set a default boot
14*8044SWilliam.Kucharski@Sun.COM                                                        entry
15*8044SWilliam.Kucharski@Sun.COM* mbchk: (grub)Invoking mbchk.  Check for the format of a Multiboot kernel
16*8044SWilliam.Kucharski@Sun.COMEND-INFO-DIR-ENTRY
17*8044SWilliam.Kucharski@Sun.COM
18*8044SWilliam.Kucharski@Sun.COM   Copyright (C) 1999,2000,2001,2002,2004 Free Software Foundation, Inc.
19*8044SWilliam.Kucharski@Sun.COM
20*8044SWilliam.Kucharski@Sun.COM   Permission is granted to make and distribute verbatim copies of this
21*8044SWilliam.Kucharski@Sun.COMmanual provided the copyright notice and this permission notice are
22*8044SWilliam.Kucharski@Sun.COMpreserved on all copies.
23*8044SWilliam.Kucharski@Sun.COM
24*8044SWilliam.Kucharski@Sun.COM   Permission is granted to copy and distribute modified versions of
25*8044SWilliam.Kucharski@Sun.COMthis manual under the conditions for verbatim copying, provided also
26*8044SWilliam.Kucharski@Sun.COMthat the entire resulting derived work is distributed under the terms
27*8044SWilliam.Kucharski@Sun.COMof a permission notice identical to this one.
28*8044SWilliam.Kucharski@Sun.COM
29*8044SWilliam.Kucharski@Sun.COM   Permission is granted to copy and distribute translations of this
30*8044SWilliam.Kucharski@Sun.COMmanual into another language, under the above conditions for modified
31*8044SWilliam.Kucharski@Sun.COMversions.
32*8044SWilliam.Kucharski@Sun.COM
33*8044SWilliam.Kucharski@Sun.COM
34*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Top,  Next: Introduction,  Up: (dir)
35*8044SWilliam.Kucharski@Sun.COM
36*8044SWilliam.Kucharski@Sun.COMGRUB manual
37*8044SWilliam.Kucharski@Sun.COM***********
38*8044SWilliam.Kucharski@Sun.COM
39*8044SWilliam.Kucharski@Sun.COMThis is the documentation of GNU GRUB, the GRand Unified Bootloader, a
40*8044SWilliam.Kucharski@Sun.COMflexible and powerful boot loader program for PCs.
41*8044SWilliam.Kucharski@Sun.COM
42*8044SWilliam.Kucharski@Sun.COM   This edition documents version 0.97.
43*8044SWilliam.Kucharski@Sun.COM
44*8044SWilliam.Kucharski@Sun.COM* Menu:
45*8044SWilliam.Kucharski@Sun.COM
46*8044SWilliam.Kucharski@Sun.COM* Introduction::                Capturing the spirit of GRUB
47*8044SWilliam.Kucharski@Sun.COM* Naming convention::           Names of your drives in GRUB
48*8044SWilliam.Kucharski@Sun.COM* Installation::                Installing GRUB on your drive
49*8044SWilliam.Kucharski@Sun.COM* Booting::                     How to boot different operating systems
50*8044SWilliam.Kucharski@Sun.COM* Configuration::               Writing your own configuration file
51*8044SWilliam.Kucharski@Sun.COM* Network::                     Downloading OS images from a network
52*8044SWilliam.Kucharski@Sun.COM* Serial terminal::             Using GRUB via a serial line
53*8044SWilliam.Kucharski@Sun.COM* Preset Menu::                 Embedding a configuration file into GRUB
54*8044SWilliam.Kucharski@Sun.COM* Security::                    Improving the security
55*8044SWilliam.Kucharski@Sun.COM* Images::                      GRUB image files
56*8044SWilliam.Kucharski@Sun.COM* Filesystem::                  Filesystem syntax and semantics
57*8044SWilliam.Kucharski@Sun.COM* Interface::                   The menu and the command-line
58*8044SWilliam.Kucharski@Sun.COM* Commands::                    The list of available builtin commands
59*8044SWilliam.Kucharski@Sun.COM* Troubleshooting::             Error messages produced by GRUB
60*8044SWilliam.Kucharski@Sun.COM* Invoking the grub shell::     How to use the grub shell
61*8044SWilliam.Kucharski@Sun.COM* Invoking grub-install::       How to use the GRUB installer
62*8044SWilliam.Kucharski@Sun.COM* Invoking grub-md5-crypt::     How to generate a cryptic password
63*8044SWilliam.Kucharski@Sun.COM* Invoking grub-terminfo::      How to generate a terminfo command
64*8044SWilliam.Kucharski@Sun.COM* Invoking grub-set-default::   How to set a default boot entry
65*8044SWilliam.Kucharski@Sun.COM* Invoking mbchk::              How to use the Multiboot checker
66*8044SWilliam.Kucharski@Sun.COM* Obtaining and Building GRUB:: How to obtain and build GRUB
67*8044SWilliam.Kucharski@Sun.COM* Reporting bugs::              Where you should send a bug report
68*8044SWilliam.Kucharski@Sun.COM* Future::                      Some future plans on GRUB
69*8044SWilliam.Kucharski@Sun.COM* Internals::                   Hacking GRUB
70*8044SWilliam.Kucharski@Sun.COM* Index::
71*8044SWilliam.Kucharski@Sun.COM
72*8044SWilliam.Kucharski@Sun.COM
73*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Introduction,  Next: Naming convention,  Prev: Top,  Up: Top
74*8044SWilliam.Kucharski@Sun.COM
75*8044SWilliam.Kucharski@Sun.COM1 Introduction to GRUB
76*8044SWilliam.Kucharski@Sun.COM**********************
77*8044SWilliam.Kucharski@Sun.COM
78*8044SWilliam.Kucharski@Sun.COM* Menu:
79*8044SWilliam.Kucharski@Sun.COM
80*8044SWilliam.Kucharski@Sun.COM* Overview::                    What exactly GRUB is and how to use it
81*8044SWilliam.Kucharski@Sun.COM* History::                     From maggot to house fly
82*8044SWilliam.Kucharski@Sun.COM* Features::                    GRUB features
83*8044SWilliam.Kucharski@Sun.COM* Role of a boot loader::       The role of a boot loader
84*8044SWilliam.Kucharski@Sun.COM
85*8044SWilliam.Kucharski@Sun.COM
86*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Overview,  Next: History,  Up: Introduction
87*8044SWilliam.Kucharski@Sun.COM
88*8044SWilliam.Kucharski@Sun.COM1.1 Overview
89*8044SWilliam.Kucharski@Sun.COM============
90*8044SWilliam.Kucharski@Sun.COM
91*8044SWilliam.Kucharski@Sun.COMBriefly, a "boot loader" is the first software program that runs when a
92*8044SWilliam.Kucharski@Sun.COMcomputer starts.  It is responsible for loading and transferring
93*8044SWilliam.Kucharski@Sun.COMcontrol to an operating system "kernel" software (such as Linux or GNU
94*8044SWilliam.Kucharski@Sun.COMMach).  The kernel, in turn, initializes the rest of the operating
95*8044SWilliam.Kucharski@Sun.COMsystem (e.g. a GNU system).
96*8044SWilliam.Kucharski@Sun.COM
97*8044SWilliam.Kucharski@Sun.COM   GNU GRUB is a very powerful boot loader, which can load a wide
98*8044SWilliam.Kucharski@Sun.COMvariety of free operating systems, as well as proprietary operating
99*8044SWilliam.Kucharski@Sun.COMsystems with chain-loading(1) (*note Overview-Footnote-1::). GRUB is
100*8044SWilliam.Kucharski@Sun.COMdesigned to address the complexity of booting a personal computer; both
101*8044SWilliam.Kucharski@Sun.COMthe program and this manual are tightly bound to that computer platform,
102*8044SWilliam.Kucharski@Sun.COMalthough porting to other platforms may be addressed in the future.
103*8044SWilliam.Kucharski@Sun.COM
104*8044SWilliam.Kucharski@Sun.COM   One of the important features in GRUB is flexibility; GRUB
105*8044SWilliam.Kucharski@Sun.COMunderstands filesystems and kernel executable formats, so you can load
106*8044SWilliam.Kucharski@Sun.COMan arbitrary operating system the way you like, without recording the
107*8044SWilliam.Kucharski@Sun.COMphysical position of your kernel on the disk. Thus you can load the
108*8044SWilliam.Kucharski@Sun.COMkernel just by specifying its file name and the drive and partition
109*8044SWilliam.Kucharski@Sun.COMwhere the kernel resides.
110*8044SWilliam.Kucharski@Sun.COM
111*8044SWilliam.Kucharski@Sun.COM   When booting with GRUB, you can use either a command-line interface
112*8044SWilliam.Kucharski@Sun.COM(*note Command-line interface::), or a menu interface (*note Menu
113*8044SWilliam.Kucharski@Sun.COMinterface::). Using the command-line interface, you type the drive
114*8044SWilliam.Kucharski@Sun.COMspecification and file name of the kernel manually. In the menu
115*8044SWilliam.Kucharski@Sun.COMinterface, you just select an OS using the arrow keys. The menu is
116*8044SWilliam.Kucharski@Sun.COMbased on a configuration file which you prepare beforehand (*note
117*8044SWilliam.Kucharski@Sun.COMConfiguration::). While in the menu, you can switch to the command-line
118*8044SWilliam.Kucharski@Sun.COMmode, and vice-versa. You can even edit menu entries before using them.
119*8044SWilliam.Kucharski@Sun.COM
120*8044SWilliam.Kucharski@Sun.COM   In the following chapters, you will learn how to specify a drive, a
121*8044SWilliam.Kucharski@Sun.COMpartition, and a file name (*note Naming convention::) to GRUB, how to
122*8044SWilliam.Kucharski@Sun.COMinstall GRUB on your drive (*note Installation::), and how to boot your
123*8044SWilliam.Kucharski@Sun.COMOSes (*note Booting::), step by step.
124*8044SWilliam.Kucharski@Sun.COM
125*8044SWilliam.Kucharski@Sun.COM   Besides the GRUB boot loader itself, there is a "grub shell" `grub'
126*8044SWilliam.Kucharski@Sun.COM(*note Invoking the grub shell::) which can be run when you are in your
127*8044SWilliam.Kucharski@Sun.COMoperating system. It emulates the boot loader and can be used for
128*8044SWilliam.Kucharski@Sun.COMinstalling the boot loader.
129*8044SWilliam.Kucharski@Sun.COM
130*8044SWilliam.Kucharski@Sun.COM
131*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Overview-Footnotes,  Up: Overview
132*8044SWilliam.Kucharski@Sun.COM
133*8044SWilliam.Kucharski@Sun.COM   (1) "chain-load" is the mechanism for loading unsupported operating
134*8044SWilliam.Kucharski@Sun.COMsystems by loading another boot loader. It is typically used for
135*8044SWilliam.Kucharski@Sun.COMloading DOS or Windows.
136*8044SWilliam.Kucharski@Sun.COM
137*8044SWilliam.Kucharski@Sun.COM
138*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: History,  Next: Features,  Prev: Overview,  Up: Introduction
139*8044SWilliam.Kucharski@Sun.COM
140*8044SWilliam.Kucharski@Sun.COM1.2 History of GRUB
141*8044SWilliam.Kucharski@Sun.COM===================
142*8044SWilliam.Kucharski@Sun.COM
143*8044SWilliam.Kucharski@Sun.COMGRUB originated in 1995 when Erich Boleyn was trying to boot the GNU
144*8044SWilliam.Kucharski@Sun.COMHurd with the University of Utah's Mach 4 microkernel (now known as GNU
145*8044SWilliam.Kucharski@Sun.COMMach).  Erich and Brian Ford designed the Multiboot Specification
146*8044SWilliam.Kucharski@Sun.COM(*note Multiboot Specification: (multiboot)Top.), because they were
147*8044SWilliam.Kucharski@Sun.COMdetermined not to add to the large number of mutually-incompatible PC
148*8044SWilliam.Kucharski@Sun.COMboot methods.
149*8044SWilliam.Kucharski@Sun.COM
150*8044SWilliam.Kucharski@Sun.COM   Erich then began modifying the FreeBSD boot loader so that it would
151*8044SWilliam.Kucharski@Sun.COMunderstand Multiboot. He soon realized that it would be a lot easier to
152*8044SWilliam.Kucharski@Sun.COMwrite his own boot loader from scratch than to keep working on the
153*8044SWilliam.Kucharski@Sun.COMFreeBSD boot loader, and so GRUB was born.
154*8044SWilliam.Kucharski@Sun.COM
155*8044SWilliam.Kucharski@Sun.COM   Erich added many features to GRUB, but other priorities prevented him
156*8044SWilliam.Kucharski@Sun.COMfrom keeping up with the demands of its quickly-expanding user base. In
157*8044SWilliam.Kucharski@Sun.COM1999, Gordon Matzigkeit and Yoshinori K. Okuji adopted GRUB as an
158*8044SWilliam.Kucharski@Sun.COMofficial GNU package, and opened its development by making the latest
159*8044SWilliam.Kucharski@Sun.COMsources available via anonymous CVS. *Note Obtaining and Building
160*8044SWilliam.Kucharski@Sun.COMGRUB::, for more information.
161*8044SWilliam.Kucharski@Sun.COM
162*8044SWilliam.Kucharski@Sun.COM
163*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Features,  Next: Role of a boot loader,  Prev: History,  Up: Introduction
164*8044SWilliam.Kucharski@Sun.COM
165*8044SWilliam.Kucharski@Sun.COM1.3 GRUB features
166*8044SWilliam.Kucharski@Sun.COM=================
167*8044SWilliam.Kucharski@Sun.COM
168*8044SWilliam.Kucharski@Sun.COMThe primary requirement for GRUB is that it be compliant with the
169*8044SWilliam.Kucharski@Sun.COM"Multiboot Specification", which is described in *Note Multiboot
170*8044SWilliam.Kucharski@Sun.COMSpecification: (multiboot)Top.
171*8044SWilliam.Kucharski@Sun.COM
172*8044SWilliam.Kucharski@Sun.COM   The other goals, listed in approximate order of importance, are:
173*8044SWilliam.Kucharski@Sun.COM
174*8044SWilliam.Kucharski@Sun.COM   * Basic functions must be straightforward for end-users.
175*8044SWilliam.Kucharski@Sun.COM
176*8044SWilliam.Kucharski@Sun.COM   * Rich functionality to support kernel experts and designers.
177*8044SWilliam.Kucharski@Sun.COM
178*8044SWilliam.Kucharski@Sun.COM   * Backward compatibility for booting FreeBSD, NetBSD, OpenBSD, and
179*8044SWilliam.Kucharski@Sun.COM     Linux. Proprietary kernels (such as DOS, Windows NT, and OS/2) are
180*8044SWilliam.Kucharski@Sun.COM     supported via a chain-loading function.
181*8044SWilliam.Kucharski@Sun.COM
182*8044SWilliam.Kucharski@Sun.COM   Except for specific compatibility modes (chain-loading and the Linux
183*8044SWilliam.Kucharski@Sun.COM"piggyback" format), all kernels will be started in much the same state
184*8044SWilliam.Kucharski@Sun.COMas in the Multiboot Specification. Only kernels loaded at 1 megabyte or
185*8044SWilliam.Kucharski@Sun.COMabove are presently supported. Any attempt to load below that boundary
186*8044SWilliam.Kucharski@Sun.COMwill simply result in immediate failure and an error message reporting
187*8044SWilliam.Kucharski@Sun.COMthe problem.
188*8044SWilliam.Kucharski@Sun.COM
189*8044SWilliam.Kucharski@Sun.COM   In addition to the requirements above, GRUB has the following
190*8044SWilliam.Kucharski@Sun.COMfeatures (note that the Multiboot Specification doesn't require all the
191*8044SWilliam.Kucharski@Sun.COMfeatures that GRUB supports):
192*8044SWilliam.Kucharski@Sun.COM
193*8044SWilliam.Kucharski@Sun.COMRecognize multiple executable formats
194*8044SWilliam.Kucharski@Sun.COM     Support many of the "a.out" variants plus "ELF". Symbol tables are
195*8044SWilliam.Kucharski@Sun.COM     also loaded.
196*8044SWilliam.Kucharski@Sun.COM
197*8044SWilliam.Kucharski@Sun.COMSupport non-Multiboot kernels
198*8044SWilliam.Kucharski@Sun.COM     Support many of the various free 32-bit kernels that lack Multiboot
199*8044SWilliam.Kucharski@Sun.COM     compliance (primarily FreeBSD, NetBSD, OpenBSD, and Linux).
200*8044SWilliam.Kucharski@Sun.COM     Chain-loading of other boot loaders is also supported.
201*8044SWilliam.Kucharski@Sun.COM
202*8044SWilliam.Kucharski@Sun.COMLoad multiples modules
203*8044SWilliam.Kucharski@Sun.COM     Fully support the Multiboot feature of loading multiple modules.
204*8044SWilliam.Kucharski@Sun.COM
205*8044SWilliam.Kucharski@Sun.COMLoad a configuration file
206*8044SWilliam.Kucharski@Sun.COM     Support a human-readable text configuration file with preset boot
207*8044SWilliam.Kucharski@Sun.COM     commands. You can also load another configuration file dynamically
208*8044SWilliam.Kucharski@Sun.COM     and embed a preset configuration file in a GRUB image file. The
209*8044SWilliam.Kucharski@Sun.COM     list of commands (*note Commands::) are a superset of those
210*8044SWilliam.Kucharski@Sun.COM     supported on the command-line. An example configuration file is
211*8044SWilliam.Kucharski@Sun.COM     provided in *Note Configuration::.
212*8044SWilliam.Kucharski@Sun.COM
213*8044SWilliam.Kucharski@Sun.COMProvide a menu interface
214*8044SWilliam.Kucharski@Sun.COM     A menu interface listing preset boot commands, with a programmable
215*8044SWilliam.Kucharski@Sun.COM     timeout, is available. There is no fixed limit on the number of
216*8044SWilliam.Kucharski@Sun.COM     boot entries, and the current implementation has space for several
217*8044SWilliam.Kucharski@Sun.COM     hundred.
218*8044SWilliam.Kucharski@Sun.COM
219*8044SWilliam.Kucharski@Sun.COMHave a flexible command-line interface
220*8044SWilliam.Kucharski@Sun.COM     A fairly flexible command-line interface, accessible from the menu,
221*8044SWilliam.Kucharski@Sun.COM     is available to edit any preset commands, or write a new boot
222*8044SWilliam.Kucharski@Sun.COM     command set from scratch. If no configuration file is present,
223*8044SWilliam.Kucharski@Sun.COM     GRUB drops to the command-line.
224*8044SWilliam.Kucharski@Sun.COM
225*8044SWilliam.Kucharski@Sun.COM     The list of commands (*note Commands::) are a subset of those
226*8044SWilliam.Kucharski@Sun.COM     supported for configuration files. Editing commands closely
227*8044SWilliam.Kucharski@Sun.COM     resembles the Bash command-line (*note Bash: (features)Command
228*8044SWilliam.Kucharski@Sun.COM     Line Editing.), with <TAB>-completion of commands, devices,
229*8044SWilliam.Kucharski@Sun.COM     partitions, and files in a directory depending on context.
230*8044SWilliam.Kucharski@Sun.COM
231*8044SWilliam.Kucharski@Sun.COMSupport multiple filesystem types
232*8044SWilliam.Kucharski@Sun.COM     Support multiple filesystem types transparently, plus a useful
233*8044SWilliam.Kucharski@Sun.COM     explicit blocklist notation. The currently supported filesystem
234*8044SWilliam.Kucharski@Sun.COM     types are "BSD FFS", "DOS FAT16 and FAT32", "Minix fs", "Linux
235*8044SWilliam.Kucharski@Sun.COM     ext2fs", "ReiserFS", "JFS", "XFS", and "VSTa fs". *Note
236*8044SWilliam.Kucharski@Sun.COM     Filesystem::, for more information.
237*8044SWilliam.Kucharski@Sun.COM
238*8044SWilliam.Kucharski@Sun.COMSupport automatic decompression
239*8044SWilliam.Kucharski@Sun.COM     Can decompress files which were compressed by `gzip'. This
240*8044SWilliam.Kucharski@Sun.COM     function is both automatic and transparent to the user (i.e. all
241*8044SWilliam.Kucharski@Sun.COM     functions operate upon the uncompressed contents of the specified
242*8044SWilliam.Kucharski@Sun.COM     files). This greatly reduces a file size and loading time, a
243*8044SWilliam.Kucharski@Sun.COM     particularly great benefit for floppies.(1) (*note
244*8044SWilliam.Kucharski@Sun.COM     Features-Footnote-1::)
245*8044SWilliam.Kucharski@Sun.COM
246*8044SWilliam.Kucharski@Sun.COM     It is conceivable that some kernel modules should be loaded in a
247*8044SWilliam.Kucharski@Sun.COM     compressed state, so a different module-loading command can be
248*8044SWilliam.Kucharski@Sun.COM     specified to avoid uncompressing the modules.
249*8044SWilliam.Kucharski@Sun.COM
250*8044SWilliam.Kucharski@Sun.COMAccess data on any installed device
251*8044SWilliam.Kucharski@Sun.COM     Support reading data from any or all floppies or hard disk(s)
252*8044SWilliam.Kucharski@Sun.COM     recognized by the BIOS, independent of the setting of the root
253*8044SWilliam.Kucharski@Sun.COM     device.
254*8044SWilliam.Kucharski@Sun.COM
255*8044SWilliam.Kucharski@Sun.COMBe independent of drive geometry translations
256*8044SWilliam.Kucharski@Sun.COM     Unlike many other boot loaders, GRUB makes the particular drive
257*8044SWilliam.Kucharski@Sun.COM     translation irrelevant. A drive installed and running with one
258*8044SWilliam.Kucharski@Sun.COM     translation may be converted to another translation without any
259*8044SWilliam.Kucharski@Sun.COM     adverse effects or changes in GRUB's configuration.
260*8044SWilliam.Kucharski@Sun.COM
261*8044SWilliam.Kucharski@Sun.COMDetect all installed RAM
262*8044SWilliam.Kucharski@Sun.COM     GRUB can generally find all the installed RAM on a PC-compatible
263*8044SWilliam.Kucharski@Sun.COM     machine. It uses an advanced BIOS query technique for finding all
264*8044SWilliam.Kucharski@Sun.COM     memory regions. As described on the Multiboot Specification (*note
265*8044SWilliam.Kucharski@Sun.COM     Multiboot Specification: (multiboot)Top.), not all kernels make
266*8044SWilliam.Kucharski@Sun.COM     use of this information, but GRUB provides it for those who do.
267*8044SWilliam.Kucharski@Sun.COM
268*8044SWilliam.Kucharski@Sun.COMSupport Logical Block Address mode
269*8044SWilliam.Kucharski@Sun.COM     In traditional disk calls (called "CHS mode"), there is a geometry
270*8044SWilliam.Kucharski@Sun.COM     translation problem, that is, the BIOS cannot access over 1024
271*8044SWilliam.Kucharski@Sun.COM     cylinders, so the accessible space is limited to at least 508 MB
272*8044SWilliam.Kucharski@Sun.COM     and to at most 8GB. GRUB can't universally solve this problem, as
273*8044SWilliam.Kucharski@Sun.COM     there is no standard interface used in all machines. However,
274*8044SWilliam.Kucharski@Sun.COM     several newer machines have the new interface, Logical Block
275*8044SWilliam.Kucharski@Sun.COM     Address ("LBA") mode. GRUB automatically detects if LBA mode is
276*8044SWilliam.Kucharski@Sun.COM     available and uses it if available. In LBA mode, GRUB can access
277*8044SWilliam.Kucharski@Sun.COM     the entire disk.
278*8044SWilliam.Kucharski@Sun.COM
279*8044SWilliam.Kucharski@Sun.COMSupport network booting
280*8044SWilliam.Kucharski@Sun.COM     GRUB is basically a disk-based boot loader but also has network
281*8044SWilliam.Kucharski@Sun.COM     support. You can load OS images from a network by using the "TFTP"
282*8044SWilliam.Kucharski@Sun.COM     protocol.
283*8044SWilliam.Kucharski@Sun.COM
284*8044SWilliam.Kucharski@Sun.COMSupport remote terminals
285*8044SWilliam.Kucharski@Sun.COM     To support computers with no console, GRUB provides remote terminal
286*8044SWilliam.Kucharski@Sun.COM     support, so that you can control GRUB from a remote host. Only
287*8044SWilliam.Kucharski@Sun.COM     serial terminal support is implemented at the moment.
288*8044SWilliam.Kucharski@Sun.COM
289*8044SWilliam.Kucharski@Sun.COM
290*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Features-Footnotes,  Up: Features
291*8044SWilliam.Kucharski@Sun.COM
292*8044SWilliam.Kucharski@Sun.COM   (1) There are a few pathological cases where loading a very badly
293*8044SWilliam.Kucharski@Sun.COMorganized ELF kernel might take longer, but in practice this never
294*8044SWilliam.Kucharski@Sun.COMhappen.
295*8044SWilliam.Kucharski@Sun.COM
296*8044SWilliam.Kucharski@Sun.COM
297*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Role of a boot loader,  Prev: Features,  Up: Introduction
298*8044SWilliam.Kucharski@Sun.COM
299*8044SWilliam.Kucharski@Sun.COM1.4 The role of a boot loader
300*8044SWilliam.Kucharski@Sun.COM=============================
301*8044SWilliam.Kucharski@Sun.COM
302*8044SWilliam.Kucharski@Sun.COMThe following is a quotation from Gordon Matzigkeit, a GRUB fanatic:
303*8044SWilliam.Kucharski@Sun.COM
304*8044SWilliam.Kucharski@Sun.COM     Some people like to acknowledge both the operating system and
305*8044SWilliam.Kucharski@Sun.COM     kernel when they talk about their computers, so they might say
306*8044SWilliam.Kucharski@Sun.COM     they use "GNU/Linux" or "GNU/Hurd".  Other people seem to think
307*8044SWilliam.Kucharski@Sun.COM     that the kernel is the most important part of the system, so they
308*8044SWilliam.Kucharski@Sun.COM     like to call their GNU operating systems "Linux systems."
309*8044SWilliam.Kucharski@Sun.COM
310*8044SWilliam.Kucharski@Sun.COM     I, personally, believe that this is a grave injustice, because the
311*8044SWilliam.Kucharski@Sun.COM     _boot loader_ is the most important software of all. I used to
312*8044SWilliam.Kucharski@Sun.COM     refer to the above systems as either "LILO"(1) (*note Role of a
313*8044SWilliam.Kucharski@Sun.COM     boot loader-Footnote-1::) or "GRUB" systems.
314*8044SWilliam.Kucharski@Sun.COM
315*8044SWilliam.Kucharski@Sun.COM     Unfortunately, nobody ever understood what I was talking about;
316*8044SWilliam.Kucharski@Sun.COM     now I just use the word "GNU" as a pseudonym for GRUB.
317*8044SWilliam.Kucharski@Sun.COM
318*8044SWilliam.Kucharski@Sun.COM     So, if you ever hear people talking about their alleged "GNU"
319*8044SWilliam.Kucharski@Sun.COM     systems, remember that they are actually paying homage to the best
320*8044SWilliam.Kucharski@Sun.COM     boot loader around... GRUB!
321*8044SWilliam.Kucharski@Sun.COM
322*8044SWilliam.Kucharski@Sun.COM   We, the GRUB maintainers, do not (usually) encourage Gordon's level
323*8044SWilliam.Kucharski@Sun.COMof fanaticism, but it helps to remember that boot loaders deserve
324*8044SWilliam.Kucharski@Sun.COMrecognition.  We hope that you enjoy using GNU GRUB as much as we did
325*8044SWilliam.Kucharski@Sun.COMwriting it.
326*8044SWilliam.Kucharski@Sun.COM
327*8044SWilliam.Kucharski@Sun.COM
328*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Role of a boot loader-Footnotes,  Up: Role of a boot loader
329*8044SWilliam.Kucharski@Sun.COM
330*8044SWilliam.Kucharski@Sun.COM   (1) The LInux LOader, a boot loader that everybody uses, but nobody
331*8044SWilliam.Kucharski@Sun.COMlikes.
332*8044SWilliam.Kucharski@Sun.COM
333*8044SWilliam.Kucharski@Sun.COM
334*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Naming convention,  Next: Installation,  Prev: Introduction,  Up: Top
335*8044SWilliam.Kucharski@Sun.COM
336*8044SWilliam.Kucharski@Sun.COM2 Naming convention
337*8044SWilliam.Kucharski@Sun.COM*******************
338*8044SWilliam.Kucharski@Sun.COM
339*8044SWilliam.Kucharski@Sun.COMThe device syntax used in GRUB is a wee bit different from what you may
340*8044SWilliam.Kucharski@Sun.COMhave seen before in your operating system(s), and you need to know it so
341*8044SWilliam.Kucharski@Sun.COMthat you can specify a drive/partition.
342*8044SWilliam.Kucharski@Sun.COM
343*8044SWilliam.Kucharski@Sun.COM   Look at the following examples and explanations:
344*8044SWilliam.Kucharski@Sun.COM
345*8044SWilliam.Kucharski@Sun.COM     (fd0)
346*8044SWilliam.Kucharski@Sun.COM
347*8044SWilliam.Kucharski@Sun.COM   First of all, GRUB requires that the device name be enclosed with
348*8044SWilliam.Kucharski@Sun.COM`(' and `)'. The `fd' part means that it is a floppy disk. The number
349*8044SWilliam.Kucharski@Sun.COM`0' is the drive number, which is counted from _zero_. This expression
350*8044SWilliam.Kucharski@Sun.COMmeans that GRUB will use the whole floppy disk.
351*8044SWilliam.Kucharski@Sun.COM
352*8044SWilliam.Kucharski@Sun.COM     (hd0,1)
353*8044SWilliam.Kucharski@Sun.COM
354*8044SWilliam.Kucharski@Sun.COM   Here, `hd' means it is a hard disk drive. The first integer `0'
355*8044SWilliam.Kucharski@Sun.COMindicates the drive number, that is, the first hard disk, while the
356*8044SWilliam.Kucharski@Sun.COMsecond integer, `1', indicates the partition number (or the PC slice
357*8044SWilliam.Kucharski@Sun.COMnumber in the BSD terminology). Once again, please note that the
358*8044SWilliam.Kucharski@Sun.COMpartition numbers are counted from _zero_, not from one. This
359*8044SWilliam.Kucharski@Sun.COMexpression means the second partition of the first hard disk drive. In
360*8044SWilliam.Kucharski@Sun.COMthis case, GRUB uses one partition of the disk, instead of the whole
361*8044SWilliam.Kucharski@Sun.COMdisk.
362*8044SWilliam.Kucharski@Sun.COM
363*8044SWilliam.Kucharski@Sun.COM     (hd0,4)
364*8044SWilliam.Kucharski@Sun.COM
365*8044SWilliam.Kucharski@Sun.COM   This specifies the first "extended partition" of the first hard disk
366*8044SWilliam.Kucharski@Sun.COMdrive. Note that the partition numbers for extended partitions are
367*8044SWilliam.Kucharski@Sun.COMcounted from `4', regardless of the actual number of primary partitions
368*8044SWilliam.Kucharski@Sun.COMon your hard disk.
369*8044SWilliam.Kucharski@Sun.COM
370*8044SWilliam.Kucharski@Sun.COM     (hd1,a)
371*8044SWilliam.Kucharski@Sun.COM
372*8044SWilliam.Kucharski@Sun.COM   This means the BSD `a' partition of the second hard disk. If you
373*8044SWilliam.Kucharski@Sun.COMneed to specify which PC slice number should be used, use something
374*8044SWilliam.Kucharski@Sun.COMlike this: `(hd1,0,a)'. If the PC slice number is omitted, GRUB
375*8044SWilliam.Kucharski@Sun.COMsearches for the first PC slice which has a BSD `a' partition.
376*8044SWilliam.Kucharski@Sun.COM
377*8044SWilliam.Kucharski@Sun.COM   Of course, to actually access the disks or partitions with GRUB, you
378*8044SWilliam.Kucharski@Sun.COMneed to use the device specification in a command, like `root (fd0)' or
379*8044SWilliam.Kucharski@Sun.COM`unhide (hd0,2)'. To help you find out which number specifies a
380*8044SWilliam.Kucharski@Sun.COMpartition you want, the GRUB command-line (*note Command-line
381*8044SWilliam.Kucharski@Sun.COMinterface::) options have argument completion. This means that, for
382*8044SWilliam.Kucharski@Sun.COMexample, you only need to type
383*8044SWilliam.Kucharski@Sun.COM
384*8044SWilliam.Kucharski@Sun.COM     root (
385*8044SWilliam.Kucharski@Sun.COM
386*8044SWilliam.Kucharski@Sun.COM   followed by a <TAB>, and GRUB will display the list of drives,
387*8044SWilliam.Kucharski@Sun.COMpartitions, or file names. So it should be quite easy to determine the
388*8044SWilliam.Kucharski@Sun.COMname of your target partition, even with minimal knowledge of the
389*8044SWilliam.Kucharski@Sun.COMsyntax.
390*8044SWilliam.Kucharski@Sun.COM
391*8044SWilliam.Kucharski@Sun.COM   Note that GRUB does _not_ distinguish IDE from SCSI - it simply
392*8044SWilliam.Kucharski@Sun.COMcounts the drive numbers from zero, regardless of their type. Normally,
393*8044SWilliam.Kucharski@Sun.COMany IDE drive number is less than any SCSI drive number, although that
394*8044SWilliam.Kucharski@Sun.COMis not true if you change the boot sequence by swapping IDE and SCSI
395*8044SWilliam.Kucharski@Sun.COMdrives in your BIOS.
396*8044SWilliam.Kucharski@Sun.COM
397*8044SWilliam.Kucharski@Sun.COM   Now the question is, how to specify a file? Again, consider an
398*8044SWilliam.Kucharski@Sun.COMexample:
399*8044SWilliam.Kucharski@Sun.COM
400*8044SWilliam.Kucharski@Sun.COM     (hd0,0)/vmlinuz
401*8044SWilliam.Kucharski@Sun.COM
402*8044SWilliam.Kucharski@Sun.COM   This specifies the file named `vmlinuz', found on the first
403*8044SWilliam.Kucharski@Sun.COMpartition of the first hard disk drive. Note that the argument
404*8044SWilliam.Kucharski@Sun.COMcompletion works with file names, too.
405*8044SWilliam.Kucharski@Sun.COM
406*8044SWilliam.Kucharski@Sun.COM   That was easy, admit it. Now read the next chapter, to find out how
407*8044SWilliam.Kucharski@Sun.COMto actually install GRUB on your drive.
408*8044SWilliam.Kucharski@Sun.COM
409*8044SWilliam.Kucharski@Sun.COM
410*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Installation,  Next: Booting,  Prev: Naming convention,  Up: Top
411*8044SWilliam.Kucharski@Sun.COM
412*8044SWilliam.Kucharski@Sun.COM3 Installation
413*8044SWilliam.Kucharski@Sun.COM**************
414*8044SWilliam.Kucharski@Sun.COM
415*8044SWilliam.Kucharski@Sun.COMIn order to install GRUB as your boot loader, you need to first install
416*8044SWilliam.Kucharski@Sun.COMthe GRUB system and utilities under your UNIX-like operating system
417*8044SWilliam.Kucharski@Sun.COM(*note Obtaining and Building GRUB::). You can do this either from the
418*8044SWilliam.Kucharski@Sun.COMsource tarball, or as a package for your OS.
419*8044SWilliam.Kucharski@Sun.COM
420*8044SWilliam.Kucharski@Sun.COM   After you have done that, you need to install the boot loader on a
421*8044SWilliam.Kucharski@Sun.COMdrive (floppy or hard disk). There are two ways of doing that - either
422*8044SWilliam.Kucharski@Sun.COMusing the utility `grub-install' (*note Invoking grub-install::) on a
423*8044SWilliam.Kucharski@Sun.COMUNIX-like OS, or by running GRUB itself from a floppy. These are quite
424*8044SWilliam.Kucharski@Sun.COMsimilar, however the utility might probe a wrong BIOS drive, so you
425*8044SWilliam.Kucharski@Sun.COMshould be careful.
426*8044SWilliam.Kucharski@Sun.COM
427*8044SWilliam.Kucharski@Sun.COM   Also, if you install GRUB on a UNIX-like OS, please make sure that
428*8044SWilliam.Kucharski@Sun.COMyou have an emergency boot disk ready, so that you can rescue your
429*8044SWilliam.Kucharski@Sun.COMcomputer if, by any chance, your hard drive becomes unusable
430*8044SWilliam.Kucharski@Sun.COM(unbootable).
431*8044SWilliam.Kucharski@Sun.COM
432*8044SWilliam.Kucharski@Sun.COM   GRUB comes with boot images, which are normally put in the directory
433*8044SWilliam.Kucharski@Sun.COM`/usr/lib/grub/i386-pc'. If you do not use grub-install, then you need
434*8044SWilliam.Kucharski@Sun.COMto copy the files `stage1', `stage2', and `*stage1_5' to the directory
435*8044SWilliam.Kucharski@Sun.COM`/boot/grub', and run the `grub-set-default' (*note Invoking
436*8044SWilliam.Kucharski@Sun.COMgrub-set-default::) if you intend to use `default saved' (*note
437*8044SWilliam.Kucharski@Sun.COMdefault::) in your configuration file. Hereafter, the directory where
438*8044SWilliam.Kucharski@Sun.COMGRUB images are initially placed (normally `/usr/lib/grub/i386-pc')
439*8044SWilliam.Kucharski@Sun.COMwill be called the "image directory", and the directory where the boot
440*8044SWilliam.Kucharski@Sun.COMloader needs to find them (usually `/boot/grub') will be called the
441*8044SWilliam.Kucharski@Sun.COM"boot directory".
442*8044SWilliam.Kucharski@Sun.COM
443*8044SWilliam.Kucharski@Sun.COM* Menu:
444*8044SWilliam.Kucharski@Sun.COM
445*8044SWilliam.Kucharski@Sun.COM* Creating a GRUB boot floppy::
446*8044SWilliam.Kucharski@Sun.COM* Installing GRUB natively::
447*8044SWilliam.Kucharski@Sun.COM* Installing GRUB using grub-install::
448*8044SWilliam.Kucharski@Sun.COM* Making a GRUB bootable CD-ROM::
449*8044SWilliam.Kucharski@Sun.COM
450*8044SWilliam.Kucharski@Sun.COM
451*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Creating a GRUB boot floppy,  Next: Installing GRUB natively,  Up: Installation
452*8044SWilliam.Kucharski@Sun.COM
453*8044SWilliam.Kucharski@Sun.COM3.1 Creating a GRUB boot floppy
454*8044SWilliam.Kucharski@Sun.COM===============================
455*8044SWilliam.Kucharski@Sun.COM
456*8044SWilliam.Kucharski@Sun.COMTo create a GRUB boot floppy, you need to take the files `stage1' and
457*8044SWilliam.Kucharski@Sun.COM`stage2' from the image directory, and write them to the first and the
458*8044SWilliam.Kucharski@Sun.COMsecond block of the floppy disk, respectively.
459*8044SWilliam.Kucharski@Sun.COM
460*8044SWilliam.Kucharski@Sun.COM   *Caution:* This procedure will destroy any data currently stored on
461*8044SWilliam.Kucharski@Sun.COMthe floppy.
462*8044SWilliam.Kucharski@Sun.COM
463*8044SWilliam.Kucharski@Sun.COM   On a UNIX-like operating system, that is done with the following
464*8044SWilliam.Kucharski@Sun.COMcommands:
465*8044SWilliam.Kucharski@Sun.COM
466*8044SWilliam.Kucharski@Sun.COM     # cd /usr/lib/grub/i386-pc
467*8044SWilliam.Kucharski@Sun.COM     # dd if=stage1 of=/dev/fd0 bs=512 count=1
468*8044SWilliam.Kucharski@Sun.COM     1+0 records in
469*8044SWilliam.Kucharski@Sun.COM     1+0 records out
470*8044SWilliam.Kucharski@Sun.COM     # dd if=stage2 of=/dev/fd0 bs=512 seek=1
471*8044SWilliam.Kucharski@Sun.COM     153+1 records in
472*8044SWilliam.Kucharski@Sun.COM     153+1 records out
473*8044SWilliam.Kucharski@Sun.COM     #
474*8044SWilliam.Kucharski@Sun.COM
475*8044SWilliam.Kucharski@Sun.COM   The device file name may be different. Consult the manual for your
476*8044SWilliam.Kucharski@Sun.COMOS.
477*8044SWilliam.Kucharski@Sun.COM
478*8044SWilliam.Kucharski@Sun.COM
479*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Installing GRUB natively,  Next: Installing GRUB using grub-install,  Prev: Creating a GRUB boot floppy,  Up: Installation
480*8044SWilliam.Kucharski@Sun.COM
481*8044SWilliam.Kucharski@Sun.COM3.2 Installing GRUB natively
482*8044SWilliam.Kucharski@Sun.COM============================
483*8044SWilliam.Kucharski@Sun.COM
484*8044SWilliam.Kucharski@Sun.COM*Caution:* Installing GRUB's stage1 in this manner will erase the
485*8044SWilliam.Kucharski@Sun.COMnormal boot-sector used by an OS.
486*8044SWilliam.Kucharski@Sun.COM
487*8044SWilliam.Kucharski@Sun.COM   GRUB can currently boot GNU Mach, Linux, FreeBSD, NetBSD, and OpenBSD
488*8044SWilliam.Kucharski@Sun.COMdirectly, so using it on a boot sector (the first sector of a
489*8044SWilliam.Kucharski@Sun.COMpartition) should be okay. But generally, it would be a good idea to
490*8044SWilliam.Kucharski@Sun.COMback up the first sector of the partition on which you are installing
491*8044SWilliam.Kucharski@Sun.COMGRUB's stage1. This isn't as important if you are installing GRUB on
492*8044SWilliam.Kucharski@Sun.COMthe first sector of a hard disk, since it's easy to reinitialize it
493*8044SWilliam.Kucharski@Sun.COM(e.g. by running `FDISK /MBR' from DOS).
494*8044SWilliam.Kucharski@Sun.COM
495*8044SWilliam.Kucharski@Sun.COM   If you decide to install GRUB in the native environment, which is
496*8044SWilliam.Kucharski@Sun.COMdefinitely desirable, you'll need to create a GRUB boot disk, and
497*8044SWilliam.Kucharski@Sun.COMreboot your computer with it. Otherwise, see *Note Installing GRUB
498*8044SWilliam.Kucharski@Sun.COMusing grub-install::.
499*8044SWilliam.Kucharski@Sun.COM
500*8044SWilliam.Kucharski@Sun.COM   Once started, GRUB will show the command-line interface (*note
501*8044SWilliam.Kucharski@Sun.COMCommand-line interface::). First, set the GRUB's "root device"(1)
502*8044SWilliam.Kucharski@Sun.COM(*note Installing GRUB natively-Footnote-1::) to the partition
503*8044SWilliam.Kucharski@Sun.COMcontaining the boot directory, like this:
504*8044SWilliam.Kucharski@Sun.COM
505*8044SWilliam.Kucharski@Sun.COM     grub> root (hd0,0)
506*8044SWilliam.Kucharski@Sun.COM
507*8044SWilliam.Kucharski@Sun.COM   If you are not sure which partition actually holds this directory,
508*8044SWilliam.Kucharski@Sun.COMuse the command `find' (*note find::), like this:
509*8044SWilliam.Kucharski@Sun.COM
510*8044SWilliam.Kucharski@Sun.COM     grub> find /boot/grub/stage1
511*8044SWilliam.Kucharski@Sun.COM
512*8044SWilliam.Kucharski@Sun.COM   This will search for the file name `/boot/grub/stage1' and show the
513*8044SWilliam.Kucharski@Sun.COMdevices which contain the file.
514*8044SWilliam.Kucharski@Sun.COM
515*8044SWilliam.Kucharski@Sun.COM   Once you've set the root device correctly, run the command `setup'
516*8044SWilliam.Kucharski@Sun.COM(*note setup::):
517*8044SWilliam.Kucharski@Sun.COM
518*8044SWilliam.Kucharski@Sun.COM     grub> setup (hd0)
519*8044SWilliam.Kucharski@Sun.COM
520*8044SWilliam.Kucharski@Sun.COM   This command will install the GRUB boot loader on the Master Boot
521*8044SWilliam.Kucharski@Sun.COMRecord (MBR) of the first drive. If you want to put GRUB into the boot
522*8044SWilliam.Kucharski@Sun.COMsector of a partition instead of putting it in the MBR, specify the
523*8044SWilliam.Kucharski@Sun.COMpartition into which you want to install GRUB:
524*8044SWilliam.Kucharski@Sun.COM
525*8044SWilliam.Kucharski@Sun.COM     grub> setup (hd0,0)
526*8044SWilliam.Kucharski@Sun.COM
527*8044SWilliam.Kucharski@Sun.COM   If you install GRUB into a partition or a drive other than the first
528*8044SWilliam.Kucharski@Sun.COMone, you must chain-load GRUB from another boot loader. Refer to the
529*8044SWilliam.Kucharski@Sun.COMmanual for the boot loader to know how to chain-load GRUB.
530*8044SWilliam.Kucharski@Sun.COM
531*8044SWilliam.Kucharski@Sun.COM   After using the setup command, you will boot into GRUB without the
532*8044SWilliam.Kucharski@Sun.COMGRUB floppy. See the chapter *Note Booting:: to find out how to boot
533*8044SWilliam.Kucharski@Sun.COMyour operating systems from GRUB.
534*8044SWilliam.Kucharski@Sun.COM
535*8044SWilliam.Kucharski@Sun.COM
536*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Installing GRUB natively-Footnotes,  Up: Installing GRUB natively
537*8044SWilliam.Kucharski@Sun.COM
538*8044SWilliam.Kucharski@Sun.COM   (1) Note that GRUB's root device doesn't necessarily mean your OS's
539*8044SWilliam.Kucharski@Sun.COMroot partition; if you need to specify a root partition for your OS,
540*8044SWilliam.Kucharski@Sun.COMadd the argument into the command `kernel'.
541*8044SWilliam.Kucharski@Sun.COM
542*8044SWilliam.Kucharski@Sun.COM
543*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Installing GRUB using grub-install,  Next: Making a GRUB bootable CD-ROM,  Prev: Installing GRUB natively,  Up: Installation
544*8044SWilliam.Kucharski@Sun.COM
545*8044SWilliam.Kucharski@Sun.COM3.3 Installing GRUB using grub-install
546*8044SWilliam.Kucharski@Sun.COM======================================
547*8044SWilliam.Kucharski@Sun.COM
548*8044SWilliam.Kucharski@Sun.COM*Caution:* This procedure is definitely less safe, because there are
549*8044SWilliam.Kucharski@Sun.COMseveral ways in which your computer can become unbootable. For example,
550*8044SWilliam.Kucharski@Sun.COMmost operating systems don't tell GRUB how to map BIOS drives to OS
551*8044SWilliam.Kucharski@Sun.COMdevices correctly--GRUB merely "guesses" the mapping. This will succeed
552*8044SWilliam.Kucharski@Sun.COMin most cases, but not always. Therefore, GRUB provides you with a map
553*8044SWilliam.Kucharski@Sun.COMfile called the "device map", which you must fix if it is wrong. *Note
554*8044SWilliam.Kucharski@Sun.COMDevice map::, for more details.
555*8044SWilliam.Kucharski@Sun.COM
556*8044SWilliam.Kucharski@Sun.COM   If you still do want to install GRUB under a UNIX-like OS (such as
557*8044SWilliam.Kucharski@Sun.COMGNU), invoke the program `grub-install' (*note Invoking grub-install::)
558*8044SWilliam.Kucharski@Sun.COMas the superuser ("root").
559*8044SWilliam.Kucharski@Sun.COM
560*8044SWilliam.Kucharski@Sun.COM   The usage is basically very simple. You only need to specify one
561*8044SWilliam.Kucharski@Sun.COMargument to the program, namely, where to install the boot loader. The
562*8044SWilliam.Kucharski@Sun.COMargument can be either a device file (like `/dev/hda') or a partition
563*8044SWilliam.Kucharski@Sun.COMspecified in GRUB's notation. For example, under Linux the following
564*8044SWilliam.Kucharski@Sun.COMwill install GRUB into the MBR of the first IDE disk:
565*8044SWilliam.Kucharski@Sun.COM
566*8044SWilliam.Kucharski@Sun.COM     # grub-install /dev/hda
567*8044SWilliam.Kucharski@Sun.COM
568*8044SWilliam.Kucharski@Sun.COM   Likewise, under GNU/Hurd, this has the same effect:
569*8044SWilliam.Kucharski@Sun.COM
570*8044SWilliam.Kucharski@Sun.COM     # grub-install /dev/hd0
571*8044SWilliam.Kucharski@Sun.COM
572*8044SWilliam.Kucharski@Sun.COM   If it is the first BIOS drive, this is the same as well:
573*8044SWilliam.Kucharski@Sun.COM
574*8044SWilliam.Kucharski@Sun.COM     # grub-install '(hd0)'
575*8044SWilliam.Kucharski@Sun.COM
576*8044SWilliam.Kucharski@Sun.COM   Or you can omit the parentheses:
577*8044SWilliam.Kucharski@Sun.COM
578*8044SWilliam.Kucharski@Sun.COM     # grub-install hd0
579*8044SWilliam.Kucharski@Sun.COM
580*8044SWilliam.Kucharski@Sun.COM   But all the above examples assume that GRUB should use images under
581*8044SWilliam.Kucharski@Sun.COMthe root directory. If you want GRUB to use images under a directory
582*8044SWilliam.Kucharski@Sun.COMother than the root directory, you need to specify the option
583*8044SWilliam.Kucharski@Sun.COM`--root-directory'. The typical usage is that you create a GRUB boot
584*8044SWilliam.Kucharski@Sun.COMfloppy with a filesystem. Here is an example:
585*8044SWilliam.Kucharski@Sun.COM
586*8044SWilliam.Kucharski@Sun.COM     # mke2fs /dev/fd0
587*8044SWilliam.Kucharski@Sun.COM     # mount -t ext2 /dev/fd0 /mnt
588*8044SWilliam.Kucharski@Sun.COM     # grub-install --root-directory=/mnt fd0
589*8044SWilliam.Kucharski@Sun.COM     # umount /mnt
590*8044SWilliam.Kucharski@Sun.COM
591*8044SWilliam.Kucharski@Sun.COM   Another example is when you have a separate boot partition which is
592*8044SWilliam.Kucharski@Sun.COMmounted at `/boot'. Since GRUB is a boot loader, it doesn't know
593*8044SWilliam.Kucharski@Sun.COManything about mountpoints at all. Thus, you need to run `grub-install'
594*8044SWilliam.Kucharski@Sun.COMlike this:
595*8044SWilliam.Kucharski@Sun.COM
596*8044SWilliam.Kucharski@Sun.COM     # grub-install --root-directory=/boot /dev/hda
597*8044SWilliam.Kucharski@Sun.COM
598*8044SWilliam.Kucharski@Sun.COM   By the way, as noted above, it is quite difficult to guess BIOS
599*8044SWilliam.Kucharski@Sun.COMdrives correctly under a UNIX-like OS. Thus, `grub-install' will prompt
600*8044SWilliam.Kucharski@Sun.COMyou to check if it could really guess the correct mappings, after the
601*8044SWilliam.Kucharski@Sun.COMinstallation. The format is defined in *Note Device map::. Please be
602*8044SWilliam.Kucharski@Sun.COMquite careful. If the output is wrong, it is unlikely that your
603*8044SWilliam.Kucharski@Sun.COMcomputer will be able to boot with no problem.
604*8044SWilliam.Kucharski@Sun.COM
605*8044SWilliam.Kucharski@Sun.COM   Note that `grub-install' is actually just a shell script and the
606*8044SWilliam.Kucharski@Sun.COMreal task is done by the grub shell `grub' (*note Invoking the grub
607*8044SWilliam.Kucharski@Sun.COMshell::). Therefore, you may run `grub' directly to install GRUB,
608*8044SWilliam.Kucharski@Sun.COMwithout using `grub-install'. Don't do that, however, unless you are
609*8044SWilliam.Kucharski@Sun.COMvery familiar with the internals of GRUB. Installing a boot loader on a
610*8044SWilliam.Kucharski@Sun.COMrunning OS may be extremely dangerous.
611*8044SWilliam.Kucharski@Sun.COM
612*8044SWilliam.Kucharski@Sun.COM
613*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Making a GRUB bootable CD-ROM,  Prev: Installing GRUB using grub-install,  Up: Installation
614*8044SWilliam.Kucharski@Sun.COM
615*8044SWilliam.Kucharski@Sun.COM3.4 Making a GRUB bootable CD-ROM
616*8044SWilliam.Kucharski@Sun.COM=================================
617*8044SWilliam.Kucharski@Sun.COM
618*8044SWilliam.Kucharski@Sun.COMGRUB supports the "no emulation mode" in the El Torito specification(1)
619*8044SWilliam.Kucharski@Sun.COM(*note Making a GRUB bootable CD-ROM-Footnote-1::). This means that you
620*8044SWilliam.Kucharski@Sun.COMcan use the whole CD-ROM from GRUB and you don't have to make a floppy
621*8044SWilliam.Kucharski@Sun.COMor hard disk image file, which can cause compatibility problems.
622*8044SWilliam.Kucharski@Sun.COM
623*8044SWilliam.Kucharski@Sun.COM   For booting from a CD-ROM, GRUB uses a special Stage 2 called
624*8044SWilliam.Kucharski@Sun.COM`stage2_eltorito'. The only GRUB files you need to have in your
625*8044SWilliam.Kucharski@Sun.COMbootable CD-ROM are this `stage2_eltorito' and optionally a config file
626*8044SWilliam.Kucharski@Sun.COM`menu.lst'. You don't need to use `stage1' or `stage2', because El
627*8044SWilliam.Kucharski@Sun.COMTorito is quite different from the standard boot process.
628*8044SWilliam.Kucharski@Sun.COM
629*8044SWilliam.Kucharski@Sun.COM   Here is an example of procedures to make a bootable CD-ROM image.
630*8044SWilliam.Kucharski@Sun.COMFirst, make a top directory for the bootable image, say, `iso':
631*8044SWilliam.Kucharski@Sun.COM
632*8044SWilliam.Kucharski@Sun.COM     $ mkdir iso
633*8044SWilliam.Kucharski@Sun.COM
634*8044SWilliam.Kucharski@Sun.COM   Make a directory for GRUB:
635*8044SWilliam.Kucharski@Sun.COM
636*8044SWilliam.Kucharski@Sun.COM     $ mkdir -p iso/boot/grub
637*8044SWilliam.Kucharski@Sun.COM
638*8044SWilliam.Kucharski@Sun.COM   Copy the file `stage2_eltorito':
639*8044SWilliam.Kucharski@Sun.COM
640*8044SWilliam.Kucharski@Sun.COM     $ cp /usr/lib/grub/i386-pc/stage2_eltorito iso/boot/grub
641*8044SWilliam.Kucharski@Sun.COM
642*8044SWilliam.Kucharski@Sun.COM   If desired, make the config file `menu.lst' under `iso/boot/grub'
643*8044SWilliam.Kucharski@Sun.COM(*note Configuration::), and copy any files and directories for the
644*8044SWilliam.Kucharski@Sun.COMdisc to the directory `iso/'.
645*8044SWilliam.Kucharski@Sun.COM
646*8044SWilliam.Kucharski@Sun.COM   Finally, make a ISO9660 image file like this:
647*8044SWilliam.Kucharski@Sun.COM
648*8044SWilliam.Kucharski@Sun.COM     $ mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
649*8044SWilliam.Kucharski@Sun.COM         -boot-load-size 4 -boot-info-table -o grub.iso iso
650*8044SWilliam.Kucharski@Sun.COM
651*8044SWilliam.Kucharski@Sun.COM   This produces a file named `grub.iso', which then can be burned into
652*8044SWilliam.Kucharski@Sun.COMa CD (or a DVD).  `mkisofs' has already set up the disc to boot from
653*8044SWilliam.Kucharski@Sun.COMthe `boot/grub/stage2_eltorito' file, so there is no need to setup GRUB
654*8044SWilliam.Kucharski@Sun.COMon the disc.  (Note that the `-boot-load-size 4' bit is required for
655*8044SWilliam.Kucharski@Sun.COMcompatibility with the BIOS on many older machines.)
656*8044SWilliam.Kucharski@Sun.COM
657*8044SWilliam.Kucharski@Sun.COM   You can use the device `(cd)' to access a CD-ROM in your config
658*8044SWilliam.Kucharski@Sun.COMfile. This is not required; GRUB automatically sets the root device to
659*8044SWilliam.Kucharski@Sun.COM`(cd)' when booted from a CD-ROM. It is only necessary to refer to
660*8044SWilliam.Kucharski@Sun.COM`(cd)' if you want to access other drives as well.
661*8044SWilliam.Kucharski@Sun.COM
662*8044SWilliam.Kucharski@Sun.COM
663*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Making a GRUB bootable CD-ROM-Footnotes,  Up: Making a GRUB bootable CD-ROM
664*8044SWilliam.Kucharski@Sun.COM
665*8044SWilliam.Kucharski@Sun.COM   (1) El Torito is a specification for bootable CD using BIOS
666*8044SWilliam.Kucharski@Sun.COMfunctions.
667*8044SWilliam.Kucharski@Sun.COM
668*8044SWilliam.Kucharski@Sun.COM
669*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Booting,  Next: Configuration,  Prev: Installation,  Up: Top
670*8044SWilliam.Kucharski@Sun.COM
671*8044SWilliam.Kucharski@Sun.COM4 Booting
672*8044SWilliam.Kucharski@Sun.COM*********
673*8044SWilliam.Kucharski@Sun.COM
674*8044SWilliam.Kucharski@Sun.COMGRUB can load Multiboot-compliant kernels in a consistent way, but for
675*8044SWilliam.Kucharski@Sun.COMsome free operating systems you need to use some OS-specific magic.
676*8044SWilliam.Kucharski@Sun.COM
677*8044SWilliam.Kucharski@Sun.COM* Menu:
678*8044SWilliam.Kucharski@Sun.COM
679*8044SWilliam.Kucharski@Sun.COM* General boot methods::        How to boot OSes with GRUB generally
680*8044SWilliam.Kucharski@Sun.COM* OS-specific notes::           Notes on some operating systems
681*8044SWilliam.Kucharski@Sun.COM* Making your system robust::   How to make your system robust
682*8044SWilliam.Kucharski@Sun.COM
683*8044SWilliam.Kucharski@Sun.COM
684*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: General boot methods,  Next: OS-specific notes,  Up: Booting
685*8044SWilliam.Kucharski@Sun.COM
686*8044SWilliam.Kucharski@Sun.COM4.1 How to boot operating systems
687*8044SWilliam.Kucharski@Sun.COM=================================
688*8044SWilliam.Kucharski@Sun.COM
689*8044SWilliam.Kucharski@Sun.COMGRUB has two distinct boot methods. One of the two is to load an
690*8044SWilliam.Kucharski@Sun.COMoperating system directly, and the other is to chain-load another boot
691*8044SWilliam.Kucharski@Sun.COMloader which then will load an operating system actually. Generally
692*8044SWilliam.Kucharski@Sun.COMspeaking, the former is more desirable, because you don't need to
693*8044SWilliam.Kucharski@Sun.COMinstall or maintain other boot loaders and GRUB is flexible enough to
694*8044SWilliam.Kucharski@Sun.COMload an operating system from an arbitrary disk/partition. However, the
695*8044SWilliam.Kucharski@Sun.COMlatter is sometimes required, since GRUB doesn't support all the
696*8044SWilliam.Kucharski@Sun.COMexisting operating systems natively.
697*8044SWilliam.Kucharski@Sun.COM
698*8044SWilliam.Kucharski@Sun.COM* Menu:
699*8044SWilliam.Kucharski@Sun.COM
700*8044SWilliam.Kucharski@Sun.COM* Loading an operating system directly::
701*8044SWilliam.Kucharski@Sun.COM* Chain-loading::
702*8044SWilliam.Kucharski@Sun.COM
703*8044SWilliam.Kucharski@Sun.COM
704*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Loading an operating system directly,  Next: Chain-loading,  Up: General boot methods
705*8044SWilliam.Kucharski@Sun.COM
706*8044SWilliam.Kucharski@Sun.COM4.1.1 How to boot an OS directly with GRUB
707*8044SWilliam.Kucharski@Sun.COM------------------------------------------
708*8044SWilliam.Kucharski@Sun.COM
709*8044SWilliam.Kucharski@Sun.COMMultiboot (*note Multiboot Specification: (multiboot)Top.) is the
710*8044SWilliam.Kucharski@Sun.COMnative format supported by GRUB.  For the sake of convenience, there is
711*8044SWilliam.Kucharski@Sun.COMalso support for Linux, FreeBSD, NetBSD and OpenBSD. If you want to
712*8044SWilliam.Kucharski@Sun.COMboot other operating systems, you will have to chain-load them (*note
713*8044SWilliam.Kucharski@Sun.COMChain-loading::).
714*8044SWilliam.Kucharski@Sun.COM
715*8044SWilliam.Kucharski@Sun.COM   Generally, GRUB can boot any Multiboot-compliant OS in the following
716*8044SWilliam.Kucharski@Sun.COMsteps:
717*8044SWilliam.Kucharski@Sun.COM
718*8044SWilliam.Kucharski@Sun.COM  1. Set GRUB's root device to the drive where the OS images are stored
719*8044SWilliam.Kucharski@Sun.COM     with the command `root' (*note root::).
720*8044SWilliam.Kucharski@Sun.COM
721*8044SWilliam.Kucharski@Sun.COM  2. Load the kernel image with the command `kernel' (*note kernel::).
722*8044SWilliam.Kucharski@Sun.COM
723*8044SWilliam.Kucharski@Sun.COM  3. If you need modules, load them with the command `module' (*note
724*8044SWilliam.Kucharski@Sun.COM     module::) or `modulenounzip' (*note modulenounzip::).
725*8044SWilliam.Kucharski@Sun.COM
726*8044SWilliam.Kucharski@Sun.COM  4. Run the command `boot' (*note boot::).
727*8044SWilliam.Kucharski@Sun.COM
728*8044SWilliam.Kucharski@Sun.COM   Linux, FreeBSD, NetBSD and OpenBSD can be booted in a similar
729*8044SWilliam.Kucharski@Sun.COMmanner. You load a kernel image with the command `kernel' and then run
730*8044SWilliam.Kucharski@Sun.COMthe command `boot'. If the kernel requires some parameters, just append
731*8044SWilliam.Kucharski@Sun.COMthe parameters to `kernel', after the file name of the kernel. Also,
732*8044SWilliam.Kucharski@Sun.COMplease refer to *Note OS-specific notes::, for information on your
733*8044SWilliam.Kucharski@Sun.COMOS-specific issues.
734*8044SWilliam.Kucharski@Sun.COM
735*8044SWilliam.Kucharski@Sun.COM
736*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Chain-loading,  Prev: Loading an operating system directly,  Up: General boot methods
737*8044SWilliam.Kucharski@Sun.COM
738*8044SWilliam.Kucharski@Sun.COM4.1.2 Load another boot loader to boot unsupported operating systems
739*8044SWilliam.Kucharski@Sun.COM--------------------------------------------------------------------
740*8044SWilliam.Kucharski@Sun.COM
741*8044SWilliam.Kucharski@Sun.COMIf you want to boot an unsupported operating system (e.g. Windows 95),
742*8044SWilliam.Kucharski@Sun.COMchain-load a boot loader for the operating system. Normally, the boot
743*8044SWilliam.Kucharski@Sun.COMloader is embedded in the "boot sector" of the partition on which the
744*8044SWilliam.Kucharski@Sun.COMoperating system is installed.
745*8044SWilliam.Kucharski@Sun.COM
746*8044SWilliam.Kucharski@Sun.COM  1. Set GRUB's root device to the partition by the command
747*8044SWilliam.Kucharski@Sun.COM     `rootnoverify' (*note rootnoverify::):
748*8044SWilliam.Kucharski@Sun.COM
749*8044SWilliam.Kucharski@Sun.COM          grub> rootnoverify (hd0,0)
750*8044SWilliam.Kucharski@Sun.COM
751*8044SWilliam.Kucharski@Sun.COM  2. Set the "active" flag in the partition using the command
752*8044SWilliam.Kucharski@Sun.COM     `makeactive'(1) (*note Chain-loading-Footnote-1::) (*note
753*8044SWilliam.Kucharski@Sun.COM     makeactive::):
754*8044SWilliam.Kucharski@Sun.COM
755*8044SWilliam.Kucharski@Sun.COM          grub> makeactive
756*8044SWilliam.Kucharski@Sun.COM
757*8044SWilliam.Kucharski@Sun.COM  3. Load the boot loader with the command `chainloader' (*note
758*8044SWilliam.Kucharski@Sun.COM     chainloader::):
759*8044SWilliam.Kucharski@Sun.COM
760*8044SWilliam.Kucharski@Sun.COM          grub> chainloader +1
761*8044SWilliam.Kucharski@Sun.COM
762*8044SWilliam.Kucharski@Sun.COM     `+1' indicates that GRUB should read one sector from the start of
763*8044SWilliam.Kucharski@Sun.COM     the partition. The complete description about this syntax can be
764*8044SWilliam.Kucharski@Sun.COM     found in *Note Block list syntax::.
765*8044SWilliam.Kucharski@Sun.COM
766*8044SWilliam.Kucharski@Sun.COM  4. Run the command `boot' (*note boot::).
767*8044SWilliam.Kucharski@Sun.COM
768*8044SWilliam.Kucharski@Sun.COM   However, DOS and Windows have some deficiencies, so you might have to
769*8044SWilliam.Kucharski@Sun.COMuse more complicated instructions. *Note DOS/Windows::, for more
770*8044SWilliam.Kucharski@Sun.COMinformation.
771*8044SWilliam.Kucharski@Sun.COM
772*8044SWilliam.Kucharski@Sun.COM
773*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Chain-loading-Footnotes,  Up: Chain-loading
774*8044SWilliam.Kucharski@Sun.COM
775*8044SWilliam.Kucharski@Sun.COM   (1) This is not necessary for most of the modern operating systems.
776*8044SWilliam.Kucharski@Sun.COM
777*8044SWilliam.Kucharski@Sun.COM
778*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: OS-specific notes,  Next: Making your system robust,  Prev: General boot methods,  Up: Booting
779*8044SWilliam.Kucharski@Sun.COM
780*8044SWilliam.Kucharski@Sun.COM4.2 Some caveats on OS-specific issues
781*8044SWilliam.Kucharski@Sun.COM======================================
782*8044SWilliam.Kucharski@Sun.COM
783*8044SWilliam.Kucharski@Sun.COMHere, we describe some caveats on several operating systems.
784*8044SWilliam.Kucharski@Sun.COM
785*8044SWilliam.Kucharski@Sun.COM* Menu:
786*8044SWilliam.Kucharski@Sun.COM
787*8044SWilliam.Kucharski@Sun.COM* GNU/Hurd::
788*8044SWilliam.Kucharski@Sun.COM* GNU/Linux::
789*8044SWilliam.Kucharski@Sun.COM* FreeBSD::
790*8044SWilliam.Kucharski@Sun.COM* NetBSD::
791*8044SWilliam.Kucharski@Sun.COM* OpenBSD::
792*8044SWilliam.Kucharski@Sun.COM* DOS/Windows::
793*8044SWilliam.Kucharski@Sun.COM* SCO UnixWare::
794*8044SWilliam.Kucharski@Sun.COM* QNX::
795*8044SWilliam.Kucharski@Sun.COM
796*8044SWilliam.Kucharski@Sun.COM
797*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: GNU/Hurd,  Next: GNU/Linux,  Up: OS-specific notes
798*8044SWilliam.Kucharski@Sun.COM
799*8044SWilliam.Kucharski@Sun.COM4.2.1 GNU/Hurd
800*8044SWilliam.Kucharski@Sun.COM--------------
801*8044SWilliam.Kucharski@Sun.COM
802*8044SWilliam.Kucharski@Sun.COMSince GNU/Hurd is Multiboot-compliant, it is easy to boot it; there is
803*8044SWilliam.Kucharski@Sun.COMnothing special about it. But do not forget that you have to specify a
804*8044SWilliam.Kucharski@Sun.COMroot partition to the kernel.
805*8044SWilliam.Kucharski@Sun.COM
806*8044SWilliam.Kucharski@Sun.COM  1. Set GRUB's root device to the same drive as GNU/Hurd's. Probably
807*8044SWilliam.Kucharski@Sun.COM     the command `find /boot/gnumach' or similar can help you (*note
808*8044SWilliam.Kucharski@Sun.COM     find::).
809*8044SWilliam.Kucharski@Sun.COM
810*8044SWilliam.Kucharski@Sun.COM  2. Load the kernel and the module, like this:
811*8044SWilliam.Kucharski@Sun.COM
812*8044SWilliam.Kucharski@Sun.COM          grub> kernel /boot/gnumach root=hd0s1
813*8044SWilliam.Kucharski@Sun.COM          grub> module /boot/serverboot
814*8044SWilliam.Kucharski@Sun.COM
815*8044SWilliam.Kucharski@Sun.COM  3. Run the command `boot' (*note boot::).
816*8044SWilliam.Kucharski@Sun.COM
817*8044SWilliam.Kucharski@Sun.COM
818*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: GNU/Linux,  Next: FreeBSD,  Prev: GNU/Hurd,  Up: OS-specific notes
819*8044SWilliam.Kucharski@Sun.COM
820*8044SWilliam.Kucharski@Sun.COM4.2.2 GNU/Linux
821*8044SWilliam.Kucharski@Sun.COM---------------
822*8044SWilliam.Kucharski@Sun.COM
823*8044SWilliam.Kucharski@Sun.COMIt is relatively easy to boot GNU/Linux from GRUB, because it somewhat
824*8044SWilliam.Kucharski@Sun.COMresembles to boot a Multiboot-compliant OS.
825*8044SWilliam.Kucharski@Sun.COM
826*8044SWilliam.Kucharski@Sun.COM  1. Set GRUB's root device to the same drive as GNU/Linux's. Probably
827*8044SWilliam.Kucharski@Sun.COM     the command `find /vmlinuz' or similar can help you (*note find::).
828*8044SWilliam.Kucharski@Sun.COM
829*8044SWilliam.Kucharski@Sun.COM  2. Load the kernel:
830*8044SWilliam.Kucharski@Sun.COM
831*8044SWilliam.Kucharski@Sun.COM          grub> kernel /vmlinuz root=/dev/hda1
832*8044SWilliam.Kucharski@Sun.COM
833*8044SWilliam.Kucharski@Sun.COM     If you need to specify some kernel parameters, just append them to
834*8044SWilliam.Kucharski@Sun.COM     the command. For example, to set `vga' to `ext', do this:
835*8044SWilliam.Kucharski@Sun.COM
836*8044SWilliam.Kucharski@Sun.COM          grub> kernel /vmlinuz root=/dev/hda1 vga=ext
837*8044SWilliam.Kucharski@Sun.COM
838*8044SWilliam.Kucharski@Sun.COM     See the documentation in the Linux source tree for complete
839*8044SWilliam.Kucharski@Sun.COM     information on the available options.
840*8044SWilliam.Kucharski@Sun.COM
841*8044SWilliam.Kucharski@Sun.COM  3. If you use an initrd, execute the command `initrd' (*note
842*8044SWilliam.Kucharski@Sun.COM     initrd::) after `kernel':
843*8044SWilliam.Kucharski@Sun.COM
844*8044SWilliam.Kucharski@Sun.COM          grub> initrd /initrd
845*8044SWilliam.Kucharski@Sun.COM
846*8044SWilliam.Kucharski@Sun.COM  4. Finally, run the command `boot' (*note boot::).
847*8044SWilliam.Kucharski@Sun.COM
848*8044SWilliam.Kucharski@Sun.COM   *Caution:* If you use an initrd and specify the `mem=' option to the
849*8044SWilliam.Kucharski@Sun.COMkernel to let it use less than actual memory size, you will also have
850*8044SWilliam.Kucharski@Sun.COMto specify the same memory size to GRUB. To let GRUB know the size, run
851*8044SWilliam.Kucharski@Sun.COMthe command `uppermem' _before_ loading the kernel. *Note uppermem::,
852*8044SWilliam.Kucharski@Sun.COMfor more information.
853*8044SWilliam.Kucharski@Sun.COM
854*8044SWilliam.Kucharski@Sun.COM
855*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: FreeBSD,  Next: NetBSD,  Prev: GNU/Linux,  Up: OS-specific notes
856*8044SWilliam.Kucharski@Sun.COM
857*8044SWilliam.Kucharski@Sun.COM4.2.3 FreeBSD
858*8044SWilliam.Kucharski@Sun.COM-------------
859*8044SWilliam.Kucharski@Sun.COM
860*8044SWilliam.Kucharski@Sun.COMGRUB can load the kernel directly, either in ELF or a.out format. But
861*8044SWilliam.Kucharski@Sun.COMthis is not recommended, since FreeBSD's bootstrap interface sometimes
862*8044SWilliam.Kucharski@Sun.COMchanges heavily, so GRUB can't guarantee to pass kernel parameters
863*8044SWilliam.Kucharski@Sun.COMcorrectly.
864*8044SWilliam.Kucharski@Sun.COM
865*8044SWilliam.Kucharski@Sun.COM   Thus, we'd recommend loading the very flexible loader `/boot/loader'
866*8044SWilliam.Kucharski@Sun.COMinstead. See this example:
867*8044SWilliam.Kucharski@Sun.COM
868*8044SWilliam.Kucharski@Sun.COM     grub> root (hd0,a)
869*8044SWilliam.Kucharski@Sun.COM     grub> kernel /boot/loader
870*8044SWilliam.Kucharski@Sun.COM     grub> boot
871*8044SWilliam.Kucharski@Sun.COM
872*8044SWilliam.Kucharski@Sun.COM
873*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: NetBSD,  Next: OpenBSD,  Prev: FreeBSD,  Up: OS-specific notes
874*8044SWilliam.Kucharski@Sun.COM
875*8044SWilliam.Kucharski@Sun.COM4.2.4 NetBSD
876*8044SWilliam.Kucharski@Sun.COM------------
877*8044SWilliam.Kucharski@Sun.COM
878*8044SWilliam.Kucharski@Sun.COMGRUB can load NetBSD a.out and ELF directly, follow these steps:
879*8044SWilliam.Kucharski@Sun.COM
880*8044SWilliam.Kucharski@Sun.COM  1. Set GRUB's root device with `root' (*note root::).
881*8044SWilliam.Kucharski@Sun.COM
882*8044SWilliam.Kucharski@Sun.COM  2. Load the kernel with `kernel' (*note kernel::). You should append
883*8044SWilliam.Kucharski@Sun.COM     the ugly option `--type=netbsd', if you want to load an ELF
884*8044SWilliam.Kucharski@Sun.COM     kernel, like this:
885*8044SWilliam.Kucharski@Sun.COM
886*8044SWilliam.Kucharski@Sun.COM          grub> kernel --type=netbsd /netbsd-elf
887*8044SWilliam.Kucharski@Sun.COM
888*8044SWilliam.Kucharski@Sun.COM  3. Run `boot' (*note boot::).
889*8044SWilliam.Kucharski@Sun.COM
890*8044SWilliam.Kucharski@Sun.COM   For now, however, GRUB doesn't allow you to pass kernel parameters,
891*8044SWilliam.Kucharski@Sun.COMso it may be better to chain-load it instead. For more information,
892*8044SWilliam.Kucharski@Sun.COMplease see *Note Chain-loading::.
893*8044SWilliam.Kucharski@Sun.COM
894*8044SWilliam.Kucharski@Sun.COM
895*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: OpenBSD,  Next: DOS/Windows,  Prev: NetBSD,  Up: OS-specific notes
896*8044SWilliam.Kucharski@Sun.COM
897*8044SWilliam.Kucharski@Sun.COM4.2.5 OpenBSD
898*8044SWilliam.Kucharski@Sun.COM-------------
899*8044SWilliam.Kucharski@Sun.COM
900*8044SWilliam.Kucharski@Sun.COMThe booting instruction is exactly the same as for NetBSD (*note
901*8044SWilliam.Kucharski@Sun.COMNetBSD::).
902*8044SWilliam.Kucharski@Sun.COM
903*8044SWilliam.Kucharski@Sun.COM
904*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: DOS/Windows,  Next: SCO UnixWare,  Prev: OpenBSD,  Up: OS-specific notes
905*8044SWilliam.Kucharski@Sun.COM
906*8044SWilliam.Kucharski@Sun.COM4.2.6 DOS/Windows
907*8044SWilliam.Kucharski@Sun.COM-----------------
908*8044SWilliam.Kucharski@Sun.COM
909*8044SWilliam.Kucharski@Sun.COMGRUB cannot boot DOS or Windows directly, so you must chain-load them
910*8044SWilliam.Kucharski@Sun.COM(*note Chain-loading::). However, their boot loaders have some critical
911*8044SWilliam.Kucharski@Sun.COMdeficiencies, so it may not work to just chain-load them. To overcome
912*8044SWilliam.Kucharski@Sun.COMthe problems, GRUB provides you with two helper functions.
913*8044SWilliam.Kucharski@Sun.COM
914*8044SWilliam.Kucharski@Sun.COM   If you have installed DOS (or Windows) on a non-first hard disk, you
915*8044SWilliam.Kucharski@Sun.COMhave to use the disk swapping technique, because that OS cannot boot
916*8044SWilliam.Kucharski@Sun.COMfrom any disks but the first one. The workaround used in GRUB is the
917*8044SWilliam.Kucharski@Sun.COMcommand `map' (*note map::), like this:
918*8044SWilliam.Kucharski@Sun.COM
919*8044SWilliam.Kucharski@Sun.COM     grub> map (hd0) (hd1)
920*8044SWilliam.Kucharski@Sun.COM     grub> map (hd1) (hd0)
921*8044SWilliam.Kucharski@Sun.COM
922*8044SWilliam.Kucharski@Sun.COM   This performs a "virtual" swap between your first and second hard
923*8044SWilliam.Kucharski@Sun.COMdrive.
924*8044SWilliam.Kucharski@Sun.COM
925*8044SWilliam.Kucharski@Sun.COM   *Caution:* This is effective only if DOS (or Windows) uses BIOS to
926*8044SWilliam.Kucharski@Sun.COMaccess the swapped disks. If that OS uses a special driver for the
927*8044SWilliam.Kucharski@Sun.COMdisks, this probably won't work.
928*8044SWilliam.Kucharski@Sun.COM
929*8044SWilliam.Kucharski@Sun.COM   Another problem arises if you installed more than one set of
930*8044SWilliam.Kucharski@Sun.COMDOS/Windows onto one disk, because they could be confused if there are
931*8044SWilliam.Kucharski@Sun.COMmore than one primary partitions for DOS/Windows. Certainly you should
932*8044SWilliam.Kucharski@Sun.COMavoid doing this, but there is a solution if you do want to do so. Use
933*8044SWilliam.Kucharski@Sun.COMthe partition hiding/unhiding technique.
934*8044SWilliam.Kucharski@Sun.COM
935*8044SWilliam.Kucharski@Sun.COM   If GRUB "hide"s a DOS (or Windows) partition (*note hide::), DOS (or
936*8044SWilliam.Kucharski@Sun.COMWindows) will ignore the partition. If GRUB "unhide"s a DOS (or
937*8044SWilliam.Kucharski@Sun.COMWindows) partition (*note unhide::), DOS (or Windows) will detect the
938*8044SWilliam.Kucharski@Sun.COMpartition. Thus, if you have installed DOS (or Windows) on the first
939*8044SWilliam.Kucharski@Sun.COMand the second partition of the first hard disk, and you want to boot
940*8044SWilliam.Kucharski@Sun.COMthe copy on the first partition, do the following:
941*8044SWilliam.Kucharski@Sun.COM
942*8044SWilliam.Kucharski@Sun.COM     grub> unhide (hd0,0)
943*8044SWilliam.Kucharski@Sun.COM     grub> hide (hd0,1)
944*8044SWilliam.Kucharski@Sun.COM     grub> rootnoverify (hd0,0)
945*8044SWilliam.Kucharski@Sun.COM     grub> chainloader +1
946*8044SWilliam.Kucharski@Sun.COM     grub> makeactive
947*8044SWilliam.Kucharski@Sun.COM     grub> boot
948*8044SWilliam.Kucharski@Sun.COM
949*8044SWilliam.Kucharski@Sun.COM
950*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: SCO UnixWare,  Next: QNX,  Prev: DOS/Windows,  Up: OS-specific notes
951*8044SWilliam.Kucharski@Sun.COM
952*8044SWilliam.Kucharski@Sun.COM4.2.7 SCO UnixWare
953*8044SWilliam.Kucharski@Sun.COM------------------
954*8044SWilliam.Kucharski@Sun.COM
955*8044SWilliam.Kucharski@Sun.COMIt is known that the signature in the boot loader for SCO UnixWare is
956*8044SWilliam.Kucharski@Sun.COMwrong, so you will have to specify the option `--force' to
957*8044SWilliam.Kucharski@Sun.COM`chainloader' (*note chainloader::), like this:
958*8044SWilliam.Kucharski@Sun.COM
959*8044SWilliam.Kucharski@Sun.COM     grub> rootnoverify (hd1,0)
960*8044SWilliam.Kucharski@Sun.COM     grub> chainloader --force +1
961*8044SWilliam.Kucharski@Sun.COM     grub> makeactive
962*8044SWilliam.Kucharski@Sun.COM     grub> boot
963*8044SWilliam.Kucharski@Sun.COM
964*8044SWilliam.Kucharski@Sun.COM
965*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: QNX,  Prev: SCO UnixWare,  Up: OS-specific notes
966*8044SWilliam.Kucharski@Sun.COM
967*8044SWilliam.Kucharski@Sun.COM4.2.8 QNX
968*8044SWilliam.Kucharski@Sun.COM---------
969*8044SWilliam.Kucharski@Sun.COM
970*8044SWilliam.Kucharski@Sun.COMQNX seems to use a bigger boot loader, so you need to boot it up, like
971*8044SWilliam.Kucharski@Sun.COMthis:
972*8044SWilliam.Kucharski@Sun.COM
973*8044SWilliam.Kucharski@Sun.COM     grub> rootnoverify (hd1,1)
974*8044SWilliam.Kucharski@Sun.COM     grub> chainloader +4
975*8044SWilliam.Kucharski@Sun.COM     grub> boot
976*8044SWilliam.Kucharski@Sun.COM
977*8044SWilliam.Kucharski@Sun.COM
978*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Making your system robust,  Prev: OS-specific notes,  Up: Booting
979*8044SWilliam.Kucharski@Sun.COM
980*8044SWilliam.Kucharski@Sun.COM4.3 How to make your system robust
981*8044SWilliam.Kucharski@Sun.COM==================================
982*8044SWilliam.Kucharski@Sun.COM
983*8044SWilliam.Kucharski@Sun.COMWhen you test a new kernel or a new OS, it is important to make sure
984*8044SWilliam.Kucharski@Sun.COMthat your computer can boot even if the new system is unbootable. This
985*8044SWilliam.Kucharski@Sun.COMis crucial especially if you maintain servers or remote systems. To
986*8044SWilliam.Kucharski@Sun.COMaccomplish this goal, you need to set up two things:
987*8044SWilliam.Kucharski@Sun.COM
988*8044SWilliam.Kucharski@Sun.COM  1. You must maintain a system which is always bootable. For instance,
989*8044SWilliam.Kucharski@Sun.COM     if you test a new kernel, you need to keep a working kernel in a
990*8044SWilliam.Kucharski@Sun.COM     different place. And, it would sometimes be very nice to even have
991*8044SWilliam.Kucharski@Sun.COM     a complete copy of a working system in a different partition or
992*8044SWilliam.Kucharski@Sun.COM     disk.
993*8044SWilliam.Kucharski@Sun.COM
994*8044SWilliam.Kucharski@Sun.COM  2. You must direct GRUB to boot a working system when the new system
995*8044SWilliam.Kucharski@Sun.COM     fails. This is possible with the "fallback" system in GRUB.
996*8044SWilliam.Kucharski@Sun.COM
997*8044SWilliam.Kucharski@Sun.COM   The former requirement is very specific to each OS, so this
998*8044SWilliam.Kucharski@Sun.COMdocumentation does not cover that topic. It is better to consult some
999*8044SWilliam.Kucharski@Sun.COMbackup tools.
1000*8044SWilliam.Kucharski@Sun.COM
1001*8044SWilliam.Kucharski@Sun.COM   So let's see the GRUB part. There are two possibilities: one of them
1002*8044SWilliam.Kucharski@Sun.COMis quite simple but not very robust, and the other is a bit complex to
1003*8044SWilliam.Kucharski@Sun.COMset up but probably the best solution to make sure that your system can
1004*8044SWilliam.Kucharski@Sun.COMstart as long as GRUB itself is bootable.
1005*8044SWilliam.Kucharski@Sun.COM
1006*8044SWilliam.Kucharski@Sun.COM* Menu:
1007*8044SWilliam.Kucharski@Sun.COM
1008*8044SWilliam.Kucharski@Sun.COM* Booting once-only::
1009*8044SWilliam.Kucharski@Sun.COM* Booting fallback systems::
1010*8044SWilliam.Kucharski@Sun.COM
1011*8044SWilliam.Kucharski@Sun.COM
1012*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Booting once-only,  Next: Booting fallback systems,  Up: Making your system robust
1013*8044SWilliam.Kucharski@Sun.COM
1014*8044SWilliam.Kucharski@Sun.COM4.3.1 Booting once-only
1015*8044SWilliam.Kucharski@Sun.COM-----------------------
1016*8044SWilliam.Kucharski@Sun.COM
1017*8044SWilliam.Kucharski@Sun.COMYou can teach GRUB to boot an entry only at next boot time. Suppose
1018*8044SWilliam.Kucharski@Sun.COMthat your have an old kernel `old_kernel' and a new kernel
1019*8044SWilliam.Kucharski@Sun.COM`new_kernel'. You know that `old_kernel' can boot your system
1020*8044SWilliam.Kucharski@Sun.COMcorrectly, and you want to test `new_kernel'.
1021*8044SWilliam.Kucharski@Sun.COM
1022*8044SWilliam.Kucharski@Sun.COM   To ensure that your system will go back to the old kernel even if the
1023*8044SWilliam.Kucharski@Sun.COMnew kernel fails (e.g. it panics), you can specify that GRUB should try
1024*8044SWilliam.Kucharski@Sun.COMthe new kernel only once and boot the old kernel after that.
1025*8044SWilliam.Kucharski@Sun.COM
1026*8044SWilliam.Kucharski@Sun.COM   First, modify your configuration file. Here is an example:
1027*8044SWilliam.Kucharski@Sun.COM
1028*8044SWilliam.Kucharski@Sun.COM     default saved        # This is important!!!
1029*8044SWilliam.Kucharski@Sun.COM     timeout 10
1030*8044SWilliam.Kucharski@Sun.COM
1031*8044SWilliam.Kucharski@Sun.COM     title the old kernel
1032*8044SWilliam.Kucharski@Sun.COM     root (hd0,0)
1033*8044SWilliam.Kucharski@Sun.COM     kernel /old_kernel
1034*8044SWilliam.Kucharski@Sun.COM     savedefault
1035*8044SWilliam.Kucharski@Sun.COM
1036*8044SWilliam.Kucharski@Sun.COM     title the new kernel
1037*8044SWilliam.Kucharski@Sun.COM     root (hd0,0)
1038*8044SWilliam.Kucharski@Sun.COM     kernel /new_kernel
1039*8044SWilliam.Kucharski@Sun.COM     savedefault 0         # This is important!!!
1040*8044SWilliam.Kucharski@Sun.COM
1041*8044SWilliam.Kucharski@Sun.COM   Note that this configuration file uses `default saved' (*note
1042*8044SWilliam.Kucharski@Sun.COMdefault::) at the head and `savedefault 0' (*note savedefault::) in the
1043*8044SWilliam.Kucharski@Sun.COMentry for the new kernel. This means that GRUB boots a saved entry by
1044*8044SWilliam.Kucharski@Sun.COMdefault, and booting the entry for the new kernel saves `0' as the
1045*8044SWilliam.Kucharski@Sun.COMsaved entry.
1046*8044SWilliam.Kucharski@Sun.COM
1047*8044SWilliam.Kucharski@Sun.COM   With this configuration file, after all, GRUB always tries to boot
1048*8044SWilliam.Kucharski@Sun.COMthe old kernel after it booted the new one, because `0' is the entry of
1049*8044SWilliam.Kucharski@Sun.COM`the old kernel'.
1050*8044SWilliam.Kucharski@Sun.COM
1051*8044SWilliam.Kucharski@Sun.COM   The next step is to tell GRUB to boot the new kernel at next boot
1052*8044SWilliam.Kucharski@Sun.COMtime. For this, execute `grub-set-default' (*note Invoking
1053*8044SWilliam.Kucharski@Sun.COMgrub-set-default::):
1054*8044SWilliam.Kucharski@Sun.COM
1055*8044SWilliam.Kucharski@Sun.COM     # grub-set-default 1
1056*8044SWilliam.Kucharski@Sun.COM
1057*8044SWilliam.Kucharski@Sun.COM   This command sets the saved entry to `1', that is, to the new kernel.
1058*8044SWilliam.Kucharski@Sun.COM
1059*8044SWilliam.Kucharski@Sun.COM   This method is useful, but still not very robust, because GRUB stops
1060*8044SWilliam.Kucharski@Sun.COMbooting, if there is any error in the boot entry, such that the new
1061*8044SWilliam.Kucharski@Sun.COMkernel has an invalid executable format. Thus, it it even better to use
1062*8044SWilliam.Kucharski@Sun.COMthe "fallback" mechanism of GRUB. Look at next subsection for this
1063*8044SWilliam.Kucharski@Sun.COMfeature.
1064*8044SWilliam.Kucharski@Sun.COM
1065*8044SWilliam.Kucharski@Sun.COM
1066*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Booting fallback systems,  Prev: Booting once-only,  Up: Making your system robust
1067*8044SWilliam.Kucharski@Sun.COM
1068*8044SWilliam.Kucharski@Sun.COM4.3.2 Booting fallback systems
1069*8044SWilliam.Kucharski@Sun.COM------------------------------
1070*8044SWilliam.Kucharski@Sun.COM
1071*8044SWilliam.Kucharski@Sun.COMGRUB supports a fallback mechanism of booting one or more other entries
1072*8044SWilliam.Kucharski@Sun.COMif a default boot entry fails. You can specify multiple fallback
1073*8044SWilliam.Kucharski@Sun.COMentries if you wish.
1074*8044SWilliam.Kucharski@Sun.COM
1075*8044SWilliam.Kucharski@Sun.COM   Suppose that you have three systems, `A', `B' and `C'. `A' is a
1076*8044SWilliam.Kucharski@Sun.COMsystem which you want to boot by default. `B' is a backup system which
1077*8044SWilliam.Kucharski@Sun.COMis supposed to boot safely. `C' is another backup system which is used
1078*8044SWilliam.Kucharski@Sun.COMin case where `B' is broken.
1079*8044SWilliam.Kucharski@Sun.COM
1080*8044SWilliam.Kucharski@Sun.COM   Then you may want GRUB to boot the first system which is bootable
1081*8044SWilliam.Kucharski@Sun.COMamong `A', `B' and `C'. A configuration file can be written in this way:
1082*8044SWilliam.Kucharski@Sun.COM
1083*8044SWilliam.Kucharski@Sun.COM     default saved        # This is important!!!
1084*8044SWilliam.Kucharski@Sun.COM     timeout 10
1085*8044SWilliam.Kucharski@Sun.COM     fallback 1 2         # This is important!!!
1086*8044SWilliam.Kucharski@Sun.COM
1087*8044SWilliam.Kucharski@Sun.COM     title A
1088*8044SWilliam.Kucharski@Sun.COM     root (hd0,0)
1089*8044SWilliam.Kucharski@Sun.COM     kernel /kernel
1090*8044SWilliam.Kucharski@Sun.COM     savedefault fallback # This is important!!!
1091*8044SWilliam.Kucharski@Sun.COM
1092*8044SWilliam.Kucharski@Sun.COM     title B
1093*8044SWilliam.Kucharski@Sun.COM     root (hd1,0)
1094*8044SWilliam.Kucharski@Sun.COM     kernel /kernel
1095*8044SWilliam.Kucharski@Sun.COM     savedefault fallback # This is important!!!
1096*8044SWilliam.Kucharski@Sun.COM
1097*8044SWilliam.Kucharski@Sun.COM     title C
1098*8044SWilliam.Kucharski@Sun.COM     root (hd2,0)
1099*8044SWilliam.Kucharski@Sun.COM     kernel /kernel
1100*8044SWilliam.Kucharski@Sun.COM     savedefault
1101*8044SWilliam.Kucharski@Sun.COM
1102*8044SWilliam.Kucharski@Sun.COM   Note that `default saved' (*note default::), `fallback 1 2' and
1103*8044SWilliam.Kucharski@Sun.COM`savedefault fallback' are used. GRUB will boot a saved entry by
1104*8044SWilliam.Kucharski@Sun.COMdefault and save a fallback entry as next boot entry with this
1105*8044SWilliam.Kucharski@Sun.COMconfiguration.
1106*8044SWilliam.Kucharski@Sun.COM
1107*8044SWilliam.Kucharski@Sun.COM   When GRUB tries to boot `A', GRUB saves `1' as next boot entry,
1108*8044SWilliam.Kucharski@Sun.COMbecause the command `fallback' specifies that `1' is the first fallback
1109*8044SWilliam.Kucharski@Sun.COMentry. The entry `1' is `B', so GRUB will try to boot `B' at next boot
1110*8044SWilliam.Kucharski@Sun.COMtime.
1111*8044SWilliam.Kucharski@Sun.COM
1112*8044SWilliam.Kucharski@Sun.COM   Likewise, when GRUB tries to boot `B', GRUB saves `2' as next boot
1113*8044SWilliam.Kucharski@Sun.COMentry, because `fallback' specifies `2' as next fallback entry. This
1114*8044SWilliam.Kucharski@Sun.COMmakes sure that GRUB will boot `C' after booting `B'.
1115*8044SWilliam.Kucharski@Sun.COM
1116*8044SWilliam.Kucharski@Sun.COM   It is noteworthy that GRUB uses fallback entries both when GRUB
1117*8044SWilliam.Kucharski@Sun.COMitself fails in booting an entry and when `A' or `B' fails in starting
1118*8044SWilliam.Kucharski@Sun.COMup your system. So this solution ensures that your system is started
1119*8044SWilliam.Kucharski@Sun.COMeven if GRUB cannot find your kernel or if your kernel panics.
1120*8044SWilliam.Kucharski@Sun.COM
1121*8044SWilliam.Kucharski@Sun.COM   However, you need to run `grub-set-default' (*note Invoking
1122*8044SWilliam.Kucharski@Sun.COMgrub-set-default::) when `A' starts correctly or you fix `A' after it
1123*8044SWilliam.Kucharski@Sun.COMcrashes, since GRUB always sets next boot entry to a fallback entry.
1124*8044SWilliam.Kucharski@Sun.COMYou should run this command in a startup script such as `rc.local' to
1125*8044SWilliam.Kucharski@Sun.COMboot `A' by default:
1126*8044SWilliam.Kucharski@Sun.COM
1127*8044SWilliam.Kucharski@Sun.COM     # grub-set-default 0
1128*8044SWilliam.Kucharski@Sun.COM
1129*8044SWilliam.Kucharski@Sun.COM   where `0' is the number of the boot entry for the system `A'.
1130*8044SWilliam.Kucharski@Sun.COM
1131*8044SWilliam.Kucharski@Sun.COM   If you want to see what is current default entry, you can look at the
1132*8044SWilliam.Kucharski@Sun.COMfile `/boot/grub/default' (or `/grub/default' in some systems). Because
1133*8044SWilliam.Kucharski@Sun.COMthis file is plain-text, you can just `cat' this file. But it is
1134*8044SWilliam.Kucharski@Sun.COMstrongly recommended *not to modify this file directly*, because GRUB
1135*8044SWilliam.Kucharski@Sun.COMmay fail in saving a default entry in this file, if you change this
1136*8044SWilliam.Kucharski@Sun.COMfile in an unintended manner. Therefore, you should use
1137*8044SWilliam.Kucharski@Sun.COM`grub-set-default' when you need to change the default entry.
1138*8044SWilliam.Kucharski@Sun.COM
1139*8044SWilliam.Kucharski@Sun.COM
1140*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Configuration,  Next: Network,  Prev: Booting,  Up: Top
1141*8044SWilliam.Kucharski@Sun.COM
1142*8044SWilliam.Kucharski@Sun.COM5 Configuration
1143*8044SWilliam.Kucharski@Sun.COM***************
1144*8044SWilliam.Kucharski@Sun.COM
1145*8044SWilliam.Kucharski@Sun.COMYou've probably noticed that you need to type several commands to boot
1146*8044SWilliam.Kucharski@Sun.COMyour OS. There's a solution to that - GRUB provides a menu interface
1147*8044SWilliam.Kucharski@Sun.COM(*note Menu interface::) from which you can select an item (using arrow
1148*8044SWilliam.Kucharski@Sun.COMkeys) that will do everything to boot an OS.
1149*8044SWilliam.Kucharski@Sun.COM
1150*8044SWilliam.Kucharski@Sun.COM   To enable the menu, you need a configuration file, `menu.lst' under
1151*8044SWilliam.Kucharski@Sun.COMthe boot directory. We'll analyze an example file.
1152*8044SWilliam.Kucharski@Sun.COM
1153*8044SWilliam.Kucharski@Sun.COM   The file first contains some general settings, the menu interface
1154*8044SWilliam.Kucharski@Sun.COMrelated options. You can put these commands (*note Menu-specific
1155*8044SWilliam.Kucharski@Sun.COMcommands::) before any of the items (starting with `title' (*note
1156*8044SWilliam.Kucharski@Sun.COMtitle::)).
1157*8044SWilliam.Kucharski@Sun.COM
1158*8044SWilliam.Kucharski@Sun.COM     #
1159*8044SWilliam.Kucharski@Sun.COM     # Sample boot menu configuration file
1160*8044SWilliam.Kucharski@Sun.COM     #
1161*8044SWilliam.Kucharski@Sun.COM
1162*8044SWilliam.Kucharski@Sun.COM   As you may have guessed, these lines are comments. Lines starting
1163*8044SWilliam.Kucharski@Sun.COMwith a hash character (`#'), and blank lines, are ignored by GRUB.
1164*8044SWilliam.Kucharski@Sun.COM
1165*8044SWilliam.Kucharski@Sun.COM     # By default, boot the first entry.
1166*8044SWilliam.Kucharski@Sun.COM     default 0
1167*8044SWilliam.Kucharski@Sun.COM
1168*8044SWilliam.Kucharski@Sun.COM   The first entry (here, counting starts with number zero, not one!)
1169*8044SWilliam.Kucharski@Sun.COMwill be the default choice.
1170*8044SWilliam.Kucharski@Sun.COM
1171*8044SWilliam.Kucharski@Sun.COM     # Boot automatically after 30 secs.
1172*8044SWilliam.Kucharski@Sun.COM     timeout 30
1173*8044SWilliam.Kucharski@Sun.COM
1174*8044SWilliam.Kucharski@Sun.COM   As the comment says, GRUB will boot automatically in 30 seconds,
1175*8044SWilliam.Kucharski@Sun.COMunless interrupted with a keypress.
1176*8044SWilliam.Kucharski@Sun.COM
1177*8044SWilliam.Kucharski@Sun.COM     # Fallback to the second entry.
1178*8044SWilliam.Kucharski@Sun.COM     fallback 1
1179*8044SWilliam.Kucharski@Sun.COM
1180*8044SWilliam.Kucharski@Sun.COM   If, for any reason, the default entry doesn't work, fall back to the
1181*8044SWilliam.Kucharski@Sun.COMsecond one (this is rarely used, for obvious reasons).
1182*8044SWilliam.Kucharski@Sun.COM
1183*8044SWilliam.Kucharski@Sun.COM   Note that the complete descriptions of these commands, which are menu
1184*8044SWilliam.Kucharski@Sun.COMinterface specific, can be found in *Note Menu-specific commands::.
1185*8044SWilliam.Kucharski@Sun.COMOther descriptions can be found in *Note Commands::.
1186*8044SWilliam.Kucharski@Sun.COM
1187*8044SWilliam.Kucharski@Sun.COM   Now, on to the actual OS definitions. You will see that each entry
1188*8044SWilliam.Kucharski@Sun.COMbegins with a special command, `title' (*note title::), and the action
1189*8044SWilliam.Kucharski@Sun.COMis described after it. Note that there is no command `boot' (*note
1190*8044SWilliam.Kucharski@Sun.COMboot::) at the  end of each item. That is because GRUB automatically
1191*8044SWilliam.Kucharski@Sun.COMexecutes `boot' if it loads other commands successfully.
1192*8044SWilliam.Kucharski@Sun.COM
1193*8044SWilliam.Kucharski@Sun.COM   The argument for the command `title' is used to display a short
1194*8044SWilliam.Kucharski@Sun.COMtitle/description of the entry in the menu. Since `title' displays the
1195*8044SWilliam.Kucharski@Sun.COMargument as is, you can write basically anything there.
1196*8044SWilliam.Kucharski@Sun.COM
1197*8044SWilliam.Kucharski@Sun.COM     # For booting GNU/Hurd
1198*8044SWilliam.Kucharski@Sun.COM     title  GNU/Hurd
1199*8044SWilliam.Kucharski@Sun.COM     root   (hd0,0)
1200*8044SWilliam.Kucharski@Sun.COM     kernel /boot/gnumach.gz root=hd0s1
1201*8044SWilliam.Kucharski@Sun.COM     module /boot/serverboot.gz
1202*8044SWilliam.Kucharski@Sun.COM
1203*8044SWilliam.Kucharski@Sun.COM   This boots GNU/Hurd from the first hard disk.
1204*8044SWilliam.Kucharski@Sun.COM
1205*8044SWilliam.Kucharski@Sun.COM     # For booting GNU/Linux
1206*8044SWilliam.Kucharski@Sun.COM     title  GNU/Linux
1207*8044SWilliam.Kucharski@Sun.COM     kernel (hd1,0)/vmlinuz root=/dev/hdb1
1208*8044SWilliam.Kucharski@Sun.COM
1209*8044SWilliam.Kucharski@Sun.COM   This boots GNU/Linux, but from the second hard disk.
1210*8044SWilliam.Kucharski@Sun.COM
1211*8044SWilliam.Kucharski@Sun.COM     # For booting Mach (getting kernel from floppy)
1212*8044SWilliam.Kucharski@Sun.COM     title  Utah Mach4 multiboot
1213*8044SWilliam.Kucharski@Sun.COM     root   (hd0,2)
1214*8044SWilliam.Kucharski@Sun.COM     pause  Insert the diskette now^G!!
1215*8044SWilliam.Kucharski@Sun.COM     kernel (fd0)/boot/kernel root=hd0s3
1216*8044SWilliam.Kucharski@Sun.COM     module (fd0)/boot/bootstrap
1217*8044SWilliam.Kucharski@Sun.COM
1218*8044SWilliam.Kucharski@Sun.COM   This boots Mach with a kernel on a floppy, but the root filesystem at
1219*8044SWilliam.Kucharski@Sun.COMhd0s3. It also contains a `pause' line (*note pause::), which will
1220*8044SWilliam.Kucharski@Sun.COMcause GRUB to display a prompt and delay, before actually executing the
1221*8044SWilliam.Kucharski@Sun.COMrest of the commands and booting.
1222*8044SWilliam.Kucharski@Sun.COM
1223*8044SWilliam.Kucharski@Sun.COM     # For booting FreeBSD
1224*8044SWilliam.Kucharski@Sun.COM     title  FreeBSD
1225*8044SWilliam.Kucharski@Sun.COM     root   (hd0,2,a)
1226*8044SWilliam.Kucharski@Sun.COM     kernel /boot/loader
1227*8044SWilliam.Kucharski@Sun.COM
1228*8044SWilliam.Kucharski@Sun.COM   This item will boot FreeBSD kernel loaded from the `a' partition of
1229*8044SWilliam.Kucharski@Sun.COMthe third PC slice of the first hard disk.
1230*8044SWilliam.Kucharski@Sun.COM
1231*8044SWilliam.Kucharski@Sun.COM     # For booting OS/2
1232*8044SWilliam.Kucharski@Sun.COM     title OS/2
1233*8044SWilliam.Kucharski@Sun.COM     root  (hd0,1)
1234*8044SWilliam.Kucharski@Sun.COM     makeactive
1235*8044SWilliam.Kucharski@Sun.COM     # chainload OS/2 bootloader from the first sector
1236*8044SWilliam.Kucharski@Sun.COM     chainloader +1
1237*8044SWilliam.Kucharski@Sun.COM     # This is similar to "chainload", but loads a specific file
1238*8044SWilliam.Kucharski@Sun.COM     #chainloader /boot/chain.os2
1239*8044SWilliam.Kucharski@Sun.COM
1240*8044SWilliam.Kucharski@Sun.COM   This will boot OS/2, using a chain-loader (*note Chain-loading::).
1241*8044SWilliam.Kucharski@Sun.COM
1242*8044SWilliam.Kucharski@Sun.COM     # For booting Windows NT or Windows95
1243*8044SWilliam.Kucharski@Sun.COM     title Windows NT / Windows 95 boot menu
1244*8044SWilliam.Kucharski@Sun.COM     root        (hd0,0)
1245*8044SWilliam.Kucharski@Sun.COM     makeactive
1246*8044SWilliam.Kucharski@Sun.COM     chainloader +1
1247*8044SWilliam.Kucharski@Sun.COM     # For loading DOS if Windows NT is installed
1248*8044SWilliam.Kucharski@Sun.COM     # chainload /bootsect.dos
1249*8044SWilliam.Kucharski@Sun.COM
1250*8044SWilliam.Kucharski@Sun.COM   The same as the above, but for Windows.
1251*8044SWilliam.Kucharski@Sun.COM
1252*8044SWilliam.Kucharski@Sun.COM     # For installing GRUB into the hard disk
1253*8044SWilliam.Kucharski@Sun.COM     title Install GRUB into the hard disk
1254*8044SWilliam.Kucharski@Sun.COM     root    (hd0,0)
1255*8044SWilliam.Kucharski@Sun.COM     setup   (hd0)
1256*8044SWilliam.Kucharski@Sun.COM
1257*8044SWilliam.Kucharski@Sun.COM   This will just (re)install GRUB onto the hard disk.
1258*8044SWilliam.Kucharski@Sun.COM
1259*8044SWilliam.Kucharski@Sun.COM     # Change the colors.
1260*8044SWilliam.Kucharski@Sun.COM     title Change the colors
1261*8044SWilliam.Kucharski@Sun.COM     color light-green/brown blink-red/blue
1262*8044SWilliam.Kucharski@Sun.COM
1263*8044SWilliam.Kucharski@Sun.COM   In the last entry, the command `color' is used (*note color::), to
1264*8044SWilliam.Kucharski@Sun.COMchange the menu colors (try it!). This command is somewhat special,
1265*8044SWilliam.Kucharski@Sun.COMbecause it can be used both in the command-line and in the menu. GRUB
1266*8044SWilliam.Kucharski@Sun.COMhas several such commands, see *Note General commands::.
1267*8044SWilliam.Kucharski@Sun.COM
1268*8044SWilliam.Kucharski@Sun.COM   We hope that you now understand how to use the basic features of
1269*8044SWilliam.Kucharski@Sun.COMGRUB. To learn more about GRUB, see the following chapters.
1270*8044SWilliam.Kucharski@Sun.COM
1271*8044SWilliam.Kucharski@Sun.COM
1272*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Network,  Next: Serial terminal,  Prev: Configuration,  Up: Top
1273*8044SWilliam.Kucharski@Sun.COM
1274*8044SWilliam.Kucharski@Sun.COM6 Downloading OS images from a network
1275*8044SWilliam.Kucharski@Sun.COM**************************************
1276*8044SWilliam.Kucharski@Sun.COM
1277*8044SWilliam.Kucharski@Sun.COMAlthough GRUB is a disk-based boot loader, it does provide network
1278*8044SWilliam.Kucharski@Sun.COMsupport. To use the network support, you need to enable at least one
1279*8044SWilliam.Kucharski@Sun.COMnetwork driver in the GRUB build process. For more information please
1280*8044SWilliam.Kucharski@Sun.COMsee `netboot/README.netboot' in the source distribution.
1281*8044SWilliam.Kucharski@Sun.COM
1282*8044SWilliam.Kucharski@Sun.COM* Menu:
1283*8044SWilliam.Kucharski@Sun.COM
1284*8044SWilliam.Kucharski@Sun.COM* General usage of network support::
1285*8044SWilliam.Kucharski@Sun.COM* Diskless::
1286*8044SWilliam.Kucharski@Sun.COM
1287*8044SWilliam.Kucharski@Sun.COM
1288*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: General usage of network support,  Next: Diskless,  Up: Network
1289*8044SWilliam.Kucharski@Sun.COM
1290*8044SWilliam.Kucharski@Sun.COM6.1 How to set up your network
1291*8044SWilliam.Kucharski@Sun.COM==============================
1292*8044SWilliam.Kucharski@Sun.COM
1293*8044SWilliam.Kucharski@Sun.COMGRUB requires a file server and optionally a server that will assign an
1294*8044SWilliam.Kucharski@Sun.COMIP address to the machine on which GRUB is running. For the former, only
1295*8044SWilliam.Kucharski@Sun.COMTFTP is supported at the moment. The latter is either BOOTP, DHCP or a
1296*8044SWilliam.Kucharski@Sun.COMRARP server(1) (*note General usage of network support-Footnote-1::).
1297*8044SWilliam.Kucharski@Sun.COMIt is not necessary to run both the servers on one computer. How to
1298*8044SWilliam.Kucharski@Sun.COMconfigure these servers is beyond the scope of this document, so please
1299*8044SWilliam.Kucharski@Sun.COMrefer to the manuals specific to those protocols/servers.
1300*8044SWilliam.Kucharski@Sun.COM
1301*8044SWilliam.Kucharski@Sun.COM   If you decided to use a server to assign an IP address, set up the
1302*8044SWilliam.Kucharski@Sun.COMserver and run `bootp' (*note bootp::), `dhcp' (*note dhcp::) or `rarp'
1303*8044SWilliam.Kucharski@Sun.COM(*note rarp::) for BOOTP, DHCP or RARP, respectively. Each command will
1304*8044SWilliam.Kucharski@Sun.COMshow an assigned IP address, a netmask, an IP address for your TFTP
1305*8044SWilliam.Kucharski@Sun.COMserver and a gateway. If any of the addresses is wrong or it causes an
1306*8044SWilliam.Kucharski@Sun.COMerror, probably the configuration of your servers isn't set up properly.
1307*8044SWilliam.Kucharski@Sun.COM
1308*8044SWilliam.Kucharski@Sun.COM   Otherwise, run `ifconfig', like this:
1309*8044SWilliam.Kucharski@Sun.COM
1310*8044SWilliam.Kucharski@Sun.COM     grub> ifconfig --address=192.168.110.23 --server=192.168.110.14
1311*8044SWilliam.Kucharski@Sun.COM
1312*8044SWilliam.Kucharski@Sun.COM   You can also use `ifconfig' in conjuction with `bootp', `dhcp' or
1313*8044SWilliam.Kucharski@Sun.COM`rarp' (e.g. to reassign the server address manually). *Note
1314*8044SWilliam.Kucharski@Sun.COMifconfig::, for more details.
1315*8044SWilliam.Kucharski@Sun.COM
1316*8044SWilliam.Kucharski@Sun.COM   Finally, download your OS images from your network. The network can
1317*8044SWilliam.Kucharski@Sun.COMbe accessed using the network drive `(nd)'. Everything else is very
1318*8044SWilliam.Kucharski@Sun.COMsimilar to the normal instructions (*note Booting::).
1319*8044SWilliam.Kucharski@Sun.COM
1320*8044SWilliam.Kucharski@Sun.COM   Here is an example:
1321*8044SWilliam.Kucharski@Sun.COM
1322*8044SWilliam.Kucharski@Sun.COM     grub> bootp
1323*8044SWilliam.Kucharski@Sun.COM     Probing... [NE*000]
1324*8044SWilliam.Kucharski@Sun.COM     NE2000 base ...
1325*8044SWilliam.Kucharski@Sun.COM     Address: 192.168.110.23    Netmask: 255.255.255.0
1326*8044SWilliam.Kucharski@Sun.COM     Server: 192.168.110.14     Gateway: 192.168.110.1
1327*8044SWilliam.Kucharski@Sun.COM
1328*8044SWilliam.Kucharski@Sun.COM     grub> root (nd)
1329*8044SWilliam.Kucharski@Sun.COM     grub> kernel /tftproot/gnumach.gz root=sd0s1
1330*8044SWilliam.Kucharski@Sun.COM     grub> module /tftproot/serverboot.gz
1331*8044SWilliam.Kucharski@Sun.COM     grub> boot
1332*8044SWilliam.Kucharski@Sun.COM
1333*8044SWilliam.Kucharski@Sun.COM
1334*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: General usage of network support-Footnotes,  Up: General usage of network support
1335*8044SWilliam.Kucharski@Sun.COM
1336*8044SWilliam.Kucharski@Sun.COM   (1) RARP is not advised, since it cannot serve much information
1337*8044SWilliam.Kucharski@Sun.COM
1338*8044SWilliam.Kucharski@Sun.COM
1339*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Diskless,  Prev: General usage of network support,  Up: Network
1340*8044SWilliam.Kucharski@Sun.COM
1341*8044SWilliam.Kucharski@Sun.COM6.2 Booting from a network
1342*8044SWilliam.Kucharski@Sun.COM==========================
1343*8044SWilliam.Kucharski@Sun.COM
1344*8044SWilliam.Kucharski@Sun.COMIt is sometimes very useful to boot from a network, especially when you
1345*8044SWilliam.Kucharski@Sun.COMuse a machine which has no local disk. In this case, you need to obtain
1346*8044SWilliam.Kucharski@Sun.COMa kind of Net Boot ROM, such as a PXE ROM or a free software package
1347*8044SWilliam.Kucharski@Sun.COMlike Etherboot. Such a Boot ROM first boots the machine, sets up the
1348*8044SWilliam.Kucharski@Sun.COMnetwork card installed into the machine, and downloads a second stage
1349*8044SWilliam.Kucharski@Sun.COMboot image from the network. Then, the second image will try to boot an
1350*8044SWilliam.Kucharski@Sun.COMoperating system actually from the network.
1351*8044SWilliam.Kucharski@Sun.COM
1352*8044SWilliam.Kucharski@Sun.COM   GRUB provides two second stage images, `nbgrub' and `pxegrub' (*note
1353*8044SWilliam.Kucharski@Sun.COMImages::). These images are the same as the normal Stage 2, except that
1354*8044SWilliam.Kucharski@Sun.COMthey set up a network automatically, and try to load a configuration
1355*8044SWilliam.Kucharski@Sun.COMfile from the network, if specified. The usage is very simple: If the
1356*8044SWilliam.Kucharski@Sun.COMmachine has a PXE ROM, use `pxegrub'. If the machine has an NBI loader
1357*8044SWilliam.Kucharski@Sun.COMsuch as Etherboot, use `nbgrub'. There is no difference between them
1358*8044SWilliam.Kucharski@Sun.COMexcept their formats. Since the way to load a second stage image you
1359*8044SWilliam.Kucharski@Sun.COMwant to use should be described in the manual on your Net Boot ROM,
1360*8044SWilliam.Kucharski@Sun.COMplease refer to the manual, for more information.
1361*8044SWilliam.Kucharski@Sun.COM
1362*8044SWilliam.Kucharski@Sun.COM   However, there is one thing specific to GRUB. Namely, how to specify
1363*8044SWilliam.Kucharski@Sun.COMa configuration file in a BOOTP/DHCP server. For now, GRUB uses the tag
1364*8044SWilliam.Kucharski@Sun.COM`150', to get the name of a configuration file. The following is an
1365*8044SWilliam.Kucharski@Sun.COMexample with a BOOTP configuration:
1366*8044SWilliam.Kucharski@Sun.COM
1367*8044SWilliam.Kucharski@Sun.COM     .allhost:hd=/tmp:bf=null:\
1368*8044SWilliam.Kucharski@Sun.COM             :ds=145.71.35.1 145.71.32.1:\
1369*8044SWilliam.Kucharski@Sun.COM             :sm=255.255.254.0:\
1370*8044SWilliam.Kucharski@Sun.COM             :gw=145.71.35.1:\
1371*8044SWilliam.Kucharski@Sun.COM             :sa=145.71.35.5:
1372*8044SWilliam.Kucharski@Sun.COM
1373*8044SWilliam.Kucharski@Sun.COM     foo:ht=1:ha=63655d0334a7:ip=145.71.35.127:\
1374*8044SWilliam.Kucharski@Sun.COM             :bf=/nbgrub:\
1375*8044SWilliam.Kucharski@Sun.COM             :tc=.allhost:\
1376*8044SWilliam.Kucharski@Sun.COM             :T150="(nd)/tftpboot/menu.lst.foo":
1377*8044SWilliam.Kucharski@Sun.COM
1378*8044SWilliam.Kucharski@Sun.COM   Note that you should specify the drive name `(nd)' in the name of
1379*8044SWilliam.Kucharski@Sun.COMthe configuration file. This is because you might change the root drive
1380*8044SWilliam.Kucharski@Sun.COMbefore downloading the configuration from the TFTP server when the
1381*8044SWilliam.Kucharski@Sun.COMpreset menu feature is used (*note Preset Menu::).
1382*8044SWilliam.Kucharski@Sun.COM
1383*8044SWilliam.Kucharski@Sun.COM   See the manual of your BOOTP/DHCP server for more information. The
1384*8044SWilliam.Kucharski@Sun.COMexact syntax should differ a little from the example.
1385*8044SWilliam.Kucharski@Sun.COM
1386*8044SWilliam.Kucharski@Sun.COM
1387*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Serial terminal,  Next: Preset Menu,  Prev: Network,  Up: Top
1388*8044SWilliam.Kucharski@Sun.COM
1389*8044SWilliam.Kucharski@Sun.COM7 Using GRUB via a serial line
1390*8044SWilliam.Kucharski@Sun.COM******************************
1391*8044SWilliam.Kucharski@Sun.COM
1392*8044SWilliam.Kucharski@Sun.COMThis chapter describes how to use the serial terminal support in GRUB.
1393*8044SWilliam.Kucharski@Sun.COM
1394*8044SWilliam.Kucharski@Sun.COM   If you have many computers or computers with no display/keyboard, it
1395*8044SWilliam.Kucharski@Sun.COMcould be very useful to control the computers through serial
1396*8044SWilliam.Kucharski@Sun.COMcommunications. To connect one computer with another via a serial line,
1397*8044SWilliam.Kucharski@Sun.COMyou need to prepare a null-modem (cross) serial cable, and you may need
1398*8044SWilliam.Kucharski@Sun.COMto have multiport serial boards, if your computer doesn't have extra
1399*8044SWilliam.Kucharski@Sun.COMserial ports. In addition, a terminal emulator is also required, such as
1400*8044SWilliam.Kucharski@Sun.COMminicom. Refer to a manual of your operating system, for more
1401*8044SWilliam.Kucharski@Sun.COMinformation.
1402*8044SWilliam.Kucharski@Sun.COM
1403*8044SWilliam.Kucharski@Sun.COM   As for GRUB, the instruction to set up a serial terminal is quite
1404*8044SWilliam.Kucharski@Sun.COMsimple. First of all, make sure that you haven't specified the option
1405*8044SWilliam.Kucharski@Sun.COM`--disable-serial' to the configure script when you built your GRUB
1406*8044SWilliam.Kucharski@Sun.COMimages. If you get them in binary form, probably they have serial
1407*8044SWilliam.Kucharski@Sun.COMterminal support already.
1408*8044SWilliam.Kucharski@Sun.COM
1409*8044SWilliam.Kucharski@Sun.COM   Then, initialize your serial terminal after GRUB starts up. Here is
1410*8044SWilliam.Kucharski@Sun.COMan example:
1411*8044SWilliam.Kucharski@Sun.COM
1412*8044SWilliam.Kucharski@Sun.COM     grub> serial --unit=0 --speed=9600
1413*8044SWilliam.Kucharski@Sun.COM     grub> terminal serial
1414*8044SWilliam.Kucharski@Sun.COM
1415*8044SWilliam.Kucharski@Sun.COM   The command `serial' initializes the serial unit 0 with the speed
1416*8044SWilliam.Kucharski@Sun.COM9600bps. The serial unit 0 is usually called `COM1', so, if you want to
1417*8044SWilliam.Kucharski@Sun.COMuse COM2, you must specify `--unit=1' instead. This command accepts
1418*8044SWilliam.Kucharski@Sun.COMmany other options, so please refer to *Note serial::, for more details.
1419*8044SWilliam.Kucharski@Sun.COM
1420*8044SWilliam.Kucharski@Sun.COM   The command `terminal' (*note terminal::) chooses which type of
1421*8044SWilliam.Kucharski@Sun.COMterminal you want to use. In the case above, the terminal will be a
1422*8044SWilliam.Kucharski@Sun.COMserial terminal, but you can also pass `console' to the command, as
1423*8044SWilliam.Kucharski@Sun.COM`terminal serial console'. In this case, a terminal in which you press
1424*8044SWilliam.Kucharski@Sun.COMany key will be selected as a GRUB terminal.
1425*8044SWilliam.Kucharski@Sun.COM
1426*8044SWilliam.Kucharski@Sun.COM   However, note that GRUB assumes that your terminal emulator is
1427*8044SWilliam.Kucharski@Sun.COMcompatible with VT100 by default. This is true for most terminal
1428*8044SWilliam.Kucharski@Sun.COMemulators nowadays, but you should pass the option `--dumb' to the
1429*8044SWilliam.Kucharski@Sun.COMcommand if your terminal emulator is not VT100-compatible or implements
1430*8044SWilliam.Kucharski@Sun.COMfew VT100 escape sequences. If you specify this option then GRUB
1431*8044SWilliam.Kucharski@Sun.COMprovides you with an alternative menu interface, because the normal
1432*8044SWilliam.Kucharski@Sun.COMmenu requires several fancy features of your terminal.
1433*8044SWilliam.Kucharski@Sun.COM
1434*8044SWilliam.Kucharski@Sun.COM
1435*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Preset Menu,  Next: Security,  Prev: Serial terminal,  Up: Top
1436*8044SWilliam.Kucharski@Sun.COM
1437*8044SWilliam.Kucharski@Sun.COM8 Embedding a configuration file into GRUB
1438*8044SWilliam.Kucharski@Sun.COM******************************************
1439*8044SWilliam.Kucharski@Sun.COM
1440*8044SWilliam.Kucharski@Sun.COMGRUB supports a "preset menu" which is to be always loaded before
1441*8044SWilliam.Kucharski@Sun.COMstarting. The preset menu feature is useful, for example, when your
1442*8044SWilliam.Kucharski@Sun.COMcomputer has no console but a serial cable. In this case, it is
1443*8044SWilliam.Kucharski@Sun.COMcritical to set up the serial terminal as soon as possible, since you
1444*8044SWilliam.Kucharski@Sun.COMcannot see any message until the serial terminal begins to work. So it
1445*8044SWilliam.Kucharski@Sun.COMis good to run the commands `serial' (*note serial::) and `terminal'
1446*8044SWilliam.Kucharski@Sun.COM(*note terminal::) before anything else at the start-up time.
1447*8044SWilliam.Kucharski@Sun.COM
1448*8044SWilliam.Kucharski@Sun.COM   How the preset menu works is slightly complicated:
1449*8044SWilliam.Kucharski@Sun.COM
1450*8044SWilliam.Kucharski@Sun.COM  1. GRUB checks if the preset menu feature is used, and loads the
1451*8044SWilliam.Kucharski@Sun.COM     preset menu, if available. This includes running commands and
1452*8044SWilliam.Kucharski@Sun.COM     reading boot entries, like an ordinary configuration file.
1453*8044SWilliam.Kucharski@Sun.COM
1454*8044SWilliam.Kucharski@Sun.COM  2. GRUB checks if the configuration file is available. Note that this
1455*8044SWilliam.Kucharski@Sun.COM     check is performed *regardless of the existence of the preset
1456*8044SWilliam.Kucharski@Sun.COM     menu*. The configuration file is loaded even if the preset menu was
1457*8044SWilliam.Kucharski@Sun.COM     loaded.
1458*8044SWilliam.Kucharski@Sun.COM
1459*8044SWilliam.Kucharski@Sun.COM  3. If the preset menu includes any boot entries, they are cleared when
1460*8044SWilliam.Kucharski@Sun.COM     the configuration file is loaded. It doesn't matter whether the
1461*8044SWilliam.Kucharski@Sun.COM     configuration file has any entries or no entry. The boot entries
1462*8044SWilliam.Kucharski@Sun.COM     in the preset menu are used only when GRUB fails in loading the
1463*8044SWilliam.Kucharski@Sun.COM     configuration file.
1464*8044SWilliam.Kucharski@Sun.COM
1465*8044SWilliam.Kucharski@Sun.COM   To enable the preset menu feature, you must rebuild GRUB specifying a
1466*8044SWilliam.Kucharski@Sun.COMfile to the configure script with the option `--enable-preset-menu'.
1467*8044SWilliam.Kucharski@Sun.COMThe file has the same semantics as normal configuration files (*note
1468*8044SWilliam.Kucharski@Sun.COMConfiguration::).
1469*8044SWilliam.Kucharski@Sun.COM
1470*8044SWilliam.Kucharski@Sun.COM   Another point you should take care is that the diskless support
1471*8044SWilliam.Kucharski@Sun.COM(*note Diskless::) diverts the preset menu. Diskless images embed a
1472*8044SWilliam.Kucharski@Sun.COMpreset menu to execute the command `bootp' (*note bootp::)
1473*8044SWilliam.Kucharski@Sun.COMautomatically, unless you specify your own preset menu to the configure
1474*8044SWilliam.Kucharski@Sun.COMscript. This means that you must put commands to initialize a network in
1475*8044SWilliam.Kucharski@Sun.COMthe preset menu yourself, because diskless images don't set it up
1476*8044SWilliam.Kucharski@Sun.COMimplicitly, when you use the preset menu explicitly.
1477*8044SWilliam.Kucharski@Sun.COM
1478*8044SWilliam.Kucharski@Sun.COM   Therefore, a typical preset menu used with diskless support would be
1479*8044SWilliam.Kucharski@Sun.COMlike this:
1480*8044SWilliam.Kucharski@Sun.COM
1481*8044SWilliam.Kucharski@Sun.COM     # Set up the serial terminal, first of all.
1482*8044SWilliam.Kucharski@Sun.COM     serial --unit=0 --speed=19200
1483*8044SWilliam.Kucharski@Sun.COM     terminal --timeout=0 serial
1484*8044SWilliam.Kucharski@Sun.COM
1485*8044SWilliam.Kucharski@Sun.COM     # Initialize the network.
1486*8044SWilliam.Kucharski@Sun.COM     dhcp
1487*8044SWilliam.Kucharski@Sun.COM
1488*8044SWilliam.Kucharski@Sun.COM
1489*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Security,  Next: Images,  Prev: Preset Menu,  Up: Top
1490*8044SWilliam.Kucharski@Sun.COM
1491*8044SWilliam.Kucharski@Sun.COM9 Protecting your computer from cracking
1492*8044SWilliam.Kucharski@Sun.COM****************************************
1493*8044SWilliam.Kucharski@Sun.COM
1494*8044SWilliam.Kucharski@Sun.COMYou may be interested in how to prevent ordinary users from doing
1495*8044SWilliam.Kucharski@Sun.COMwhatever they like, if you share your computer with other people. So
1496*8044SWilliam.Kucharski@Sun.COMthis chapter describes how to improve the security of GRUB.
1497*8044SWilliam.Kucharski@Sun.COM
1498*8044SWilliam.Kucharski@Sun.COM   One thing which could be a security hole is that the user can do too
1499*8044SWilliam.Kucharski@Sun.COMmany things with GRUB, because GRUB allows one to modify its
1500*8044SWilliam.Kucharski@Sun.COMconfiguration and run arbitrary commands at run-time. For example, the
1501*8044SWilliam.Kucharski@Sun.COMuser can even read `/etc/passwd' in the command-line interface by the
1502*8044SWilliam.Kucharski@Sun.COMcommand `cat' (*note cat::). So it is necessary to disable all the
1503*8044SWilliam.Kucharski@Sun.COMinteractive operations.
1504*8044SWilliam.Kucharski@Sun.COM
1505*8044SWilliam.Kucharski@Sun.COM   Thus, GRUB provides a "password" feature, so that only administrators
1506*8044SWilliam.Kucharski@Sun.COMcan start the interactive operations (i.e. editing menu entries and
1507*8044SWilliam.Kucharski@Sun.COMentering the command-line interface). To use this feature, you need to
1508*8044SWilliam.Kucharski@Sun.COMrun the command `password' in your configuration file (*note
1509*8044SWilliam.Kucharski@Sun.COMpassword::), like this:
1510*8044SWilliam.Kucharski@Sun.COM
1511*8044SWilliam.Kucharski@Sun.COM     password --md5 PASSWORD
1512*8044SWilliam.Kucharski@Sun.COM
1513*8044SWilliam.Kucharski@Sun.COM   If this is specified, GRUB disallows any interactive control, until
1514*8044SWilliam.Kucharski@Sun.COMyou press the key <p> and enter a correct password.  The option `--md5'
1515*8044SWilliam.Kucharski@Sun.COMtells GRUB that `PASSWORD' is in MD5 format.  If it is omitted, GRUB
1516*8044SWilliam.Kucharski@Sun.COMassumes the `PASSWORD' is in clear text.
1517*8044SWilliam.Kucharski@Sun.COM
1518*8044SWilliam.Kucharski@Sun.COM   You can encrypt your password with the command `md5crypt' (*note
1519*8044SWilliam.Kucharski@Sun.COMmd5crypt::). For example, run the grub shell (*note Invoking the grub
1520*8044SWilliam.Kucharski@Sun.COMshell::), and enter your password:
1521*8044SWilliam.Kucharski@Sun.COM
1522*8044SWilliam.Kucharski@Sun.COM     grub> md5crypt
1523*8044SWilliam.Kucharski@Sun.COM     Password: **********
1524*8044SWilliam.Kucharski@Sun.COM     Encrypted: $1$U$JK7xFegdxWH6VuppCUSIb.
1525*8044SWilliam.Kucharski@Sun.COM
1526*8044SWilliam.Kucharski@Sun.COM   Then, cut and paste the encrypted password to your configuration
1527*8044SWilliam.Kucharski@Sun.COMfile.
1528*8044SWilliam.Kucharski@Sun.COM
1529*8044SWilliam.Kucharski@Sun.COM   Also, you can specify an optional argument to `password'. See this
1530*8044SWilliam.Kucharski@Sun.COMexample:
1531*8044SWilliam.Kucharski@Sun.COM
1532*8044SWilliam.Kucharski@Sun.COM     password PASSWORD /boot/grub/menu-admin.lst
1533*8044SWilliam.Kucharski@Sun.COM
1534*8044SWilliam.Kucharski@Sun.COM   In this case, GRUB will load `/boot/grub/menu-admin.lst' as a
1535*8044SWilliam.Kucharski@Sun.COMconfiguration file when you enter the valid password.
1536*8044SWilliam.Kucharski@Sun.COM
1537*8044SWilliam.Kucharski@Sun.COM   Another thing which may be dangerous is that any user can choose any
1538*8044SWilliam.Kucharski@Sun.COMmenu entry. Usually, this wouldn't be problematic, but you might want to
1539*8044SWilliam.Kucharski@Sun.COMpermit only administrators to run some of your menu entries, such as an
1540*8044SWilliam.Kucharski@Sun.COMentry for booting an insecure OS like DOS.
1541*8044SWilliam.Kucharski@Sun.COM
1542*8044SWilliam.Kucharski@Sun.COM   GRUB provides the command `lock' (*note lock::). This command always
1543*8044SWilliam.Kucharski@Sun.COMfails until you enter the valid password, so you can use it, like this:
1544*8044SWilliam.Kucharski@Sun.COM
1545*8044SWilliam.Kucharski@Sun.COM     title Boot DOS
1546*8044SWilliam.Kucharski@Sun.COM     lock
1547*8044SWilliam.Kucharski@Sun.COM     rootnoverify (hd0,1)
1548*8044SWilliam.Kucharski@Sun.COM     makeactive
1549*8044SWilliam.Kucharski@Sun.COM     chainload +1
1550*8044SWilliam.Kucharski@Sun.COM
1551*8044SWilliam.Kucharski@Sun.COM   You should insert `lock' right after `title', because any user can
1552*8044SWilliam.Kucharski@Sun.COMexecute commands in an entry until GRUB encounters `lock'.
1553*8044SWilliam.Kucharski@Sun.COM
1554*8044SWilliam.Kucharski@Sun.COM   You can also use the command `password' instead of `lock'. In this
1555*8044SWilliam.Kucharski@Sun.COMcase the boot process will ask for the password and stop if it was
1556*8044SWilliam.Kucharski@Sun.COMentered incorrectly.  Since the `password' takes its own PASSWORD
1557*8044SWilliam.Kucharski@Sun.COMargument this is useful if you want different passwords for different
1558*8044SWilliam.Kucharski@Sun.COMentries.
1559*8044SWilliam.Kucharski@Sun.COM
1560*8044SWilliam.Kucharski@Sun.COM
1561*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Images,  Next: Filesystem,  Prev: Security,  Up: Top
1562*8044SWilliam.Kucharski@Sun.COM
1563*8044SWilliam.Kucharski@Sun.COM10 GRUB image files
1564*8044SWilliam.Kucharski@Sun.COM*******************
1565*8044SWilliam.Kucharski@Sun.COM
1566*8044SWilliam.Kucharski@Sun.COMGRUB consists of several images: two essential stages, optional stages
1567*8044SWilliam.Kucharski@Sun.COMcalled "Stage 1.5", one image for bootable CD-ROM, and two network boot
1568*8044SWilliam.Kucharski@Sun.COMimages. Here is a short overview of them. *Note Internals::, for more
1569*8044SWilliam.Kucharski@Sun.COMdetails.
1570*8044SWilliam.Kucharski@Sun.COM
1571*8044SWilliam.Kucharski@Sun.COM`stage1'
1572*8044SWilliam.Kucharski@Sun.COM     This is an essential image used for booting up GRUB. Usually, this
1573*8044SWilliam.Kucharski@Sun.COM     is embedded in an MBR or the boot sector of a partition. Because a
1574*8044SWilliam.Kucharski@Sun.COM     PC boot sector is 512 bytes, the size of this image is exactly 512
1575*8044SWilliam.Kucharski@Sun.COM     bytes.
1576*8044SWilliam.Kucharski@Sun.COM
1577*8044SWilliam.Kucharski@Sun.COM     All `stage1' must do is to load Stage 2 or Stage 1.5 from a local
1578*8044SWilliam.Kucharski@Sun.COM     disk. Because of the size restriction, `stage1' encodes the
1579*8044SWilliam.Kucharski@Sun.COM     location of Stage 2 (or Stage 1.5) in a block list format, so it
1580*8044SWilliam.Kucharski@Sun.COM     never understand any filesystem structure.
1581*8044SWilliam.Kucharski@Sun.COM
1582*8044SWilliam.Kucharski@Sun.COM`stage2'
1583*8044SWilliam.Kucharski@Sun.COM     This is the core image of GRUB. It does everything but booting up
1584*8044SWilliam.Kucharski@Sun.COM     itself. Usually, this is put in a filesystem, but that is not
1585*8044SWilliam.Kucharski@Sun.COM     required.
1586*8044SWilliam.Kucharski@Sun.COM
1587*8044SWilliam.Kucharski@Sun.COM`e2fs_stage1_5'
1588*8044SWilliam.Kucharski@Sun.COM`fat_stage1_5'
1589*8044SWilliam.Kucharski@Sun.COM`ffs_stage1_5'
1590*8044SWilliam.Kucharski@Sun.COM`jfs_stage1_5'
1591*8044SWilliam.Kucharski@Sun.COM`minix_stage1_5'
1592*8044SWilliam.Kucharski@Sun.COM`reiserfs_stage1_5'
1593*8044SWilliam.Kucharski@Sun.COM`vstafs_stage1_5'
1594*8044SWilliam.Kucharski@Sun.COM`xfs_stage1_5'
1595*8044SWilliam.Kucharski@Sun.COM     These are called "Stage 1.5", because they serve as a bridge
1596*8044SWilliam.Kucharski@Sun.COM     between `stage1' and `stage2', that is to say, Stage 1.5 is loaded
1597*8044SWilliam.Kucharski@Sun.COM     by Stage 1 and Stage 1.5 loads Stage 2. The difference between
1598*8044SWilliam.Kucharski@Sun.COM     `stage1' and `*_stage1_5' is that the former doesn't understand
1599*8044SWilliam.Kucharski@Sun.COM     any filesystem while the latter understands one filesystem (e.g.
1600*8044SWilliam.Kucharski@Sun.COM     `e2fs_stage1_5' understands ext2fs). So you can move the Stage 2
1601*8044SWilliam.Kucharski@Sun.COM     image to another location safely, even after GRUB has been
1602*8044SWilliam.Kucharski@Sun.COM     installed.
1603*8044SWilliam.Kucharski@Sun.COM
1604*8044SWilliam.Kucharski@Sun.COM     While Stage 2 cannot generally be embedded in a fixed area as the
1605*8044SWilliam.Kucharski@Sun.COM     size is so large, Stage 1.5 can be installed into the area right
1606*8044SWilliam.Kucharski@Sun.COM     after an MBR, or the boot loader area of a ReiserFS or a FFS.
1607*8044SWilliam.Kucharski@Sun.COM
1608*8044SWilliam.Kucharski@Sun.COM`stage2_eltorito'
1609*8044SWilliam.Kucharski@Sun.COM     This is a boot image for CD-ROMs using the "no emulation mode" in
1610*8044SWilliam.Kucharski@Sun.COM     El Torito specification. This is identical to Stage 2, except that
1611*8044SWilliam.Kucharski@Sun.COM     this boots up without Stage 1 and sets up a special drive `(cd)'.
1612*8044SWilliam.Kucharski@Sun.COM
1613*8044SWilliam.Kucharski@Sun.COM`nbgrub'
1614*8044SWilliam.Kucharski@Sun.COM     This is a network boot image for the Network Image Proposal used
1615*8044SWilliam.Kucharski@Sun.COM     by some network boot loaders, such as Etherboot. This is mostly
1616*8044SWilliam.Kucharski@Sun.COM     the same as Stage 2, but it also sets up a network and loads a
1617*8044SWilliam.Kucharski@Sun.COM     configuration file from the network.
1618*8044SWilliam.Kucharski@Sun.COM
1619*8044SWilliam.Kucharski@Sun.COM`pxegrub'
1620*8044SWilliam.Kucharski@Sun.COM     This is another network boot image for the Preboot Execution
1621*8044SWilliam.Kucharski@Sun.COM     Environment used by several Netboot ROMs. This is identical to
1622*8044SWilliam.Kucharski@Sun.COM     `nbgrub', except for the format.
1623*8044SWilliam.Kucharski@Sun.COM
1624*8044SWilliam.Kucharski@Sun.COM
1625*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Filesystem,  Next: Interface,  Prev: Images,  Up: Top
1626*8044SWilliam.Kucharski@Sun.COM
1627*8044SWilliam.Kucharski@Sun.COM11 Filesystem syntax and semantics
1628*8044SWilliam.Kucharski@Sun.COM**********************************
1629*8044SWilliam.Kucharski@Sun.COM
1630*8044SWilliam.Kucharski@Sun.COMGRUB uses a special syntax for specifying disk drives which can be
1631*8044SWilliam.Kucharski@Sun.COMaccessed by BIOS. Because of BIOS limitations, GRUB cannot distinguish
1632*8044SWilliam.Kucharski@Sun.COMbetween IDE, ESDI, SCSI, or others. You must know yourself which BIOS
1633*8044SWilliam.Kucharski@Sun.COMdevice is equivalent to which OS device. Normally, that will be clear if
1634*8044SWilliam.Kucharski@Sun.COMyou see the files in a device or use the command `find' (*note find::).
1635*8044SWilliam.Kucharski@Sun.COM
1636*8044SWilliam.Kucharski@Sun.COM* Menu:
1637*8044SWilliam.Kucharski@Sun.COM
1638*8044SWilliam.Kucharski@Sun.COM* Device syntax::               How to specify devices
1639*8044SWilliam.Kucharski@Sun.COM* File name syntax::            How to specify files
1640*8044SWilliam.Kucharski@Sun.COM* Block list syntax::           How to specify block lists
1641*8044SWilliam.Kucharski@Sun.COM
1642*8044SWilliam.Kucharski@Sun.COM
1643*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Device syntax,  Next: File name syntax,  Up: Filesystem
1644*8044SWilliam.Kucharski@Sun.COM
1645*8044SWilliam.Kucharski@Sun.COM11.1 How to specify devices
1646*8044SWilliam.Kucharski@Sun.COM===========================
1647*8044SWilliam.Kucharski@Sun.COM
1648*8044SWilliam.Kucharski@Sun.COMThe device syntax is like this:
1649*8044SWilliam.Kucharski@Sun.COM
1650*8044SWilliam.Kucharski@Sun.COM     `(DEVICE[,PART-NUM][,BSD-SUBPART-LETTER])'
1651*8044SWilliam.Kucharski@Sun.COM
1652*8044SWilliam.Kucharski@Sun.COM   `[]' means the parameter is optional. DEVICE should be either `fd'
1653*8044SWilliam.Kucharski@Sun.COMor `hd' followed by a digit, like `fd0'.  But you can also set DEVICE
1654*8044SWilliam.Kucharski@Sun.COMto a hexadecimal or a decimal number which is a BIOS drive number, so
1655*8044SWilliam.Kucharski@Sun.COMthe following are equivalent:
1656*8044SWilliam.Kucharski@Sun.COM
1657*8044SWilliam.Kucharski@Sun.COM     (hd0)
1658*8044SWilliam.Kucharski@Sun.COM     (0x80)
1659*8044SWilliam.Kucharski@Sun.COM     (128)
1660*8044SWilliam.Kucharski@Sun.COM
1661*8044SWilliam.Kucharski@Sun.COM   PART-NUM represents the partition number of DEVICE, starting from
1662*8044SWilliam.Kucharski@Sun.COMzero for primary partitions and from four for extended partitions, and
1663*8044SWilliam.Kucharski@Sun.COMBSD-SUBPART-LETTER represents the BSD disklabel subpartition, such as
1664*8044SWilliam.Kucharski@Sun.COM`a' or `e'.
1665*8044SWilliam.Kucharski@Sun.COM
1666*8044SWilliam.Kucharski@Sun.COM   A shortcut for specifying BSD subpartitions is
1667*8044SWilliam.Kucharski@Sun.COM`(DEVICE,BSD-SUBPART-LETTER)', in this case, GRUB searches for the
1668*8044SWilliam.Kucharski@Sun.COMfirst PC partition containing a BSD disklabel, then finds the
1669*8044SWilliam.Kucharski@Sun.COMsubpartition BSD-SUBPART-LETTER. Here is an example:
1670*8044SWilliam.Kucharski@Sun.COM
1671*8044SWilliam.Kucharski@Sun.COM     (hd0,a)
1672*8044SWilliam.Kucharski@Sun.COM
1673*8044SWilliam.Kucharski@Sun.COM   The syntax `(hd0)' represents using the entire disk (or the MBR when
1674*8044SWilliam.Kucharski@Sun.COMinstalling GRUB), while the syntax `(hd0,0)' represents using the first
1675*8044SWilliam.Kucharski@Sun.COMpartition of the disk (or the boot sector of the partition when
1676*8044SWilliam.Kucharski@Sun.COMinstalling GRUB).
1677*8044SWilliam.Kucharski@Sun.COM
1678*8044SWilliam.Kucharski@Sun.COM   If you enabled the network support, the special drive, `(nd)', is
1679*8044SWilliam.Kucharski@Sun.COMalso available. Before using the network drive, you must initialize the
1680*8044SWilliam.Kucharski@Sun.COMnetwork. *Note Network::, for more information.
1681*8044SWilliam.Kucharski@Sun.COM
1682*8044SWilliam.Kucharski@Sun.COM   If you boot GRUB from a CD-ROM, `(cd)' is available. *Note Making a
1683*8044SWilliam.Kucharski@Sun.COMGRUB bootable CD-ROM::, for details.
1684*8044SWilliam.Kucharski@Sun.COM
1685*8044SWilliam.Kucharski@Sun.COM
1686*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: File name syntax,  Next: Block list syntax,  Prev: Device syntax,  Up: Filesystem
1687*8044SWilliam.Kucharski@Sun.COM
1688*8044SWilliam.Kucharski@Sun.COM11.2 How to specify files
1689*8044SWilliam.Kucharski@Sun.COM=========================
1690*8044SWilliam.Kucharski@Sun.COM
1691*8044SWilliam.Kucharski@Sun.COMThere are two ways to specify files, by "absolute file name" and by
1692*8044SWilliam.Kucharski@Sun.COM"block list".
1693*8044SWilliam.Kucharski@Sun.COM
1694*8044SWilliam.Kucharski@Sun.COM   An absolute file name resembles a Unix absolute file name, using `/'
1695*8044SWilliam.Kucharski@Sun.COMfor the directory separator (not `\' as in DOS). One example is
1696*8044SWilliam.Kucharski@Sun.COM`(hd0,0)/boot/grub/menu.lst'. This means the file `/boot/grub/menu.lst'
1697*8044SWilliam.Kucharski@Sun.COMin the first partition of the first hard disk. If you omit the device
1698*8044SWilliam.Kucharski@Sun.COMname in an absolute file name, GRUB uses GRUB's "root device"
1699*8044SWilliam.Kucharski@Sun.COMimplicitly. So if you set the root device to, say, `(hd1,0)' by the
1700*8044SWilliam.Kucharski@Sun.COMcommand `root' (*note root::), then `/boot/kernel' is the same as
1701*8044SWilliam.Kucharski@Sun.COM`(hd1,0)/boot/kernel'.
1702*8044SWilliam.Kucharski@Sun.COM
1703*8044SWilliam.Kucharski@Sun.COM
1704*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Block list syntax,  Prev: File name syntax,  Up: Filesystem
1705*8044SWilliam.Kucharski@Sun.COM
1706*8044SWilliam.Kucharski@Sun.COM11.3 How to specify block lists
1707*8044SWilliam.Kucharski@Sun.COM===============================
1708*8044SWilliam.Kucharski@Sun.COM
1709*8044SWilliam.Kucharski@Sun.COMA block list is used for specifying a file that doesn't appear in the
1710*8044SWilliam.Kucharski@Sun.COMfilesystem, like a chainloader. The syntax is
1711*8044SWilliam.Kucharski@Sun.COM`[OFFSET]+LENGTH[,[OFFSET]+LENGTH]...'.  Here is an example:
1712*8044SWilliam.Kucharski@Sun.COM
1713*8044SWilliam.Kucharski@Sun.COM     `0+100,200+1,300+300'
1714*8044SWilliam.Kucharski@Sun.COM
1715*8044SWilliam.Kucharski@Sun.COM   This represents that GRUB should read blocks 0 through 99, block 200,
1716*8044SWilliam.Kucharski@Sun.COMand blocks 300 through 599. If you omit an offset, then GRUB assumes
1717*8044SWilliam.Kucharski@Sun.COMthe offset is zero.
1718*8044SWilliam.Kucharski@Sun.COM
1719*8044SWilliam.Kucharski@Sun.COM   Like the file name syntax (*note File name syntax::), if a blocklist
1720*8044SWilliam.Kucharski@Sun.COMdoes not contain a device name, then GRUB uses GRUB's "root device". So
1721*8044SWilliam.Kucharski@Sun.COM`(hd0,1)+1' is the same as `+1' when the root device is `(hd0,1)'.
1722*8044SWilliam.Kucharski@Sun.COM
1723*8044SWilliam.Kucharski@Sun.COM
1724*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Interface,  Next: Commands,  Prev: Filesystem,  Up: Top
1725*8044SWilliam.Kucharski@Sun.COM
1726*8044SWilliam.Kucharski@Sun.COM12 GRUB's user interface
1727*8044SWilliam.Kucharski@Sun.COM************************
1728*8044SWilliam.Kucharski@Sun.COM
1729*8044SWilliam.Kucharski@Sun.COMGRUB has both a simple menu interface for choosing preset entries from a
1730*8044SWilliam.Kucharski@Sun.COMconfiguration file, and a highly flexible command-line for performing
1731*8044SWilliam.Kucharski@Sun.COMany desired combination of boot commands.
1732*8044SWilliam.Kucharski@Sun.COM
1733*8044SWilliam.Kucharski@Sun.COM   GRUB looks for its configuration file as soon as it is loaded. If one
1734*8044SWilliam.Kucharski@Sun.COMis found, then the full menu interface is activated using whatever
1735*8044SWilliam.Kucharski@Sun.COMentries were found in the file. If you choose the "command-line" menu
1736*8044SWilliam.Kucharski@Sun.COMoption, or if the configuration file was not found, then GRUB drops to
1737*8044SWilliam.Kucharski@Sun.COMthe command-line interface.
1738*8044SWilliam.Kucharski@Sun.COM
1739*8044SWilliam.Kucharski@Sun.COM* Menu:
1740*8044SWilliam.Kucharski@Sun.COM
1741*8044SWilliam.Kucharski@Sun.COM* Command-line interface::      The flexible command-line interface
1742*8044SWilliam.Kucharski@Sun.COM* Menu interface::              The simple menu interface
1743*8044SWilliam.Kucharski@Sun.COM* Menu entry editor::           Editing a menu entry
1744*8044SWilliam.Kucharski@Sun.COM* Hidden menu interface::       The hidden menu interface
1745*8044SWilliam.Kucharski@Sun.COM
1746*8044SWilliam.Kucharski@Sun.COM
1747*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Command-line interface,  Next: Menu interface,  Up: Interface
1748*8044SWilliam.Kucharski@Sun.COM
1749*8044SWilliam.Kucharski@Sun.COM12.1 The flexible command-line interface
1750*8044SWilliam.Kucharski@Sun.COM========================================
1751*8044SWilliam.Kucharski@Sun.COM
1752*8044SWilliam.Kucharski@Sun.COMThe command-line interface provides a prompt and after it an editable
1753*8044SWilliam.Kucharski@Sun.COMtext area much like a command-line in Unix or DOS. Each command is
1754*8044SWilliam.Kucharski@Sun.COMimmediately executed after it is entered(1) (*note Command-line
1755*8044SWilliam.Kucharski@Sun.COMinterface-Footnote-1::). The commands (*note Command-line and menu
1756*8044SWilliam.Kucharski@Sun.COMentry commands::) are a subset of those available in the configuration
1757*8044SWilliam.Kucharski@Sun.COMfile, used with exactly the same syntax.
1758*8044SWilliam.Kucharski@Sun.COM
1759*8044SWilliam.Kucharski@Sun.COM   Cursor movement and editing of the text on the line can be done via a
1760*8044SWilliam.Kucharski@Sun.COMsubset of the functions available in the Bash shell:
1761*8044SWilliam.Kucharski@Sun.COM
1762*8044SWilliam.Kucharski@Sun.COM<C-f>
1763*8044SWilliam.Kucharski@Sun.COM<PC right key>
1764*8044SWilliam.Kucharski@Sun.COM     Move forward one character.
1765*8044SWilliam.Kucharski@Sun.COM
1766*8044SWilliam.Kucharski@Sun.COM<C-b>
1767*8044SWilliam.Kucharski@Sun.COM<PC left key>
1768*8044SWilliam.Kucharski@Sun.COM     Move back one character.
1769*8044SWilliam.Kucharski@Sun.COM
1770*8044SWilliam.Kucharski@Sun.COM<C-a>
1771*8044SWilliam.Kucharski@Sun.COM<HOME>
1772*8044SWilliam.Kucharski@Sun.COM     Move to the start of the line.
1773*8044SWilliam.Kucharski@Sun.COM
1774*8044SWilliam.Kucharski@Sun.COM<C-e>
1775*8044SWilliam.Kucharski@Sun.COM<END>
1776*8044SWilliam.Kucharski@Sun.COM     Move the the end of the line.
1777*8044SWilliam.Kucharski@Sun.COM
1778*8044SWilliam.Kucharski@Sun.COM<C-d>
1779*8044SWilliam.Kucharski@Sun.COM<DEL>
1780*8044SWilliam.Kucharski@Sun.COM     Delete the character underneath the cursor.
1781*8044SWilliam.Kucharski@Sun.COM
1782*8044SWilliam.Kucharski@Sun.COM<C-h>
1783*8044SWilliam.Kucharski@Sun.COM<BS>
1784*8044SWilliam.Kucharski@Sun.COM     Delete the character to the left of the cursor.
1785*8044SWilliam.Kucharski@Sun.COM
1786*8044SWilliam.Kucharski@Sun.COM<C-k>
1787*8044SWilliam.Kucharski@Sun.COM     Kill the text from the current cursor position to the end of the
1788*8044SWilliam.Kucharski@Sun.COM     line.
1789*8044SWilliam.Kucharski@Sun.COM
1790*8044SWilliam.Kucharski@Sun.COM<C-u>
1791*8044SWilliam.Kucharski@Sun.COM     Kill backward from the cursor to the beginning of the line.
1792*8044SWilliam.Kucharski@Sun.COM
1793*8044SWilliam.Kucharski@Sun.COM<C-y>
1794*8044SWilliam.Kucharski@Sun.COM     Yank the killed text back into the buffer at the cursor.
1795*8044SWilliam.Kucharski@Sun.COM
1796*8044SWilliam.Kucharski@Sun.COM<C-p>
1797*8044SWilliam.Kucharski@Sun.COM<PC up key>
1798*8044SWilliam.Kucharski@Sun.COM     Move up through the history list.
1799*8044SWilliam.Kucharski@Sun.COM
1800*8044SWilliam.Kucharski@Sun.COM<C-n>
1801*8044SWilliam.Kucharski@Sun.COM<PC down key>
1802*8044SWilliam.Kucharski@Sun.COM     Move down through the history list.
1803*8044SWilliam.Kucharski@Sun.COM
1804*8044SWilliam.Kucharski@Sun.COM   When typing commands interactively, if the cursor is within or before
1805*8044SWilliam.Kucharski@Sun.COMthe first word in the command-line, pressing the <TAB> key (or <C-i>)
1806*8044SWilliam.Kucharski@Sun.COMwill display a listing of the available commands, and if the cursor is
1807*8044SWilliam.Kucharski@Sun.COMafter the first word, the `<TAB>' will provide a completion listing of
1808*8044SWilliam.Kucharski@Sun.COMdisks, partitions, and file names depending on the context. Note that
1809*8044SWilliam.Kucharski@Sun.COMto obtain a list of drives, one must open a parenthesis, as `root ('.
1810*8044SWilliam.Kucharski@Sun.COM
1811*8044SWilliam.Kucharski@Sun.COM   Note that you cannot use the completion functionality in the TFTP
1812*8044SWilliam.Kucharski@Sun.COMfilesystem. This is because TFTP doesn't support file name listing for
1813*8044SWilliam.Kucharski@Sun.COMthe security.
1814*8044SWilliam.Kucharski@Sun.COM
1815*8044SWilliam.Kucharski@Sun.COM
1816*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Command-line interface-Footnotes,  Up: Command-line interface
1817*8044SWilliam.Kucharski@Sun.COM
1818*8044SWilliam.Kucharski@Sun.COM   (1) However, this behavior will be changed in the future version, in
1819*8044SWilliam.Kucharski@Sun.COMa user-invisible way.
1820*8044SWilliam.Kucharski@Sun.COM
1821*8044SWilliam.Kucharski@Sun.COM
1822*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Menu interface,  Next: Menu entry editor,  Prev: Command-line interface,  Up: Interface
1823*8044SWilliam.Kucharski@Sun.COM
1824*8044SWilliam.Kucharski@Sun.COM12.2 The simple menu interface
1825*8044SWilliam.Kucharski@Sun.COM==============================
1826*8044SWilliam.Kucharski@Sun.COM
1827*8044SWilliam.Kucharski@Sun.COMThe menu interface is quite easy to use. Its commands are both
1828*8044SWilliam.Kucharski@Sun.COMreasonably intuitive and described on screen.
1829*8044SWilliam.Kucharski@Sun.COM
1830*8044SWilliam.Kucharski@Sun.COM   Basically, the menu interface provides a list of "boot entries" to
1831*8044SWilliam.Kucharski@Sun.COMthe user to choose from. Use the arrow keys to select the entry of
1832*8044SWilliam.Kucharski@Sun.COMchoice, then press <RET> to run it.  An optional timeout is available
1833*8044SWilliam.Kucharski@Sun.COMto boot the default entry (the first one if not set), which is aborted
1834*8044SWilliam.Kucharski@Sun.COMby pressing any key.
1835*8044SWilliam.Kucharski@Sun.COM
1836*8044SWilliam.Kucharski@Sun.COM   Commands are available to enter a bare command-line by pressing <c>
1837*8044SWilliam.Kucharski@Sun.COM(which operates exactly like the non-config-file version of GRUB, but
1838*8044SWilliam.Kucharski@Sun.COMallows one to return to the menu if desired by pressing <ESC>) or to
1839*8044SWilliam.Kucharski@Sun.COMedit any of the "boot entries" by pressing <e>.
1840*8044SWilliam.Kucharski@Sun.COM
1841*8044SWilliam.Kucharski@Sun.COM   If you protect the menu interface with a password (*note Security::),
1842*8044SWilliam.Kucharski@Sun.COMall you can do is choose an entry by pressing <RET>, or press <p> to
1843*8044SWilliam.Kucharski@Sun.COMenter the password.
1844*8044SWilliam.Kucharski@Sun.COM
1845*8044SWilliam.Kucharski@Sun.COM
1846*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Menu entry editor,  Next: Hidden menu interface,  Prev: Menu interface,  Up: Interface
1847*8044SWilliam.Kucharski@Sun.COM
1848*8044SWilliam.Kucharski@Sun.COM12.3 Editing a menu entry
1849*8044SWilliam.Kucharski@Sun.COM=========================
1850*8044SWilliam.Kucharski@Sun.COM
1851*8044SWilliam.Kucharski@Sun.COMThe menu entry editor looks much like the main menu interface, but the
1852*8044SWilliam.Kucharski@Sun.COMlines in the menu are individual commands in the selected entry instead
1853*8044SWilliam.Kucharski@Sun.COMof entry names.
1854*8044SWilliam.Kucharski@Sun.COM
1855*8044SWilliam.Kucharski@Sun.COM   If an <ESC> is pressed in the editor, it aborts all the changes made
1856*8044SWilliam.Kucharski@Sun.COMto the configuration entry and returns to the main menu interface.
1857*8044SWilliam.Kucharski@Sun.COM
1858*8044SWilliam.Kucharski@Sun.COM   When a particular line is selected, the editor places the user in a
1859*8044SWilliam.Kucharski@Sun.COMspecial version of the GRUB command-line to edit that line.  When the
1860*8044SWilliam.Kucharski@Sun.COMuser hits <RET>, GRUB replaces the line in question in the boot entry
1861*8044SWilliam.Kucharski@Sun.COMwith the changes (unless it was aborted via <ESC>, in which case the
1862*8044SWilliam.Kucharski@Sun.COMchanges are thrown away).
1863*8044SWilliam.Kucharski@Sun.COM
1864*8044SWilliam.Kucharski@Sun.COM   If you want to add a new line to the menu entry, press <o> if adding
1865*8044SWilliam.Kucharski@Sun.COMa line after the current line or press <O> if before the current line.
1866*8044SWilliam.Kucharski@Sun.COM
1867*8044SWilliam.Kucharski@Sun.COM   To delete a line, hit the key <d>. Although GRUB unfortunately does
1868*8044SWilliam.Kucharski@Sun.COMnot support "undo", you can do almost the same thing by just returning
1869*8044SWilliam.Kucharski@Sun.COMto the main menu.
1870*8044SWilliam.Kucharski@Sun.COM
1871*8044SWilliam.Kucharski@Sun.COM
1872*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Hidden menu interface,  Prev: Menu entry editor,  Up: Interface
1873*8044SWilliam.Kucharski@Sun.COM
1874*8044SWilliam.Kucharski@Sun.COM12.4 The hidden menu interface
1875*8044SWilliam.Kucharski@Sun.COM==============================
1876*8044SWilliam.Kucharski@Sun.COM
1877*8044SWilliam.Kucharski@Sun.COMWhen your terminal is dumb or you request GRUB to hide the menu
1878*8044SWilliam.Kucharski@Sun.COMinterface explicitly with the command `hiddenmenu' (*note
1879*8044SWilliam.Kucharski@Sun.COMhiddenmenu::), GRUB doesn't show the menu interface (*note Menu
1880*8044SWilliam.Kucharski@Sun.COMinterface::) and automatically boots the default entry, unless
1881*8044SWilliam.Kucharski@Sun.COMinterrupted by pressing <ESC>.
1882*8044SWilliam.Kucharski@Sun.COM
1883*8044SWilliam.Kucharski@Sun.COM   When you interrupt the timeout and your terminal is dumb, GRUB falls
1884*8044SWilliam.Kucharski@Sun.COMback to the command-line interface (*note Command-line interface::).
1885*8044SWilliam.Kucharski@Sun.COM
1886*8044SWilliam.Kucharski@Sun.COM
1887*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Commands,  Next: Troubleshooting,  Prev: Interface,  Up: Top
1888*8044SWilliam.Kucharski@Sun.COM
1889*8044SWilliam.Kucharski@Sun.COM13 The list of available commands
1890*8044SWilliam.Kucharski@Sun.COM*********************************
1891*8044SWilliam.Kucharski@Sun.COM
1892*8044SWilliam.Kucharski@Sun.COMIn this chapter, we list all commands that are available in GRUB.
1893*8044SWilliam.Kucharski@Sun.COM
1894*8044SWilliam.Kucharski@Sun.COM   Commands belong to different groups. A few can only be used in the
1895*8044SWilliam.Kucharski@Sun.COMglobal section of the configuration file (or "menu"); most of them can
1896*8044SWilliam.Kucharski@Sun.COMbe entered on the command-line and can be used either anywhere in the
1897*8044SWilliam.Kucharski@Sun.COMmenu or specifically in the menu entries.
1898*8044SWilliam.Kucharski@Sun.COM
1899*8044SWilliam.Kucharski@Sun.COM* Menu:
1900*8044SWilliam.Kucharski@Sun.COM
1901*8044SWilliam.Kucharski@Sun.COM* Menu-specific commands::
1902*8044SWilliam.Kucharski@Sun.COM* General commands::
1903*8044SWilliam.Kucharski@Sun.COM* Command-line and menu entry commands::
1904*8044SWilliam.Kucharski@Sun.COM
1905*8044SWilliam.Kucharski@Sun.COM
1906*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Menu-specific commands,  Next: General commands,  Up: Commands
1907*8044SWilliam.Kucharski@Sun.COM
1908*8044SWilliam.Kucharski@Sun.COM13.1 The list of commands for the menu only
1909*8044SWilliam.Kucharski@Sun.COM===========================================
1910*8044SWilliam.Kucharski@Sun.COM
1911*8044SWilliam.Kucharski@Sun.COMThe semantics used in parsing the configuration file are the following:
1912*8044SWilliam.Kucharski@Sun.COM
1913*8044SWilliam.Kucharski@Sun.COM   * The menu-specific commands have to be used before any others.
1914*8044SWilliam.Kucharski@Sun.COM
1915*8044SWilliam.Kucharski@Sun.COM   * The files _must_ be in plain-text format.
1916*8044SWilliam.Kucharski@Sun.COM
1917*8044SWilliam.Kucharski@Sun.COM   * `#' at the beginning of a line in a configuration file means it is
1918*8044SWilliam.Kucharski@Sun.COM     only a comment.
1919*8044SWilliam.Kucharski@Sun.COM
1920*8044SWilliam.Kucharski@Sun.COM   * Options are separated by spaces.
1921*8044SWilliam.Kucharski@Sun.COM
1922*8044SWilliam.Kucharski@Sun.COM   * All numbers can be either decimal or hexadecimal. A hexadecimal
1923*8044SWilliam.Kucharski@Sun.COM     number must be preceded by `0x', and is case-insensitive.
1924*8044SWilliam.Kucharski@Sun.COM
1925*8044SWilliam.Kucharski@Sun.COM   * Extra options or text at the end of the line are ignored unless
1926*8044SWilliam.Kucharski@Sun.COM     otherwise specified.
1927*8044SWilliam.Kucharski@Sun.COM
1928*8044SWilliam.Kucharski@Sun.COM   * Unrecognized commands are added to the current entry, except
1929*8044SWilliam.Kucharski@Sun.COM     before entries start, where they are ignored.
1930*8044SWilliam.Kucharski@Sun.COM
1931*8044SWilliam.Kucharski@Sun.COM   These commands can only be used in the menu:
1932*8044SWilliam.Kucharski@Sun.COM
1933*8044SWilliam.Kucharski@Sun.COM* Menu:
1934*8044SWilliam.Kucharski@Sun.COM
1935*8044SWilliam.Kucharski@Sun.COM* default::                     Set the default entry
1936*8044SWilliam.Kucharski@Sun.COM* fallback::                    Set the fallback entry
1937*8044SWilliam.Kucharski@Sun.COM* hiddenmenu::                  Hide the menu interface
1938*8044SWilliam.Kucharski@Sun.COM* timeout::                     Set the timeout
1939*8044SWilliam.Kucharski@Sun.COM* title::                       Start a menu entry
1940*8044SWilliam.Kucharski@Sun.COM
1941*8044SWilliam.Kucharski@Sun.COM
1942*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: default,  Next: fallback,  Up: Menu-specific commands
1943*8044SWilliam.Kucharski@Sun.COM
1944*8044SWilliam.Kucharski@Sun.COM13.1.1 default
1945*8044SWilliam.Kucharski@Sun.COM--------------
1946*8044SWilliam.Kucharski@Sun.COM
1947*8044SWilliam.Kucharski@Sun.COM -- Command: default num
1948*8044SWilliam.Kucharski@Sun.COM     Set the default entry to the entry number NUM. Numbering starts
1949*8044SWilliam.Kucharski@Sun.COM     from 0, and the entry number 0 is the default if the command is not
1950*8044SWilliam.Kucharski@Sun.COM     used.
1951*8044SWilliam.Kucharski@Sun.COM
1952*8044SWilliam.Kucharski@Sun.COM     You can specify `saved' instead of a number. In this case, the
1953*8044SWilliam.Kucharski@Sun.COM     default entry is the entry saved with the command `savedefault'.
1954*8044SWilliam.Kucharski@Sun.COM     *Note savedefault::, for more information.
1955*8044SWilliam.Kucharski@Sun.COM
1956*8044SWilliam.Kucharski@Sun.COM
1957*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: fallback,  Next: hiddenmenu,  Prev: default,  Up: Menu-specific commands
1958*8044SWilliam.Kucharski@Sun.COM
1959*8044SWilliam.Kucharski@Sun.COM13.1.2 fallback
1960*8044SWilliam.Kucharski@Sun.COM---------------
1961*8044SWilliam.Kucharski@Sun.COM
1962*8044SWilliam.Kucharski@Sun.COM -- Command: fallback num...
1963*8044SWilliam.Kucharski@Sun.COM     Go into unattended boot mode: if the default boot entry has any
1964*8044SWilliam.Kucharski@Sun.COM     errors, instead of waiting for the user to do something,
1965*8044SWilliam.Kucharski@Sun.COM     immediately start over using the NUM entry (same numbering as the
1966*8044SWilliam.Kucharski@Sun.COM     `default' command (*note default::)). This obviously won't help if
1967*8044SWilliam.Kucharski@Sun.COM     the machine was rebooted by a kernel that GRUB loaded. You can
1968*8044SWilliam.Kucharski@Sun.COM     specify multiple fallback entry numbers.
1969*8044SWilliam.Kucharski@Sun.COM
1970*8044SWilliam.Kucharski@Sun.COM
1971*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: hiddenmenu,  Next: timeout,  Prev: fallback,  Up: Menu-specific commands
1972*8044SWilliam.Kucharski@Sun.COM
1973*8044SWilliam.Kucharski@Sun.COM13.1.3 hiddenmenu
1974*8044SWilliam.Kucharski@Sun.COM-----------------
1975*8044SWilliam.Kucharski@Sun.COM
1976*8044SWilliam.Kucharski@Sun.COM -- Command: hiddenmenu
1977*8044SWilliam.Kucharski@Sun.COM     Don't display the menu. If the command is used, no menu will be
1978*8044SWilliam.Kucharski@Sun.COM     displayed on the control terminal, and the default entry will be
1979*8044SWilliam.Kucharski@Sun.COM     booted after the timeout expired. The user can still request the
1980*8044SWilliam.Kucharski@Sun.COM     menu to be displayed by pressing <ESC> before the timeout expires.
1981*8044SWilliam.Kucharski@Sun.COM     See also *Note Hidden menu interface::.
1982*8044SWilliam.Kucharski@Sun.COM
1983*8044SWilliam.Kucharski@Sun.COM
1984*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: timeout,  Next: title,  Prev: hiddenmenu,  Up: Menu-specific commands
1985*8044SWilliam.Kucharski@Sun.COM
1986*8044SWilliam.Kucharski@Sun.COM13.1.4 timeout
1987*8044SWilliam.Kucharski@Sun.COM--------------
1988*8044SWilliam.Kucharski@Sun.COM
1989*8044SWilliam.Kucharski@Sun.COM -- Command: timeout sec
1990*8044SWilliam.Kucharski@Sun.COM     Set a timeout, in SEC seconds, before automatically booting the
1991*8044SWilliam.Kucharski@Sun.COM     default entry (normally the first entry defined).
1992*8044SWilliam.Kucharski@Sun.COM
1993*8044SWilliam.Kucharski@Sun.COM
1994*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: title,  Prev: timeout,  Up: Menu-specific commands
1995*8044SWilliam.Kucharski@Sun.COM
1996*8044SWilliam.Kucharski@Sun.COM13.1.5 title
1997*8044SWilliam.Kucharski@Sun.COM------------
1998*8044SWilliam.Kucharski@Sun.COM
1999*8044SWilliam.Kucharski@Sun.COM -- Command: title name ...
2000*8044SWilliam.Kucharski@Sun.COM     Start a new boot entry, and set its name to the contents of the
2001*8044SWilliam.Kucharski@Sun.COM     rest of the line, starting with the first non-space character.
2002*8044SWilliam.Kucharski@Sun.COM
2003*8044SWilliam.Kucharski@Sun.COM
2004*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: General commands,  Next: Command-line and menu entry commands,  Prev: Menu-specific commands,  Up: Commands
2005*8044SWilliam.Kucharski@Sun.COM
2006*8044SWilliam.Kucharski@Sun.COM13.2 The list of general commands
2007*8044SWilliam.Kucharski@Sun.COM=================================
2008*8044SWilliam.Kucharski@Sun.COM
2009*8044SWilliam.Kucharski@Sun.COMCommands usable anywhere in the menu and in the command-line.
2010*8044SWilliam.Kucharski@Sun.COM
2011*8044SWilliam.Kucharski@Sun.COM* Menu:
2012*8044SWilliam.Kucharski@Sun.COM
2013*8044SWilliam.Kucharski@Sun.COM* bootp::                       Initialize a network device via BOOTP
2014*8044SWilliam.Kucharski@Sun.COM* color::                       Color the menu interface
2015*8044SWilliam.Kucharski@Sun.COM* device::                      Specify a file as a drive
2016*8044SWilliam.Kucharski@Sun.COM* dhcp::                        Initialize a network device via DHCP
2017*8044SWilliam.Kucharski@Sun.COM* hide::                        Hide a partition
2018*8044SWilliam.Kucharski@Sun.COM* ifconfig::                    Configure a network device manually
2019*8044SWilliam.Kucharski@Sun.COM* pager::                       Change the state of the internal pager
2020*8044SWilliam.Kucharski@Sun.COM* partnew::                     Make a primary partition
2021*8044SWilliam.Kucharski@Sun.COM* parttype::                    Change the type of a partition
2022*8044SWilliam.Kucharski@Sun.COM* password::                    Set a password for the menu interface
2023*8044SWilliam.Kucharski@Sun.COM* rarp::                        Initialize a network device via RARP
2024*8044SWilliam.Kucharski@Sun.COM* serial::                      Set up a serial device
2025*8044SWilliam.Kucharski@Sun.COM* setkey::                      Configure the key map
2026*8044SWilliam.Kucharski@Sun.COM* terminal::                    Choose a terminal
2027*8044SWilliam.Kucharski@Sun.COM* terminfo::                    Define escape sequences for a terminal
2028*8044SWilliam.Kucharski@Sun.COM* tftpserver::                  Specify a TFTP server
2029*8044SWilliam.Kucharski@Sun.COM* unhide::                      Unhide a partition
2030*8044SWilliam.Kucharski@Sun.COM
2031*8044SWilliam.Kucharski@Sun.COM
2032*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: bootp,  Next: color,  Up: General commands
2033*8044SWilliam.Kucharski@Sun.COM
2034*8044SWilliam.Kucharski@Sun.COM13.2.1 bootp
2035*8044SWilliam.Kucharski@Sun.COM------------
2036*8044SWilliam.Kucharski@Sun.COM
2037*8044SWilliam.Kucharski@Sun.COM -- Command: bootp [`--with-configfile']
2038*8044SWilliam.Kucharski@Sun.COM     Initialize a network device via the "BOOTP" protocol. This command
2039*8044SWilliam.Kucharski@Sun.COM     is only available if GRUB is compiled with netboot support. See
2040*8044SWilliam.Kucharski@Sun.COM     also *Note Network::.
2041*8044SWilliam.Kucharski@Sun.COM
2042*8044SWilliam.Kucharski@Sun.COM     If you specify `--with-configfile' to this command, GRUB will
2043*8044SWilliam.Kucharski@Sun.COM     fetch and load a configuration file specified by your BOOTP server
2044*8044SWilliam.Kucharski@Sun.COM     with the vendor tag `150'.
2045*8044SWilliam.Kucharski@Sun.COM
2046*8044SWilliam.Kucharski@Sun.COM
2047*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: color,  Next: device,  Prev: bootp,  Up: General commands
2048*8044SWilliam.Kucharski@Sun.COM
2049*8044SWilliam.Kucharski@Sun.COM13.2.2 color
2050*8044SWilliam.Kucharski@Sun.COM------------
2051*8044SWilliam.Kucharski@Sun.COM
2052*8044SWilliam.Kucharski@Sun.COM -- Command: color normal [highlight]
2053*8044SWilliam.Kucharski@Sun.COM     Change the menu colors. The color NORMAL is used for most lines in
2054*8044SWilliam.Kucharski@Sun.COM     the menu (*note Menu interface::), and the color HIGHLIGHT is used
2055*8044SWilliam.Kucharski@Sun.COM     to highlight the line where the cursor points. If you omit
2056*8044SWilliam.Kucharski@Sun.COM     HIGHLIGHT, then the inverted color of NORMAL is used for the
2057*8044SWilliam.Kucharski@Sun.COM     highlighted line. The format of a color is
2058*8044SWilliam.Kucharski@Sun.COM     `FOREGROUND/BACKGROUND'. FOREGROUND and BACKGROUND are symbolic
2059*8044SWilliam.Kucharski@Sun.COM     color names. A symbolic color name must be one of these:
2060*8044SWilliam.Kucharski@Sun.COM
2061*8044SWilliam.Kucharski@Sun.COM        * black
2062*8044SWilliam.Kucharski@Sun.COM
2063*8044SWilliam.Kucharski@Sun.COM        * blue
2064*8044SWilliam.Kucharski@Sun.COM
2065*8044SWilliam.Kucharski@Sun.COM        * green
2066*8044SWilliam.Kucharski@Sun.COM
2067*8044SWilliam.Kucharski@Sun.COM        * cyan
2068*8044SWilliam.Kucharski@Sun.COM
2069*8044SWilliam.Kucharski@Sun.COM        * red
2070*8044SWilliam.Kucharski@Sun.COM
2071*8044SWilliam.Kucharski@Sun.COM        * magenta
2072*8044SWilliam.Kucharski@Sun.COM
2073*8044SWilliam.Kucharski@Sun.COM        * brown
2074*8044SWilliam.Kucharski@Sun.COM
2075*8044SWilliam.Kucharski@Sun.COM        * light-gray
2076*8044SWilliam.Kucharski@Sun.COM
2077*8044SWilliam.Kucharski@Sun.COM          *These below can be specified only for the foreground.*
2078*8044SWilliam.Kucharski@Sun.COM
2079*8044SWilliam.Kucharski@Sun.COM        * dark-gray
2080*8044SWilliam.Kucharski@Sun.COM
2081*8044SWilliam.Kucharski@Sun.COM        * light-blue
2082*8044SWilliam.Kucharski@Sun.COM
2083*8044SWilliam.Kucharski@Sun.COM        * light-green
2084*8044SWilliam.Kucharski@Sun.COM
2085*8044SWilliam.Kucharski@Sun.COM        * light-cyan
2086*8044SWilliam.Kucharski@Sun.COM
2087*8044SWilliam.Kucharski@Sun.COM        * light-red
2088*8044SWilliam.Kucharski@Sun.COM
2089*8044SWilliam.Kucharski@Sun.COM        * light-magenta
2090*8044SWilliam.Kucharski@Sun.COM
2091*8044SWilliam.Kucharski@Sun.COM        * yellow
2092*8044SWilliam.Kucharski@Sun.COM
2093*8044SWilliam.Kucharski@Sun.COM        * white
2094*8044SWilliam.Kucharski@Sun.COM
2095*8044SWilliam.Kucharski@Sun.COM     But only the first eight names can be used for BACKGROUND. You can
2096*8044SWilliam.Kucharski@Sun.COM     prefix `blink-' to FOREGROUND if you want a blinking foreground
2097*8044SWilliam.Kucharski@Sun.COM     color.
2098*8044SWilliam.Kucharski@Sun.COM
2099*8044SWilliam.Kucharski@Sun.COM     This command can be used in the configuration file and on the
2100*8044SWilliam.Kucharski@Sun.COM     command line, so you may write something like this in your
2101*8044SWilliam.Kucharski@Sun.COM     configuration file:
2102*8044SWilliam.Kucharski@Sun.COM
2103*8044SWilliam.Kucharski@Sun.COM          # Set default colors.
2104*8044SWilliam.Kucharski@Sun.COM          color light-gray/blue black/light-gray
2105*8044SWilliam.Kucharski@Sun.COM
2106*8044SWilliam.Kucharski@Sun.COM          # Change the colors.
2107*8044SWilliam.Kucharski@Sun.COM          title OS-BS like
2108*8044SWilliam.Kucharski@Sun.COM          color magenta/blue black/magenta
2109*8044SWilliam.Kucharski@Sun.COM
2110*8044SWilliam.Kucharski@Sun.COM
2111*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: device,  Next: dhcp,  Prev: color,  Up: General commands
2112*8044SWilliam.Kucharski@Sun.COM
2113*8044SWilliam.Kucharski@Sun.COM13.2.3 device
2114*8044SWilliam.Kucharski@Sun.COM-------------
2115*8044SWilliam.Kucharski@Sun.COM
2116*8044SWilliam.Kucharski@Sun.COM -- Command: device drive file
2117*8044SWilliam.Kucharski@Sun.COM     In the grub shell, specify the file FILE as the actual drive for a
2118*8044SWilliam.Kucharski@Sun.COM     BIOS drive DRIVE. You can use this command to create a disk image,
2119*8044SWilliam.Kucharski@Sun.COM     and/or to fix the drives guessed by GRUB when GRUB fails to
2120*8044SWilliam.Kucharski@Sun.COM     determine them correctly, like this:
2121*8044SWilliam.Kucharski@Sun.COM
2122*8044SWilliam.Kucharski@Sun.COM          grub> device (fd0) /floppy-image
2123*8044SWilliam.Kucharski@Sun.COM          grub> device (hd0) /dev/sd0
2124*8044SWilliam.Kucharski@Sun.COM
2125*8044SWilliam.Kucharski@Sun.COM     This command can be used only in the grub shell (*note Invoking
2126*8044SWilliam.Kucharski@Sun.COM     the grub shell::).
2127*8044SWilliam.Kucharski@Sun.COM
2128*8044SWilliam.Kucharski@Sun.COM
2129*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: dhcp,  Next: hide,  Prev: device,  Up: General commands
2130*8044SWilliam.Kucharski@Sun.COM
2131*8044SWilliam.Kucharski@Sun.COM13.2.4 dhcp
2132*8044SWilliam.Kucharski@Sun.COM-----------
2133*8044SWilliam.Kucharski@Sun.COM
2134*8044SWilliam.Kucharski@Sun.COM -- Command: dhcp [-with-configfile]
2135*8044SWilliam.Kucharski@Sun.COM     Initialize a network device via the "DHCP" protocol. Currently,
2136*8044SWilliam.Kucharski@Sun.COM     this command is just an alias for `bootp', since the two protocols
2137*8044SWilliam.Kucharski@Sun.COM     are very similar. This command is only available if GRUB is
2138*8044SWilliam.Kucharski@Sun.COM     compiled with netboot support. See also *Note Network::.
2139*8044SWilliam.Kucharski@Sun.COM
2140*8044SWilliam.Kucharski@Sun.COM     If you specify `--with-configfile' to this command, GRUB will
2141*8044SWilliam.Kucharski@Sun.COM     fetch and load a configuration file specified by your DHCP server
2142*8044SWilliam.Kucharski@Sun.COM     with the vendor tag `150'.
2143*8044SWilliam.Kucharski@Sun.COM
2144*8044SWilliam.Kucharski@Sun.COM
2145*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: hide,  Next: ifconfig,  Prev: dhcp,  Up: General commands
2146*8044SWilliam.Kucharski@Sun.COM
2147*8044SWilliam.Kucharski@Sun.COM13.2.5 hide
2148*8044SWilliam.Kucharski@Sun.COM-----------
2149*8044SWilliam.Kucharski@Sun.COM
2150*8044SWilliam.Kucharski@Sun.COM -- Command: hide partition
2151*8044SWilliam.Kucharski@Sun.COM     Hide the partition PARTITION by setting the "hidden" bit in its
2152*8044SWilliam.Kucharski@Sun.COM     partition type code. This is useful only when booting DOS or
2153*8044SWilliam.Kucharski@Sun.COM     Windows and multiple primary FAT partitions exist in one disk. See
2154*8044SWilliam.Kucharski@Sun.COM     also *Note DOS/Windows::.
2155*8044SWilliam.Kucharski@Sun.COM
2156*8044SWilliam.Kucharski@Sun.COM
2157*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: ifconfig,  Next: pager,  Prev: hide,  Up: General commands
2158*8044SWilliam.Kucharski@Sun.COM
2159*8044SWilliam.Kucharski@Sun.COM13.2.6 ifconfig
2160*8044SWilliam.Kucharski@Sun.COM---------------
2161*8044SWilliam.Kucharski@Sun.COM
2162*8044SWilliam.Kucharski@Sun.COM -- Command: ifconfig [`--server=server'] [`--gateway=gateway']
2163*8044SWilliam.Kucharski@Sun.COM          [`--mask=mask'] [`--address=address']
2164*8044SWilliam.Kucharski@Sun.COM     Configure the IP address, the netmask, the gateway, and the server
2165*8044SWilliam.Kucharski@Sun.COM     address of a network device manually. The values must be in dotted
2166*8044SWilliam.Kucharski@Sun.COM     decimal format, like `192.168.11.178'. The order of the options is
2167*8044SWilliam.Kucharski@Sun.COM     not important. This command shows current network configuration,
2168*8044SWilliam.Kucharski@Sun.COM     if no option is specified. See also *Note Network::.
2169*8044SWilliam.Kucharski@Sun.COM
2170*8044SWilliam.Kucharski@Sun.COM
2171*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: pager,  Next: partnew,  Prev: ifconfig,  Up: General commands
2172*8044SWilliam.Kucharski@Sun.COM
2173*8044SWilliam.Kucharski@Sun.COM13.2.7 pager
2174*8044SWilliam.Kucharski@Sun.COM------------
2175*8044SWilliam.Kucharski@Sun.COM
2176*8044SWilliam.Kucharski@Sun.COM -- Command: pager [flag]
2177*8044SWilliam.Kucharski@Sun.COM     Toggle or set the state of the internal pager. If FLAG is `on',
2178*8044SWilliam.Kucharski@Sun.COM     the internal pager is enabled. If FLAG is `off', it is disabled.
2179*8044SWilliam.Kucharski@Sun.COM     If no argument is given, the state is toggled.
2180*8044SWilliam.Kucharski@Sun.COM
2181*8044SWilliam.Kucharski@Sun.COM
2182*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: partnew,  Next: parttype,  Prev: pager,  Up: General commands
2183*8044SWilliam.Kucharski@Sun.COM
2184*8044SWilliam.Kucharski@Sun.COM13.2.8 partnew
2185*8044SWilliam.Kucharski@Sun.COM--------------
2186*8044SWilliam.Kucharski@Sun.COM
2187*8044SWilliam.Kucharski@Sun.COM -- Command: partnew part type from len
2188*8044SWilliam.Kucharski@Sun.COM     Create a new primary partition. PART is a partition specification
2189*8044SWilliam.Kucharski@Sun.COM     in GRUB syntax (*note Naming convention::); TYPE is the partition
2190*8044SWilliam.Kucharski@Sun.COM     type and must be a number in the range `0-0xff'; FROM is the
2191*8044SWilliam.Kucharski@Sun.COM     starting address and LEN is the length, both in sector units.
2192*8044SWilliam.Kucharski@Sun.COM
2193*8044SWilliam.Kucharski@Sun.COM
2194*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: parttype,  Next: password,  Prev: partnew,  Up: General commands
2195*8044SWilliam.Kucharski@Sun.COM
2196*8044SWilliam.Kucharski@Sun.COM13.2.9 parttype
2197*8044SWilliam.Kucharski@Sun.COM---------------
2198*8044SWilliam.Kucharski@Sun.COM
2199*8044SWilliam.Kucharski@Sun.COM -- Command: parttype part type
2200*8044SWilliam.Kucharski@Sun.COM     Change the type of an existing partition.  PART is a partition
2201*8044SWilliam.Kucharski@Sun.COM     specification in GRUB syntax (*note Naming convention::); TYPE is
2202*8044SWilliam.Kucharski@Sun.COM     the new partition type and must be a number in the range 0-0xff.
2203*8044SWilliam.Kucharski@Sun.COM
2204*8044SWilliam.Kucharski@Sun.COM
2205*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: password,  Next: rarp,  Prev: parttype,  Up: General commands
2206*8044SWilliam.Kucharski@Sun.COM
2207*8044SWilliam.Kucharski@Sun.COM13.2.10 password
2208*8044SWilliam.Kucharski@Sun.COM----------------
2209*8044SWilliam.Kucharski@Sun.COM
2210*8044SWilliam.Kucharski@Sun.COM -- Command: password [`--md5'] passwd [new-config-file]
2211*8044SWilliam.Kucharski@Sun.COM     If used in the first section of a menu file, disable all
2212*8044SWilliam.Kucharski@Sun.COM     interactive editing control (menu entry editor and command-line)
2213*8044SWilliam.Kucharski@Sun.COM     and entries protected by the command `lock'. If the password
2214*8044SWilliam.Kucharski@Sun.COM     PASSWD is entered, it loads the NEW-CONFIG-FILE as a new config
2215*8044SWilliam.Kucharski@Sun.COM     file and restarts the GRUB Stage 2, if NEW-CONFIG-FILE is
2216*8044SWilliam.Kucharski@Sun.COM     specified. Otherwise, GRUB will just unlock the privileged
2217*8044SWilliam.Kucharski@Sun.COM     instructions.  You can also use this command in the script
2218*8044SWilliam.Kucharski@Sun.COM     section, in which case it will ask for the password, before
2219*8044SWilliam.Kucharski@Sun.COM     continuing.  The option `--md5' tells GRUB that PASSWD is
2220*8044SWilliam.Kucharski@Sun.COM     encrypted with `md5crypt' (*note md5crypt::).
2221*8044SWilliam.Kucharski@Sun.COM
2222*8044SWilliam.Kucharski@Sun.COM
2223*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: rarp,  Next: serial,  Prev: password,  Up: General commands
2224*8044SWilliam.Kucharski@Sun.COM
2225*8044SWilliam.Kucharski@Sun.COM13.2.11 rarp
2226*8044SWilliam.Kucharski@Sun.COM------------
2227*8044SWilliam.Kucharski@Sun.COM
2228*8044SWilliam.Kucharski@Sun.COM -- Command: rarp
2229*8044SWilliam.Kucharski@Sun.COM     Initialize a network device via the "RARP" protocol.  This command
2230*8044SWilliam.Kucharski@Sun.COM     is only available if GRUB is compiled with netboot support. See
2231*8044SWilliam.Kucharski@Sun.COM     also *Note Network::.
2232*8044SWilliam.Kucharski@Sun.COM
2233*8044SWilliam.Kucharski@Sun.COM
2234*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: serial,  Next: setkey,  Prev: rarp,  Up: General commands
2235*8044SWilliam.Kucharski@Sun.COM
2236*8044SWilliam.Kucharski@Sun.COM13.2.12 serial
2237*8044SWilliam.Kucharski@Sun.COM--------------
2238*8044SWilliam.Kucharski@Sun.COM
2239*8044SWilliam.Kucharski@Sun.COM -- Command: serial [`--unit=unit'] [`--port=port'] [`--speed=speed']
2240*8044SWilliam.Kucharski@Sun.COM          [`--word=word'] [`--parity=parity'] [`--stop=stop']
2241*8044SWilliam.Kucharski@Sun.COM          [`--device=dev']
2242*8044SWilliam.Kucharski@Sun.COM     Initialize a serial device. UNIT is a number in the range 0-3
2243*8044SWilliam.Kucharski@Sun.COM     specifying which serial port to use; default is 0, which
2244*8044SWilliam.Kucharski@Sun.COM     corresponds to the port often called COM1. PORT is the I/O port
2245*8044SWilliam.Kucharski@Sun.COM     where the UART is to be found; if specified it takes precedence
2246*8044SWilliam.Kucharski@Sun.COM     over UNIT.  SPEED is the transmission speed; default is 9600. WORD
2247*8044SWilliam.Kucharski@Sun.COM     and STOP are the number of data bits and stop bits. Data bits must
2248*8044SWilliam.Kucharski@Sun.COM     be in the range 5-8 and stop bits must be 1 or 2. Default is 8 data
2249*8044SWilliam.Kucharski@Sun.COM     bits and one stop bit. PARITY is one of `no', `odd', `even' and
2250*8044SWilliam.Kucharski@Sun.COM     defaults to `no'. The option `--device' can only be used in the
2251*8044SWilliam.Kucharski@Sun.COM     grub shell and is used to specify the tty device to be used in the
2252*8044SWilliam.Kucharski@Sun.COM     host operating system (*note Invoking the grub shell::).
2253*8044SWilliam.Kucharski@Sun.COM
2254*8044SWilliam.Kucharski@Sun.COM     The serial port is not used as a communication channel unless the
2255*8044SWilliam.Kucharski@Sun.COM     `terminal' command is used (*note terminal::).
2256*8044SWilliam.Kucharski@Sun.COM
2257*8044SWilliam.Kucharski@Sun.COM     This command is only available if GRUB is compiled with serial
2258*8044SWilliam.Kucharski@Sun.COM     support. See also *Note Serial terminal::.
2259*8044SWilliam.Kucharski@Sun.COM
2260*8044SWilliam.Kucharski@Sun.COM
2261*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: setkey,  Next: terminal,  Prev: serial,  Up: General commands
2262*8044SWilliam.Kucharski@Sun.COM
2263*8044SWilliam.Kucharski@Sun.COM13.2.13 setkey
2264*8044SWilliam.Kucharski@Sun.COM--------------
2265*8044SWilliam.Kucharski@Sun.COM
2266*8044SWilliam.Kucharski@Sun.COM -- Command: setkey [to_key from_key]
2267*8044SWilliam.Kucharski@Sun.COM     Change the keyboard map. The key FROM_KEY is mapped to the key
2268*8044SWilliam.Kucharski@Sun.COM     TO_KEY. If no argument is specified, reset key mappings. Note that
2269*8044SWilliam.Kucharski@Sun.COM     this command _does not_ exchange the keys. If you want to exchange
2270*8044SWilliam.Kucharski@Sun.COM     the keys, run this command again with the arguments exchanged,
2271*8044SWilliam.Kucharski@Sun.COM     like this:
2272*8044SWilliam.Kucharski@Sun.COM
2273*8044SWilliam.Kucharski@Sun.COM          grub> setkey capslock control
2274*8044SWilliam.Kucharski@Sun.COM          grub> setkey control capslock
2275*8044SWilliam.Kucharski@Sun.COM
2276*8044SWilliam.Kucharski@Sun.COM     A key must be an alphabet letter, a digit, or one of these symbols:
2277*8044SWilliam.Kucharski@Sun.COM     `escape', `exclam', `at', `numbersign', `dollar', `percent',
2278*8044SWilliam.Kucharski@Sun.COM     `caret', `ampersand', `asterisk', `parenleft', `parenright',
2279*8044SWilliam.Kucharski@Sun.COM     `minus', `underscore', `equal', `plus', `backspace', `tab',
2280*8044SWilliam.Kucharski@Sun.COM     `bracketleft', `braceleft', `bracketright', `braceright', `enter',
2281*8044SWilliam.Kucharski@Sun.COM     `control', `semicolon', `colon', `quote', `doublequote',
2282*8044SWilliam.Kucharski@Sun.COM     `backquote', `tilde', `shift', `backslash', `bar', `comma',
2283*8044SWilliam.Kucharski@Sun.COM     `less', `period', `greater', `slash', `question', `alt', `space',
2284*8044SWilliam.Kucharski@Sun.COM     `capslock', `FX' (`X' is a digit), and `delete'. This table
2285*8044SWilliam.Kucharski@Sun.COM     describes to which character each of the symbols corresponds:
2286*8044SWilliam.Kucharski@Sun.COM
2287*8044SWilliam.Kucharski@Sun.COM    `exclam'
2288*8044SWilliam.Kucharski@Sun.COM          `!'
2289*8044SWilliam.Kucharski@Sun.COM
2290*8044SWilliam.Kucharski@Sun.COM    `at'
2291*8044SWilliam.Kucharski@Sun.COM          `@'
2292*8044SWilliam.Kucharski@Sun.COM
2293*8044SWilliam.Kucharski@Sun.COM    `numbersign'
2294*8044SWilliam.Kucharski@Sun.COM          `#'
2295*8044SWilliam.Kucharski@Sun.COM
2296*8044SWilliam.Kucharski@Sun.COM    `dollar'
2297*8044SWilliam.Kucharski@Sun.COM          `$'
2298*8044SWilliam.Kucharski@Sun.COM
2299*8044SWilliam.Kucharski@Sun.COM    `percent'
2300*8044SWilliam.Kucharski@Sun.COM          `%'
2301*8044SWilliam.Kucharski@Sun.COM
2302*8044SWilliam.Kucharski@Sun.COM    `caret'
2303*8044SWilliam.Kucharski@Sun.COM          `^'
2304*8044SWilliam.Kucharski@Sun.COM
2305*8044SWilliam.Kucharski@Sun.COM    `ampersand'
2306*8044SWilliam.Kucharski@Sun.COM          `&'
2307*8044SWilliam.Kucharski@Sun.COM
2308*8044SWilliam.Kucharski@Sun.COM    `asterisk'
2309*8044SWilliam.Kucharski@Sun.COM          `*'
2310*8044SWilliam.Kucharski@Sun.COM
2311*8044SWilliam.Kucharski@Sun.COM    `parenleft'
2312*8044SWilliam.Kucharski@Sun.COM          `('
2313*8044SWilliam.Kucharski@Sun.COM
2314*8044SWilliam.Kucharski@Sun.COM    `parenright'
2315*8044SWilliam.Kucharski@Sun.COM          `)'
2316*8044SWilliam.Kucharski@Sun.COM
2317*8044SWilliam.Kucharski@Sun.COM    `minus'
2318*8044SWilliam.Kucharski@Sun.COM          `-'
2319*8044SWilliam.Kucharski@Sun.COM
2320*8044SWilliam.Kucharski@Sun.COM    `underscore'
2321*8044SWilliam.Kucharski@Sun.COM          `_'
2322*8044SWilliam.Kucharski@Sun.COM
2323*8044SWilliam.Kucharski@Sun.COM    `equal'
2324*8044SWilliam.Kucharski@Sun.COM          `='
2325*8044SWilliam.Kucharski@Sun.COM
2326*8044SWilliam.Kucharski@Sun.COM    `plus'
2327*8044SWilliam.Kucharski@Sun.COM          `+'
2328*8044SWilliam.Kucharski@Sun.COM
2329*8044SWilliam.Kucharski@Sun.COM    `bracketleft'
2330*8044SWilliam.Kucharski@Sun.COM          `['
2331*8044SWilliam.Kucharski@Sun.COM
2332*8044SWilliam.Kucharski@Sun.COM    `braceleft'
2333*8044SWilliam.Kucharski@Sun.COM          `{'
2334*8044SWilliam.Kucharski@Sun.COM
2335*8044SWilliam.Kucharski@Sun.COM    `bracketright'
2336*8044SWilliam.Kucharski@Sun.COM          `]'
2337*8044SWilliam.Kucharski@Sun.COM
2338*8044SWilliam.Kucharski@Sun.COM    `braceright'
2339*8044SWilliam.Kucharski@Sun.COM          `}'
2340*8044SWilliam.Kucharski@Sun.COM
2341*8044SWilliam.Kucharski@Sun.COM    `semicolon'
2342*8044SWilliam.Kucharski@Sun.COM          `;'
2343*8044SWilliam.Kucharski@Sun.COM
2344*8044SWilliam.Kucharski@Sun.COM    `colon'
2345*8044SWilliam.Kucharski@Sun.COM          `:'
2346*8044SWilliam.Kucharski@Sun.COM
2347*8044SWilliam.Kucharski@Sun.COM    `quote'
2348*8044SWilliam.Kucharski@Sun.COM          `''
2349*8044SWilliam.Kucharski@Sun.COM
2350*8044SWilliam.Kucharski@Sun.COM    `doublequote'
2351*8044SWilliam.Kucharski@Sun.COM          `"'
2352*8044SWilliam.Kucharski@Sun.COM
2353*8044SWilliam.Kucharski@Sun.COM    `backquote'
2354*8044SWilliam.Kucharski@Sun.COM          ``'
2355*8044SWilliam.Kucharski@Sun.COM
2356*8044SWilliam.Kucharski@Sun.COM    `tilde'
2357*8044SWilliam.Kucharski@Sun.COM          `~'
2358*8044SWilliam.Kucharski@Sun.COM
2359*8044SWilliam.Kucharski@Sun.COM    `backslash'
2360*8044SWilliam.Kucharski@Sun.COM          `\'
2361*8044SWilliam.Kucharski@Sun.COM
2362*8044SWilliam.Kucharski@Sun.COM    `bar'
2363*8044SWilliam.Kucharski@Sun.COM          `|'
2364*8044SWilliam.Kucharski@Sun.COM
2365*8044SWilliam.Kucharski@Sun.COM    `comma'
2366*8044SWilliam.Kucharski@Sun.COM          `,'
2367*8044SWilliam.Kucharski@Sun.COM
2368*8044SWilliam.Kucharski@Sun.COM    `less'
2369*8044SWilliam.Kucharski@Sun.COM          `<'
2370*8044SWilliam.Kucharski@Sun.COM
2371*8044SWilliam.Kucharski@Sun.COM    `period'
2372*8044SWilliam.Kucharski@Sun.COM          `.'
2373*8044SWilliam.Kucharski@Sun.COM
2374*8044SWilliam.Kucharski@Sun.COM    `greater'
2375*8044SWilliam.Kucharski@Sun.COM          `>'
2376*8044SWilliam.Kucharski@Sun.COM
2377*8044SWilliam.Kucharski@Sun.COM    `slash'
2378*8044SWilliam.Kucharski@Sun.COM          `/'
2379*8044SWilliam.Kucharski@Sun.COM
2380*8044SWilliam.Kucharski@Sun.COM    `question'
2381*8044SWilliam.Kucharski@Sun.COM          `?'
2382*8044SWilliam.Kucharski@Sun.COM
2383*8044SWilliam.Kucharski@Sun.COM    `space'
2384*8044SWilliam.Kucharski@Sun.COM          ` '
2385*8044SWilliam.Kucharski@Sun.COM
2386*8044SWilliam.Kucharski@Sun.COM
2387*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: terminal,  Next: terminfo,  Prev: setkey,  Up: General commands
2388*8044SWilliam.Kucharski@Sun.COM
2389*8044SWilliam.Kucharski@Sun.COM13.2.14 terminal
2390*8044SWilliam.Kucharski@Sun.COM----------------
2391*8044SWilliam.Kucharski@Sun.COM
2392*8044SWilliam.Kucharski@Sun.COM -- Command: terminal [`--dumb'] [`--no-echo'] [`--no-edit']
2393*8044SWilliam.Kucharski@Sun.COM          [`--timeout=secs'] [`--lines=lines'] [`--silent'] [`console']
2394*8044SWilliam.Kucharski@Sun.COM          [`serial'] [`hercules']
2395*8044SWilliam.Kucharski@Sun.COM     Select a terminal for user interaction. The terminal is assumed to
2396*8044SWilliam.Kucharski@Sun.COM     be VT100-compatible unless `--dumb' is specified. If both
2397*8044SWilliam.Kucharski@Sun.COM     `console' and `serial' are specified, then GRUB will use the one
2398*8044SWilliam.Kucharski@Sun.COM     where a key is entered first or the first when the timeout
2399*8044SWilliam.Kucharski@Sun.COM     expires. If neither are specified, the current setting is
2400*8044SWilliam.Kucharski@Sun.COM     reported. This command is only available if GRUB is compiled with
2401*8044SWilliam.Kucharski@Sun.COM     serial support. See also *Note Serial terminal::.
2402*8044SWilliam.Kucharski@Sun.COM
2403*8044SWilliam.Kucharski@Sun.COM     This may not make sense for most users, but GRUB supports Hercules
2404*8044SWilliam.Kucharski@Sun.COM     console as well. Hercules console is usable like the ordinary
2405*8044SWilliam.Kucharski@Sun.COM     console, and the usage is quite similar to that for serial
2406*8044SWilliam.Kucharski@Sun.COM     terminals: specify `hercules' as the argument.
2407*8044SWilliam.Kucharski@Sun.COM
2408*8044SWilliam.Kucharski@Sun.COM     The option `--lines' defines the number of lines in your terminal,
2409*8044SWilliam.Kucharski@Sun.COM     and it is used for the internal pager function. If you don't
2410*8044SWilliam.Kucharski@Sun.COM     specify this option, the number is assumed as 24.
2411*8044SWilliam.Kucharski@Sun.COM
2412*8044SWilliam.Kucharski@Sun.COM     The option `--silent' suppresses the message to prompt you to hit
2413*8044SWilliam.Kucharski@Sun.COM     any key. This might be useful if your system has no terminal
2414*8044SWilliam.Kucharski@Sun.COM     device.
2415*8044SWilliam.Kucharski@Sun.COM
2416*8044SWilliam.Kucharski@Sun.COM     The option `--no-echo' has GRUB not to echo back input characters.
2417*8044SWilliam.Kucharski@Sun.COM     This implies the option `--no-edit'.
2418*8044SWilliam.Kucharski@Sun.COM
2419*8044SWilliam.Kucharski@Sun.COM     The option `--no-edit' disables the BASH-like editing feature.
2420*8044SWilliam.Kucharski@Sun.COM
2421*8044SWilliam.Kucharski@Sun.COM
2422*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: terminfo,  Next: tftpserver,  Prev: terminal,  Up: General commands
2423*8044SWilliam.Kucharski@Sun.COM
2424*8044SWilliam.Kucharski@Sun.COM13.2.15 terminfo
2425*8044SWilliam.Kucharski@Sun.COM----------------
2426*8044SWilliam.Kucharski@Sun.COM
2427*8044SWilliam.Kucharski@Sun.COM -- Command: terminfo `--name=name' `--cursor-address=seq'
2428*8044SWilliam.Kucharski@Sun.COM          [`--clear-screen=seq'] [`--enter-standout-mode=seq']
2429*8044SWilliam.Kucharski@Sun.COM          [`--exit-standout-mode=seq']
2430*8044SWilliam.Kucharski@Sun.COM     Define the capabilities of your terminal. Use this command to
2431*8044SWilliam.Kucharski@Sun.COM     define escape sequences, if it is not vt100-compatible. You may
2432*8044SWilliam.Kucharski@Sun.COM     use `\e' for <ESC> and `^X' for a control character.
2433*8044SWilliam.Kucharski@Sun.COM
2434*8044SWilliam.Kucharski@Sun.COM     You can use the utility `grub-terminfo' to generate appropriate
2435*8044SWilliam.Kucharski@Sun.COM     arguments to this command. *Note Invoking grub-terminfo::.
2436*8044SWilliam.Kucharski@Sun.COM
2437*8044SWilliam.Kucharski@Sun.COM     If no option is specified, the current settings are printed.
2438*8044SWilliam.Kucharski@Sun.COM
2439*8044SWilliam.Kucharski@Sun.COM
2440*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: tftpserver,  Next: unhide,  Prev: terminfo,  Up: General commands
2441*8044SWilliam.Kucharski@Sun.COM
2442*8044SWilliam.Kucharski@Sun.COM13.2.16 tftpserver
2443*8044SWilliam.Kucharski@Sun.COM------------------
2444*8044SWilliam.Kucharski@Sun.COM
2445*8044SWilliam.Kucharski@Sun.COM -- Command: tftpserver ipaddr
2446*8044SWilliam.Kucharski@Sun.COM     *Caution:* This command exists only for backward compatibility.
2447*8044SWilliam.Kucharski@Sun.COM     Use `ifconfig' (*note ifconfig::) instead.
2448*8044SWilliam.Kucharski@Sun.COM
2449*8044SWilliam.Kucharski@Sun.COM     Override a TFTP server address returned by a BOOTP/DHCP/RARP
2450*8044SWilliam.Kucharski@Sun.COM     server. The argument IPADDR must be in dotted decimal format, like
2451*8044SWilliam.Kucharski@Sun.COM     `192.168.0.15'.  This command is only available if GRUB is compiled
2452*8044SWilliam.Kucharski@Sun.COM     with netboot support. See also *Note Network::.
2453*8044SWilliam.Kucharski@Sun.COM
2454*8044SWilliam.Kucharski@Sun.COM
2455*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: unhide,  Prev: tftpserver,  Up: General commands
2456*8044SWilliam.Kucharski@Sun.COM
2457*8044SWilliam.Kucharski@Sun.COM13.2.17 unhide
2458*8044SWilliam.Kucharski@Sun.COM--------------
2459*8044SWilliam.Kucharski@Sun.COM
2460*8044SWilliam.Kucharski@Sun.COM -- Command: unhide partition
2461*8044SWilliam.Kucharski@Sun.COM     Unhide the partition PARTITION by clearing the "hidden" bit in its
2462*8044SWilliam.Kucharski@Sun.COM     partition type code. This is useful only when booting DOS or
2463*8044SWilliam.Kucharski@Sun.COM     Windows and multiple primary partitions exist on one disk. See also
2464*8044SWilliam.Kucharski@Sun.COM     *Note DOS/Windows::.
2465*8044SWilliam.Kucharski@Sun.COM
2466*8044SWilliam.Kucharski@Sun.COM
2467*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Command-line and menu entry commands,  Prev: General commands,  Up: Commands
2468*8044SWilliam.Kucharski@Sun.COM
2469*8044SWilliam.Kucharski@Sun.COM13.3 The list of command-line and menu entry commands
2470*8044SWilliam.Kucharski@Sun.COM=====================================================
2471*8044SWilliam.Kucharski@Sun.COM
2472*8044SWilliam.Kucharski@Sun.COMThese commands are usable in the command-line and in menu entries.  If
2473*8044SWilliam.Kucharski@Sun.COMyou forget a command, you can run the command `help' (*note help::).
2474*8044SWilliam.Kucharski@Sun.COM
2475*8044SWilliam.Kucharski@Sun.COM* Menu:
2476*8044SWilliam.Kucharski@Sun.COM
2477*8044SWilliam.Kucharski@Sun.COM* blocklist::                   Get the block list notation of a file
2478*8044SWilliam.Kucharski@Sun.COM* boot::                        Start up your operating system
2479*8044SWilliam.Kucharski@Sun.COM* cat::                         Show the contents of a file
2480*8044SWilliam.Kucharski@Sun.COM* chainloader::                 Chain-load another boot loader
2481*8044SWilliam.Kucharski@Sun.COM* cmp::                         Compare two files
2482*8044SWilliam.Kucharski@Sun.COM* configfile::                  Load a configuration file
2483*8044SWilliam.Kucharski@Sun.COM* debug::                       Toggle the debug flag
2484*8044SWilliam.Kucharski@Sun.COM* displayapm::                  Display APM information
2485*8044SWilliam.Kucharski@Sun.COM* displaymem::                  Display memory configuration
2486*8044SWilliam.Kucharski@Sun.COM* embed::                       Embed Stage 1.5
2487*8044SWilliam.Kucharski@Sun.COM* find::                        Find a file
2488*8044SWilliam.Kucharski@Sun.COM* fstest::                      Test a filesystem
2489*8044SWilliam.Kucharski@Sun.COM* geometry::                    Manipulate the geometry of a drive
2490*8044SWilliam.Kucharski@Sun.COM* halt::                        Shut down your computer
2491*8044SWilliam.Kucharski@Sun.COM* help::                        Show help messages
2492*8044SWilliam.Kucharski@Sun.COM* impsprobe::                   Probe SMP
2493*8044SWilliam.Kucharski@Sun.COM* initrd::                      Load an initrd
2494*8044SWilliam.Kucharski@Sun.COM* install::                     Install GRUB
2495*8044SWilliam.Kucharski@Sun.COM* ioprobe::                     Probe I/O ports used for a drive
2496*8044SWilliam.Kucharski@Sun.COM* kernel::                      Load a kernel
2497*8044SWilliam.Kucharski@Sun.COM* lock::                        Lock a menu entry
2498*8044SWilliam.Kucharski@Sun.COM* makeactive::                  Make a partition active
2499*8044SWilliam.Kucharski@Sun.COM* map::                         Map a drive to another
2500*8044SWilliam.Kucharski@Sun.COM* md5crypt::                    Encrypt a password in MD5 format
2501*8044SWilliam.Kucharski@Sun.COM* module::                      Load a module
2502*8044SWilliam.Kucharski@Sun.COM* modulenounzip::               Load a module without decompression
2503*8044SWilliam.Kucharski@Sun.COM* pause::                       Wait for a key press
2504*8044SWilliam.Kucharski@Sun.COM* quit::                        Exit from the grub shell
2505*8044SWilliam.Kucharski@Sun.COM* reboot::                      Reboot your computer
2506*8044SWilliam.Kucharski@Sun.COM* read::                        Read data from memory
2507*8044SWilliam.Kucharski@Sun.COM* root::                        Set GRUB's root device
2508*8044SWilliam.Kucharski@Sun.COM* rootnoverify::                Set GRUB's root device without mounting
2509*8044SWilliam.Kucharski@Sun.COM* savedefault::                 Save current entry as the default entry
2510*8044SWilliam.Kucharski@Sun.COM* setup::                       Set up GRUB's installation automatically
2511*8044SWilliam.Kucharski@Sun.COM* testload::                    Load a file for testing a filesystem
2512*8044SWilliam.Kucharski@Sun.COM* testvbe::                     Test VESA BIOS EXTENSION
2513*8044SWilliam.Kucharski@Sun.COM* uppermem::                    Set the upper memory size
2514*8044SWilliam.Kucharski@Sun.COM* vbeprobe::                    Probe VESA BIOS EXTENSION
2515*8044SWilliam.Kucharski@Sun.COM
2516*8044SWilliam.Kucharski@Sun.COM
2517*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: blocklist,  Next: boot,  Up: Command-line and menu entry commands
2518*8044SWilliam.Kucharski@Sun.COM
2519*8044SWilliam.Kucharski@Sun.COM13.3.1 blocklist
2520*8044SWilliam.Kucharski@Sun.COM----------------
2521*8044SWilliam.Kucharski@Sun.COM
2522*8044SWilliam.Kucharski@Sun.COM -- Command: blocklist file
2523*8044SWilliam.Kucharski@Sun.COM     Print the block list notation of the file FILE. *Note Block list
2524*8044SWilliam.Kucharski@Sun.COM     syntax::.
2525*8044SWilliam.Kucharski@Sun.COM
2526*8044SWilliam.Kucharski@Sun.COM
2527*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: boot,  Next: cat,  Prev: blocklist,  Up: Command-line and menu entry commands
2528*8044SWilliam.Kucharski@Sun.COM
2529*8044SWilliam.Kucharski@Sun.COM13.3.2 boot
2530*8044SWilliam.Kucharski@Sun.COM-----------
2531*8044SWilliam.Kucharski@Sun.COM
2532*8044SWilliam.Kucharski@Sun.COM -- Command: boot
2533*8044SWilliam.Kucharski@Sun.COM     Boot the OS or chain-loader which has been loaded. Only necessary
2534*8044SWilliam.Kucharski@Sun.COM     if running the fully interactive command-line (it is implicit at
2535*8044SWilliam.Kucharski@Sun.COM     the end of a menu entry).
2536*8044SWilliam.Kucharski@Sun.COM
2537*8044SWilliam.Kucharski@Sun.COM
2538*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: cat,  Next: chainloader,  Prev: boot,  Up: Command-line and menu entry commands
2539*8044SWilliam.Kucharski@Sun.COM
2540*8044SWilliam.Kucharski@Sun.COM13.3.3 cat
2541*8044SWilliam.Kucharski@Sun.COM----------
2542*8044SWilliam.Kucharski@Sun.COM
2543*8044SWilliam.Kucharski@Sun.COM -- Command: cat file
2544*8044SWilliam.Kucharski@Sun.COM     Display the contents of the file FILE. This command may be useful
2545*8044SWilliam.Kucharski@Sun.COM     to remind you of your OS's root partition:
2546*8044SWilliam.Kucharski@Sun.COM
2547*8044SWilliam.Kucharski@Sun.COM          grub> cat /etc/fstab
2548*8044SWilliam.Kucharski@Sun.COM
2549*8044SWilliam.Kucharski@Sun.COM
2550*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: chainloader,  Next: cmp,  Prev: cat,  Up: Command-line and menu entry commands
2551*8044SWilliam.Kucharski@Sun.COM
2552*8044SWilliam.Kucharski@Sun.COM13.3.4 chainloader
2553*8044SWilliam.Kucharski@Sun.COM------------------
2554*8044SWilliam.Kucharski@Sun.COM
2555*8044SWilliam.Kucharski@Sun.COM -- Command: chainloader [`--force'] file
2556*8044SWilliam.Kucharski@Sun.COM     Load FILE as a chain-loader. Like any other file loaded by the
2557*8044SWilliam.Kucharski@Sun.COM     filesystem code, it can use the blocklist notation to grab the
2558*8044SWilliam.Kucharski@Sun.COM     first sector of the current partition with `+1'. If you specify the
2559*8044SWilliam.Kucharski@Sun.COM     option `--force', then load FILE forcibly, whether it has a
2560*8044SWilliam.Kucharski@Sun.COM     correct signature or not. This is required when you want to load a
2561*8044SWilliam.Kucharski@Sun.COM     defective boot loader, such as SCO UnixWare 7.1 (*note SCO
2562*8044SWilliam.Kucharski@Sun.COM     UnixWare::).
2563*8044SWilliam.Kucharski@Sun.COM
2564*8044SWilliam.Kucharski@Sun.COM
2565*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: cmp,  Next: configfile,  Prev: chainloader,  Up: Command-line and menu entry commands
2566*8044SWilliam.Kucharski@Sun.COM
2567*8044SWilliam.Kucharski@Sun.COM13.3.5 cmp
2568*8044SWilliam.Kucharski@Sun.COM----------
2569*8044SWilliam.Kucharski@Sun.COM
2570*8044SWilliam.Kucharski@Sun.COM -- Command: cmp file1 file2
2571*8044SWilliam.Kucharski@Sun.COM     Compare the file FILE1 with the file FILE2. If they differ in
2572*8044SWilliam.Kucharski@Sun.COM     size, print the sizes like this:
2573*8044SWilliam.Kucharski@Sun.COM
2574*8044SWilliam.Kucharski@Sun.COM          Differ in size: 0x1234 [foo], 0x4321 [bar]
2575*8044SWilliam.Kucharski@Sun.COM
2576*8044SWilliam.Kucharski@Sun.COM     If the sizes are equal but the bytes at an offset differ, then
2577*8044SWilliam.Kucharski@Sun.COM     print the bytes like this:
2578*8044SWilliam.Kucharski@Sun.COM
2579*8044SWilliam.Kucharski@Sun.COM          Differ at the offset 777: 0xbe [foo], 0xef [bar]
2580*8044SWilliam.Kucharski@Sun.COM
2581*8044SWilliam.Kucharski@Sun.COM     If they are completely identical, nothing will be printed.
2582*8044SWilliam.Kucharski@Sun.COM
2583*8044SWilliam.Kucharski@Sun.COM
2584*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: configfile,  Next: debug,  Prev: cmp,  Up: Command-line and menu entry commands
2585*8044SWilliam.Kucharski@Sun.COM
2586*8044SWilliam.Kucharski@Sun.COM13.3.6 configfile
2587*8044SWilliam.Kucharski@Sun.COM-----------------
2588*8044SWilliam.Kucharski@Sun.COM
2589*8044SWilliam.Kucharski@Sun.COM -- Command: configfile file
2590*8044SWilliam.Kucharski@Sun.COM     Load FILE as a configuration file.
2591*8044SWilliam.Kucharski@Sun.COM
2592*8044SWilliam.Kucharski@Sun.COM
2593*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: debug,  Next: displayapm,  Prev: configfile,  Up: Command-line and menu entry commands
2594*8044SWilliam.Kucharski@Sun.COM
2595*8044SWilliam.Kucharski@Sun.COM13.3.7 debug
2596*8044SWilliam.Kucharski@Sun.COM------------
2597*8044SWilliam.Kucharski@Sun.COM
2598*8044SWilliam.Kucharski@Sun.COM -- Command: debug
2599*8044SWilliam.Kucharski@Sun.COM     Toggle debug mode (by default it is off). When debug mode is on,
2600*8044SWilliam.Kucharski@Sun.COM     some extra messages are printed to show disk activity. This global
2601*8044SWilliam.Kucharski@Sun.COM     debug flag is mainly useful for GRUB developers when testing new
2602*8044SWilliam.Kucharski@Sun.COM     code.
2603*8044SWilliam.Kucharski@Sun.COM
2604*8044SWilliam.Kucharski@Sun.COM
2605*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: displayapm,  Next: displaymem,  Prev: debug,  Up: Command-line and menu entry commands
2606*8044SWilliam.Kucharski@Sun.COM
2607*8044SWilliam.Kucharski@Sun.COM13.3.8 displayapm
2608*8044SWilliam.Kucharski@Sun.COM-----------------
2609*8044SWilliam.Kucharski@Sun.COM
2610*8044SWilliam.Kucharski@Sun.COM -- Command: displayapm
2611*8044SWilliam.Kucharski@Sun.COM     Display APM BIOS information.
2612*8044SWilliam.Kucharski@Sun.COM
2613*8044SWilliam.Kucharski@Sun.COM
2614*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: displaymem,  Next: embed,  Prev: displayapm,  Up: Command-line and menu entry commands
2615*8044SWilliam.Kucharski@Sun.COM
2616*8044SWilliam.Kucharski@Sun.COM13.3.9 displaymem
2617*8044SWilliam.Kucharski@Sun.COM-----------------
2618*8044SWilliam.Kucharski@Sun.COM
2619*8044SWilliam.Kucharski@Sun.COM -- Command: displaymem
2620*8044SWilliam.Kucharski@Sun.COM     Display what GRUB thinks the system address space map of the
2621*8044SWilliam.Kucharski@Sun.COM     machine is, including all regions of physical RAM installed. GRUB's
2622*8044SWilliam.Kucharski@Sun.COM     "upper/lower memory" display uses the standard BIOS interface for
2623*8044SWilliam.Kucharski@Sun.COM     the available memory in the first megabyte, or "lower memory", and
2624*8044SWilliam.Kucharski@Sun.COM     a synthesized number from various BIOS interfaces of the memory
2625*8044SWilliam.Kucharski@Sun.COM     starting at 1MB and going up to the first chipset hole for "upper
2626*8044SWilliam.Kucharski@Sun.COM     memory" (the standard PC "upper memory" interface is limited to
2627*8044SWilliam.Kucharski@Sun.COM     reporting a maximum of 64MB).
2628*8044SWilliam.Kucharski@Sun.COM
2629*8044SWilliam.Kucharski@Sun.COM
2630*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: embed,  Next: find,  Prev: displaymem,  Up: Command-line and menu entry commands
2631*8044SWilliam.Kucharski@Sun.COM
2632*8044SWilliam.Kucharski@Sun.COM13.3.10 embed
2633*8044SWilliam.Kucharski@Sun.COM-------------
2634*8044SWilliam.Kucharski@Sun.COM
2635*8044SWilliam.Kucharski@Sun.COM -- Command: embed stage1_5 device
2636*8044SWilliam.Kucharski@Sun.COM     Embed the Stage 1.5 STAGE1_5 in the sectors after the MBR if
2637*8044SWilliam.Kucharski@Sun.COM     DEVICE is a drive, or in the "boot loader" area if DEVICE is a FFS
2638*8044SWilliam.Kucharski@Sun.COM     partition or a ReiserFS partition.(1) (*note embed-Footnote-1::)
2639*8044SWilliam.Kucharski@Sun.COM     Print the number of sectors which STAGE1_5 occupies, if successful.
2640*8044SWilliam.Kucharski@Sun.COM
2641*8044SWilliam.Kucharski@Sun.COM     Usually, you don't need to run this command directly. *Note
2642*8044SWilliam.Kucharski@Sun.COM     setup::.
2643*8044SWilliam.Kucharski@Sun.COM
2644*8044SWilliam.Kucharski@Sun.COM
2645*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: embed-Footnotes,  Up: embed
2646*8044SWilliam.Kucharski@Sun.COM
2647*8044SWilliam.Kucharski@Sun.COM   (1) The latter feature has not been implemented yet.
2648*8044SWilliam.Kucharski@Sun.COM
2649*8044SWilliam.Kucharski@Sun.COM
2650*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: find,  Next: fstest,  Prev: embed,  Up: Command-line and menu entry commands
2651*8044SWilliam.Kucharski@Sun.COM
2652*8044SWilliam.Kucharski@Sun.COM13.3.11 find
2653*8044SWilliam.Kucharski@Sun.COM------------
2654*8044SWilliam.Kucharski@Sun.COM
2655*8044SWilliam.Kucharski@Sun.COM -- Command: find filename
2656*8044SWilliam.Kucharski@Sun.COM     Search for the file name FILENAME in all mountable partitions and
2657*8044SWilliam.Kucharski@Sun.COM     print the list of the devices which contain the file. The file
2658*8044SWilliam.Kucharski@Sun.COM     name FILENAME should be an absolute file name like
2659*8044SWilliam.Kucharski@Sun.COM     `/boot/grub/stage1'.
2660*8044SWilliam.Kucharski@Sun.COM
2661*8044SWilliam.Kucharski@Sun.COM
2662*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: fstest,  Next: geometry,  Prev: find,  Up: Command-line and menu entry commands
2663*8044SWilliam.Kucharski@Sun.COM
2664*8044SWilliam.Kucharski@Sun.COM13.3.12 fstest
2665*8044SWilliam.Kucharski@Sun.COM--------------
2666*8044SWilliam.Kucharski@Sun.COM
2667*8044SWilliam.Kucharski@Sun.COM -- Command: fstest
2668*8044SWilliam.Kucharski@Sun.COM     Toggle filesystem test mode.  Filesystem test mode, when turned
2669*8044SWilliam.Kucharski@Sun.COM     on, prints out data corresponding to all the device reads and what
2670*8044SWilliam.Kucharski@Sun.COM     values are being sent to the low-level routines. The format is
2671*8044SWilliam.Kucharski@Sun.COM     `<PARTITION-OFFSET-SECTOR, BYTE-OFFSET, BYTE-LENGTH>' for
2672*8044SWilliam.Kucharski@Sun.COM     high-level reads inside a partition, and `[DISK-OFFSET-SECTOR]'
2673*8044SWilliam.Kucharski@Sun.COM     for low-level sector requests from the disk.  Filesystem test mode
2674*8044SWilliam.Kucharski@Sun.COM     is turned off by any use of the `install' (*note install::) or
2675*8044SWilliam.Kucharski@Sun.COM     `testload' (*note testload::) commands.
2676*8044SWilliam.Kucharski@Sun.COM
2677*8044SWilliam.Kucharski@Sun.COM
2678*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: geometry,  Next: halt,  Prev: fstest,  Up: Command-line and menu entry commands
2679*8044SWilliam.Kucharski@Sun.COM
2680*8044SWilliam.Kucharski@Sun.COM13.3.13 geometry
2681*8044SWilliam.Kucharski@Sun.COM----------------
2682*8044SWilliam.Kucharski@Sun.COM
2683*8044SWilliam.Kucharski@Sun.COM -- Command: geometry drive [cylinder head sector [total_sector]]
2684*8044SWilliam.Kucharski@Sun.COM     Print the information for the drive DRIVE. In the grub shell, you
2685*8044SWilliam.Kucharski@Sun.COM     can set the geometry of the drive arbitrarily. The number of
2686*8044SWilliam.Kucharski@Sun.COM     cylinders, the number of heads, the number of sectors and the
2687*8044SWilliam.Kucharski@Sun.COM     number of total sectors are set to CYLINDER, HEAD, SECTOR and
2688*8044SWilliam.Kucharski@Sun.COM     TOTAL_SECTOR, respectively. If you omit TOTAL_SECTOR, then it will
2689*8044SWilliam.Kucharski@Sun.COM     be calculated based on the C/H/S values automatically.
2690*8044SWilliam.Kucharski@Sun.COM
2691*8044SWilliam.Kucharski@Sun.COM
2692*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: halt,  Next: help,  Prev: geometry,  Up: Command-line and menu entry commands
2693*8044SWilliam.Kucharski@Sun.COM
2694*8044SWilliam.Kucharski@Sun.COM13.3.14 halt
2695*8044SWilliam.Kucharski@Sun.COM------------
2696*8044SWilliam.Kucharski@Sun.COM
2697*8044SWilliam.Kucharski@Sun.COM -- Command: halt `--no-apm'
2698*8044SWilliam.Kucharski@Sun.COM     The command halts the computer. If the `--no-apm' option is
2699*8044SWilliam.Kucharski@Sun.COM     specified, no APM BIOS call is performed. Otherwise, the computer
2700*8044SWilliam.Kucharski@Sun.COM     is shut down using APM.
2701*8044SWilliam.Kucharski@Sun.COM
2702*8044SWilliam.Kucharski@Sun.COM
2703*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: help,  Next: impsprobe,  Prev: halt,  Up: Command-line and menu entry commands
2704*8044SWilliam.Kucharski@Sun.COM
2705*8044SWilliam.Kucharski@Sun.COM13.3.15 help
2706*8044SWilliam.Kucharski@Sun.COM------------
2707*8044SWilliam.Kucharski@Sun.COM
2708*8044SWilliam.Kucharski@Sun.COM -- Command: help `--all' [pattern ...]
2709*8044SWilliam.Kucharski@Sun.COM     Display helpful information about builtin commands. If you do not
2710*8044SWilliam.Kucharski@Sun.COM     specify PATTERN, this command shows short descriptions of most of
2711*8044SWilliam.Kucharski@Sun.COM     available commands. If you specify the option `--all' to this
2712*8044SWilliam.Kucharski@Sun.COM     command, short descriptions of rarely used commands (such as *Note
2713*8044SWilliam.Kucharski@Sun.COM     testload::) are displayed as well.
2714*8044SWilliam.Kucharski@Sun.COM
2715*8044SWilliam.Kucharski@Sun.COM     If you specify any PATTERNS, it displays longer information about
2716*8044SWilliam.Kucharski@Sun.COM     each of the commands which match those PATTERNS.
2717*8044SWilliam.Kucharski@Sun.COM
2718*8044SWilliam.Kucharski@Sun.COM
2719*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: impsprobe,  Next: initrd,  Prev: help,  Up: Command-line and menu entry commands
2720*8044SWilliam.Kucharski@Sun.COM
2721*8044SWilliam.Kucharski@Sun.COM13.3.16 impsprobe
2722*8044SWilliam.Kucharski@Sun.COM-----------------
2723*8044SWilliam.Kucharski@Sun.COM
2724*8044SWilliam.Kucharski@Sun.COM -- Command: impsprobe
2725*8044SWilliam.Kucharski@Sun.COM     Probe the Intel Multiprocessor Specification 1.1 or 1.4
2726*8044SWilliam.Kucharski@Sun.COM     configuration table and boot the various CPUs which are found into
2727*8044SWilliam.Kucharski@Sun.COM     a tight loop. This command can be used only in the Stage 2, but
2728*8044SWilliam.Kucharski@Sun.COM     not in the grub shell.
2729*8044SWilliam.Kucharski@Sun.COM
2730*8044SWilliam.Kucharski@Sun.COM
2731*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: initrd,  Next: install,  Prev: impsprobe,  Up: Command-line and menu entry commands
2732*8044SWilliam.Kucharski@Sun.COM
2733*8044SWilliam.Kucharski@Sun.COM13.3.17 initrd
2734*8044SWilliam.Kucharski@Sun.COM--------------
2735*8044SWilliam.Kucharski@Sun.COM
2736*8044SWilliam.Kucharski@Sun.COM -- Command: initrd file ...
2737*8044SWilliam.Kucharski@Sun.COM     Load an initial ramdisk for a Linux format boot image and set the
2738*8044SWilliam.Kucharski@Sun.COM     appropriate parameters in the Linux setup area in memory. See also
2739*8044SWilliam.Kucharski@Sun.COM     *Note GNU/Linux::.
2740*8044SWilliam.Kucharski@Sun.COM
2741*8044SWilliam.Kucharski@Sun.COM
2742*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: install,  Next: ioprobe,  Prev: initrd,  Up: Command-line and menu entry commands
2743*8044SWilliam.Kucharski@Sun.COM
2744*8044SWilliam.Kucharski@Sun.COM13.3.18 install
2745*8044SWilliam.Kucharski@Sun.COM---------------
2746*8044SWilliam.Kucharski@Sun.COM
2747*8044SWilliam.Kucharski@Sun.COM -- Command: install [`--force-lba'] [`--stage2=os_stage2_file']
2748*8044SWilliam.Kucharski@Sun.COM          stage1_file [`d'] dest_dev stage2_file [addr] [`p']
2749*8044SWilliam.Kucharski@Sun.COM          [config_file] [real_config_file]
2750*8044SWilliam.Kucharski@Sun.COM     This command is fairly complex, and you should not use this command
2751*8044SWilliam.Kucharski@Sun.COM     unless you are familiar with GRUB. Use `setup' (*note setup::)
2752*8044SWilliam.Kucharski@Sun.COM     instead.
2753*8044SWilliam.Kucharski@Sun.COM
2754*8044SWilliam.Kucharski@Sun.COM     In short, it will perform a full install presuming the Stage 2 or
2755*8044SWilliam.Kucharski@Sun.COM     Stage 1.5(1) (*note install-Footnote-1::) is in its final install
2756*8044SWilliam.Kucharski@Sun.COM     location.
2757*8044SWilliam.Kucharski@Sun.COM
2758*8044SWilliam.Kucharski@Sun.COM     In slightly more detail, it will load STAGE1_FILE, validate that
2759*8044SWilliam.Kucharski@Sun.COM     it is a GRUB Stage 1 of the right version number, install in it a
2760*8044SWilliam.Kucharski@Sun.COM     blocklist for loading STAGE2_FILE as a Stage 2. If the option `d'
2761*8044SWilliam.Kucharski@Sun.COM     is present, the Stage 1 will always look for the actual disk
2762*8044SWilliam.Kucharski@Sun.COM     STAGE2_FILE was installed on, rather than using the booting drive.
2763*8044SWilliam.Kucharski@Sun.COM     The Stage 2 will be loaded at address ADDR, which must be `0x8000'
2764*8044SWilliam.Kucharski@Sun.COM     for a true Stage 2, and `0x2000' for a Stage 1.5. If ADDR is not
2765*8044SWilliam.Kucharski@Sun.COM     present, GRUB will determine the address automatically. It then
2766*8044SWilliam.Kucharski@Sun.COM     writes the completed Stage 1 to the first block of the device
2767*8044SWilliam.Kucharski@Sun.COM     DEST_DEV. If the options `p' or CONFIG_FILE are present, then it
2768*8044SWilliam.Kucharski@Sun.COM     reads the first block of stage2, modifies it with the values of
2769*8044SWilliam.Kucharski@Sun.COM     the partition STAGE2_FILE was found on (for `p') or places the
2770*8044SWilliam.Kucharski@Sun.COM     string CONFIG_FILE into the area telling the stage2 where to look
2771*8044SWilliam.Kucharski@Sun.COM     for a configuration file at boot time. Likewise, if
2772*8044SWilliam.Kucharski@Sun.COM     REAL_CONFIG_FILE is present and STAGE2_FILE is a Stage 1.5, then
2773*8044SWilliam.Kucharski@Sun.COM     the Stage 2 CONFIG_FILE is patched with the configuration file
2774*8044SWilliam.Kucharski@Sun.COM     name REAL_CONFIG_FILE. This command preserves the DOS BPB (and for
2775*8044SWilliam.Kucharski@Sun.COM     hard disks, the partition table) of the sector the Stage 1 is to
2776*8044SWilliam.Kucharski@Sun.COM     be installed into.
2777*8044SWilliam.Kucharski@Sun.COM
2778*8044SWilliam.Kucharski@Sun.COM     *Caution:* Several buggy BIOSes don't pass a booting drive
2779*8044SWilliam.Kucharski@Sun.COM     properly when booting from a hard disk drive. Therefore, you will
2780*8044SWilliam.Kucharski@Sun.COM     unfortunately have to specify the option `d', whether your Stage2
2781*8044SWilliam.Kucharski@Sun.COM     resides at the booting drive or not, if you have such a BIOS. We
2782*8044SWilliam.Kucharski@Sun.COM     know these are defective in this way:
2783*8044SWilliam.Kucharski@Sun.COM
2784*8044SWilliam.Kucharski@Sun.COM
2785*8044SWilliam.Kucharski@Sun.COM          Fujitsu LifeBook 400 BIOS version 31J0103A
2786*8044SWilliam.Kucharski@Sun.COM
2787*8044SWilliam.Kucharski@Sun.COM
2788*8044SWilliam.Kucharski@Sun.COM          HP Vectra XU 6/200 BIOS version GG.06.11
2789*8044SWilliam.Kucharski@Sun.COM
2790*8044SWilliam.Kucharski@Sun.COM     *Caution2:* A number of BIOSes don't return a correct LBA support
2791*8044SWilliam.Kucharski@Sun.COM     bitmap even if they do have the support. So GRUB provides a
2792*8044SWilliam.Kucharski@Sun.COM     solution to ignore the wrong bitmap, that is, the option
2793*8044SWilliam.Kucharski@Sun.COM     `--force-lba'. Don't use this option if you know that your BIOS
2794*8044SWilliam.Kucharski@Sun.COM     doesn't have LBA support.
2795*8044SWilliam.Kucharski@Sun.COM
2796*8044SWilliam.Kucharski@Sun.COM     *Caution3:* You must specify the option `--stage2' in the grub
2797*8044SWilliam.Kucharski@Sun.COM     shell, if you cannot unmount the filesystem where your stage2 file
2798*8044SWilliam.Kucharski@Sun.COM     resides. The argument should be the file name in your operating
2799*8044SWilliam.Kucharski@Sun.COM     system.
2800*8044SWilliam.Kucharski@Sun.COM
2801*8044SWilliam.Kucharski@Sun.COM
2802*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: install-Footnotes,  Up: install
2803*8044SWilliam.Kucharski@Sun.COM
2804*8044SWilliam.Kucharski@Sun.COM   (1) They're loaded the same way, so we will refer to the Stage 1.5
2805*8044SWilliam.Kucharski@Sun.COMas a Stage 2 from now on.
2806*8044SWilliam.Kucharski@Sun.COM
2807*8044SWilliam.Kucharski@Sun.COM
2808*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: ioprobe,  Next: kernel,  Prev: install,  Up: Command-line and menu entry commands
2809*8044SWilliam.Kucharski@Sun.COM
2810*8044SWilliam.Kucharski@Sun.COM13.3.19 ioprobe
2811*8044SWilliam.Kucharski@Sun.COM---------------
2812*8044SWilliam.Kucharski@Sun.COM
2813*8044SWilliam.Kucharski@Sun.COM -- Command: ioprobe drive
2814*8044SWilliam.Kucharski@Sun.COM     Probe I/O ports used for the drive DRIVE. This command will list
2815*8044SWilliam.Kucharski@Sun.COM     the I/O ports on the screen. For technical information, *Note
2816*8044SWilliam.Kucharski@Sun.COM     Internals::.
2817*8044SWilliam.Kucharski@Sun.COM
2818*8044SWilliam.Kucharski@Sun.COM
2819*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: kernel,  Next: lock,  Prev: ioprobe,  Up: Command-line and menu entry commands
2820*8044SWilliam.Kucharski@Sun.COM
2821*8044SWilliam.Kucharski@Sun.COM13.3.20 kernel
2822*8044SWilliam.Kucharski@Sun.COM--------------
2823*8044SWilliam.Kucharski@Sun.COM
2824*8044SWilliam.Kucharski@Sun.COM -- Command: kernel [`--type=type'] [`--no-mem-option'] file ...
2825*8044SWilliam.Kucharski@Sun.COM     Attempt to load the primary boot image (Multiboot a.out or ELF,
2826*8044SWilliam.Kucharski@Sun.COM     Linux zImage or bzImage, FreeBSD a.out, NetBSD a.out, etc.) from
2827*8044SWilliam.Kucharski@Sun.COM     FILE. The rest of the line is passed verbatim as the "kernel
2828*8044SWilliam.Kucharski@Sun.COM     command-line". Any modules must be reloaded after using this
2829*8044SWilliam.Kucharski@Sun.COM     command.
2830*8044SWilliam.Kucharski@Sun.COM
2831*8044SWilliam.Kucharski@Sun.COM     This command also accepts the option `--type' so that you can
2832*8044SWilliam.Kucharski@Sun.COM     specify the kernel type of FILE explicitly. The argument TYPE must
2833*8044SWilliam.Kucharski@Sun.COM     be one of these: `netbsd', `freebsd', `openbsd', `linux',
2834*8044SWilliam.Kucharski@Sun.COM     `biglinux', and `multiboot'. However, you need to specify it only
2835*8044SWilliam.Kucharski@Sun.COM     if you want to load a NetBSD ELF kernel, because GRUB can
2836*8044SWilliam.Kucharski@Sun.COM     automatically determine a kernel type in the other cases, quite
2837*8044SWilliam.Kucharski@Sun.COM     safely.
2838*8044SWilliam.Kucharski@Sun.COM
2839*8044SWilliam.Kucharski@Sun.COM     The option `--no-mem-option' is effective only for Linux. If the
2840*8044SWilliam.Kucharski@Sun.COM     option is specified, GRUB doesn't pass the option `mem=' to the
2841*8044SWilliam.Kucharski@Sun.COM     kernel.  This option is implied for Linux kernels 2.4.18 and newer.
2842*8044SWilliam.Kucharski@Sun.COM
2843*8044SWilliam.Kucharski@Sun.COM
2844*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: lock,  Next: makeactive,  Prev: kernel,  Up: Command-line and menu entry commands
2845*8044SWilliam.Kucharski@Sun.COM
2846*8044SWilliam.Kucharski@Sun.COM13.3.21 lock
2847*8044SWilliam.Kucharski@Sun.COM------------
2848*8044SWilliam.Kucharski@Sun.COM
2849*8044SWilliam.Kucharski@Sun.COM -- Command: lock
2850*8044SWilliam.Kucharski@Sun.COM     Prevent normal users from executing arbitrary menu entries. You
2851*8044SWilliam.Kucharski@Sun.COM     must use the command `password' if you really want this command to
2852*8044SWilliam.Kucharski@Sun.COM     be useful (*note password::).
2853*8044SWilliam.Kucharski@Sun.COM
2854*8044SWilliam.Kucharski@Sun.COM     This command is used in a menu, as shown in this example:
2855*8044SWilliam.Kucharski@Sun.COM
2856*8044SWilliam.Kucharski@Sun.COM          title This entry is too dangerous to be executed by normal users
2857*8044SWilliam.Kucharski@Sun.COM          lock
2858*8044SWilliam.Kucharski@Sun.COM          root (hd0,a)
2859*8044SWilliam.Kucharski@Sun.COM          kernel /no-security-os
2860*8044SWilliam.Kucharski@Sun.COM
2861*8044SWilliam.Kucharski@Sun.COM     See also *Note Security::.
2862*8044SWilliam.Kucharski@Sun.COM
2863*8044SWilliam.Kucharski@Sun.COM
2864*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: makeactive,  Next: map,  Prev: lock,  Up: Command-line and menu entry commands
2865*8044SWilliam.Kucharski@Sun.COM
2866*8044SWilliam.Kucharski@Sun.COM13.3.22 makeactive
2867*8044SWilliam.Kucharski@Sun.COM------------------
2868*8044SWilliam.Kucharski@Sun.COM
2869*8044SWilliam.Kucharski@Sun.COM -- Command: makeactive
2870*8044SWilliam.Kucharski@Sun.COM     Set the active partition on the root disk to GRUB's root device.
2871*8044SWilliam.Kucharski@Sun.COM     This command is limited to _primary_ PC partitions on a hard disk.
2872*8044SWilliam.Kucharski@Sun.COM
2873*8044SWilliam.Kucharski@Sun.COM
2874*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: map,  Next: md5crypt,  Prev: makeactive,  Up: Command-line and menu entry commands
2875*8044SWilliam.Kucharski@Sun.COM
2876*8044SWilliam.Kucharski@Sun.COM13.3.23 map
2877*8044SWilliam.Kucharski@Sun.COM-----------
2878*8044SWilliam.Kucharski@Sun.COM
2879*8044SWilliam.Kucharski@Sun.COM -- Command: map to_drive from_drive
2880*8044SWilliam.Kucharski@Sun.COM     Map the drive FROM_DRIVE to the drive TO_DRIVE. This is necessary
2881*8044SWilliam.Kucharski@Sun.COM     when you chain-load some operating systems, such as DOS, if such
2882*8044SWilliam.Kucharski@Sun.COM     an OS resides at a non-first drive. Here is an example:
2883*8044SWilliam.Kucharski@Sun.COM
2884*8044SWilliam.Kucharski@Sun.COM          grub> map (hd0) (hd1)
2885*8044SWilliam.Kucharski@Sun.COM          grub> map (hd1) (hd0)
2886*8044SWilliam.Kucharski@Sun.COM
2887*8044SWilliam.Kucharski@Sun.COM     The example exchanges the order between the first hard disk and the
2888*8044SWilliam.Kucharski@Sun.COM     second hard disk. See also *Note DOS/Windows::.
2889*8044SWilliam.Kucharski@Sun.COM
2890*8044SWilliam.Kucharski@Sun.COM
2891*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: md5crypt,  Next: module,  Prev: map,  Up: Command-line and menu entry commands
2892*8044SWilliam.Kucharski@Sun.COM
2893*8044SWilliam.Kucharski@Sun.COM13.3.24 md5crypt
2894*8044SWilliam.Kucharski@Sun.COM----------------
2895*8044SWilliam.Kucharski@Sun.COM
2896*8044SWilliam.Kucharski@Sun.COM -- Command: md5crypt
2897*8044SWilliam.Kucharski@Sun.COM     Prompt to enter a password, and encrypt it in MD5 format. The
2898*8044SWilliam.Kucharski@Sun.COM     encrypted password can be used with the command `password' (*note
2899*8044SWilliam.Kucharski@Sun.COM     password::). See also *Note Security::.
2900*8044SWilliam.Kucharski@Sun.COM
2901*8044SWilliam.Kucharski@Sun.COM
2902*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: module,  Next: modulenounzip,  Prev: md5crypt,  Up: Command-line and menu entry commands
2903*8044SWilliam.Kucharski@Sun.COM
2904*8044SWilliam.Kucharski@Sun.COM13.3.25 module
2905*8044SWilliam.Kucharski@Sun.COM--------------
2906*8044SWilliam.Kucharski@Sun.COM
2907*8044SWilliam.Kucharski@Sun.COM -- Command: module file ...
2908*8044SWilliam.Kucharski@Sun.COM     Load a boot module FILE for a Multiboot format boot image (no
2909*8044SWilliam.Kucharski@Sun.COM     interpretation of the file contents are made, so the user of this
2910*8044SWilliam.Kucharski@Sun.COM     command must know what the kernel in question expects). The rest
2911*8044SWilliam.Kucharski@Sun.COM     of the line is passed as the "module command-line", like the
2912*8044SWilliam.Kucharski@Sun.COM     `kernel' command. You must load a Multiboot kernel image before
2913*8044SWilliam.Kucharski@Sun.COM     loading any module. See also *Note modulenounzip::.
2914*8044SWilliam.Kucharski@Sun.COM
2915*8044SWilliam.Kucharski@Sun.COM
2916*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: modulenounzip,  Next: pause,  Prev: module,  Up: Command-line and menu entry commands
2917*8044SWilliam.Kucharski@Sun.COM
2918*8044SWilliam.Kucharski@Sun.COM13.3.26 modulenounzip
2919*8044SWilliam.Kucharski@Sun.COM---------------------
2920*8044SWilliam.Kucharski@Sun.COM
2921*8044SWilliam.Kucharski@Sun.COM -- Command: modulenounzip file ...
2922*8044SWilliam.Kucharski@Sun.COM     The same as `module' (*note module::), except that automatic
2923*8044SWilliam.Kucharski@Sun.COM     decompression is disabled.
2924*8044SWilliam.Kucharski@Sun.COM
2925*8044SWilliam.Kucharski@Sun.COM
2926*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: pause,  Next: quit,  Prev: modulenounzip,  Up: Command-line and menu entry commands
2927*8044SWilliam.Kucharski@Sun.COM
2928*8044SWilliam.Kucharski@Sun.COM13.3.27 pause
2929*8044SWilliam.Kucharski@Sun.COM-------------
2930*8044SWilliam.Kucharski@Sun.COM
2931*8044SWilliam.Kucharski@Sun.COM -- Command: pause message ...
2932*8044SWilliam.Kucharski@Sun.COM     Print the MESSAGE, then wait until a key is pressed. Note that
2933*8044SWilliam.Kucharski@Sun.COM     placing <^G> (ASCII code 7) in the message will cause the speaker
2934*8044SWilliam.Kucharski@Sun.COM     to emit the standard beep sound, which is useful when prompting
2935*8044SWilliam.Kucharski@Sun.COM     the user to change floppies.
2936*8044SWilliam.Kucharski@Sun.COM
2937*8044SWilliam.Kucharski@Sun.COM
2938*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: quit,  Next: reboot,  Prev: pause,  Up: Command-line and menu entry commands
2939*8044SWilliam.Kucharski@Sun.COM
2940*8044SWilliam.Kucharski@Sun.COM13.3.28 quit
2941*8044SWilliam.Kucharski@Sun.COM------------
2942*8044SWilliam.Kucharski@Sun.COM
2943*8044SWilliam.Kucharski@Sun.COM -- Command: quit
2944*8044SWilliam.Kucharski@Sun.COM     Exit from the grub shell `grub' (*note Invoking the grub shell::).
2945*8044SWilliam.Kucharski@Sun.COM     This command can be used only in the grub shell.
2946*8044SWilliam.Kucharski@Sun.COM
2947*8044SWilliam.Kucharski@Sun.COM
2948*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: reboot,  Next: read,  Prev: quit,  Up: Command-line and menu entry commands
2949*8044SWilliam.Kucharski@Sun.COM
2950*8044SWilliam.Kucharski@Sun.COM13.3.29 reboot
2951*8044SWilliam.Kucharski@Sun.COM--------------
2952*8044SWilliam.Kucharski@Sun.COM
2953*8044SWilliam.Kucharski@Sun.COM -- Command: reboot
2954*8044SWilliam.Kucharski@Sun.COM     Reboot the computer.
2955*8044SWilliam.Kucharski@Sun.COM
2956*8044SWilliam.Kucharski@Sun.COM
2957*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: read,  Next: root,  Prev: reboot,  Up: Command-line and menu entry commands
2958*8044SWilliam.Kucharski@Sun.COM
2959*8044SWilliam.Kucharski@Sun.COM13.3.30 read
2960*8044SWilliam.Kucharski@Sun.COM------------
2961*8044SWilliam.Kucharski@Sun.COM
2962*8044SWilliam.Kucharski@Sun.COM -- Command: read addr
2963*8044SWilliam.Kucharski@Sun.COM     Read a 32-bit value from memory at address ADDR and display it in
2964*8044SWilliam.Kucharski@Sun.COM     hex format.
2965*8044SWilliam.Kucharski@Sun.COM
2966*8044SWilliam.Kucharski@Sun.COM
2967*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: root,  Next: rootnoverify,  Prev: read,  Up: Command-line and menu entry commands
2968*8044SWilliam.Kucharski@Sun.COM
2969*8044SWilliam.Kucharski@Sun.COM13.3.31 root
2970*8044SWilliam.Kucharski@Sun.COM------------
2971*8044SWilliam.Kucharski@Sun.COM
2972*8044SWilliam.Kucharski@Sun.COM -- Command: root device [hdbias]
2973*8044SWilliam.Kucharski@Sun.COM     Set the current "root device" to the device DEVICE, then attempt
2974*8044SWilliam.Kucharski@Sun.COM     to mount it to get the partition size (for passing the partition
2975*8044SWilliam.Kucharski@Sun.COM     descriptor in `ES:ESI', used by some chain-loaded boot loaders),
2976*8044SWilliam.Kucharski@Sun.COM     the BSD drive-type (for booting BSD kernels using their native
2977*8044SWilliam.Kucharski@Sun.COM     boot format), and correctly determine the PC partition where a BSD
2978*8044SWilliam.Kucharski@Sun.COM     sub-partition is located. The optional HDBIAS parameter is a
2979*8044SWilliam.Kucharski@Sun.COM     number to tell a BSD kernel how many BIOS drive numbers are on
2980*8044SWilliam.Kucharski@Sun.COM     controllers before the current one. For example, if there is an
2981*8044SWilliam.Kucharski@Sun.COM     IDE disk and a SCSI disk, and your FreeBSD root partition is on
2982*8044SWilliam.Kucharski@Sun.COM     the SCSI disk, then use a `1' for HDBIAS.
2983*8044SWilliam.Kucharski@Sun.COM
2984*8044SWilliam.Kucharski@Sun.COM     See also *Note rootnoverify::.
2985*8044SWilliam.Kucharski@Sun.COM
2986*8044SWilliam.Kucharski@Sun.COM
2987*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: rootnoverify,  Next: savedefault,  Prev: root,  Up: Command-line and menu entry commands
2988*8044SWilliam.Kucharski@Sun.COM
2989*8044SWilliam.Kucharski@Sun.COM13.3.32 rootnoverify
2990*8044SWilliam.Kucharski@Sun.COM--------------------
2991*8044SWilliam.Kucharski@Sun.COM
2992*8044SWilliam.Kucharski@Sun.COM -- Command: rootnoverify device [hdbias]
2993*8044SWilliam.Kucharski@Sun.COM     Similar to `root' (*note root::), but don't attempt to mount the
2994*8044SWilliam.Kucharski@Sun.COM     partition. This is useful for when an OS is outside of the area of
2995*8044SWilliam.Kucharski@Sun.COM     the disk that GRUB can read, but setting the correct root device
2996*8044SWilliam.Kucharski@Sun.COM     is still desired. Note that the items mentioned in `root' above
2997*8044SWilliam.Kucharski@Sun.COM     which derived from attempting the mount will _not_ work correctly.
2998*8044SWilliam.Kucharski@Sun.COM
2999*8044SWilliam.Kucharski@Sun.COM
3000*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: savedefault,  Next: setup,  Prev: rootnoverify,  Up: Command-line and menu entry commands
3001*8044SWilliam.Kucharski@Sun.COM
3002*8044SWilliam.Kucharski@Sun.COM13.3.33 savedefault
3003*8044SWilliam.Kucharski@Sun.COM-------------------
3004*8044SWilliam.Kucharski@Sun.COM
3005*8044SWilliam.Kucharski@Sun.COM -- Command: savedefault num
3006*8044SWilliam.Kucharski@Sun.COM     Save the current menu entry or NUM if specified as a default
3007*8044SWilliam.Kucharski@Sun.COM     entry. Here is an example:
3008*8044SWilliam.Kucharski@Sun.COM
3009*8044SWilliam.Kucharski@Sun.COM          default saved
3010*8044SWilliam.Kucharski@Sun.COM          timeout 10
3011*8044SWilliam.Kucharski@Sun.COM
3012*8044SWilliam.Kucharski@Sun.COM          title GNU/Linux
3013*8044SWilliam.Kucharski@Sun.COM          root (hd0,0)
3014*8044SWilliam.Kucharski@Sun.COM          kernel /boot/vmlinuz root=/dev/sda1 vga=ext
3015*8044SWilliam.Kucharski@Sun.COM          initrd /boot/initrd
3016*8044SWilliam.Kucharski@Sun.COM          savedefault
3017*8044SWilliam.Kucharski@Sun.COM
3018*8044SWilliam.Kucharski@Sun.COM          title FreeBSD
3019*8044SWilliam.Kucharski@Sun.COM          root (hd0,a)
3020*8044SWilliam.Kucharski@Sun.COM          kernel /boot/loader
3021*8044SWilliam.Kucharski@Sun.COM          savedefault
3022*8044SWilliam.Kucharski@Sun.COM
3023*8044SWilliam.Kucharski@Sun.COM     With this configuration, GRUB will choose the entry booted
3024*8044SWilliam.Kucharski@Sun.COM     previously as the default entry.
3025*8044SWilliam.Kucharski@Sun.COM
3026*8044SWilliam.Kucharski@Sun.COM     You can specify `fallback' instead of a number. Then, next
3027*8044SWilliam.Kucharski@Sun.COM     fallback entry is saved. Next fallback entry is chosen from
3028*8044SWilliam.Kucharski@Sun.COM     fallback entries. Normally, this will be the first entry in
3029*8044SWilliam.Kucharski@Sun.COM     fallback ones.
3030*8044SWilliam.Kucharski@Sun.COM
3031*8044SWilliam.Kucharski@Sun.COM     See also *Note default:: and *Note Invoking grub-set-default::.
3032*8044SWilliam.Kucharski@Sun.COM
3033*8044SWilliam.Kucharski@Sun.COM
3034*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: setup,  Next: testload,  Prev: savedefault,  Up: Command-line and menu entry commands
3035*8044SWilliam.Kucharski@Sun.COM
3036*8044SWilliam.Kucharski@Sun.COM13.3.34 setup
3037*8044SWilliam.Kucharski@Sun.COM-------------
3038*8044SWilliam.Kucharski@Sun.COM
3039*8044SWilliam.Kucharski@Sun.COM -- Command: setup [`--force-lba'] [`--stage2=os_stage2_file']
3040*8044SWilliam.Kucharski@Sun.COM          [`--prefix=dir'] install_device [image_device]
3041*8044SWilliam.Kucharski@Sun.COM     Set up the installation of GRUB automatically. This command uses
3042*8044SWilliam.Kucharski@Sun.COM     the more flexible command `install' (*note install::) in the
3043*8044SWilliam.Kucharski@Sun.COM     backend and installs GRUB into the device INSTALL_DEVICE. If
3044*8044SWilliam.Kucharski@Sun.COM     IMAGE_DEVICE is specified, then find the GRUB images (*note
3045*8044SWilliam.Kucharski@Sun.COM     Images::) in the device IMAGE_DEVICE, otherwise use the current
3046*8044SWilliam.Kucharski@Sun.COM     "root device", which can be set by the command `root'. If
3047*8044SWilliam.Kucharski@Sun.COM     INSTALL_DEVICE is a hard disk, then embed a Stage 1.5 in the disk
3048*8044SWilliam.Kucharski@Sun.COM     if possible.
3049*8044SWilliam.Kucharski@Sun.COM
3050*8044SWilliam.Kucharski@Sun.COM     The option `--prefix' specifies the directory under which GRUB
3051*8044SWilliam.Kucharski@Sun.COM     images are put. If it is not specified, GRUB automatically
3052*8044SWilliam.Kucharski@Sun.COM     searches them in `/boot/grub' and `/grub'.
3053*8044SWilliam.Kucharski@Sun.COM
3054*8044SWilliam.Kucharski@Sun.COM     The options `--force-lba' and `--stage2' are just passed to
3055*8044SWilliam.Kucharski@Sun.COM     `install' if specified. *Note install::, for more information.
3056*8044SWilliam.Kucharski@Sun.COM
3057*8044SWilliam.Kucharski@Sun.COM
3058*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: testload,  Next: testvbe,  Prev: setup,  Up: Command-line and menu entry commands
3059*8044SWilliam.Kucharski@Sun.COM
3060*8044SWilliam.Kucharski@Sun.COM13.3.35 testload
3061*8044SWilliam.Kucharski@Sun.COM----------------
3062*8044SWilliam.Kucharski@Sun.COM
3063*8044SWilliam.Kucharski@Sun.COM -- Command: testload file
3064*8044SWilliam.Kucharski@Sun.COM     Read the entire contents of FILE in several different ways and
3065*8044SWilliam.Kucharski@Sun.COM     compare them, to test the filesystem code. The output is somewhat
3066*8044SWilliam.Kucharski@Sun.COM     cryptic, but if no errors are reported and the final `i=X,
3067*8044SWilliam.Kucharski@Sun.COM     filepos=Y' reading has X and Y equal, then it is definitely
3068*8044SWilliam.Kucharski@Sun.COM     consistent, and very likely works correctly subject to a
3069*8044SWilliam.Kucharski@Sun.COM     consistent offset error. If this test succeeds, then a good next
3070*8044SWilliam.Kucharski@Sun.COM     step is to try loading a kernel.
3071*8044SWilliam.Kucharski@Sun.COM
3072*8044SWilliam.Kucharski@Sun.COM
3073*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: testvbe,  Next: uppermem,  Prev: testload,  Up: Command-line and menu entry commands
3074*8044SWilliam.Kucharski@Sun.COM
3075*8044SWilliam.Kucharski@Sun.COM13.3.36 testvbe
3076*8044SWilliam.Kucharski@Sun.COM---------------
3077*8044SWilliam.Kucharski@Sun.COM
3078*8044SWilliam.Kucharski@Sun.COM -- Command: testvbe mode
3079*8044SWilliam.Kucharski@Sun.COM     Test the VESA BIOS EXTENSION mode MODE. This command will switch
3080*8044SWilliam.Kucharski@Sun.COM     your video card to the graphics mode, and show an endless
3081*8044SWilliam.Kucharski@Sun.COM     animation. Hit any key to return. See also *Note vbeprobe::.
3082*8044SWilliam.Kucharski@Sun.COM
3083*8044SWilliam.Kucharski@Sun.COM
3084*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: uppermem,  Next: vbeprobe,  Prev: testvbe,  Up: Command-line and menu entry commands
3085*8044SWilliam.Kucharski@Sun.COM
3086*8044SWilliam.Kucharski@Sun.COM13.3.37 uppermem
3087*8044SWilliam.Kucharski@Sun.COM----------------
3088*8044SWilliam.Kucharski@Sun.COM
3089*8044SWilliam.Kucharski@Sun.COM -- Command: uppermem kbytes
3090*8044SWilliam.Kucharski@Sun.COM     Force GRUB to assume that only KBYTES kilobytes of upper memory
3091*8044SWilliam.Kucharski@Sun.COM     are installed. Any system address range maps are discarded.
3092*8044SWilliam.Kucharski@Sun.COM
3093*8044SWilliam.Kucharski@Sun.COM     *Caution:* This should be used with great caution, and should only
3094*8044SWilliam.Kucharski@Sun.COM     be necessary on some old machines. GRUB's BIOS probe can pick up
3095*8044SWilliam.Kucharski@Sun.COM     all RAM on all new machines the author has ever heard of. It can
3096*8044SWilliam.Kucharski@Sun.COM     also be used for debugging purposes to lie to an OS.
3097*8044SWilliam.Kucharski@Sun.COM
3098*8044SWilliam.Kucharski@Sun.COM
3099*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: vbeprobe,  Prev: uppermem,  Up: Command-line and menu entry commands
3100*8044SWilliam.Kucharski@Sun.COM
3101*8044SWilliam.Kucharski@Sun.COM13.3.38 vbeprobe
3102*8044SWilliam.Kucharski@Sun.COM----------------
3103*8044SWilliam.Kucharski@Sun.COM
3104*8044SWilliam.Kucharski@Sun.COM -- Command: vbeprobe [mode]
3105*8044SWilliam.Kucharski@Sun.COM     Probe VESA BIOS EXTENSION information. If the mode MODE is
3106*8044SWilliam.Kucharski@Sun.COM     specified, show only the information about MODE. Otherwise, this
3107*8044SWilliam.Kucharski@Sun.COM     command lists up available VBE modes on the screen. See also *Note
3108*8044SWilliam.Kucharski@Sun.COM     testvbe::.
3109*8044SWilliam.Kucharski@Sun.COM
3110*8044SWilliam.Kucharski@Sun.COM
3111*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Troubleshooting,  Next: Invoking the grub shell,  Prev: Commands,  Up: Top
3112*8044SWilliam.Kucharski@Sun.COM
3113*8044SWilliam.Kucharski@Sun.COM14 Error messages reported by GRUB
3114*8044SWilliam.Kucharski@Sun.COM**********************************
3115*8044SWilliam.Kucharski@Sun.COM
3116*8044SWilliam.Kucharski@Sun.COMThis chapter describes error messages reported by GRUB when you
3117*8044SWilliam.Kucharski@Sun.COMencounter trouble. *Note Invoking the grub shell::, if your problem is
3118*8044SWilliam.Kucharski@Sun.COMspecific to the grub shell.
3119*8044SWilliam.Kucharski@Sun.COM
3120*8044SWilliam.Kucharski@Sun.COM* Menu:
3121*8044SWilliam.Kucharski@Sun.COM
3122*8044SWilliam.Kucharski@Sun.COM* Stage1 errors::               Errors reported by the Stage 1
3123*8044SWilliam.Kucharski@Sun.COM* Stage1.5 errors::             Errors reported by the Stage 1.5
3124*8044SWilliam.Kucharski@Sun.COM* Stage2 errors::               Errors reported by the Stage 2
3125*8044SWilliam.Kucharski@Sun.COM
3126*8044SWilliam.Kucharski@Sun.COM
3127*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Stage1 errors,  Next: Stage1.5 errors,  Up: Troubleshooting
3128*8044SWilliam.Kucharski@Sun.COM
3129*8044SWilliam.Kucharski@Sun.COM14.1 Errors reported by the Stage 1
3130*8044SWilliam.Kucharski@Sun.COM===================================
3131*8044SWilliam.Kucharski@Sun.COM
3132*8044SWilliam.Kucharski@Sun.COMThe general way that the Stage 1 handles errors is to print an error
3133*8044SWilliam.Kucharski@Sun.COMstring and then halt. Pressing `<CTRL>-<ALT>-<DEL>' will reboot.
3134*8044SWilliam.Kucharski@Sun.COM
3135*8044SWilliam.Kucharski@Sun.COM   The following is a comprehensive list of error messages for the
3136*8044SWilliam.Kucharski@Sun.COMStage 1:
3137*8044SWilliam.Kucharski@Sun.COM
3138*8044SWilliam.Kucharski@Sun.COMHard Disk Error
3139*8044SWilliam.Kucharski@Sun.COM     The stage2 or stage1.5 is being read from a hard disk, and the
3140*8044SWilliam.Kucharski@Sun.COM     attempt to determine the size and geometry of the hard disk failed.
3141*8044SWilliam.Kucharski@Sun.COM
3142*8044SWilliam.Kucharski@Sun.COMFloppy Error
3143*8044SWilliam.Kucharski@Sun.COM     The stage2 or stage1.5 is being read from a floppy disk, and the
3144*8044SWilliam.Kucharski@Sun.COM     attempt to determine the size and geometry of the floppy disk
3145*8044SWilliam.Kucharski@Sun.COM     failed. It's listed as a separate error since the probe sequence
3146*8044SWilliam.Kucharski@Sun.COM     is different than for hard disks.
3147*8044SWilliam.Kucharski@Sun.COM
3148*8044SWilliam.Kucharski@Sun.COMRead Error
3149*8044SWilliam.Kucharski@Sun.COM     A disk read error happened while trying to read the stage2 or
3150*8044SWilliam.Kucharski@Sun.COM     stage1.5.
3151*8044SWilliam.Kucharski@Sun.COM
3152*8044SWilliam.Kucharski@Sun.COMGeom Error
3153*8044SWilliam.Kucharski@Sun.COM     The location of the stage2 or stage1.5 is not in the portion of
3154*8044SWilliam.Kucharski@Sun.COM     the disk supported directly by the BIOS read calls.  This could
3155*8044SWilliam.Kucharski@Sun.COM     occur because the BIOS translated geometry has been changed by the
3156*8044SWilliam.Kucharski@Sun.COM     user or the disk is moved to another machine or controller after
3157*8044SWilliam.Kucharski@Sun.COM     installation, or GRUB was not installed using itself (if it was,
3158*8044SWilliam.Kucharski@Sun.COM     the Stage 2 version of this error would have been seen during that
3159*8044SWilliam.Kucharski@Sun.COM     process and it would not have completed the install).
3160*8044SWilliam.Kucharski@Sun.COM
3161*8044SWilliam.Kucharski@Sun.COM
3162*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Stage1.5 errors,  Next: Stage2 errors,  Prev: Stage1 errors,  Up: Troubleshooting
3163*8044SWilliam.Kucharski@Sun.COM
3164*8044SWilliam.Kucharski@Sun.COM14.2 Errors reported by the Stage 1.5
3165*8044SWilliam.Kucharski@Sun.COM=====================================
3166*8044SWilliam.Kucharski@Sun.COM
3167*8044SWilliam.Kucharski@Sun.COMThe general way that the Stage 1.5 handles errors is to print an error
3168*8044SWilliam.Kucharski@Sun.COMnumber in the form `Error NUM' and then halt. Pressing
3169*8044SWilliam.Kucharski@Sun.COM`<CTRL>-<ALT>-<DEL>' will reboot.
3170*8044SWilliam.Kucharski@Sun.COM
3171*8044SWilliam.Kucharski@Sun.COM   The error numbers correspond to the errors reported by Stage 2.
3172*8044SWilliam.Kucharski@Sun.COM*Note Stage2 errors::.
3173*8044SWilliam.Kucharski@Sun.COM
3174*8044SWilliam.Kucharski@Sun.COM
3175*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Stage2 errors,  Prev: Stage1.5 errors,  Up: Troubleshooting
3176*8044SWilliam.Kucharski@Sun.COM
3177*8044SWilliam.Kucharski@Sun.COM14.3 Errors reported by the Stage 2
3178*8044SWilliam.Kucharski@Sun.COM===================================
3179*8044SWilliam.Kucharski@Sun.COM
3180*8044SWilliam.Kucharski@Sun.COMThe general way that the Stage 2 handles errors is to abort the
3181*8044SWilliam.Kucharski@Sun.COMoperation in question, print an error string, then (if possible) either
3182*8044SWilliam.Kucharski@Sun.COMcontinue based on the fact that an error occurred or wait for the user
3183*8044SWilliam.Kucharski@Sun.COMto deal with the error.
3184*8044SWilliam.Kucharski@Sun.COM
3185*8044SWilliam.Kucharski@Sun.COM   The following is a comprehensive list of error messages for the
3186*8044SWilliam.Kucharski@Sun.COMStage 2 (error numbers for the Stage 1.5 are listed before the colon in
3187*8044SWilliam.Kucharski@Sun.COMeach description):
3188*8044SWilliam.Kucharski@Sun.COM
3189*8044SWilliam.Kucharski@Sun.COM1 : Filename must be either an absolute filename or blocklist
3190*8044SWilliam.Kucharski@Sun.COM     This error is returned if a file name is requested which doesn't
3191*8044SWilliam.Kucharski@Sun.COM     fit the syntax/rules listed in the *Note Filesystem::.
3192*8044SWilliam.Kucharski@Sun.COM
3193*8044SWilliam.Kucharski@Sun.COM2 : Bad file or directory type
3194*8044SWilliam.Kucharski@Sun.COM     This error is returned if a file requested is not a regular file,
3195*8044SWilliam.Kucharski@Sun.COM     but something like a symbolic link, directory, or FIFO.
3196*8044SWilliam.Kucharski@Sun.COM
3197*8044SWilliam.Kucharski@Sun.COM3 : Bad or corrupt data while decompressing file
3198*8044SWilliam.Kucharski@Sun.COM     This error is returned if the run-length decompression code gets an
3199*8044SWilliam.Kucharski@Sun.COM     internal error. This is usually from a corrupt file.
3200*8044SWilliam.Kucharski@Sun.COM
3201*8044SWilliam.Kucharski@Sun.COM4 : Bad or incompatible header in compressed file
3202*8044SWilliam.Kucharski@Sun.COM     This error is returned if the file header for a supposedly
3203*8044SWilliam.Kucharski@Sun.COM     compressed file is bad.
3204*8044SWilliam.Kucharski@Sun.COM
3205*8044SWilliam.Kucharski@Sun.COM5 : Partition table invalid or corrupt
3206*8044SWilliam.Kucharski@Sun.COM     This error is returned if the sanity checks on the integrity of the
3207*8044SWilliam.Kucharski@Sun.COM     partition table fail. This is a bad sign.
3208*8044SWilliam.Kucharski@Sun.COM
3209*8044SWilliam.Kucharski@Sun.COM6 : Mismatched or corrupt version of stage1/stage2
3210*8044SWilliam.Kucharski@Sun.COM     This error is returned if the install command points to
3211*8044SWilliam.Kucharski@Sun.COM     incompatible or corrupt versions of the stage1 or stage2. It can't
3212*8044SWilliam.Kucharski@Sun.COM     detect corruption in general, but this is a sanity check on the
3213*8044SWilliam.Kucharski@Sun.COM     version numbers, which should be correct.
3214*8044SWilliam.Kucharski@Sun.COM
3215*8044SWilliam.Kucharski@Sun.COM7 : Loading below 1MB is not supported
3216*8044SWilliam.Kucharski@Sun.COM     This error is returned if the lowest address in a kernel is below
3217*8044SWilliam.Kucharski@Sun.COM     the 1MB boundary. The Linux zImage format is a special case and
3218*8044SWilliam.Kucharski@Sun.COM     can be handled since it has a fixed loading address and maximum
3219*8044SWilliam.Kucharski@Sun.COM     size.
3220*8044SWilliam.Kucharski@Sun.COM
3221*8044SWilliam.Kucharski@Sun.COM8 : Kernel must be loaded before booting
3222*8044SWilliam.Kucharski@Sun.COM     This error is returned if GRUB is told to execute the boot sequence
3223*8044SWilliam.Kucharski@Sun.COM     without having a kernel to start.
3224*8044SWilliam.Kucharski@Sun.COM
3225*8044SWilliam.Kucharski@Sun.COM9 : Unknown boot failure
3226*8044SWilliam.Kucharski@Sun.COM     This error is returned if the boot attempt did not succeed for
3227*8044SWilliam.Kucharski@Sun.COM     reasons which are unknown.
3228*8044SWilliam.Kucharski@Sun.COM
3229*8044SWilliam.Kucharski@Sun.COM10 : Unsupported Multiboot features requested
3230*8044SWilliam.Kucharski@Sun.COM     This error is returned when the Multiboot features word in the
3231*8044SWilliam.Kucharski@Sun.COM     Multiboot header requires a feature that is not recognized. The
3232*8044SWilliam.Kucharski@Sun.COM     point of this is that the kernel requires special handling which
3233*8044SWilliam.Kucharski@Sun.COM     GRUB is probably unable to provide.
3234*8044SWilliam.Kucharski@Sun.COM
3235*8044SWilliam.Kucharski@Sun.COM11 : Unrecognized device string
3236*8044SWilliam.Kucharski@Sun.COM     This error is returned if a device string was expected, and the
3237*8044SWilliam.Kucharski@Sun.COM     string encountered didn't fit the syntax/rules listed in the *Note
3238*8044SWilliam.Kucharski@Sun.COM     Filesystem::.
3239*8044SWilliam.Kucharski@Sun.COM
3240*8044SWilliam.Kucharski@Sun.COM12 : Invalid device requested
3241*8044SWilliam.Kucharski@Sun.COM     This error is returned if a device string is recognizable but does
3242*8044SWilliam.Kucharski@Sun.COM     not fall under the other device errors.
3243*8044SWilliam.Kucharski@Sun.COM
3244*8044SWilliam.Kucharski@Sun.COM13 : Invalid or unsupported executable format
3245*8044SWilliam.Kucharski@Sun.COM     This error is returned if the kernel image being loaded is not
3246*8044SWilliam.Kucharski@Sun.COM     recognized as Multiboot or one of the supported native formats
3247*8044SWilliam.Kucharski@Sun.COM     (Linux zImage or bzImage, FreeBSD, or NetBSD).
3248*8044SWilliam.Kucharski@Sun.COM
3249*8044SWilliam.Kucharski@Sun.COM14 : Filesystem compatibility error, cannot read whole file
3250*8044SWilliam.Kucharski@Sun.COM     Some of the filesystem reading code in GRUB has limits on the
3251*8044SWilliam.Kucharski@Sun.COM     length of the files it can read. This error is returned when the
3252*8044SWilliam.Kucharski@Sun.COM     user runs into such a limit.
3253*8044SWilliam.Kucharski@Sun.COM
3254*8044SWilliam.Kucharski@Sun.COM15 : File not found
3255*8044SWilliam.Kucharski@Sun.COM     This error is returned if the specified file name cannot be found,
3256*8044SWilliam.Kucharski@Sun.COM     but everything else (like the disk/partition info) is OK.
3257*8044SWilliam.Kucharski@Sun.COM
3258*8044SWilliam.Kucharski@Sun.COM16 : Inconsistent filesystem structure
3259*8044SWilliam.Kucharski@Sun.COM     This error is returned by the filesystem code to denote an internal
3260*8044SWilliam.Kucharski@Sun.COM     error caused by the sanity checks of the filesystem structure on
3261*8044SWilliam.Kucharski@Sun.COM     disk not matching what it expects. This is usually caused by a
3262*8044SWilliam.Kucharski@Sun.COM     corrupt filesystem or bugs in the code handling it in GRUB.
3263*8044SWilliam.Kucharski@Sun.COM
3264*8044SWilliam.Kucharski@Sun.COM17 : Cannot mount selected partition
3265*8044SWilliam.Kucharski@Sun.COM     This error is returned if the partition requested exists, but the
3266*8044SWilliam.Kucharski@Sun.COM     filesystem type cannot be recognized by GRUB.
3267*8044SWilliam.Kucharski@Sun.COM
3268*8044SWilliam.Kucharski@Sun.COM18 : Selected cylinder exceeds maximum supported by BIOS
3269*8044SWilliam.Kucharski@Sun.COM     This error is returned when a read is attempted at a linear block
3270*8044SWilliam.Kucharski@Sun.COM     address beyond the end of the BIOS translated area. This generally
3271*8044SWilliam.Kucharski@Sun.COM     happens if your disk is larger than the BIOS can handle (512MB for
3272*8044SWilliam.Kucharski@Sun.COM     (E)IDE disks on older machines or larger than 8GB in general).
3273*8044SWilliam.Kucharski@Sun.COM
3274*8044SWilliam.Kucharski@Sun.COM19 : Linux kernel must be loaded before initrd
3275*8044SWilliam.Kucharski@Sun.COM     This error is returned if the initrd command is used before
3276*8044SWilliam.Kucharski@Sun.COM     loading a Linux kernel.
3277*8044SWilliam.Kucharski@Sun.COM
3278*8044SWilliam.Kucharski@Sun.COM20 : Multiboot kernel must be loaded before modules
3279*8044SWilliam.Kucharski@Sun.COM     This error is returned if the module load command is used before
3280*8044SWilliam.Kucharski@Sun.COM     loading a Multiboot kernel. It only makes sense in this case
3281*8044SWilliam.Kucharski@Sun.COM     anyway, as GRUB has no idea how to communicate the presence of
3282*8044SWilliam.Kucharski@Sun.COM     such modules to a non-Multiboot-aware kernel.
3283*8044SWilliam.Kucharski@Sun.COM
3284*8044SWilliam.Kucharski@Sun.COM21 : Selected disk does not exist
3285*8044SWilliam.Kucharski@Sun.COM     This error is returned if the device part of a device- or full
3286*8044SWilliam.Kucharski@Sun.COM     file name refers to a disk or BIOS device that is not present or
3287*8044SWilliam.Kucharski@Sun.COM     not recognized by the BIOS in the system.
3288*8044SWilliam.Kucharski@Sun.COM
3289*8044SWilliam.Kucharski@Sun.COM22 : No such partition
3290*8044SWilliam.Kucharski@Sun.COM     This error is returned if a partition is requested in the device
3291*8044SWilliam.Kucharski@Sun.COM     part of a device- or full file name which isn't on the selected
3292*8044SWilliam.Kucharski@Sun.COM     disk.
3293*8044SWilliam.Kucharski@Sun.COM
3294*8044SWilliam.Kucharski@Sun.COM23 : Error while parsing number
3295*8044SWilliam.Kucharski@Sun.COM     This error is returned if GRUB was expecting to read a number and
3296*8044SWilliam.Kucharski@Sun.COM     encountered bad data.
3297*8044SWilliam.Kucharski@Sun.COM
3298*8044SWilliam.Kucharski@Sun.COM24 : Attempt to access block outside partition
3299*8044SWilliam.Kucharski@Sun.COM     This error is returned if a linear block address is outside of the
3300*8044SWilliam.Kucharski@Sun.COM     disk partition. This generally happens because of a corrupt
3301*8044SWilliam.Kucharski@Sun.COM     filesystem on the disk or a bug in the code handling it in GRUB
3302*8044SWilliam.Kucharski@Sun.COM     (it's a great debugging tool).
3303*8044SWilliam.Kucharski@Sun.COM
3304*8044SWilliam.Kucharski@Sun.COM25 : Disk read error
3305*8044SWilliam.Kucharski@Sun.COM     This error is returned if there is a disk read error when trying to
3306*8044SWilliam.Kucharski@Sun.COM     probe or read data from a particular disk.
3307*8044SWilliam.Kucharski@Sun.COM
3308*8044SWilliam.Kucharski@Sun.COM26 : Too many symbolic links
3309*8044SWilliam.Kucharski@Sun.COM     This error is returned if the link count is beyond the maximum
3310*8044SWilliam.Kucharski@Sun.COM     (currently 5), possibly the symbolic links are looped.
3311*8044SWilliam.Kucharski@Sun.COM
3312*8044SWilliam.Kucharski@Sun.COM27 : Unrecognized command
3313*8044SWilliam.Kucharski@Sun.COM     This error is returned if an unrecognized command is entered on the
3314*8044SWilliam.Kucharski@Sun.COM     command-line or in a boot sequence section of a configuration file
3315*8044SWilliam.Kucharski@Sun.COM     and that entry is selected.
3316*8044SWilliam.Kucharski@Sun.COM
3317*8044SWilliam.Kucharski@Sun.COM28 : Selected item cannot fit into memory
3318*8044SWilliam.Kucharski@Sun.COM     This error is returned if a kernel, module, or raw file load
3319*8044SWilliam.Kucharski@Sun.COM     command is either trying to load its data such that it won't fit
3320*8044SWilliam.Kucharski@Sun.COM     into memory or it is simply too big.
3321*8044SWilliam.Kucharski@Sun.COM
3322*8044SWilliam.Kucharski@Sun.COM29 : Disk write error
3323*8044SWilliam.Kucharski@Sun.COM     This error is returned if there is a disk write error when trying
3324*8044SWilliam.Kucharski@Sun.COM     to write to a particular disk. This would generally only occur
3325*8044SWilliam.Kucharski@Sun.COM     during an install of set active partition command.
3326*8044SWilliam.Kucharski@Sun.COM
3327*8044SWilliam.Kucharski@Sun.COM30 : Invalid argument
3328*8044SWilliam.Kucharski@Sun.COM     This error is returned if an argument specified to a command is
3329*8044SWilliam.Kucharski@Sun.COM     invalid.
3330*8044SWilliam.Kucharski@Sun.COM
3331*8044SWilliam.Kucharski@Sun.COM31 : File is not sector aligned
3332*8044SWilliam.Kucharski@Sun.COM     This error may occur only when you access a ReiserFS partition by
3333*8044SWilliam.Kucharski@Sun.COM     block-lists (e.g. the command `install'). In this case, you should
3334*8044SWilliam.Kucharski@Sun.COM     mount the partition with the `-o notail' option.
3335*8044SWilliam.Kucharski@Sun.COM
3336*8044SWilliam.Kucharski@Sun.COM32 : Must be authenticated
3337*8044SWilliam.Kucharski@Sun.COM     This error is returned if you try to run a locked entry. You should
3338*8044SWilliam.Kucharski@Sun.COM     enter a correct password before running such an entry.
3339*8044SWilliam.Kucharski@Sun.COM
3340*8044SWilliam.Kucharski@Sun.COM33 : Serial device not configured
3341*8044SWilliam.Kucharski@Sun.COM     This error is returned if you try to change your terminal to a
3342*8044SWilliam.Kucharski@Sun.COM     serial one before initializing any serial device.
3343*8044SWilliam.Kucharski@Sun.COM
3344*8044SWilliam.Kucharski@Sun.COM34 : No spare sectors on the disk
3345*8044SWilliam.Kucharski@Sun.COM     This error is returned if a disk doesn't have enough spare space.
3346*8044SWilliam.Kucharski@Sun.COM     This happens when you try to embed Stage 1.5 into the unused
3347*8044SWilliam.Kucharski@Sun.COM     sectors after the MBR, but the first partition starts right after
3348*8044SWilliam.Kucharski@Sun.COM     the MBR or they are used by EZ-BIOS.
3349*8044SWilliam.Kucharski@Sun.COM
3350*8044SWilliam.Kucharski@Sun.COM
3351*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Invoking the grub shell,  Next: Invoking grub-install,  Prev: Troubleshooting,  Up: Top
3352*8044SWilliam.Kucharski@Sun.COM
3353*8044SWilliam.Kucharski@Sun.COM15 Invoking the grub shell
3354*8044SWilliam.Kucharski@Sun.COM**************************
3355*8044SWilliam.Kucharski@Sun.COM
3356*8044SWilliam.Kucharski@Sun.COMThis chapter documents the grub shell `grub'. Note that the grub shell
3357*8044SWilliam.Kucharski@Sun.COMis an emulator; it doesn't run under the native environment, so it
3358*8044SWilliam.Kucharski@Sun.COMsometimes does something wrong. Therefore, you shouldn't trust it too
3359*8044SWilliam.Kucharski@Sun.COMmuch. If there is anything wrong with it, don't hesitate to try the
3360*8044SWilliam.Kucharski@Sun.COMnative GRUB environment, especially when it guesses a wrong map between
3361*8044SWilliam.Kucharski@Sun.COMBIOS drives and OS devices.
3362*8044SWilliam.Kucharski@Sun.COM
3363*8044SWilliam.Kucharski@Sun.COM* Menu:
3364*8044SWilliam.Kucharski@Sun.COM
3365*8044SWilliam.Kucharski@Sun.COM* Basic usage::                 How to use the grub shell
3366*8044SWilliam.Kucharski@Sun.COM* Installation under UNIX::     How to install GRUB via `grub'
3367*8044SWilliam.Kucharski@Sun.COM* Device map::                  The map between BIOS drives and OS devices
3368*8044SWilliam.Kucharski@Sun.COM
3369*8044SWilliam.Kucharski@Sun.COM
3370*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Basic usage,  Next: Installation under UNIX,  Up: Invoking the grub shell
3371*8044SWilliam.Kucharski@Sun.COM
3372*8044SWilliam.Kucharski@Sun.COM15.1 Introduction into the grub shell
3373*8044SWilliam.Kucharski@Sun.COM=====================================
3374*8044SWilliam.Kucharski@Sun.COM
3375*8044SWilliam.Kucharski@Sun.COMYou can use the command `grub' for installing GRUB under your operating
3376*8044SWilliam.Kucharski@Sun.COMsystems and for a testbed when you add a new feature into GRUB or when
3377*8044SWilliam.Kucharski@Sun.COMfixing a bug. `grub' is almost the same as the Stage 2, and, in fact,
3378*8044SWilliam.Kucharski@Sun.COMit shares the source code with the Stage 2 and you can use the same
3379*8044SWilliam.Kucharski@Sun.COMcommands (*note Commands::) in `grub'. It is emulated by replacing BIOS
3380*8044SWilliam.Kucharski@Sun.COMcalls with UNIX system calls and libc functions.
3381*8044SWilliam.Kucharski@Sun.COM
3382*8044SWilliam.Kucharski@Sun.COM   The command `grub' accepts the following options:
3383*8044SWilliam.Kucharski@Sun.COM
3384*8044SWilliam.Kucharski@Sun.COM`--help'
3385*8044SWilliam.Kucharski@Sun.COM     Print a summary of the command-line options and exit.
3386*8044SWilliam.Kucharski@Sun.COM
3387*8044SWilliam.Kucharski@Sun.COM`--version'
3388*8044SWilliam.Kucharski@Sun.COM     Print the version number of GRUB and exit.
3389*8044SWilliam.Kucharski@Sun.COM
3390*8044SWilliam.Kucharski@Sun.COM`--verbose'
3391*8044SWilliam.Kucharski@Sun.COM     Print some verbose messages for debugging purpose.
3392*8044SWilliam.Kucharski@Sun.COM
3393*8044SWilliam.Kucharski@Sun.COM`--device-map=FILE'
3394*8044SWilliam.Kucharski@Sun.COM     Use the device map file FILE. The format is described in *Note
3395*8044SWilliam.Kucharski@Sun.COM     Device map::.
3396*8044SWilliam.Kucharski@Sun.COM
3397*8044SWilliam.Kucharski@Sun.COM`--no-floppy'
3398*8044SWilliam.Kucharski@Sun.COM     Do not probe any floppy drive. This option has no effect if the
3399*8044SWilliam.Kucharski@Sun.COM     option `--device-map' is specified (*note Device map::).
3400*8044SWilliam.Kucharski@Sun.COM
3401*8044SWilliam.Kucharski@Sun.COM`--probe-second-floppy'
3402*8044SWilliam.Kucharski@Sun.COM     Probe the second floppy drive. If this option is not specified,
3403*8044SWilliam.Kucharski@Sun.COM     the grub shell does not probe it, as that sometimes takes a long
3404*8044SWilliam.Kucharski@Sun.COM     time. If you specify the device map file (*note Device map::), the
3405*8044SWilliam.Kucharski@Sun.COM     grub shell just ignores this option.
3406*8044SWilliam.Kucharski@Sun.COM
3407*8044SWilliam.Kucharski@Sun.COM`--config-file=FILE'
3408*8044SWilliam.Kucharski@Sun.COM     Read the configuration file FILE instead of `/boot/grub/menu.lst'.
3409*8044SWilliam.Kucharski@Sun.COM     The format is the same as the normal GRUB syntax. See *Note
3410*8044SWilliam.Kucharski@Sun.COM     Filesystem::, for more information.
3411*8044SWilliam.Kucharski@Sun.COM
3412*8044SWilliam.Kucharski@Sun.COM`--boot-drive=DRIVE'
3413*8044SWilliam.Kucharski@Sun.COM     Set the stage2 BOOT_DRIVE to DRIVE. This argument should be an
3414*8044SWilliam.Kucharski@Sun.COM     integer (decimal, octal or hexadecimal).
3415*8044SWilliam.Kucharski@Sun.COM
3416*8044SWilliam.Kucharski@Sun.COM`--install-partition=PAR'
3417*8044SWilliam.Kucharski@Sun.COM     Set the stage2 INSTALL_PARTITION to PAR. This argument should be
3418*8044SWilliam.Kucharski@Sun.COM     an integer (decimal, octal or hexadecimal).
3419*8044SWilliam.Kucharski@Sun.COM
3420*8044SWilliam.Kucharski@Sun.COM`--no-config-file'
3421*8044SWilliam.Kucharski@Sun.COM     Do not use the configuration file even if it can be read.
3422*8044SWilliam.Kucharski@Sun.COM
3423*8044SWilliam.Kucharski@Sun.COM`--no-curses'
3424*8044SWilliam.Kucharski@Sun.COM     Do not use the screen handling interface by the curses even if it
3425*8044SWilliam.Kucharski@Sun.COM     is available.
3426*8044SWilliam.Kucharski@Sun.COM
3427*8044SWilliam.Kucharski@Sun.COM`--batch'
3428*8044SWilliam.Kucharski@Sun.COM     This option has the same meaning as `--no-config-file --no-curses'.
3429*8044SWilliam.Kucharski@Sun.COM
3430*8044SWilliam.Kucharski@Sun.COM`--read-only'
3431*8044SWilliam.Kucharski@Sun.COM     Disable writing to any disk.
3432*8044SWilliam.Kucharski@Sun.COM
3433*8044SWilliam.Kucharski@Sun.COM`--hold'
3434*8044SWilliam.Kucharski@Sun.COM     Wait until a debugger will attach. This option is useful when you
3435*8044SWilliam.Kucharski@Sun.COM     want to debug the startup code.
3436*8044SWilliam.Kucharski@Sun.COM
3437*8044SWilliam.Kucharski@Sun.COM
3438*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Installation under UNIX,  Next: Device map,  Prev: Basic usage,  Up: Invoking the grub shell
3439*8044SWilliam.Kucharski@Sun.COM
3440*8044SWilliam.Kucharski@Sun.COM15.2 How to install GRUB via `grub'
3441*8044SWilliam.Kucharski@Sun.COM===================================
3442*8044SWilliam.Kucharski@Sun.COM
3443*8044SWilliam.Kucharski@Sun.COMThe installation procedure is the same as under the "native" Stage 2.
3444*8044SWilliam.Kucharski@Sun.COM*Note Installation::, for more information. The command `grub'-specific
3445*8044SWilliam.Kucharski@Sun.COMinformation is described here.
3446*8044SWilliam.Kucharski@Sun.COM
3447*8044SWilliam.Kucharski@Sun.COM   What you should be careful about is "buffer cache". `grub' makes use
3448*8044SWilliam.Kucharski@Sun.COMof raw devices instead of filesystems that your operating systems
3449*8044SWilliam.Kucharski@Sun.COMserve, so there exists a potential problem that some cache
3450*8044SWilliam.Kucharski@Sun.COMinconsistency may corrupt your filesystems. What we recommend is:
3451*8044SWilliam.Kucharski@Sun.COM
3452*8044SWilliam.Kucharski@Sun.COM   * If you can unmount drives to which GRUB may write any amount of
3453*8044SWilliam.Kucharski@Sun.COM     data, unmount them before running `grub'.
3454*8044SWilliam.Kucharski@Sun.COM
3455*8044SWilliam.Kucharski@Sun.COM   * If a drive cannot be unmounted but can be mounted with the
3456*8044SWilliam.Kucharski@Sun.COM     read-only flag, mount it in read-only mode. That should be secure.
3457*8044SWilliam.Kucharski@Sun.COM
3458*8044SWilliam.Kucharski@Sun.COM   * If a drive must be mounted with the read-write flag, make sure
3459*8044SWilliam.Kucharski@Sun.COM     that no activity is being done on it while the command `grub' is
3460*8044SWilliam.Kucharski@Sun.COM     running.
3461*8044SWilliam.Kucharski@Sun.COM
3462*8044SWilliam.Kucharski@Sun.COM   * Reboot your operating system as soon as possible. This is probably
3463*8044SWilliam.Kucharski@Sun.COM     not required if you follow the rules above, but reboot is the most
3464*8044SWilliam.Kucharski@Sun.COM     secure way.
3465*8044SWilliam.Kucharski@Sun.COM
3466*8044SWilliam.Kucharski@Sun.COM   In addition, enter the command `quit' when you finish the
3467*8044SWilliam.Kucharski@Sun.COMinstallation. That is _very important_ because `quit' makes the buffer
3468*8044SWilliam.Kucharski@Sun.COMcache consistent. Do not push <C-c>.
3469*8044SWilliam.Kucharski@Sun.COM
3470*8044SWilliam.Kucharski@Sun.COM   If you want to install GRUB non-interactively, specify `--batch'
3471*8044SWilliam.Kucharski@Sun.COMoption in the command-line. This is a simple example:
3472*8044SWilliam.Kucharski@Sun.COM
3473*8044SWilliam.Kucharski@Sun.COM     #!/bin/sh
3474*8044SWilliam.Kucharski@Sun.COM
3475*8044SWilliam.Kucharski@Sun.COM     # Use /usr/sbin/grub if you are on an older system.
3476*8044SWilliam.Kucharski@Sun.COM     /sbin/grub --batch <<EOT 1>/dev/null 2>/dev/null
3477*8044SWilliam.Kucharski@Sun.COM     root (hd0,0)
3478*8044SWilliam.Kucharski@Sun.COM     setup (hd0)
3479*8044SWilliam.Kucharski@Sun.COM     quit
3480*8044SWilliam.Kucharski@Sun.COM     EOT
3481*8044SWilliam.Kucharski@Sun.COM
3482*8044SWilliam.Kucharski@Sun.COM
3483*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Device map,  Prev: Installation under UNIX,  Up: Invoking the grub shell
3484*8044SWilliam.Kucharski@Sun.COM
3485*8044SWilliam.Kucharski@Sun.COM15.3 The map between BIOS drives and OS devices
3486*8044SWilliam.Kucharski@Sun.COM===============================================
3487*8044SWilliam.Kucharski@Sun.COM
3488*8044SWilliam.Kucharski@Sun.COMWhen you specify the option `--device-map' (*note Basic usage::), the
3489*8044SWilliam.Kucharski@Sun.COMgrub shell creates the "device map file" automatically unless it
3490*8044SWilliam.Kucharski@Sun.COMalready exists. The file name `/boot/grub/device.map' is preferred.
3491*8044SWilliam.Kucharski@Sun.COM
3492*8044SWilliam.Kucharski@Sun.COM   If the device map file exists, the grub shell reads it to map BIOS
3493*8044SWilliam.Kucharski@Sun.COMdrives to OS devices. This file consists of lines like this:
3494*8044SWilliam.Kucharski@Sun.COM
3495*8044SWilliam.Kucharski@Sun.COM     DEVICE FILE
3496*8044SWilliam.Kucharski@Sun.COM
3497*8044SWilliam.Kucharski@Sun.COM   DEVICE is a drive specified in the GRUB syntax (*note Device
3498*8044SWilliam.Kucharski@Sun.COMsyntax::), and FILE is an OS file, which is normally a device file.
3499*8044SWilliam.Kucharski@Sun.COM
3500*8044SWilliam.Kucharski@Sun.COM   The reason why the grub shell gives you the device map file is that
3501*8044SWilliam.Kucharski@Sun.COMit cannot guess the map between BIOS drives and OS devices correctly in
3502*8044SWilliam.Kucharski@Sun.COMsome environments. For example, if you exchange the boot sequence
3503*8044SWilliam.Kucharski@Sun.COMbetween IDE and SCSI in your BIOS, it gets the order wrong.
3504*8044SWilliam.Kucharski@Sun.COM
3505*8044SWilliam.Kucharski@Sun.COM   Thus, edit the file if the grub shell makes a mistake. You can put
3506*8044SWilliam.Kucharski@Sun.COMany comments in the file if needed, as the grub shell assumes that a
3507*8044SWilliam.Kucharski@Sun.COMline is just a comment if the first character is `#'.
3508*8044SWilliam.Kucharski@Sun.COM
3509*8044SWilliam.Kucharski@Sun.COM
3510*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Invoking grub-install,  Next: Invoking grub-md5-crypt,  Prev: Invoking the grub shell,  Up: Top
3511*8044SWilliam.Kucharski@Sun.COM
3512*8044SWilliam.Kucharski@Sun.COM16 Invoking grub-install
3513*8044SWilliam.Kucharski@Sun.COM************************
3514*8044SWilliam.Kucharski@Sun.COM
3515*8044SWilliam.Kucharski@Sun.COMThe program `grub-install' installs GRUB on your drive using the grub
3516*8044SWilliam.Kucharski@Sun.COMshell (*note Invoking the grub shell::). You must specify the device
3517*8044SWilliam.Kucharski@Sun.COMname on which you want to install GRUB, like this:
3518*8044SWilliam.Kucharski@Sun.COM
3519*8044SWilliam.Kucharski@Sun.COM     grub-install INSTALL_DEVICE
3520*8044SWilliam.Kucharski@Sun.COM
3521*8044SWilliam.Kucharski@Sun.COM   The device name INSTALL_DEVICE is an OS device name or a GRUB device
3522*8044SWilliam.Kucharski@Sun.COMname.
3523*8044SWilliam.Kucharski@Sun.COM
3524*8044SWilliam.Kucharski@Sun.COM   `grub-install' accepts the following options:
3525*8044SWilliam.Kucharski@Sun.COM
3526*8044SWilliam.Kucharski@Sun.COM`--help'
3527*8044SWilliam.Kucharski@Sun.COM     Print a summary of the command-line options and exit.
3528*8044SWilliam.Kucharski@Sun.COM
3529*8044SWilliam.Kucharski@Sun.COM`--version'
3530*8044SWilliam.Kucharski@Sun.COM     Print the version number of GRUB and exit.
3531*8044SWilliam.Kucharski@Sun.COM
3532*8044SWilliam.Kucharski@Sun.COM`--force-lba'
3533*8044SWilliam.Kucharski@Sun.COM     Force GRUB to use LBA mode even for a buggy BIOS. Use this option
3534*8044SWilliam.Kucharski@Sun.COM     only if your BIOS doesn't work properly in LBA mode even though it
3535*8044SWilliam.Kucharski@Sun.COM     supports LBA mode.
3536*8044SWilliam.Kucharski@Sun.COM
3537*8044SWilliam.Kucharski@Sun.COM`--root-directory=DIR'
3538*8044SWilliam.Kucharski@Sun.COM     Install GRUB images under the directory DIR instead of the root
3539*8044SWilliam.Kucharski@Sun.COM     directory. This option is useful when you want to install GRUB
3540*8044SWilliam.Kucharski@Sun.COM     into a separate partition or a removable disk. Here is an example
3541*8044SWilliam.Kucharski@Sun.COM     in which you have a separate "boot" partition which is mounted on
3542*8044SWilliam.Kucharski@Sun.COM     `/boot':
3543*8044SWilliam.Kucharski@Sun.COM
3544*8044SWilliam.Kucharski@Sun.COM          grub-install --root-directory=/boot hd0
3545*8044SWilliam.Kucharski@Sun.COM
3546*8044SWilliam.Kucharski@Sun.COM`--grub-shell=FILE'
3547*8044SWilliam.Kucharski@Sun.COM     Use FILE as the grub shell. You can append arbitrary options to
3548*8044SWilliam.Kucharski@Sun.COM     FILE after the file name, like this:
3549*8044SWilliam.Kucharski@Sun.COM
3550*8044SWilliam.Kucharski@Sun.COM          grub-install --grub-shell="grub --read-only" /dev/fd0
3551*8044SWilliam.Kucharski@Sun.COM
3552*8044SWilliam.Kucharski@Sun.COM`--recheck'
3553*8044SWilliam.Kucharski@Sun.COM     Recheck the device map, even if `/boot/grub/device.map' already
3554*8044SWilliam.Kucharski@Sun.COM     exists. You should use this option whenever you add/remove a disk
3555*8044SWilliam.Kucharski@Sun.COM     into/from your computer.
3556*8044SWilliam.Kucharski@Sun.COM
3557*8044SWilliam.Kucharski@Sun.COM
3558*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Invoking grub-md5-crypt,  Next: Invoking grub-terminfo,  Prev: Invoking grub-install,  Up: Top
3559*8044SWilliam.Kucharski@Sun.COM
3560*8044SWilliam.Kucharski@Sun.COM17 Invoking grub-md5-crypt
3561*8044SWilliam.Kucharski@Sun.COM**************************
3562*8044SWilliam.Kucharski@Sun.COM
3563*8044SWilliam.Kucharski@Sun.COMThe program `grub-md5-crypt' encrypts a password in MD5 format.  This
3564*8044SWilliam.Kucharski@Sun.COMis just a frontend of the grub shell (*note Invoking the grub shell::).
3565*8044SWilliam.Kucharski@Sun.COMPasswords encrypted by this program can be used with the command
3566*8044SWilliam.Kucharski@Sun.COM`password' (*note password::).
3567*8044SWilliam.Kucharski@Sun.COM
3568*8044SWilliam.Kucharski@Sun.COM   `grub-md5-crypt' accepts the following options:
3569*8044SWilliam.Kucharski@Sun.COM
3570*8044SWilliam.Kucharski@Sun.COM`--help'
3571*8044SWilliam.Kucharski@Sun.COM     Print a summary of the command-line options and exit.
3572*8044SWilliam.Kucharski@Sun.COM
3573*8044SWilliam.Kucharski@Sun.COM`--version'
3574*8044SWilliam.Kucharski@Sun.COM     Print the version information and exit.
3575*8044SWilliam.Kucharski@Sun.COM
3576*8044SWilliam.Kucharski@Sun.COM`--grub-shell=FILE'
3577*8044SWilliam.Kucharski@Sun.COM     Use FILE as the grub shell.
3578*8044SWilliam.Kucharski@Sun.COM
3579*8044SWilliam.Kucharski@Sun.COM
3580*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Invoking grub-terminfo,  Next: Invoking grub-set-default,  Prev: Invoking grub-md5-crypt,  Up: Top
3581*8044SWilliam.Kucharski@Sun.COM
3582*8044SWilliam.Kucharski@Sun.COM18 Invoking grub-terminfo
3583*8044SWilliam.Kucharski@Sun.COM*************************
3584*8044SWilliam.Kucharski@Sun.COM
3585*8044SWilliam.Kucharski@Sun.COMThe program `grub-terminfo' generates a terminfo command from a
3586*8044SWilliam.Kucharski@Sun.COMterminfo name (*note terminfo::). The result can be used in the
3587*8044SWilliam.Kucharski@Sun.COMconfiguration file, to define escape sequences. Because GRUB assumes
3588*8044SWilliam.Kucharski@Sun.COMthat your terminal is vt100-compatible by default, this would be useful
3589*8044SWilliam.Kucharski@Sun.COMonly if your terminal is uncommon (such as vt52).
3590*8044SWilliam.Kucharski@Sun.COM
3591*8044SWilliam.Kucharski@Sun.COM   `grub-terminfo' accepts the following options:
3592*8044SWilliam.Kucharski@Sun.COM
3593*8044SWilliam.Kucharski@Sun.COM`--help'
3594*8044SWilliam.Kucharski@Sun.COM     Print a summary of the command-line options and exit.
3595*8044SWilliam.Kucharski@Sun.COM
3596*8044SWilliam.Kucharski@Sun.COM`--version'
3597*8044SWilliam.Kucharski@Sun.COM     Print the version information and exit.
3598*8044SWilliam.Kucharski@Sun.COM
3599*8044SWilliam.Kucharski@Sun.COM   You must specify one argument to this command. For example:
3600*8044SWilliam.Kucharski@Sun.COM
3601*8044SWilliam.Kucharski@Sun.COM     grub-terminfo vt52
3602*8044SWilliam.Kucharski@Sun.COM
3603*8044SWilliam.Kucharski@Sun.COM
3604*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Invoking grub-set-default,  Next: Invoking mbchk,  Prev: Invoking grub-terminfo,  Up: Top
3605*8044SWilliam.Kucharski@Sun.COM
3606*8044SWilliam.Kucharski@Sun.COM19 Invoking grub-set-default
3607*8044SWilliam.Kucharski@Sun.COM****************************
3608*8044SWilliam.Kucharski@Sun.COM
3609*8044SWilliam.Kucharski@Sun.COMThe program `grub-set-default' sets the default boot entry for GRUB.
3610*8044SWilliam.Kucharski@Sun.COMThis automatically creates a file named `default' under your GRUB
3611*8044SWilliam.Kucharski@Sun.COMdirectory (i.e. `/boot/grub'), if it is not present. This file is used
3612*8044SWilliam.Kucharski@Sun.COMto determine the default boot entry when GRUB boots up your system when
3613*8044SWilliam.Kucharski@Sun.COMyou use `default saved' in your configuration file (*note default::),
3614*8044SWilliam.Kucharski@Sun.COMand to save next default boot entry when you use `savedefault' in a
3615*8044SWilliam.Kucharski@Sun.COMboot entry (*note savedefault::).
3616*8044SWilliam.Kucharski@Sun.COM
3617*8044SWilliam.Kucharski@Sun.COM   `grub-set-default' accepts the following options:
3618*8044SWilliam.Kucharski@Sun.COM
3619*8044SWilliam.Kucharski@Sun.COM`--help'
3620*8044SWilliam.Kucharski@Sun.COM     Print a summary of the command-line options and exit.
3621*8044SWilliam.Kucharski@Sun.COM
3622*8044SWilliam.Kucharski@Sun.COM`--version'
3623*8044SWilliam.Kucharski@Sun.COM     Print the version information and exit.
3624*8044SWilliam.Kucharski@Sun.COM
3625*8044SWilliam.Kucharski@Sun.COM`--root-directory=DIR'
3626*8044SWilliam.Kucharski@Sun.COM     Use the directory DIR instead of the root directory (i.e. `/') to
3627*8044SWilliam.Kucharski@Sun.COM     define the location of the default file. This is useful when you
3628*8044SWilliam.Kucharski@Sun.COM     mount a disk which is used for another system.
3629*8044SWilliam.Kucharski@Sun.COM
3630*8044SWilliam.Kucharski@Sun.COM   You must specify a single argument to `grub-set-default'. This
3631*8044SWilliam.Kucharski@Sun.COMargument is normally the number of a default boot entry. For example,
3632*8044SWilliam.Kucharski@Sun.COMif you have this configuration file:
3633*8044SWilliam.Kucharski@Sun.COM
3634*8044SWilliam.Kucharski@Sun.COM     default saved
3635*8044SWilliam.Kucharski@Sun.COM     timeout 10
3636*8044SWilliam.Kucharski@Sun.COM
3637*8044SWilliam.Kucharski@Sun.COM     title GNU/Hurd
3638*8044SWilliam.Kucharski@Sun.COM     root (hd0,0)
3639*8044SWilliam.Kucharski@Sun.COM     ...
3640*8044SWilliam.Kucharski@Sun.COM
3641*8044SWilliam.Kucharski@Sun.COM     title GNU/Linux
3642*8044SWilliam.Kucharski@Sun.COM     root (hd0,1)
3643*8044SWilliam.Kucharski@Sun.COM     ...
3644*8044SWilliam.Kucharski@Sun.COM
3645*8044SWilliam.Kucharski@Sun.COM   and if you want to set the next default boot entry to GNU/Linux, you
3646*8044SWilliam.Kucharski@Sun.COMmay execute this command:
3647*8044SWilliam.Kucharski@Sun.COM
3648*8044SWilliam.Kucharski@Sun.COM     grub-set-default 1
3649*8044SWilliam.Kucharski@Sun.COM
3650*8044SWilliam.Kucharski@Sun.COM   Because the entry for GNU/Linux is `1'. Note that entries are
3651*8044SWilliam.Kucharski@Sun.COMcounted from zero. So, if you want to specify GNU/Hurd here, then you
3652*8044SWilliam.Kucharski@Sun.COMshould specify `0'.
3653*8044SWilliam.Kucharski@Sun.COM
3654*8044SWilliam.Kucharski@Sun.COM   This feature is very useful if you want to test a new kernel or to
3655*8044SWilliam.Kucharski@Sun.COMmake your system quite robust. *Note Making your system robust::, for
3656*8044SWilliam.Kucharski@Sun.COMmore hints about how to set up a robust system.
3657*8044SWilliam.Kucharski@Sun.COM
3658*8044SWilliam.Kucharski@Sun.COM
3659*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Invoking mbchk,  Next: Obtaining and Building GRUB,  Prev: Invoking grub-set-default,  Up: Top
3660*8044SWilliam.Kucharski@Sun.COM
3661*8044SWilliam.Kucharski@Sun.COM20 Invoking mbchk
3662*8044SWilliam.Kucharski@Sun.COM*****************
3663*8044SWilliam.Kucharski@Sun.COM
3664*8044SWilliam.Kucharski@Sun.COMThe program `mbchk' checks for the format of a Multiboot kernel. We
3665*8044SWilliam.Kucharski@Sun.COMrecommend using this program before booting your own kernel by GRUB.
3666*8044SWilliam.Kucharski@Sun.COM
3667*8044SWilliam.Kucharski@Sun.COM   `mbchk' accepts the following options:
3668*8044SWilliam.Kucharski@Sun.COM
3669*8044SWilliam.Kucharski@Sun.COM`--help'
3670*8044SWilliam.Kucharski@Sun.COM     Print a summary of the command-line options and exit.
3671*8044SWilliam.Kucharski@Sun.COM
3672*8044SWilliam.Kucharski@Sun.COM`--version'
3673*8044SWilliam.Kucharski@Sun.COM     Print the version number of GRUB and exit.
3674*8044SWilliam.Kucharski@Sun.COM
3675*8044SWilliam.Kucharski@Sun.COM`--quiet'
3676*8044SWilliam.Kucharski@Sun.COM     Suppress all normal output.
3677*8044SWilliam.Kucharski@Sun.COM
3678*8044SWilliam.Kucharski@Sun.COM
3679*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Obtaining and Building GRUB,  Next: Reporting bugs,  Prev: Invoking mbchk,  Up: Top
3680*8044SWilliam.Kucharski@Sun.COM
3681*8044SWilliam.Kucharski@Sun.COMAppendix A How to obtain and build GRUB
3682*8044SWilliam.Kucharski@Sun.COM***************************************
3683*8044SWilliam.Kucharski@Sun.COM
3684*8044SWilliam.Kucharski@Sun.COM     *Caution:* GRUB requires binutils-2.9.1.0.23 or later because the
3685*8044SWilliam.Kucharski@Sun.COM     GNU assembler has been changed so that it can produce real 16bits
3686*8044SWilliam.Kucharski@Sun.COM     machine code between 2.9.1 and 2.9.1.0.x. See
3687*8044SWilliam.Kucharski@Sun.COM     `http://sources.redhat.com/binutils/', to obtain information on
3688*8044SWilliam.Kucharski@Sun.COM     how to get the latest version.
3689*8044SWilliam.Kucharski@Sun.COM
3690*8044SWilliam.Kucharski@Sun.COM   GRUB is available from the GNU alpha archive site
3691*8044SWilliam.Kucharski@Sun.COM`ftp://alpha.gnu.org/gnu/grub' or any of its mirrors. The file will be
3692*8044SWilliam.Kucharski@Sun.COMnamed grub-version.tar.gz. The current version is 0.97, so the file you
3693*8044SWilliam.Kucharski@Sun.COMshould grab is:
3694*8044SWilliam.Kucharski@Sun.COM
3695*8044SWilliam.Kucharski@Sun.COM   `ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz'
3696*8044SWilliam.Kucharski@Sun.COM
3697*8044SWilliam.Kucharski@Sun.COM   To unbundle GRUB use the instruction:
3698*8044SWilliam.Kucharski@Sun.COM
3699*8044SWilliam.Kucharski@Sun.COM     zcat grub-0.97.tar.gz | tar xvf -
3700*8044SWilliam.Kucharski@Sun.COM
3701*8044SWilliam.Kucharski@Sun.COM   which will create a directory called `grub-0.97' with all the
3702*8044SWilliam.Kucharski@Sun.COMsources. You can look at the file `INSTALL' for detailed instructions
3703*8044SWilliam.Kucharski@Sun.COMon how to build and install GRUB, but you should be able to just do:
3704*8044SWilliam.Kucharski@Sun.COM
3705*8044SWilliam.Kucharski@Sun.COM     cd grub-0.97
3706*8044SWilliam.Kucharski@Sun.COM     ./configure
3707*8044SWilliam.Kucharski@Sun.COM     make install
3708*8044SWilliam.Kucharski@Sun.COM
3709*8044SWilliam.Kucharski@Sun.COM   This will install the grub shell `grub' (*note Invoking the grub
3710*8044SWilliam.Kucharski@Sun.COMshell::), the Multiboot checker `mbchk' (*note Invoking mbchk::), and
3711*8044SWilliam.Kucharski@Sun.COMthe GRUB images. This will also install the GRUB manual.
3712*8044SWilliam.Kucharski@Sun.COM
3713*8044SWilliam.Kucharski@Sun.COM   Also, the latest version is available from the CVS. See
3714*8044SWilliam.Kucharski@Sun.COM`http://savannah.gnu.org/cvs/?group=grub' for more information.
3715*8044SWilliam.Kucharski@Sun.COM
3716*8044SWilliam.Kucharski@Sun.COM
3717*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Reporting bugs,  Next: Future,  Prev: Obtaining and Building GRUB,  Up: Top
3718*8044SWilliam.Kucharski@Sun.COM
3719*8044SWilliam.Kucharski@Sun.COMAppendix B Reporting bugs
3720*8044SWilliam.Kucharski@Sun.COM*************************
3721*8044SWilliam.Kucharski@Sun.COM
3722*8044SWilliam.Kucharski@Sun.COMThese are the guideline for how to report bugs. Take a look at this
3723*8044SWilliam.Kucharski@Sun.COMlist below before you submit bugs:
3724*8044SWilliam.Kucharski@Sun.COM
3725*8044SWilliam.Kucharski@Sun.COM  1. Before getting unsettled, read this manual through and through.
3726*8044SWilliam.Kucharski@Sun.COM     Also, see the GNU GRUB FAQ
3727*8044SWilliam.Kucharski@Sun.COM     (http://www.gnu.org/software/grub/grub-faq.html).
3728*8044SWilliam.Kucharski@Sun.COM
3729*8044SWilliam.Kucharski@Sun.COM  2. Always mention the information on your GRUB. The version number
3730*8044SWilliam.Kucharski@Sun.COM     and the configuration are quite important. If you build it
3731*8044SWilliam.Kucharski@Sun.COM     yourself, write the options specified to the configure script and
3732*8044SWilliam.Kucharski@Sun.COM     your operating system, including the versions of gcc and binutils.
3733*8044SWilliam.Kucharski@Sun.COM
3734*8044SWilliam.Kucharski@Sun.COM  3. If you have trouble with the installation, inform us of how you
3735*8044SWilliam.Kucharski@Sun.COM     installed GRUB. Don't omit error messages, if any. Just `GRUB hangs
3736*8044SWilliam.Kucharski@Sun.COM     up when it boots' is not enough.
3737*8044SWilliam.Kucharski@Sun.COM
3738*8044SWilliam.Kucharski@Sun.COM     The information on your hardware is also essential. These are
3739*8044SWilliam.Kucharski@Sun.COM     especially important: the geometries and the partition tables of
3740*8044SWilliam.Kucharski@Sun.COM     your hard disk drives and your BIOS.
3741*8044SWilliam.Kucharski@Sun.COM
3742*8044SWilliam.Kucharski@Sun.COM  4. If GRUB cannot boot your operating system, write down _everything_
3743*8044SWilliam.Kucharski@Sun.COM     you see on the screen. Don't paraphrase them, like `The foo OS
3744*8044SWilliam.Kucharski@Sun.COM     crashes with GRUB, even though it can boot with the bar boot
3745*8044SWilliam.Kucharski@Sun.COM     loader just fine'. Mention the commands you executed, the messages
3746*8044SWilliam.Kucharski@Sun.COM     printed by them, and information on your operating system
3747*8044SWilliam.Kucharski@Sun.COM     including the version number.
3748*8044SWilliam.Kucharski@Sun.COM
3749*8044SWilliam.Kucharski@Sun.COM  5. Explain what you wanted to do. It is very useful to know your
3750*8044SWilliam.Kucharski@Sun.COM     purpose and your wish, and how GRUB didn't satisfy you.
3751*8044SWilliam.Kucharski@Sun.COM
3752*8044SWilliam.Kucharski@Sun.COM  6. If you can investigate the problem yourself, please do. That will
3753*8044SWilliam.Kucharski@Sun.COM     give you and us much more information on the problem. Attaching a
3754*8044SWilliam.Kucharski@Sun.COM     patch is even better.
3755*8044SWilliam.Kucharski@Sun.COM
3756*8044SWilliam.Kucharski@Sun.COM     When you attach a patch, make the patch in unified diff format, and
3757*8044SWilliam.Kucharski@Sun.COM     write ChangeLog entries. But, even when you make a patch, don't
3758*8044SWilliam.Kucharski@Sun.COM     forget to explain the problem, so that we can understand what your
3759*8044SWilliam.Kucharski@Sun.COM     patch is for.
3760*8044SWilliam.Kucharski@Sun.COM
3761*8044SWilliam.Kucharski@Sun.COM  7. Write down anything that you think might be related. Please
3762*8044SWilliam.Kucharski@Sun.COM     understand that we often need to reproduce the same problem you
3763*8044SWilliam.Kucharski@Sun.COM     encounterred in our environment. So your information should be
3764*8044SWilliam.Kucharski@Sun.COM     sufficient for us to do the same thing--Don't forget that we
3765*8044SWilliam.Kucharski@Sun.COM     cannot see your computer directly. If you are not sure whether to
3766*8044SWilliam.Kucharski@Sun.COM     state a fact or leave it out, state it!  Reporting too many things
3767*8044SWilliam.Kucharski@Sun.COM     is much better than omitting something important.
3768*8044SWilliam.Kucharski@Sun.COM
3769*8044SWilliam.Kucharski@Sun.COM   If you follow the guideline above, submit a report to the Bug
3770*8044SWilliam.Kucharski@Sun.COMTracking System (http://savannah.gnu.org/bugs/?group=grub).
3771*8044SWilliam.Kucharski@Sun.COMAlternatively, you can submit a report via electronic mail to
3772*8044SWilliam.Kucharski@Sun.COM<bug-grub@gnu.org>, but we strongly recommend that you use the Bug
3773*8044SWilliam.Kucharski@Sun.COMTracking System, because e-mail can be passed over easily.
3774*8044SWilliam.Kucharski@Sun.COM
3775*8044SWilliam.Kucharski@Sun.COM   Once we get your report, we will try to fix the bugs.
3776*8044SWilliam.Kucharski@Sun.COM
3777*8044SWilliam.Kucharski@Sun.COM
3778*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Future,  Next: Internals,  Prev: Reporting bugs,  Up: Top
3779*8044SWilliam.Kucharski@Sun.COM
3780*8044SWilliam.Kucharski@Sun.COMAppendix C Where GRUB will go
3781*8044SWilliam.Kucharski@Sun.COM*****************************
3782*8044SWilliam.Kucharski@Sun.COM
3783*8044SWilliam.Kucharski@Sun.COMWe started the next generation of GRUB, GRUB 2. This will include
3784*8044SWilliam.Kucharski@Sun.COMinternationalization, dynamic module loading, real memory management,
3785*8044SWilliam.Kucharski@Sun.COMmultiple architecture support, a scripting language, and many other
3786*8044SWilliam.Kucharski@Sun.COMnice feature. If you are interested in the development of GRUB 2, take
3787*8044SWilliam.Kucharski@Sun.COMa look at the homepage (http://www.gnu.org/software/grub/grub.html).
3788*8044SWilliam.Kucharski@Sun.COM
3789*8044SWilliam.Kucharski@Sun.COM
3790*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Internals,  Next: Index,  Prev: Future,  Up: Top
3791*8044SWilliam.Kucharski@Sun.COM
3792*8044SWilliam.Kucharski@Sun.COMAppendix D Hacking GRUB
3793*8044SWilliam.Kucharski@Sun.COM***********************
3794*8044SWilliam.Kucharski@Sun.COM
3795*8044SWilliam.Kucharski@Sun.COMThis chapter documents the user-invisible aspect of GRUB.
3796*8044SWilliam.Kucharski@Sun.COM
3797*8044SWilliam.Kucharski@Sun.COM   As a general rule of software development, it is impossible to keep
3798*8044SWilliam.Kucharski@Sun.COMthe descriptions of the internals up-to-date, and it is quite hard to
3799*8044SWilliam.Kucharski@Sun.COMdocument everything. So refer to the source code, whenever you are not
3800*8044SWilliam.Kucharski@Sun.COMsatisfied with this documentation.  Please assume that this gives just
3801*8044SWilliam.Kucharski@Sun.COMhints to you.
3802*8044SWilliam.Kucharski@Sun.COM
3803*8044SWilliam.Kucharski@Sun.COM* Menu:
3804*8044SWilliam.Kucharski@Sun.COM
3805*8044SWilliam.Kucharski@Sun.COM* Memory map::                  The memory map of various components
3806*8044SWilliam.Kucharski@Sun.COM* Embedded data::               Embedded variables in GRUB
3807*8044SWilliam.Kucharski@Sun.COM* Filesystem interface::        The generic interface for filesystems
3808*8044SWilliam.Kucharski@Sun.COM* Command interface::           The generic interface for built-ins
3809*8044SWilliam.Kucharski@Sun.COM* Bootstrap tricks::            The bootstrap mechanism used in GRUB
3810*8044SWilliam.Kucharski@Sun.COM* I/O ports detection::         How to probe I/O ports used by INT 13H
3811*8044SWilliam.Kucharski@Sun.COM* Memory detection::            How to detect all installed RAM
3812*8044SWilliam.Kucharski@Sun.COM* Low-level disk I/O::          INT 13H disk I/O interrupts
3813*8044SWilliam.Kucharski@Sun.COM* MBR::                         The structure of Master Boot Record
3814*8044SWilliam.Kucharski@Sun.COM* Partition table::             The format of partition tables
3815*8044SWilliam.Kucharski@Sun.COM* Submitting patches::          Where and how you should send patches
3816*8044SWilliam.Kucharski@Sun.COM
3817*8044SWilliam.Kucharski@Sun.COM
3818*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Memory map,  Next: Embedded data,  Up: Internals
3819*8044SWilliam.Kucharski@Sun.COM
3820*8044SWilliam.Kucharski@Sun.COMD.1 The memory map of various components
3821*8044SWilliam.Kucharski@Sun.COM========================================
3822*8044SWilliam.Kucharski@Sun.COM
3823*8044SWilliam.Kucharski@Sun.COMGRUB consists of two distinct components, called "stages", which are
3824*8044SWilliam.Kucharski@Sun.COMloaded at different times in the boot process. Because they run
3825*8044SWilliam.Kucharski@Sun.COMmutual-exclusively, sometimes a memory area overlaps with another
3826*8044SWilliam.Kucharski@Sun.COMmemory area. And, even in one stage, a single memory area can be used
3827*8044SWilliam.Kucharski@Sun.COMfor various purposes, because their usages are mutually exclusive.
3828*8044SWilliam.Kucharski@Sun.COM
3829*8044SWilliam.Kucharski@Sun.COM   Here is the memory map of the various components:
3830*8044SWilliam.Kucharski@Sun.COM
3831*8044SWilliam.Kucharski@Sun.COM0 to 4K-1
3832*8044SWilliam.Kucharski@Sun.COM     BIOS and real mode interrupts
3833*8044SWilliam.Kucharski@Sun.COM
3834*8044SWilliam.Kucharski@Sun.COM0x07BE to 0x07FF
3835*8044SWilliam.Kucharski@Sun.COM     Partition table passed to another boot loader
3836*8044SWilliam.Kucharski@Sun.COM
3837*8044SWilliam.Kucharski@Sun.COMdown from 8K-1
3838*8044SWilliam.Kucharski@Sun.COM     Real mode stack
3839*8044SWilliam.Kucharski@Sun.COM
3840*8044SWilliam.Kucharski@Sun.COM0x2000 to ?
3841*8044SWilliam.Kucharski@Sun.COM     The optional Stage 1.5 is loaded here
3842*8044SWilliam.Kucharski@Sun.COM
3843*8044SWilliam.Kucharski@Sun.COM0x2000 to 0x7FFF
3844*8044SWilliam.Kucharski@Sun.COM     Command-line buffer for Multiboot kernels and modules
3845*8044SWilliam.Kucharski@Sun.COM
3846*8044SWilliam.Kucharski@Sun.COM0x7C00 to 0x7DFF
3847*8044SWilliam.Kucharski@Sun.COM     Stage 1 is loaded here by BIOS or another boot loader
3848*8044SWilliam.Kucharski@Sun.COM
3849*8044SWilliam.Kucharski@Sun.COM0x7F00 to 0x7F42
3850*8044SWilliam.Kucharski@Sun.COM     LBA drive parameters
3851*8044SWilliam.Kucharski@Sun.COM
3852*8044SWilliam.Kucharski@Sun.COM0x8000 to ?
3853*8044SWilliam.Kucharski@Sun.COM     Stage2 is loaded here
3854*8044SWilliam.Kucharski@Sun.COM
3855*8044SWilliam.Kucharski@Sun.COMThe end of Stage 2 to 416K-1
3856*8044SWilliam.Kucharski@Sun.COM     Heap, in particular used for the menu
3857*8044SWilliam.Kucharski@Sun.COM
3858*8044SWilliam.Kucharski@Sun.COMdown from 416K-1
3859*8044SWilliam.Kucharski@Sun.COM     Protected mode stack
3860*8044SWilliam.Kucharski@Sun.COM
3861*8044SWilliam.Kucharski@Sun.COM416K to 448K-1
3862*8044SWilliam.Kucharski@Sun.COM     Filesystem buffer
3863*8044SWilliam.Kucharski@Sun.COM
3864*8044SWilliam.Kucharski@Sun.COM448K to 479.5K-1
3865*8044SWilliam.Kucharski@Sun.COM     Raw device buffer
3866*8044SWilliam.Kucharski@Sun.COM
3867*8044SWilliam.Kucharski@Sun.COM479.5K to 480K-1
3868*8044SWilliam.Kucharski@Sun.COM     512-byte scratch area
3869*8044SWilliam.Kucharski@Sun.COM
3870*8044SWilliam.Kucharski@Sun.COM480K to 512K-1
3871*8044SWilliam.Kucharski@Sun.COM     Buffers for various functions, such as password, command-line, cut
3872*8044SWilliam.Kucharski@Sun.COM     and paste, and completion.
3873*8044SWilliam.Kucharski@Sun.COM
3874*8044SWilliam.Kucharski@Sun.COMThe last 1K of lower memory
3875*8044SWilliam.Kucharski@Sun.COM     Disk swapping code and data
3876*8044SWilliam.Kucharski@Sun.COM
3877*8044SWilliam.Kucharski@Sun.COM   See the file `stage2/shared.h', for more information.
3878*8044SWilliam.Kucharski@Sun.COM
3879*8044SWilliam.Kucharski@Sun.COM
3880*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Embedded data,  Next: Filesystem interface,  Prev: Memory map,  Up: Internals
3881*8044SWilliam.Kucharski@Sun.COM
3882*8044SWilliam.Kucharski@Sun.COMD.2 Embedded variables in GRUB
3883*8044SWilliam.Kucharski@Sun.COM==============================
3884*8044SWilliam.Kucharski@Sun.COM
3885*8044SWilliam.Kucharski@Sun.COMStage 1 and Stage 2 have embedded variables whose locations are
3886*8044SWilliam.Kucharski@Sun.COMwell-defined, so that the installation can patch the binary file
3887*8044SWilliam.Kucharski@Sun.COMdirectly without recompilation of the stages.
3888*8044SWilliam.Kucharski@Sun.COM
3889*8044SWilliam.Kucharski@Sun.COM   In Stage 1, these are defined:
3890*8044SWilliam.Kucharski@Sun.COM
3891*8044SWilliam.Kucharski@Sun.COM`0x3E'
3892*8044SWilliam.Kucharski@Sun.COM     The version number (not GRUB's, but the installation mechanism's).
3893*8044SWilliam.Kucharski@Sun.COM
3894*8044SWilliam.Kucharski@Sun.COM`0x40'
3895*8044SWilliam.Kucharski@Sun.COM     The boot drive. If it is 0xFF, use a drive passed by BIOS.
3896*8044SWilliam.Kucharski@Sun.COM
3897*8044SWilliam.Kucharski@Sun.COM`0x41'
3898*8044SWilliam.Kucharski@Sun.COM     The flag for if forcing LBA.
3899*8044SWilliam.Kucharski@Sun.COM
3900*8044SWilliam.Kucharski@Sun.COM`0x42'
3901*8044SWilliam.Kucharski@Sun.COM     The starting address of Stage 2.
3902*8044SWilliam.Kucharski@Sun.COM
3903*8044SWilliam.Kucharski@Sun.COM`0x44'
3904*8044SWilliam.Kucharski@Sun.COM     The first sector of Stage 2.
3905*8044SWilliam.Kucharski@Sun.COM
3906*8044SWilliam.Kucharski@Sun.COM`0x48'
3907*8044SWilliam.Kucharski@Sun.COM     The starting segment of Stage 2.
3908*8044SWilliam.Kucharski@Sun.COM
3909*8044SWilliam.Kucharski@Sun.COM`0x1FE'
3910*8044SWilliam.Kucharski@Sun.COM     The signature (`0xAA55').
3911*8044SWilliam.Kucharski@Sun.COM
3912*8044SWilliam.Kucharski@Sun.COM   See the file `stage1/stage1.S', for more information.
3913*8044SWilliam.Kucharski@Sun.COM
3914*8044SWilliam.Kucharski@Sun.COM   In the first sector of Stage 1.5 and Stage 2, the block lists are
3915*8044SWilliam.Kucharski@Sun.COMrecorded between `firstlist' and `lastlist'. The address of `lastlist'
3916*8044SWilliam.Kucharski@Sun.COMis determined when assembling the file `stage2/start.S'.
3917*8044SWilliam.Kucharski@Sun.COM
3918*8044SWilliam.Kucharski@Sun.COM   The trick here is that it is actually read backward, and the first
3919*8044SWilliam.Kucharski@Sun.COM8-byte block list is not read here, but after the pointer is decremented
3920*8044SWilliam.Kucharski@Sun.COM8 bytes, then after reading it, it decrements again, reads, and so on,
3921*8044SWilliam.Kucharski@Sun.COMuntil it is finished. The terminating condition is when the number of
3922*8044SWilliam.Kucharski@Sun.COMsectors to be read in the next block list is zero.
3923*8044SWilliam.Kucharski@Sun.COM
3924*8044SWilliam.Kucharski@Sun.COM   The format of a block list can be seen from the example in the code
3925*8044SWilliam.Kucharski@Sun.COMjust before the `firstlist' label. Note that it is always from the
3926*8044SWilliam.Kucharski@Sun.COMbeginning of the disk, but _not_ relative to the partition boundaries.
3927*8044SWilliam.Kucharski@Sun.COM
3928*8044SWilliam.Kucharski@Sun.COM   In the second sector of Stage 1.5 and Stage 2, these are defined:
3929*8044SWilliam.Kucharski@Sun.COM
3930*8044SWilliam.Kucharski@Sun.COM`0x6'
3931*8044SWilliam.Kucharski@Sun.COM     The version number (likewise, the installation mechanism's).
3932*8044SWilliam.Kucharski@Sun.COM
3933*8044SWilliam.Kucharski@Sun.COM`0x8'
3934*8044SWilliam.Kucharski@Sun.COM     The installed partition.
3935*8044SWilliam.Kucharski@Sun.COM
3936*8044SWilliam.Kucharski@Sun.COM`0xC'
3937*8044SWilliam.Kucharski@Sun.COM     The saved entry number.
3938*8044SWilliam.Kucharski@Sun.COM
3939*8044SWilliam.Kucharski@Sun.COM`0x10'
3940*8044SWilliam.Kucharski@Sun.COM     The identifier.
3941*8044SWilliam.Kucharski@Sun.COM
3942*8044SWilliam.Kucharski@Sun.COM`0x11'
3943*8044SWilliam.Kucharski@Sun.COM     The flag for if forcing LBA.
3944*8044SWilliam.Kucharski@Sun.COM
3945*8044SWilliam.Kucharski@Sun.COM`0x12'
3946*8044SWilliam.Kucharski@Sun.COM     The version string (GRUB's).
3947*8044SWilliam.Kucharski@Sun.COM
3948*8044SWilliam.Kucharski@Sun.COM`0x12' + "the length of the version string"
3949*8044SWilliam.Kucharski@Sun.COM     The name of a configuration file.
3950*8044SWilliam.Kucharski@Sun.COM
3951*8044SWilliam.Kucharski@Sun.COM   See the file `stage2/asm.S', for more information.
3952*8044SWilliam.Kucharski@Sun.COM
3953*8044SWilliam.Kucharski@Sun.COM
3954*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Filesystem interface,  Next: Command interface,  Prev: Embedded data,  Up: Internals
3955*8044SWilliam.Kucharski@Sun.COM
3956*8044SWilliam.Kucharski@Sun.COMD.3 The generic interface for filesystems
3957*8044SWilliam.Kucharski@Sun.COM=========================================
3958*8044SWilliam.Kucharski@Sun.COM
3959*8044SWilliam.Kucharski@Sun.COMFor any particular partition, it is presumed that only one of the
3960*8044SWilliam.Kucharski@Sun.COM"normal" filesystems such as FAT, FFS, or ext2fs can be used, so there
3961*8044SWilliam.Kucharski@Sun.COMis a switch table managed by the functions in `disk_io.c'. The notation
3962*8044SWilliam.Kucharski@Sun.COMis that you can only "mount" one at a time.
3963*8044SWilliam.Kucharski@Sun.COM
3964*8044SWilliam.Kucharski@Sun.COM   The block list filesystem has a special place in the system. In
3965*8044SWilliam.Kucharski@Sun.COMaddition to the "normal" filesystem (or even without one mounted), you
3966*8044SWilliam.Kucharski@Sun.COMcan access disk blocks directly (in the indicated partition) via the
3967*8044SWilliam.Kucharski@Sun.COMblock list notation. Using the block list filesystem doesn't effect any
3968*8044SWilliam.Kucharski@Sun.COMother filesystem mounts.
3969*8044SWilliam.Kucharski@Sun.COM
3970*8044SWilliam.Kucharski@Sun.COM   The variables which can be read by the filesystem backend are:
3971*8044SWilliam.Kucharski@Sun.COM
3972*8044SWilliam.Kucharski@Sun.COM`current_drive'
3973*8044SWilliam.Kucharski@Sun.COM     The current BIOS drive number (numbered from 0, if a floppy, and
3974*8044SWilliam.Kucharski@Sun.COM     numbered from 0x80, if a hard disk).
3975*8044SWilliam.Kucharski@Sun.COM
3976*8044SWilliam.Kucharski@Sun.COM`current_partition'
3977*8044SWilliam.Kucharski@Sun.COM     The current partition number.
3978*8044SWilliam.Kucharski@Sun.COM
3979*8044SWilliam.Kucharski@Sun.COM`current_slice'
3980*8044SWilliam.Kucharski@Sun.COM     The current partition type.
3981*8044SWilliam.Kucharski@Sun.COM
3982*8044SWilliam.Kucharski@Sun.COM`saved_drive'
3983*8044SWilliam.Kucharski@Sun.COM     The "drive" part of the root device.
3984*8044SWilliam.Kucharski@Sun.COM
3985*8044SWilliam.Kucharski@Sun.COM`saved_partition'
3986*8044SWilliam.Kucharski@Sun.COM     The "partition" part of the root device.
3987*8044SWilliam.Kucharski@Sun.COM
3988*8044SWilliam.Kucharski@Sun.COM`part_start'
3989*8044SWilliam.Kucharski@Sun.COM     The current partition starting address, in sectors.
3990*8044SWilliam.Kucharski@Sun.COM
3991*8044SWilliam.Kucharski@Sun.COM`part_length'
3992*8044SWilliam.Kucharski@Sun.COM     The current partition length, in sectors.
3993*8044SWilliam.Kucharski@Sun.COM
3994*8044SWilliam.Kucharski@Sun.COM`print_possibilities'
3995*8044SWilliam.Kucharski@Sun.COM     True when the `dir' function should print the possible completions
3996*8044SWilliam.Kucharski@Sun.COM     of a file, and false when it should try to actually open a file of
3997*8044SWilliam.Kucharski@Sun.COM     that name.
3998*8044SWilliam.Kucharski@Sun.COM
3999*8044SWilliam.Kucharski@Sun.COM`FSYS_BUF'
4000*8044SWilliam.Kucharski@Sun.COM     Filesystem buffer which is 32K in size, to use in any way which the
4001*8044SWilliam.Kucharski@Sun.COM     filesystem backend desires.
4002*8044SWilliam.Kucharski@Sun.COM
4003*8044SWilliam.Kucharski@Sun.COM   The variables which need to be written by a filesystem backend are:
4004*8044SWilliam.Kucharski@Sun.COM
4005*8044SWilliam.Kucharski@Sun.COM`filepos'
4006*8044SWilliam.Kucharski@Sun.COM     The current position in the file, in sectors.
4007*8044SWilliam.Kucharski@Sun.COM
4008*8044SWilliam.Kucharski@Sun.COM     *Caution:* the value of FILEPOS can be changed out from under the
4009*8044SWilliam.Kucharski@Sun.COM     filesystem code in the current implementation. Don't depend on it
4010*8044SWilliam.Kucharski@Sun.COM     being the same for later calls into the backend code!
4011*8044SWilliam.Kucharski@Sun.COM
4012*8044SWilliam.Kucharski@Sun.COM`filemax'
4013*8044SWilliam.Kucharski@Sun.COM     The length of the file.
4014*8044SWilliam.Kucharski@Sun.COM
4015*8044SWilliam.Kucharski@Sun.COM`disk_read_func'
4016*8044SWilliam.Kucharski@Sun.COM     The value of DISK_READ_HOOK _only_ during reading of data for the
4017*8044SWilliam.Kucharski@Sun.COM     file, not any other fs data, inodes, FAT tables, whatever, then
4018*8044SWilliam.Kucharski@Sun.COM     set to `NULL' at all other times (it will be `NULL' by default).
4019*8044SWilliam.Kucharski@Sun.COM     If this isn't done correctly, then the `testload' and `install'
4020*8044SWilliam.Kucharski@Sun.COM     commands won't work correctly.
4021*8044SWilliam.Kucharski@Sun.COM
4022*8044SWilliam.Kucharski@Sun.COM   The functions expected to be used by the filesystem backend are:
4023*8044SWilliam.Kucharski@Sun.COM
4024*8044SWilliam.Kucharski@Sun.COM`devread'
4025*8044SWilliam.Kucharski@Sun.COM     Only read sectors from within a partition. Sector 0 is the first
4026*8044SWilliam.Kucharski@Sun.COM     sector in the partition.
4027*8044SWilliam.Kucharski@Sun.COM
4028*8044SWilliam.Kucharski@Sun.COM`grub_read'
4029*8044SWilliam.Kucharski@Sun.COM     If the backend uses the block list code, then `grub_read' can be
4030*8044SWilliam.Kucharski@Sun.COM     used, after setting BLOCK_FILE to 1.
4031*8044SWilliam.Kucharski@Sun.COM
4032*8044SWilliam.Kucharski@Sun.COM`print_a_completion'
4033*8044SWilliam.Kucharski@Sun.COM     If PRINT_POSSIBILITIES is true, call `print_a_completion' for each
4034*8044SWilliam.Kucharski@Sun.COM     possible file name. Otherwise, the file name completion won't work.
4035*8044SWilliam.Kucharski@Sun.COM
4036*8044SWilliam.Kucharski@Sun.COM   The functions expected to be defined by the filesystem backend are
4037*8044SWilliam.Kucharski@Sun.COMdescribed at least moderately in the file `filesys.h'. Their usage is
4038*8044SWilliam.Kucharski@Sun.COMfairly evident from their use in the functions in `disk_io.c', look for
4039*8044SWilliam.Kucharski@Sun.COMthe use of the FSYS_TABLE array.
4040*8044SWilliam.Kucharski@Sun.COM
4041*8044SWilliam.Kucharski@Sun.COM   *Caution:* The semantics are such that then `mount'ing the
4042*8044SWilliam.Kucharski@Sun.COMfilesystem, presume the filesystem buffer `FSYS_BUF' is corrupted, and
4043*8044SWilliam.Kucharski@Sun.COM(re-)load all important contents. When opening and reading a file,
4044*8044SWilliam.Kucharski@Sun.COMpresume that the data from the `mount' is available, and doesn't get
4045*8044SWilliam.Kucharski@Sun.COMcorrupted by the open/read (i.e. multiple opens and/or reads will be
4046*8044SWilliam.Kucharski@Sun.COMdone with only one mount if in the same filesystem).
4047*8044SWilliam.Kucharski@Sun.COM
4048*8044SWilliam.Kucharski@Sun.COM
4049*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Command interface,  Next: Bootstrap tricks,  Prev: Filesystem interface,  Up: Internals
4050*8044SWilliam.Kucharski@Sun.COM
4051*8044SWilliam.Kucharski@Sun.COMD.4 The generic interface for built-ins
4052*8044SWilliam.Kucharski@Sun.COM=======================================
4053*8044SWilliam.Kucharski@Sun.COM
4054*8044SWilliam.Kucharski@Sun.COMGRUB built-in commands are defined in a uniformal interface, whether
4055*8044SWilliam.Kucharski@Sun.COMthey are menu-specific or can be used anywhere. The definition of a
4056*8044SWilliam.Kucharski@Sun.COMbuiltin command consists of two parts: the code itself and the table of
4057*8044SWilliam.Kucharski@Sun.COMthe information.
4058*8044SWilliam.Kucharski@Sun.COM
4059*8044SWilliam.Kucharski@Sun.COM   The code must be a function which takes two arguments, a command-line
4060*8044SWilliam.Kucharski@Sun.COMstring and flags, and returns an `int' value. The "flags" argument
4061*8044SWilliam.Kucharski@Sun.COMspecifies how the function is called, using a bit mask. The return
4062*8044SWilliam.Kucharski@Sun.COMvalue must be zero if successful, otherwise non-zero. So it is normally
4063*8044SWilliam.Kucharski@Sun.COMenough to return ERRNUM.
4064*8044SWilliam.Kucharski@Sun.COM
4065*8044SWilliam.Kucharski@Sun.COM   The table of the information is represented by the structure `struct
4066*8044SWilliam.Kucharski@Sun.COMbuiltin', which contains the name of the command, a pointer to the
4067*8044SWilliam.Kucharski@Sun.COMfunction, flags, a short description of the command and a long
4068*8044SWilliam.Kucharski@Sun.COMdescription of the command. Since the descriptions are used only for
4069*8044SWilliam.Kucharski@Sun.COMhelp messages interactively, you don't have to define them, if the
4070*8044SWilliam.Kucharski@Sun.COMcommand may not be called interactively (such as `title').
4071*8044SWilliam.Kucharski@Sun.COM
4072*8044SWilliam.Kucharski@Sun.COM   The table is finally registered in the table BUILTIN_TABLE, so that
4073*8044SWilliam.Kucharski@Sun.COM`run_script' and `enter_cmdline' can find the command. See the files
4074*8044SWilliam.Kucharski@Sun.COM`cmdline.c' and `builtins.c', for more details.
4075*8044SWilliam.Kucharski@Sun.COM
4076*8044SWilliam.Kucharski@Sun.COM
4077*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Bootstrap tricks,  Next: I/O ports detection,  Prev: Command interface,  Up: Internals
4078*8044SWilliam.Kucharski@Sun.COM
4079*8044SWilliam.Kucharski@Sun.COMD.5 The bootstrap mechanism used in GRUB
4080*8044SWilliam.Kucharski@Sun.COM========================================
4081*8044SWilliam.Kucharski@Sun.COM
4082*8044SWilliam.Kucharski@Sun.COMThe disk space can be used in a boot loader is very restricted because
4083*8044SWilliam.Kucharski@Sun.COMa MBR (*note MBR::) is only 512 bytes but it also contains a partition
4084*8044SWilliam.Kucharski@Sun.COMtable (*note Partition table::) and a BPB. So the question is how to
4085*8044SWilliam.Kucharski@Sun.COMmake a boot loader code enough small to be fit in a MBR.
4086*8044SWilliam.Kucharski@Sun.COM
4087*8044SWilliam.Kucharski@Sun.COM   However, GRUB is a very large program, so we break GRUB into 2 (or 3)
4088*8044SWilliam.Kucharski@Sun.COMdistinct components, "Stage 1" and "Stage 2" (and optionally "Stage
4089*8044SWilliam.Kucharski@Sun.COM1.5"). *Note Memory map::, for more information.
4090*8044SWilliam.Kucharski@Sun.COM
4091*8044SWilliam.Kucharski@Sun.COM   We embed Stage 1 in a MBR or in the boot sector of a partition, and
4092*8044SWilliam.Kucharski@Sun.COMplace Stage 2 in a filesystem. The optional Stage 1.5 can be installed
4093*8044SWilliam.Kucharski@Sun.COMin a filesystem, in the "boot loader" area in a FFS or a ReiserFS, and
4094*8044SWilliam.Kucharski@Sun.COMin the sectors right after a MBR, because Stage 1.5 is enough small and
4095*8044SWilliam.Kucharski@Sun.COMthe sectors right after a MBR is normally an unused region. The size of
4096*8044SWilliam.Kucharski@Sun.COMthis region is the number of sectors per head minus 1.
4097*8044SWilliam.Kucharski@Sun.COM
4098*8044SWilliam.Kucharski@Sun.COM   Thus, all Stage1 must do is just load Stage2 or Stage1.5. But even if
4099*8044SWilliam.Kucharski@Sun.COMStage 1 needs not to support the user interface or the filesystem
4100*8044SWilliam.Kucharski@Sun.COMinterface, it is impossible to make Stage 1 less than 400 bytes, because
4101*8044SWilliam.Kucharski@Sun.COMGRUB should support both the CHS mode and the LBA mode (*note Low-level
4102*8044SWilliam.Kucharski@Sun.COMdisk I/O::).
4103*8044SWilliam.Kucharski@Sun.COM
4104*8044SWilliam.Kucharski@Sun.COM   The solution used by GRUB is that Stage 1 loads only the first
4105*8044SWilliam.Kucharski@Sun.COMsector of Stage 2 (or Stage 1.5) and Stage 2 itself loads the rest. The
4106*8044SWilliam.Kucharski@Sun.COMflow of Stage 1 is:
4107*8044SWilliam.Kucharski@Sun.COM
4108*8044SWilliam.Kucharski@Sun.COM  1. Initialize the system briefly.
4109*8044SWilliam.Kucharski@Sun.COM
4110*8044SWilliam.Kucharski@Sun.COM  2. Detect the geometry and the accessing mode of the "loading drive".
4111*8044SWilliam.Kucharski@Sun.COM
4112*8044SWilliam.Kucharski@Sun.COM  3. Load the first sector of Stage 2.
4113*8044SWilliam.Kucharski@Sun.COM
4114*8044SWilliam.Kucharski@Sun.COM  4. Jump to the starting address of the Stage 2.
4115*8044SWilliam.Kucharski@Sun.COM
4116*8044SWilliam.Kucharski@Sun.COM   The flow of Stage 2 (and Stage 1.5) is:
4117*8044SWilliam.Kucharski@Sun.COM
4118*8044SWilliam.Kucharski@Sun.COM  1. Load the rest of itself to the real starting address, that is, the
4119*8044SWilliam.Kucharski@Sun.COM     starting address plus 512 bytes. The block lists are stored in the
4120*8044SWilliam.Kucharski@Sun.COM     last part of the first sector.
4121*8044SWilliam.Kucharski@Sun.COM
4122*8044SWilliam.Kucharski@Sun.COM  2. Long jump to the real starting address.
4123*8044SWilliam.Kucharski@Sun.COM
4124*8044SWilliam.Kucharski@Sun.COM   Note that Stage 2 (or Stage 1.5) does not probe the geometry or the
4125*8044SWilliam.Kucharski@Sun.COMaccessing mode of the "loading drive", since Stage 1 has already probed
4126*8044SWilliam.Kucharski@Sun.COMthem.
4127*8044SWilliam.Kucharski@Sun.COM
4128*8044SWilliam.Kucharski@Sun.COM
4129*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: I/O ports detection,  Next: Memory detection,  Prev: Bootstrap tricks,  Up: Internals
4130*8044SWilliam.Kucharski@Sun.COM
4131*8044SWilliam.Kucharski@Sun.COMD.6 How to probe I/O ports used by INT 13H
4132*8044SWilliam.Kucharski@Sun.COM==========================================
4133*8044SWilliam.Kucharski@Sun.COM
4134*8044SWilliam.Kucharski@Sun.COMFIXME: I will write this chapter after implementing the new technique.
4135*8044SWilliam.Kucharski@Sun.COM
4136*8044SWilliam.Kucharski@Sun.COM
4137*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Memory detection,  Next: Low-level disk I/O,  Prev: I/O ports detection,  Up: Internals
4138*8044SWilliam.Kucharski@Sun.COM
4139*8044SWilliam.Kucharski@Sun.COMD.7 How to detect all installed RAM
4140*8044SWilliam.Kucharski@Sun.COM===================================
4141*8044SWilliam.Kucharski@Sun.COM
4142*8044SWilliam.Kucharski@Sun.COMFIXME: I doubt if Erich didn't write this chapter only himself wholly,
4143*8044SWilliam.Kucharski@Sun.COMso I will rewrite this chapter.
4144*8044SWilliam.Kucharski@Sun.COM
4145*8044SWilliam.Kucharski@Sun.COM
4146*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Low-level disk I/O,  Next: MBR,  Prev: Memory detection,  Up: Internals
4147*8044SWilliam.Kucharski@Sun.COM
4148*8044SWilliam.Kucharski@Sun.COMD.8 INT 13H disk I/O interrupts
4149*8044SWilliam.Kucharski@Sun.COM===============================
4150*8044SWilliam.Kucharski@Sun.COM
4151*8044SWilliam.Kucharski@Sun.COMFIXME: I'm not sure where some part of the original chapter is derived,
4152*8044SWilliam.Kucharski@Sun.COMso I will rewrite this chapter.
4153*8044SWilliam.Kucharski@Sun.COM
4154*8044SWilliam.Kucharski@Sun.COM
4155*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: MBR,  Next: Partition table,  Prev: Low-level disk I/O,  Up: Internals
4156*8044SWilliam.Kucharski@Sun.COM
4157*8044SWilliam.Kucharski@Sun.COMD.9 The structure of Master Boot Record
4158*8044SWilliam.Kucharski@Sun.COM=======================================
4159*8044SWilliam.Kucharski@Sun.COM
4160*8044SWilliam.Kucharski@Sun.COMFIXME: Likewise.
4161*8044SWilliam.Kucharski@Sun.COM
4162*8044SWilliam.Kucharski@Sun.COM
4163*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Partition table,  Next: Submitting patches,  Prev: MBR,  Up: Internals
4164*8044SWilliam.Kucharski@Sun.COM
4165*8044SWilliam.Kucharski@Sun.COMD.10 The format of partition tables
4166*8044SWilliam.Kucharski@Sun.COM===================================
4167*8044SWilliam.Kucharski@Sun.COM
4168*8044SWilliam.Kucharski@Sun.COMFIXME: Probably the original chapter is derived from "How It Works", so
4169*8044SWilliam.Kucharski@Sun.COMI will rewrite this chapter.
4170*8044SWilliam.Kucharski@Sun.COM
4171*8044SWilliam.Kucharski@Sun.COM
4172*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Submitting patches,  Prev: Partition table,  Up: Internals
4173*8044SWilliam.Kucharski@Sun.COM
4174*8044SWilliam.Kucharski@Sun.COMD.11 Where and how you should send patches
4175*8044SWilliam.Kucharski@Sun.COM==========================================
4176*8044SWilliam.Kucharski@Sun.COM
4177*8044SWilliam.Kucharski@Sun.COMWhen you write patches for GRUB, please send them to the mailing list
4178*8044SWilliam.Kucharski@Sun.COM<bug-grub@gnu.org>. Here is the list of items of which you should take
4179*8044SWilliam.Kucharski@Sun.COMcare:
4180*8044SWilliam.Kucharski@Sun.COM
4181*8044SWilliam.Kucharski@Sun.COM   * Please make your patch as small as possible. Generally, it is not
4182*8044SWilliam.Kucharski@Sun.COM     a good thing to make one big patch which changes many things.
4183*8044SWilliam.Kucharski@Sun.COM     Instead, segregate features and produce many patches.
4184*8044SWilliam.Kucharski@Sun.COM
4185*8044SWilliam.Kucharski@Sun.COM   * Use as late code as possible, for the original code. The CVS
4186*8044SWilliam.Kucharski@Sun.COM     repository always has the current version (*note Obtaining and
4187*8044SWilliam.Kucharski@Sun.COM     Building GRUB::).
4188*8044SWilliam.Kucharski@Sun.COM
4189*8044SWilliam.Kucharski@Sun.COM   * Write ChangeLog entries. *Note Change Logs: (standards)Change
4190*8044SWilliam.Kucharski@Sun.COM     Logs, if you don't know how to write ChangeLog.
4191*8044SWilliam.Kucharski@Sun.COM
4192*8044SWilliam.Kucharski@Sun.COM   * Make patches in unified diff format. `diff -urN' is appropriate in
4193*8044SWilliam.Kucharski@Sun.COM     most cases.
4194*8044SWilliam.Kucharski@Sun.COM
4195*8044SWilliam.Kucharski@Sun.COM   * Don't make patches reversely. Reverse patches are difficult to
4196*8044SWilliam.Kucharski@Sun.COM     read and use.
4197*8044SWilliam.Kucharski@Sun.COM
4198*8044SWilliam.Kucharski@Sun.COM   * Be careful enough of the license term and the copyright. Because
4199*8044SWilliam.Kucharski@Sun.COM     GRUB is under GNU General Public License, you may not steal code
4200*8044SWilliam.Kucharski@Sun.COM     from software whose license is incompatible against GPL. And, if
4201*8044SWilliam.Kucharski@Sun.COM     you copy code written by others, you must not ignore their
4202*8044SWilliam.Kucharski@Sun.COM     copyrights. Feel free to ask GRUB maintainers, whenever you are
4203*8044SWilliam.Kucharski@Sun.COM     not sure what you should do.
4204*8044SWilliam.Kucharski@Sun.COM
4205*8044SWilliam.Kucharski@Sun.COM   * If your patch is too large to send in e-mail, put it at somewhere
4206*8044SWilliam.Kucharski@Sun.COM     we can see. Usually, you shouldn't send e-mail over 20K.
4207*8044SWilliam.Kucharski@Sun.COM
4208*8044SWilliam.Kucharski@Sun.COM
4209*8044SWilliam.Kucharski@Sun.COMFile: grub.info,  Node: Index,  Prev: Internals,  Up: Top
4210*8044SWilliam.Kucharski@Sun.COM
4211*8044SWilliam.Kucharski@Sun.COMIndex
4212*8044SWilliam.Kucharski@Sun.COM*****
4213*8044SWilliam.Kucharski@Sun.COM
4214*8044SWilliam.Kucharski@Sun.COM[index]
4215*8044SWilliam.Kucharski@Sun.COM* Menu:
4216*8044SWilliam.Kucharski@Sun.COM
4217*8044SWilliam.Kucharski@Sun.COM* blocklist:                             blocklist.            (line  7)
4218*8044SWilliam.Kucharski@Sun.COM* boot:                                  boot.                 (line  7)
4219*8044SWilliam.Kucharski@Sun.COM* bootp:                                 bootp.                (line  7)
4220*8044SWilliam.Kucharski@Sun.COM* cat:                                   cat.                  (line  7)
4221*8044SWilliam.Kucharski@Sun.COM* chainloader:                           chainloader.          (line  7)
4222*8044SWilliam.Kucharski@Sun.COM* cmp:                                   cmp.                  (line  7)
4223*8044SWilliam.Kucharski@Sun.COM* color:                                 color.                (line  7)
4224*8044SWilliam.Kucharski@Sun.COM* configfile:                            configfile.           (line  7)
4225*8044SWilliam.Kucharski@Sun.COM* current_drive:                         Filesystem interface. (line 19)
4226*8044SWilliam.Kucharski@Sun.COM* current_partition:                     Filesystem interface. (line 23)
4227*8044SWilliam.Kucharski@Sun.COM* current_slice:                         Filesystem interface. (line 26)
4228*8044SWilliam.Kucharski@Sun.COM* debug:                                 debug.                (line  7)
4229*8044SWilliam.Kucharski@Sun.COM* default:                               default.              (line  7)
4230*8044SWilliam.Kucharski@Sun.COM* device:                                device.               (line  7)
4231*8044SWilliam.Kucharski@Sun.COM* devread:                               Filesystem interface. (line 71)
4232*8044SWilliam.Kucharski@Sun.COM* dhcp:                                  dhcp.                 (line  7)
4233*8044SWilliam.Kucharski@Sun.COM* disk_read_func:                        Filesystem interface. (line 62)
4234*8044SWilliam.Kucharski@Sun.COM* displayapm:                            displayapm.           (line  7)
4235*8044SWilliam.Kucharski@Sun.COM* displaymem:                            displaymem.           (line  7)
4236*8044SWilliam.Kucharski@Sun.COM* embed:                                 embed.                (line  7)
4237*8044SWilliam.Kucharski@Sun.COM* fallback:                              fallback.             (line  7)
4238*8044SWilliam.Kucharski@Sun.COM* filemax:                               Filesystem interface. (line 59)
4239*8044SWilliam.Kucharski@Sun.COM* filepos:                               Filesystem interface. (line 52)
4240*8044SWilliam.Kucharski@Sun.COM* find:                                  find.                 (line  7)
4241*8044SWilliam.Kucharski@Sun.COM* fstest:                                fstest.               (line  7)
4242*8044SWilliam.Kucharski@Sun.COM* FSYS_BUF:                              Filesystem interface. (line 46)
4243*8044SWilliam.Kucharski@Sun.COM* geometry:                              geometry.             (line  7)
4244*8044SWilliam.Kucharski@Sun.COM* grub_read:                             Filesystem interface. (line 75)
4245*8044SWilliam.Kucharski@Sun.COM* halt:                                  halt.                 (line  7)
4246*8044SWilliam.Kucharski@Sun.COM* help:                                  help.                 (line  7)
4247*8044SWilliam.Kucharski@Sun.COM* hiddenmenu:                            hiddenmenu.           (line  7)
4248*8044SWilliam.Kucharski@Sun.COM* hide:                                  hide.                 (line  7)
4249*8044SWilliam.Kucharski@Sun.COM* ifconfig:                              ifconfig.             (line  8)
4250*8044SWilliam.Kucharski@Sun.COM* impsprobe:                             impsprobe.            (line  7)
4251*8044SWilliam.Kucharski@Sun.COM* initrd:                                initrd.               (line  7)
4252*8044SWilliam.Kucharski@Sun.COM* install:                               install.              (line  9)
4253*8044SWilliam.Kucharski@Sun.COM* ioprobe:                               ioprobe.              (line  7)
4254*8044SWilliam.Kucharski@Sun.COM* kernel:                                kernel.               (line  7)
4255*8044SWilliam.Kucharski@Sun.COM* lock:                                  lock.                 (line  7)
4256*8044SWilliam.Kucharski@Sun.COM* makeactive:                            makeactive.           (line  7)
4257*8044SWilliam.Kucharski@Sun.COM* map:                                   map.                  (line  7)
4258*8044SWilliam.Kucharski@Sun.COM* md5crypt:                              md5crypt.             (line  7)
4259*8044SWilliam.Kucharski@Sun.COM* module:                                module.               (line  7)
4260*8044SWilliam.Kucharski@Sun.COM* modulenounzip:                         modulenounzip.        (line  7)
4261*8044SWilliam.Kucharski@Sun.COM* pager:                                 pager.                (line  7)
4262*8044SWilliam.Kucharski@Sun.COM* part_length:                           Filesystem interface. (line 38)
4263*8044SWilliam.Kucharski@Sun.COM* part_start:                            Filesystem interface. (line 35)
4264*8044SWilliam.Kucharski@Sun.COM* partnew:                               partnew.              (line  7)
4265*8044SWilliam.Kucharski@Sun.COM* parttype:                              parttype.             (line  7)
4266*8044SWilliam.Kucharski@Sun.COM* password:                              password.             (line  7)
4267*8044SWilliam.Kucharski@Sun.COM* pause:                                 pause.                (line  7)
4268*8044SWilliam.Kucharski@Sun.COM* print_a_completion:                    Filesystem interface. (line 79)
4269*8044SWilliam.Kucharski@Sun.COM* print_possibilities:                   Filesystem interface. (line 41)
4270*8044SWilliam.Kucharski@Sun.COM* quit:                                  quit.                 (line  7)
4271*8044SWilliam.Kucharski@Sun.COM* rarp:                                  rarp.                 (line  7)
4272*8044SWilliam.Kucharski@Sun.COM* read:                                  read.                 (line  7)
4273*8044SWilliam.Kucharski@Sun.COM* reboot:                                reboot.               (line  7)
4274*8044SWilliam.Kucharski@Sun.COM* root:                                  root.                 (line  7)
4275*8044SWilliam.Kucharski@Sun.COM* rootnoverify:                          rootnoverify.         (line  7)
4276*8044SWilliam.Kucharski@Sun.COM* saved_drive:                           Filesystem interface. (line 29)
4277*8044SWilliam.Kucharski@Sun.COM* saved_partition:                       Filesystem interface. (line 32)
4278*8044SWilliam.Kucharski@Sun.COM* savedefault:                           savedefault.          (line  7)
4279*8044SWilliam.Kucharski@Sun.COM* serial:                                serial.               (line  9)
4280*8044SWilliam.Kucharski@Sun.COM* setkey:                                setkey.               (line  7)
4281*8044SWilliam.Kucharski@Sun.COM* setup:                                 setup.                (line  8)
4282*8044SWilliam.Kucharski@Sun.COM* terminal:                              terminal.             (line  9)
4283*8044SWilliam.Kucharski@Sun.COM* terminfo:                              terminfo.             (line  9)
4284*8044SWilliam.Kucharski@Sun.COM* testload:                              testload.             (line  7)
4285*8044SWilliam.Kucharski@Sun.COM* testvbe:                               testvbe.              (line  7)
4286*8044SWilliam.Kucharski@Sun.COM* tftpserver:                            tftpserver.           (line  7)
4287*8044SWilliam.Kucharski@Sun.COM* timeout:                               timeout.              (line  7)
4288*8044SWilliam.Kucharski@Sun.COM* title:                                 title.                (line  7)
4289*8044SWilliam.Kucharski@Sun.COM* unhide:                                unhide.               (line  7)
4290*8044SWilliam.Kucharski@Sun.COM* uppermem:                              uppermem.             (line  7)
4291*8044SWilliam.Kucharski@Sun.COM* vbeprobe:                              vbeprobe.             (line  7)
4292*8044SWilliam.Kucharski@Sun.COM
4293*8044SWilliam.Kucharski@Sun.COM
4294*8044SWilliam.Kucharski@Sun.COM
4295*8044SWilliam.Kucharski@Sun.COMTag Table:
4296*8044SWilliam.Kucharski@Sun.COMNode: Top1487
4297*8044SWilliam.Kucharski@Sun.COMNode: Introduction3266
4298*8044SWilliam.Kucharski@Sun.COMNode: Overview3643
4299*8044SWilliam.Kucharski@Sun.COMNode: Overview-Footnotes5865
4300*8044SWilliam.Kucharski@Sun.COMRef: Overview-Footnote-15926
4301*8044SWilliam.Kucharski@Sun.COMNode: History6087
4302*8044SWilliam.Kucharski@Sun.COMNode: Features7208
4303*8044SWilliam.Kucharski@Sun.COMNode: Features-Footnotes12976
4304*8044SWilliam.Kucharski@Sun.COMRef: Features-Footnote-113037
4305*8044SWilliam.Kucharski@Sun.COMNode: Role of a boot loader13182
4306*8044SWilliam.Kucharski@Sun.COMNode: Role of a boot loader-Footnotes14520
4307*8044SWilliam.Kucharski@Sun.COMRef: Role of a boot loader-Footnote-114607
4308*8044SWilliam.Kucharski@Sun.COMNode: Naming convention14686
4309*8044SWilliam.Kucharski@Sun.COMNode: Installation17621
4310*8044SWilliam.Kucharski@Sun.COMNode: Creating a GRUB boot floppy19363
4311*8044SWilliam.Kucharski@Sun.COMNode: Installing GRUB natively20181
4312*8044SWilliam.Kucharski@Sun.COMNode: Installing GRUB natively-Footnotes22461
4313*8044SWilliam.Kucharski@Sun.COMRef: Installing GRUB natively-Footnote-122554
4314*8044SWilliam.Kucharski@Sun.COMNode: Installing GRUB using grub-install22739
4315*8044SWilliam.Kucharski@Sun.COMNode: Making a GRUB bootable CD-ROM25685
4316*8044SWilliam.Kucharski@Sun.COMNode: Making a GRUB bootable CD-ROM-Footnotes27730
4317*8044SWilliam.Kucharski@Sun.COMRef: Making a GRUB bootable CD-ROM-Footnote-127833
4318*8044SWilliam.Kucharski@Sun.COMNode: Booting27908
4319*8044SWilliam.Kucharski@Sun.COMNode: General boot methods28363
4320*8044SWilliam.Kucharski@Sun.COMNode: Loading an operating system directly29104
4321*8044SWilliam.Kucharski@Sun.COMNode: Chain-loading30408
4322*8044SWilliam.Kucharski@Sun.COMNode: Chain-loading-Footnotes31718
4323*8044SWilliam.Kucharski@Sun.COMRef: Chain-loading-Footnote-131789
4324*8044SWilliam.Kucharski@Sun.COMNode: OS-specific notes31861
4325*8044SWilliam.Kucharski@Sun.COMNode: GNU/Hurd32237
4326*8044SWilliam.Kucharski@Sun.COMNode: GNU/Linux32856
4327*8044SWilliam.Kucharski@Sun.COMNode: FreeBSD34104
4328*8044SWilliam.Kucharski@Sun.COMNode: NetBSD34617
4329*8044SWilliam.Kucharski@Sun.COMNode: OpenBSD35275
4330*8044SWilliam.Kucharski@Sun.COMNode: DOS/Windows35475
4331*8044SWilliam.Kucharski@Sun.COMNode: SCO UnixWare37301
4332*8044SWilliam.Kucharski@Sun.COMNode: QNX37719
4333*8044SWilliam.Kucharski@Sun.COMNode: Making your system robust37969
4334*8044SWilliam.Kucharski@Sun.COMNode: Booting once-only39294
4335*8044SWilliam.Kucharski@Sun.COMNode: Booting fallback systems41219
4336*8044SWilliam.Kucharski@Sun.COMNode: Configuration44066
4337*8044SWilliam.Kucharski@Sun.COMNode: Network48495
4338*8044SWilliam.Kucharski@Sun.COMNode: General usage of network support48989
4339*8044SWilliam.Kucharski@Sun.COMNode: General usage of network support-Footnotes50850
4340*8044SWilliam.Kucharski@Sun.COMRef: General usage of network support-Footnote-150959
4341*8044SWilliam.Kucharski@Sun.COMNode: Diskless51027
4342*8044SWilliam.Kucharski@Sun.COMNode: Serial terminal53211
4343*8044SWilliam.Kucharski@Sun.COMNode: Preset Menu55444
4344*8044SWilliam.Kucharski@Sun.COMNode: Security57812
4345*8044SWilliam.Kucharski@Sun.COMNode: Images60620
4346*8044SWilliam.Kucharski@Sun.COMNode: Filesystem63131
4347*8044SWilliam.Kucharski@Sun.COMNode: Device syntax63814
4348*8044SWilliam.Kucharski@Sun.COMNode: File name syntax65308
4349*8044SWilliam.Kucharski@Sun.COMNode: Block list syntax66051
4350*8044SWilliam.Kucharski@Sun.COMNode: Interface66784
4351*8044SWilliam.Kucharski@Sun.COMNode: Command-line interface67661
4352*8044SWilliam.Kucharski@Sun.COMNode: Command-line interface-Footnotes69602
4353*8044SWilliam.Kucharski@Sun.COMRef: Command-line interface-Footnote-169691
4354*8044SWilliam.Kucharski@Sun.COMNode: Menu interface69786
4355*8044SWilliam.Kucharski@Sun.COMNode: Menu entry editor70796
4356*8044SWilliam.Kucharski@Sun.COMNode: Hidden menu interface71875
4357*8044SWilliam.Kucharski@Sun.COMNode: Commands72452
4358*8044SWilliam.Kucharski@Sun.COMNode: Menu-specific commands73029
4359*8044SWilliam.Kucharski@Sun.COMNode: default74200
4360*8044SWilliam.Kucharski@Sun.COMNode: fallback74678
4361*8044SWilliam.Kucharski@Sun.COMNode: hiddenmenu75229
4362*8044SWilliam.Kucharski@Sun.COMNode: timeout75717
4363*8044SWilliam.Kucharski@Sun.COMNode: title75995
4364*8044SWilliam.Kucharski@Sun.COMNode: General commands76266
4365*8044SWilliam.Kucharski@Sun.COMNode: bootp77579
4366*8044SWilliam.Kucharski@Sun.COMNode: color78058
4367*8044SWilliam.Kucharski@Sun.COMNode: device79532
4368*8044SWilliam.Kucharski@Sun.COMNode: dhcp80104
4369*8044SWilliam.Kucharski@Sun.COMNode: hide80689
4370*8044SWilliam.Kucharski@Sun.COMNode: ifconfig81066
4371*8044SWilliam.Kucharski@Sun.COMNode: pager81642
4372*8044SWilliam.Kucharski@Sun.COMNode: partnew81976
4373*8044SWilliam.Kucharski@Sun.COMNode: parttype82412
4374*8044SWilliam.Kucharski@Sun.COMNode: password82779
4375*8044SWilliam.Kucharski@Sun.COMNode: rarp83598
4376*8044SWilliam.Kucharski@Sun.COMNode: serial83899
4377*8044SWilliam.Kucharski@Sun.COMNode: setkey85172
4378*8044SWilliam.Kucharski@Sun.COMNode: terminal87341
4379*8044SWilliam.Kucharski@Sun.COMNode: terminfo88878
4380*8044SWilliam.Kucharski@Sun.COMNode: tftpserver89565
4381*8044SWilliam.Kucharski@Sun.COMNode: unhide90111
4382*8044SWilliam.Kucharski@Sun.COMNode: Command-line and menu entry commands90486
4383*8044SWilliam.Kucharski@Sun.COMNode: blocklist93017
4384*8044SWilliam.Kucharski@Sun.COMNode: boot93259
4385*8044SWilliam.Kucharski@Sun.COMNode: cat93580
4386*8044SWilliam.Kucharski@Sun.COMNode: chainloader93884
4387*8044SWilliam.Kucharski@Sun.COMNode: cmp94500
4388*8044SWilliam.Kucharski@Sun.COMNode: configfile95051
4389*8044SWilliam.Kucharski@Sun.COMNode: debug95265
4390*8044SWilliam.Kucharski@Sun.COMNode: displayapm95649
4391*8044SWilliam.Kucharski@Sun.COMNode: displaymem95860
4392*8044SWilliam.Kucharski@Sun.COMNode: embed96562
4393*8044SWilliam.Kucharski@Sun.COMNode: embed-Footnotes97096
4394*8044SWilliam.Kucharski@Sun.COMRef: embed-Footnote-197151
4395*8044SWilliam.Kucharski@Sun.COMNode: find97208
4396*8044SWilliam.Kucharski@Sun.COMNode: fstest97588
4397*8044SWilliam.Kucharski@Sun.COMNode: geometry98273
4398*8044SWilliam.Kucharski@Sun.COMNode: halt98885
4399*8044SWilliam.Kucharski@Sun.COMNode: help99212
4400*8044SWilliam.Kucharski@Sun.COMNode: impsprobe99833
4401*8044SWilliam.Kucharski@Sun.COMNode: initrd100232
4402*8044SWilliam.Kucharski@Sun.COMNode: install100571
4403*8044SWilliam.Kucharski@Sun.COMNode: install-Footnotes103415
4404*8044SWilliam.Kucharski@Sun.COMRef: install-Footnote-1103474
4405*8044SWilliam.Kucharski@Sun.COMNode: ioprobe103571
4406*8044SWilliam.Kucharski@Sun.COMNode: kernel103896
4407*8044SWilliam.Kucharski@Sun.COMNode: lock105016
4408*8044SWilliam.Kucharski@Sun.COMNode: makeactive105591
4409*8044SWilliam.Kucharski@Sun.COMNode: map105903
4410*8044SWilliam.Kucharski@Sun.COMNode: md5crypt106470
4411*8044SWilliam.Kucharski@Sun.COMNode: module106817
4412*8044SWilliam.Kucharski@Sun.COMNode: modulenounzip107394
4413*8044SWilliam.Kucharski@Sun.COMNode: pause107687
4414*8044SWilliam.Kucharski@Sun.COMNode: quit108101
4415*8044SWilliam.Kucharski@Sun.COMNode: reboot108377
4416*8044SWilliam.Kucharski@Sun.COMNode: read108558
4417*8044SWilliam.Kucharski@Sun.COMNode: root108800
4418*8044SWilliam.Kucharski@Sun.COMNode: rootnoverify109677
4419*8044SWilliam.Kucharski@Sun.COMNode: savedefault110232
4420*8044SWilliam.Kucharski@Sun.COMNode: setup111208
4421*8044SWilliam.Kucharski@Sun.COMNode: testload112274
4422*8044SWilliam.Kucharski@Sun.COMNode: testvbe112884
4423*8044SWilliam.Kucharski@Sun.COMNode: uppermem113255
4424*8044SWilliam.Kucharski@Sun.COMNode: vbeprobe113837
4425*8044SWilliam.Kucharski@Sun.COMNode: Troubleshooting114220
4426*8044SWilliam.Kucharski@Sun.COMNode: Stage1 errors114758
4427*8044SWilliam.Kucharski@Sun.COMNode: Stage1.5 errors116135
4428*8044SWilliam.Kucharski@Sun.COMNode: Stage2 errors116573
4429*8044SWilliam.Kucharski@Sun.COMNode: Invoking the grub shell124033
4430*8044SWilliam.Kucharski@Sun.COMNode: Basic usage124786
4431*8044SWilliam.Kucharski@Sun.COMNode: Installation under UNIX127073
4432*8044SWilliam.Kucharski@Sun.COMNode: Device map128748
4433*8044SWilliam.Kucharski@Sun.COMNode: Invoking grub-install129896
4434*8044SWilliam.Kucharski@Sun.COMNode: Invoking grub-md5-crypt131484
4435*8044SWilliam.Kucharski@Sun.COMNode: Invoking grub-terminfo132133
4436*8044SWilliam.Kucharski@Sun.COMNode: Invoking grub-set-default132899
4437*8044SWilliam.Kucharski@Sun.COMNode: Invoking mbchk134700
4438*8044SWilliam.Kucharski@Sun.COMNode: Obtaining and Building GRUB135214
4439*8044SWilliam.Kucharski@Sun.COMNode: Reporting bugs136631
4440*8044SWilliam.Kucharski@Sun.COMNode: Future139435
4441*8044SWilliam.Kucharski@Sun.COMNode: Internals139926
4442*8044SWilliam.Kucharski@Sun.COMNode: Memory map141149
4443*8044SWilliam.Kucharski@Sun.COMNode: Embedded data142627
4444*8044SWilliam.Kucharski@Sun.COMNode: Filesystem interface144644
4445*8044SWilliam.Kucharski@Sun.COMNode: Command interface148077
4446*8044SWilliam.Kucharski@Sun.COMNode: Bootstrap tricks149392
4447*8044SWilliam.Kucharski@Sun.COMNode: I/O ports detection151541
4448*8044SWilliam.Kucharski@Sun.COMNode: Memory detection151813
4449*8044SWilliam.Kucharski@Sun.COMNode: Low-level disk I/O152105
4450*8044SWilliam.Kucharski@Sun.COMNode: MBR152374
4451*8044SWilliam.Kucharski@Sun.COMNode: Partition table152571
4452*8044SWilliam.Kucharski@Sun.COMNode: Submitting patches152844
4453*8044SWilliam.Kucharski@Sun.COMNode: Index154332
4454*8044SWilliam.Kucharski@Sun.COM
4455*8044SWilliam.Kucharski@Sun.COMEnd Tag Table
4456