fix some minor bugs and replace the old manual with the new one.

This commit is contained in:
okuji 1999-10-23 23:58:27 +00:00
parent 4b1ec86348
commit 8ae7fd5f6f
10 changed files with 287 additions and 3167 deletions

View file

@ -1,3 +1,26 @@
1999-10-24 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
The new GRUB manual becomes official.
* docs/grub.texi: Replaced with new-grub.texi.
* docs/new-grub.texi: Removed.
* docs/Makefile.am (grub_TEXINFOS): New variable.
(UNFINISHED_MANUALS): Removed.
(EXTRA_DIST): Deleted $(UNFINISHED_MANUALS).
1999-10-24 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* stage2/builtins.c (device_func) [!GRUB_UTIL]: Set ERRNUM to
ERR_UNRECOGINIZED and return 1.
(impsprobe_func) [GRUB_UTIL]: Likewise.
(quit_func) [!GRUB_UTIL]: Likewise.
* docs/tutorial.texi: Rename "Device Syntax" to "Filename".
Added many cross-references.
* docs/new-grub.texi: "Device Syntax" -> "Filename".
* docs/user-ref.texi: Fix typos and added some cross-references.
* docs/prog-ref.texi: Likewise.
* docs/appendices.texi: Likewise.
1999-10-23 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* stage2/builtins.c (map_func): If BIOS_DRIVE_MAP already

2
NEWS
View file

@ -19,6 +19,8 @@ New in 0.5.94:
chain-load some foolish operating systems (such as DOS) even if such
an operating system resides at a non-first drive.
* The command "keycode" maps a key code to another.
* The GRUB manual is rewritten, and now consists of three parts and
appendices.
New in 0.5.93:
* ELF format of FreeBSD kernel is supported.

View file

@ -1,4 +1,6 @@
info_TEXINFOS = grub.texi multiboot.texi
grub_TEXINFOS = tutorial.texi user-ref.texi prog-ref.texi \
appendices.texi
EXAMPLES = boot.S kernel.c multiboot.h
multiboot_TEXINFOS = boot.S.texi kernel.c.texi multiboot.h.texi
man_MANS = grub.8 mbchk.1
@ -6,12 +8,8 @@ HELP2MAN = help2man
SRC2TEXI = src2texi
noinst_SCRIPTS = $(HELP2MAN) $(SRC2TEXI)
# The unfinished manuals.
UNFINISHED_MANUALS = new-grub.texi tutorial.texi user-ref.texi \
prog-ref.texi appendices.texi
EXTRA_DIST = menu.lst $(man_MANS) $(noinst_SCRIPTS) \
$(EXAMPLES) $(multiboot_TEXINFOS) $(UNFINISHED_MANUALS)
$(EXAMPLES) $(multiboot_TEXINFOS)
# Cancel the rule %.texi -> %. This rule may confuse make to determine
# the dependecies.

View file

@ -13,9 +13,9 @@ Technically speaking, GNU GRUB has many features that are not
seen in the original GRUB. For example, GNU GRUB can be installed on
UNIX-like operating system (i.e. GNU/Linux) via the grub shell
@file{/sbin/grub}, it supports Logical Block Address (LBA) mode that
solves the 1024 cylinders problem, and TAB completes a filename when
it's unique. Of course, many bug fixes are done as well, so it is
recommended to use GNU GRUB.
solves the 1024 cylinders problem, and @kbd{@key{TAB}} completes a
filename when it's unique. Of course, many bug fixes are done as well,
so it is recommended to use GNU GRUB.
@item Can GRUB boot my operating system from over 8GB hard disks?
@ -72,13 +72,13 @@ EOT
@item GRUB does not recognize my GNU/Hurd partition.
I don't know why, but the authors of FDISK programs have assigned the
partition type 0x63 to GNU Hurd incorrectly. A partition type should
mean what format is used in the partition, such as filesystem and BSD
slices, and should not be used to represent what operating system owns
the partition. So use 0x83 if the partition contains ext2fs
filesystem, and use 0xA5 if the partition contains ffs fielsystem,
whether the partition owner is Hurd or not. We will use 0x63 for GNU
Hurd filesystem that has not been implemented yet.
partition type @samp{0x63} to GNU Hurd incorrectly. A partition type
should mean what format is used in the partition, such as filesystem and
BSD slices, and should not be used to represent what operating system
owns the partition. So use @samp{0x83} if the partition contains ext2fs
filesystem, and use @samp{0xA5} if the partition contains ffs
fielsystem, whether the partition owner is Hurd or not. We will use
@samp{0x63} for GNU Hurd filesystem that has not been implemented yet.
@item I've installed a recent version of binutils, but GRUB still crashes.
@ -112,7 +112,9 @@ there is a serious bug in GRUB. @xref{Reporting bugs}.
@item Why doesn't Linux (FreeBSD, NetBSD, etc.) become Multiboot-compliant?
Please ask the maintainers. If all free kernels were
Multiboot-compliant, the world would be an utopia@dots{}
Multiboot-compliant (@pxref{Top, Multiboot Specification, Motivation,
multiboot, The Multiboot Specification}), the world would be an
utopia@dots{}
@end table
@ -145,13 +147,16 @@ instructions on how to build and install GRUB, but you should be able to
just do:
@example
@group
$ cd grub-@value{VERSION}
$ ./configure
$ make install
@end group
@end example
This will install the grub shell @file{grub}, the Multiboot checker
@file{mbchk}, and the GRUB images It will also install the GRUB manual.
This will install the grub shell @file{grub} (@pxref{Invoking the grub
shell}), the Multiboot checker @file{mbchk} (@pxref{Invoking mbchk}),
and the GRUB images It will also install the GRUB manual.
Also, you can obtain the latest version from the CVS. Use the repository
@code{:pserver:anoncvs@@anoncvs.gnu.org:/gd/gnu/anoncvsroot} and the
@ -159,9 +164,11 @@ module @code{grub}. The password for anoncvs is empty. So the
instruction is:
@example
@group
$ cvs -d :pserver:anoncvs@@anoncvs.gnu.org:/gd/gnu/anoncvsroot login
Password: @key{ENTER}
$ cvs -d :pserver:anoncvs@@anoncvs.gnu.org:/gd/gnu/anoncvsroot co grub
@end group
@end example
Get the recent version of GNU Automake from the CVS to regenerate

File diff suppressed because it is too large Load diff

View file

@ -1,165 +0,0 @@
\input texinfo
@c -*-texinfo-*-
@c %**start of header
@c @setfilename grub.info
@settitle GRUB Manual
@c %**end of header
@c This new manual is under development. When it will be completed, I'll
@c replace it with the old one. If you'd like to help it, please let me
@c know. - okuji
@include version.texi
@c Unify all our little indices for now.
@syncodeindex fn cp
@syncodeindex vr cp
@syncodeindex ky cp
@syncodeindex pg cp
@syncodeindex tp cp
@dircategory Kernel
@direntry
* GRUB: (grub). The GRand Unified Bootloader
@end direntry
@dircategory Kernel
@direntry
* mbchk: (grub)Invoking mbchk. Check for the format of a Multiboot kernel
@end direntry
@setchapternewpage off
@ifinfo
Copyright @copyright{} 1996 Erich Boleyn
Copyright @copyright{} 1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries a copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
@end ifinfo
@titlepage
@sp 10
@title The GRUB Manual
@author Gordon Matzigkeit
@author OKUJI Yoshinori
@c The following two commands start the copyright page.
@page
@vskip 0pt plus 1filll
@vskip 0pt plus 1filll
Copyright @copyright{} 1996 Erich Boleyn
Copyright @copyright{} 1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
by Free Software Foundation.
@end titlepage
@finalout
@headings double
@c The Top node should not appear in TeX.
@ifnottex
@node Top
@top GRUB
This file documents GNU GRUB, the Grand Unified Bootloader. This
edition documents version @value{VERSION}.
@end ifnottex
@menu
Part I: The Tutorial Manual
* Overview:: Starting to use GRUB
* Device Syntax:: How to specify a device
* Installation:: How to install GRUB on your drive
* Boot:: How to boot your operating systems
* Configuration:: Writing your configuration file
Part II: The User Reference Manual
* Introduction:: Capturing the spirit of GRUB
* Filesystem:: Filesystem syntax and semantics
* Interface:: The menu and the command-line
* Command:: The list of available builtin commands
* Troubleshooting:: Error messages produced by GRUB
* Invoking the grub shell:: How to use the grub shell
* Invoking mbchk:: How to use the Multiboot checker
Part III: The Programmer Reference Manual
* Hacking:: Implementation details
* Memory map:: The memory map of various components
* Embedded data:: Embedded variables in GRUB
* Filesystem interface:: The generic interface for the fs code
* Bootstrap tricks:: The bootstrap mechanism used in GRUB
* Memory detection:: How to detect all installed @sc{ram}
* Low-level disk I/O:: INT 13H disk I/O interrupts
* MBR:: The structure of Master Boot Record
* Partition table:: The format of partition table
Appendices and Indices
* FAQ:: Frequently asked questions
* Obtaining and Building GRUB:: How to obtain and build GRUB
* Reporting bugs:: Where you should send a bug report
* Index::
@end menu
@iftex
@page
@unnumbered{Part I: The Tutorial Manual}
@end iftex
@include tutorial.texi
@iftex
@page
@unnumbered{Part II: The User Reference Manual}
@end iftex
@include user-ref.texi
@iftex
@page
@unnumbered{Part III: The Programmer Reference Manual}
@end iftex
@include prog-ref.texi
@iftex
@page
@unnumbered{Appendices and Indices}
@end iftex
@include appendices.texi
@contents
@bye

View file

@ -291,7 +291,7 @@ distinct components, @dfn{stage1} and @dfn{stage2} (and optionally
@dfn{stage1.5}). @xref{Memory map}, for more information.
We embed @dfn{stage1} in a MBR or in the boot sector of a partition
table, and place @dfn{stage2} in a filesystem. The optional
, and place @dfn{stage2} in a filesystem. The optional
@dfn{stage1.5} can be installed in a filesystem, in the @dfn{boot loader}
area in a FFS, and in the sectors right after a MBR, because
@dfn{stage1.5} is enough small and the sectors right after a MBR is
@ -310,7 +310,7 @@ loads the rest. The flow of @dfn{stage1} is:
@enumerate
@item
Initialize the symtem briefly.
Initialize the system briefly.
@item
Detect the geometry and the accessing mode of the @dfn{loading drive}.

View file

@ -17,17 +17,27 @@ without recording the position of your kernel on the disk.
Therefore, you have to specify the drive/partition where your kernel
resides and the filename at hand. If you don't want to type the
drive and the filename every time, the menu interface will help
you. GRUB loads a configuration file if found and provides the menu so
that you can select which OS is booted at ease. Of course, you can enter
the command-line interface whenever you like.
drive and the filename every time, the menu interface (@pxref{Menu})
will help you. GRUB loads a configuration file (@pxref{Configuration})
if found and provides the menu so that you can select which OS is booted
at ease. Of course, you can enter the command-line interface
(@pxref{Command line}) whenever you like.
In the following chapters, we teach you how to specify your drive, how
to install GRUB on your drive, and how to boot your OSes, step by step.
In the following chapters, we teach you how to specify a
drive/partition and a filename (@pxref{Filename}), how to install GRUB
on your drive (@pxref{Installation}), and how to boot your OSes
(@pxref{Boot}), step by step.
@node Device Syntax
@chapter Device Syntax
@c @node Fundamentals
@c @chapter Introduction to the technical basic knowledge
@c
@c I'm going to include Bill White's documentation here, once his
@c copyright problem will be solved.
@node Filename
@chapter Filename
Now is the time when you should learn the device syntax used in GRUB, so
that you can specify a drive/partition. See this example:
@ -37,8 +47,9 @@ that you can specify a drive/partition. See this example:
@end example
This means the first floppy disk drive. GRUB requires that the device
name is enclosed with @samp{(} and @samp{)}. In this case, GRUB
uses the whole of the floppy disk.
name is enclosed with @samp{(} and @samp{)}. The number @samp{0} is the
drive number, which is counted from @emph{zero}. In this case, GRUB uses
the whole of the floppy disk.
@example
(hd0,1)
@ -52,6 +63,15 @@ partition numbers are counted from @emph{zero} but not from one. In this
case, GRUB uses the partition of the disk instead of the whole of the
disk.
@example
(hd0,4)
@end example
This specifies the first @dfn{extended partition} of the first hard disk
drive. Note that the partition numbers for extended partitions are
counted from @samp{4}, whether your disks has four primary partitions or
less.
@example
(hd1,a)
@end example
@ -63,13 +83,14 @@ searches for the first @sc{pc} slice which has a BSD @samp{a} partition.
Note that GRUB does @emph{not} distinguish IDE from SCSI; just count the
drive numbers from zero. Normally, any IDE drive number is less than any
SCSI drive number, but this is not correct if you exchange the boot
SCSI drive number, but this is not true if you exchange the boot
sequence between IDE and SCSI in your BIOS. But do not worry. In the
GRUB command-line, you can always use the @key{TAB} completion which
displays the list of drives, the list of the partitions of a drive, or
the list of the filenames on a partition, depending on where you push
the @key{TAB} key in the command-line. So it should be possible to
determine which drive and which partition are what you seek for.
GRUB command-line (@pxref{Command line}), you can always use the
@key{TAB} completion which displays the list of drives, the list of the
partitions of a drive, or the list of the filenames on a partition,
depending on where you push the @key{TAB} key in the command-line. So it
should be possible to determine which drive and which partition are what
you seek for.
Now the question is how to specify a file. Again, see this example:
@ -79,10 +100,10 @@ Now the question is how to specify a file. Again, see this example:
This specifies the file whose name is @samp{vmlinuz} on the first
partition of the first hard disk drive. Isn't that easy? All you should
do is just type the absolute filename. If you are tired of typing the
whole of the filename, press the @key{TAB} key. @key{TAB} completes the
filename if it is unique. Otherwise, it displays the list of the
candidates.
do is type the absolute filename. If you are tired of typing the
whole of the filename, press the @key{TAB} key. @kbd{@key{TAB}}
completes the filename if it is unique. Otherwise, it displays the list
of the candidates.
OK, the next chapter introduces how to install GRUB on your drive.
@ -93,11 +114,12 @@ OK, the next chapter introduces how to install GRUB on your drive.
At first, install GRUB by @code{make install} (@pxref{Obtaining and
Building GRUB}) or by the GRUB package for your OS. If this is done,
let's install GRUB on your drive. There are two ways to install GRUB:
using the grub shell on a UNIX-like OS and using the native Stage 2. The
two ways are almost same, but the main difference is that the grub shell
might probe a wrong BIOS drive on a UNIX-like OS. If you install GRUB on
a UNIX-like OS, make sure that you have a boot floppy disk so that you
can rescue your computer when it crashes.
using the grub shell (@pxref{Invoking the grub shell}) on a UNIX-like OS
and using the native Stage 2. The two ways are almost the same, but the
main difference is that the grub shell might probe a wrong BIOS drive on
a UNIX-like OS. If you install GRUB on a UNIX-like OS, make sure that
you have a boot floppy disk so that you can rescue your computer when it
crashes.
Anyhow, copy your GRUB images (@file{stage1}, @file{stage2}, etc.) to
the directory @file{/boot/grub} before staring to install
@ -146,13 +168,14 @@ DOS).
OK, now reboot your computer with a GRUB boot floppy inserted if you
decide to install GRUB in the native environment. That's definitely
desirable. However, if you don't want to reboot your computer, run the
program @file{/sbin/grub}.
program @file{/sbin/grub} (@pxref{Invoking the grub shell}).
In both, GRUB will show the command-line interface. First, set the
GRUB's @dfn{root device}@footnote{Note that GRUB's root device is
not your OS's root partition; if you need to specify a root partition
for your OS, add the argument into the command @command{kernel}.} to the
partition which has your GRUB images, like this:
In both, GRUB will show the command-line interface (@pxref{Command
line}). First, set the GRUB's @dfn{root device}@footnote{Note that
GRUB's root device is not your OS's root partition; if you need to
specify a root partition for your OS, add the argument into the command
@command{kernel}.} to the partition which has your GRUB images, like
this:
@example
grub> root (hd0,0)
@ -166,7 +189,7 @@ grub> find /boot/grub/stage1
@end example
This will search for the filename @file{/boot/grub/stage1} and show the
device which contains the images.
devices which contain the image.
If you set the root device correctly, run the command
@command{setup}:
@ -175,9 +198,10 @@ If you set the root device correctly, run the command
grub> setup (hd0)
@end example
This command will install GRUB on the MBR in the first drive. If you
want to install GRUB into the @dfn{boot sector} of a partition instead
of the MBR, specify a partition into which you want to install GRUB:
This command will install GRUB on the MBR (@pxref{MBR}) in the first
drive. If you want to install GRUB into the @dfn{boot sector} of a
partition instead of the MBR, specify a partition into which you want to
install GRUB:
@example
grub> setup (hd0,0)
@ -217,18 +241,18 @@ steps:
@enumerate
@item
Set GRUB's root device to the drive where the OS images is stored by
the command @command{root}.
Set GRUB's root device to the drive where the OS images are stored by
the command @command{root} (@pxref{Command}).
@item
Load the kernel image by the command @command{kernel}.
Load the kernel image by the command @command{kernel} (@pxref{Command}).
@item
Load the modules by the command @command{module} or
@command{modulenounzip} as you need.
@command{modulenounzip} as you need (@pxref{Command}).
@item
Run the command @command{boot}.
Run the command @command{boot} (@pxref{Command}).
@end enumerate
@ -257,7 +281,8 @@ And, finally, run the command @command{boot}.
@section Booting GNU/Linux
It is relatively easy to boot GNU/Linux from GRUB, because booting
GNU/Linux somewhat resembles booting a Multiboot-compliant OS.
GNU/Linux somewhat resembles booting a Multiboot-compliant OS
(@pxref{Booting a Multiboot-compliant OS}).
First, set GRUB's root device to the same drive as
GNU/Linux's. Probably @code{find /vmlinuz} or such will help
@ -270,7 +295,7 @@ grub> kernel /vmlinuz root=/dev/hda1
@end example
If you need to specify some kernel parameters, just append them to the
command. An example is to set @samp{vga} to @samp{ext}:
command. An example is to set @option{vga} to @samp{ext}:
@example
grub> kernel /vmlinuz root=/dev/hda1 vga=ext
@ -314,7 +339,7 @@ FIXME
@node Chain-loading
@section Chain-loading
If you want to boot a unsupported operating system (i.e. Windows 95),
If you want to boot an unsupported operating system (i.e. Windows 95),
chain-load the boot loader for the operating system. Normally, the boot
loader is embedded in the @dfn{boot sector} of the partition on which
the operating system is installed.
@ -326,7 +351,7 @@ First, set GRUB's root device to the partition by the command
grub> rootnoverify (hd0,0)
@end example
Second, set the @dfn{active} flags in the partition by the command
Second, set the @dfn{active} flag in the partition by the command
@command{makeactive}:
@example
@ -340,18 +365,33 @@ grub> chainloader +1
@end example
Do not care about what @samp{+1} is. We describe it later in
@xref{Filesystem}. If this succeeds, run the command @command{boot}.
@ref{Filesystem}. If this succeeds, run the command @command{boot}.
However, some tricks will be necessary if you have installed DOS or
Windows on a non-first hard disk, because they cannot boot any disks
except for the first one. The solution is to use the command
@command{map} (@pxref{Command}), like this:
@example
@group
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
@end group
@end example
This performs the @dfn{logical} exchange between your first disk and
your second one.
@node Configuration
@chapter Configuration
Probably it is bothersome to type the commands to boot your OS. So
GRUB provides the menu interface so that you can just select an item
from the menu.
GRUB provides the menu interface (@pxref{Menu}) so that you can just
select an item from the menu.
To enable the menu, write a configuration file and save it in
@file{/boot/grub/menu.lst}. Here is the sample configuration file:
@file{/boot/grub/menu.lst}. Here is a sample configuration file:
@example
@include menu.lst
@ -366,10 +406,10 @@ The argument for the command @command{title} is used to display the
message about the entry. Since @command{title} displays the argument as
it is, you can write any words as you like.
You can write the menu interface specific commands before any
@command{title}. There are several commands you can use in there, but we
describe a few of them. The complete descriptions can be found in
@xref{Command}.
You can write the menu interface specific commands (@pxref{Menu-specific
commands}) before any @command{title}. There are several commands you
can use in there, but we describe a few of them. The complete
descriptions can be found in @ref{Command}.
The command @command{default} specifies which entry will be selected
when you do not select an entry explicitly. The argument is the entry
@ -380,16 +420,16 @@ The default entry will be executed when you do not select any entry
during certain seconds, which is defined by the command
@command{timeout}. So in the example above, the timeout is 30 seconds.
The command @command{fallback} is used if the default entry fails. If
GRUB executes the default entry and it fails, then it executes the
@dfn{fallback} entry. The argument is the same meaning as the one for
@command{default}. This command is rarely used.
The command @command{fallback} is used only if the default entry
fails. If GRUB executes the default entry and it fails, then it executes
the @dfn{fallback} entry. The argument is the same meaning as the one
for @command{default}. This command is rarely used.
In the last entry, @command{color} is used. This command is somewhat
special because it can be used both in the command-line and in the
menu. GRUB has such several commands. The command @command{color}
changes the menu colors. It is best to run the command actually to
understand what happens.
menu (@pxref{General commands}). GRUB has such several commands. The
command @command{color} changes the menu colors. It is best to run the
command actually to understand what happens.
We hope that you now understand how to use GRUB. To understand more
about GRUB, see the User Reference Manual (@pxref{Introduction}). Have

View file

@ -17,7 +17,7 @@ Manual (@pxref{Hacking}).
GRUB originated in 1995 when Erich Boleyn was trying to boot the GNU
Hurd with the University of Utah's Mach 4 microkernel (now known as GNU
Mach). Erich and Brian Ford designed the Multiboot Standard
Mach). Erich and Brian Ford designed the Multiboot Specification
(@pxref{Top, Multiboot Specification, Motivation, multiboot, The Multiboot
Specification}), because they were determined not to add to the large
number of mutually-incompatible PC boot methods.
@ -59,7 +59,7 @@ supported via a chain-loading function.
Except for specific compatibility modes (chain-loading and the Linux
@dfn{piggyback} format), all kernels will be started in much the same
state as in the Multiboot Standard. Only kernels loaded at 1 megabyte
state as in the Multiboot Specification. Only kernels loaded at 1 megabyte
or above are presently supported. Any attempt to load below that
boundary will simply result in immediate failure and an error message
reporting the problem.
@ -73,12 +73,12 @@ that GRUB supports):
Supports many of the @dfn{a.out} variants plus @dfn{ELF}. Symbol
tables are also loaded.
@item Supports Non-Multiboot Kernels
@item Support Non-Multiboot Kernels
Supports many of the various free 32-bit kernels that lack Multiboot
compliance (primarily FreeBSD, NetBSD, OpenBSD, and
Linux). Chain-loading of other boot loaders is also supported.
@item Loads Multiples Modules
@item Load Multiples Modules
GRUB fully supports the Multiboot feature of loading multiple modules.
@item Configuration File
@ -133,7 +133,7 @@ translation irrelevant. A drive installed and running with one
translation may be converted to another translation without any adverse
effects or changes in GRUB's configuration.
@item Detects All Installed @sc{ram}
@item Detect All Installed @sc{ram}
GRUB can generally find all the installed @sc{ram} on a PC-compatible
machine. It uses an advanced BIOS query technique for finding all
memory regions (@pxref{Memory detection}). As described on the Multiboot
@ -141,7 +141,7 @@ Specification (@pxref{Top, Multiboot Specification, Motivation,
multiboot, The Multiboot Specification}), not all kernels make use of
this information, but GRUB provides it for those who do.
@item Supports Logical Block Address Mode
@item Support Logical Block Address Mode
In traditional disk calls (called @dfn{CHS mode}), there is a geometry
translation problem, that is, the BIOS cannot access over 1024
cylinders, so the accessible space is limited to at least 508 MB and to
@ -200,7 +200,8 @@ GRUB uses a special syntax for specifying disk drives which can be
accessed by BIOS. Because of BIOS limitations, GRUB cannot distinguish
between IDE, ESDI, SCSI, or others. You must know yourself which BIOS
device is equivalent to which OS device. Normally, that will be clear if
you see the files in a device or use the command @command{find}.
you see the files in a device or use the command @command{find}
(@pxref{Command}).
@menu
* Device syntax:: How to specify devices
@ -230,8 +231,9 @@ which is a BIOS drive number, so the following are equivalent:
@end example
@var{part-num} represents the partition number of @var{bios-device},
starting from zero, and @var{bsd-subpart-letter} represents the BSD
disklabel subpartition, such as @samp{a} or @samp{e}.
starting from zero for primary partitions and from four for extened
partitions, and @var{bsd-subpart-letter} represents the BSD disklabel
subpartition, such as @samp{a} or @samp{e}.
A shortcut for specifying BSD subpartitions is
@code{(@var{bios-device},@var{bsd-subpart-letter})}, in this case, GRUB
@ -313,19 +315,19 @@ The command line interface provides a prompt and after it an editable
text area much like a command line in Unix or DOS. Each command is
immediately executed after it is entered @footnote{However, this
behavior will be changed in the future version, in a user-invisible
way.}. The commands are a subset of those available in the configuration
file, used with exactly the same syntax.
way.}. The commands (@pxref{Command}) are a subset of those available in
the configuration file, used with exactly the same syntax.
Cursor movement and editing of the text on the line can be done via a
subset of the functions available in the Bash shell:
@table @key
@item C-f
@itemx PC left key
@itemx PC right key
Move forward one character.
@item C-b
@itemx PC right key
@itemx PC left key
Move back one character.
@item C-a
@ -365,8 +367,9 @@ Move down through the history list.
When typing commands interactively, if the cursor is within or before
the first word in the command-line, pressing the @key{TAB} key (or
@key{C-i}) will display a listing of the available commands, and if the
cursor is after the first word, the @key{TAB} will provide a completion
listing of disks, partitions, and filenames depending on the context.
cursor is after the first word, the @kbd{@key{TAB}} will provide a
completion listing of disks, partitions, and filenames depending on the
context.
@node Menu
@ -585,7 +588,8 @@ grub> device (fd0) /floppy-image
grub> device (hd0) /dev/sd0
@end example
This command is just ignored in Stage 2.
This command can be used only in the grub shell (@pxref{Invoking the
grub shell}).
@end deffn
@deffn Command hide partition
@ -689,7 +693,8 @@ displays long documents of the commands which match @var{pattern}.
@deffn Command impsprobe
Probe the Intel Multiprocessor Specification 1.1 or 1.4 configuration
table and boot the various CPUs which are found into a tight loop.
table and boot the various CPUs which are found into a tight loop. This
command can be used only in the Stage 2.
@end deffn
@deffn Command initrd file @dots{}
@ -770,7 +775,7 @@ change floppies.
@deffn Command quit
Exit from the GRUB shell @command{grub} (@pxref{Invoking the grub
shell}). This command is ignored in the native Stage 2.
shell}). This command can be used only in the grub shell.
@end deffn
@deffn Command read addr
@ -819,7 +824,7 @@ consistent offset error. If this test succeeds, then a good next step is
to try loading a kernel.
@end deffn
@deffn uppermem kbytes
@deffn Command uppermem kbytes
Force GRUB to assume that only @var{kbytes} kilobytes of upper memory
are installed. Any system address range maps are discarded.
@ -1059,8 +1064,8 @@ You can use the command @command{grub} for installing GRUB under your
operating systems and for a testbed when you add a new feature into GRUB
or when fix a bug. @command{grub} is almost the same as the Stage 2,
and, in fact, it shares the source code with the Stage 2 and you can use
the same commands in @command{grub}. It is emulated by replacing BIOS
calls with UNIX system calls and libc functions.
the same commands (@pxref{Command}) in @command{grub}. It is emulated by
replacing BIOS calls with UNIX system calls and libc functions.
The command @command{grub} accepts the following options:
@ -1185,13 +1190,13 @@ drives to OS devices. This file consists of lines like this:
@end example
@var{device} is a drive, which syntax is the same as the one in GRUB
(@pxref{Device syntax}), and @var{file} is a OS's file, which is
(@pxref{Device syntax}), and @var{file} is an OS's file, which is
normally a device file.
The reason why the grub shell gives you the device map file is that it
cannot guess the map between BIOS drives and OS devices in some
environments. For example, if you exchange the boot sequence between IDE
and SCSI in your BIOS, it mistakes the order.
cannot guess the map between BIOS drives and OS devices correctly in
some environments. For example, if you exchange the boot sequence
between IDE and SCSI in your BIOS, it mistakes the order.
Thus, edit the file if the grub shell makes a mistake. You can put any
comments in the file if needed, as the grub shell assumes that a line is

View file

@ -472,9 +472,13 @@ device_func (char *arg, int flags)
*ptr = 0;
assign_device_name (current_drive, device);
#endif /* GRUB_UTIL */
return 0;
#else /* ! GRUB_UTIL */
/* In Stage 2, this command cannot be used. */
errnum = ERR_UNRECOGNIZED;
return 1;
#endif /* GRUB_UTIL */
}
static struct builtin builtin_device =
@ -484,7 +488,7 @@ static struct builtin builtin_device =
BUILTIN_MENU | BUILTIN_CMDLINE,
"device DRIVE DEVICE",
"Specify DEVICE as the actual drive for a BIOS drive DRIVE. This command"
" is just ignored in the native Stage 2."
" can be used only in the grub shell."
};
@ -1052,12 +1056,16 @@ static struct builtin builtin_hide =
static int
impsprobe_func (char *arg, int flags)
{
#ifndef GRUB_UTIL
#ifdef GRUB_UTIL
/* In the grub shell, we cannot probe IMPS. */
errnum = ERR_UNRECOGNIZED;
return 1;
#else /* ! GRUB_UTIL */
if (!imps_probe ())
#endif
printf (" No MPS information found or probe failed\n");
return 0;
#endif /* ! GRUB_UTIL */
}
static struct builtin builtin_impsprobe =
@ -1767,10 +1775,13 @@ quit_func (char *arg, int flags)
{
#ifdef GRUB_UTIL
stop ();
#endif
/* In Stage 2, just ignore this command. */
/* Never reach here. */
return 0;
#else /* ! GRUB_UTIL */
errnum = ERR_UNRECOGINIZED;
return 1;
#endif /* ! GRUB_UTIL */
}
static struct builtin builtin_quit =