merge the changes on the branch prepare_0_5_96 to the main trunk.
This commit is contained in:
parent
98be6a00af
commit
5b956a8ac8
17 changed files with 412 additions and 201 deletions
53
ChangeLog
53
ChangeLog
|
@ -1,3 +1,56 @@
|
||||||
|
2000-10-06 Alessandro Rubini <rubini@gnu.org>
|
||||||
|
|
||||||
|
* docs/user-ref.texi (Commands): Added missing commands and
|
||||||
|
reworded part of the text.
|
||||||
|
|
||||||
|
* stage2/builtins.c (serial_func): Unswap the setting of "speed"
|
||||||
|
and "port".
|
||||||
|
|
||||||
|
2000-10-06 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* stage2/builtins.c (setup_func): Append "... " to the
|
||||||
|
messages when calling embed_func and install_func, and print
|
||||||
|
the result.
|
||||||
|
Don't jump to the label "fail", even when embed_func failed.
|
||||||
|
|
||||||
|
2000-10-05 Gordon Matzigkeit <gord@fig.org>
|
||||||
|
|
||||||
|
* stage2/disk_io.c (real_open_partition): Make sure that buf_geom
|
||||||
|
corresponds to the current drive before using it.
|
||||||
|
|
||||||
|
* lib/device.c (get_drive_geometry): Use fstat if the native
|
||||||
|
geometry methods fail, such as when the drive is mapped to a
|
||||||
|
regular file.
|
||||||
|
|
||||||
|
* docs/tutorial.texi: Add `@kbd{...}' to examples in order to
|
||||||
|
differentiate between command output and characters the user
|
||||||
|
should type.
|
||||||
|
* docs/user-ref.texi: Likewise.
|
||||||
|
|
||||||
|
2000-10-05 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* docs/grub.texi: Added an entry for the chapter "Serial
|
||||||
|
terminal".
|
||||||
|
* docs/tutorial.texi (Serial terminal): New chapter.
|
||||||
|
|
||||||
|
2000-10-04 Gordon Matzigkeit <gord@fig.org>
|
||||||
|
|
||||||
|
* util/grub-image (VERSION): Fix version calculation to tolerate
|
||||||
|
`(GNU GRUB 0.5.96)'-style versions.
|
||||||
|
|
||||||
|
* docs/grub.texi: Remove braces from `@unnumbered' sections so
|
||||||
|
that texi2html doesn't complain.
|
||||||
|
|
||||||
|
* debian/rules: Build HTML documentation to appease the Debian
|
||||||
|
masses.
|
||||||
|
|
||||||
|
2000-10-04 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* stage2/fsys_reiserfs.c (reiserfs_mount): Compare PART_LENGTH
|
||||||
|
with SUPERBLOCK + (sizeof(super) >> SECTOR_BITS) instead of
|
||||||
|
sizeof(struct reiserfs_super_block). Reported by Jochen
|
||||||
|
Hoenicke.
|
||||||
|
|
||||||
2000-10-05 OKUJI Yoshinori <okuji@gnu.org>
|
2000-10-05 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* configure.in (AM_INIT_AUTOMAKE): The version number is set to
|
* configure.in (AM_INIT_AUTOMAKE): The version number is set to
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -1,6 +1,6 @@
|
||||||
NEWS - list of user-visible changes between releases of GRUB
|
NEWS - list of user-visible changes between releases of GRUB
|
||||||
|
|
||||||
New in 0.5.96 - XXXX-XX-XX:
|
New in 0.5.96 - 2000-10-04:
|
||||||
* New commands, "reboot" and "halt".
|
* New commands, "reboot" and "halt".
|
||||||
* New command, "hiddenmenu". You can hide the menu interface by default
|
* New command, "hiddenmenu". You can hide the menu interface by default
|
||||||
with this command.
|
with this command.
|
||||||
|
|
56
config.h.in
56
config.h.in
|
@ -27,36 +27,44 @@
|
||||||
/* Defined if an absolute indirect call/jump must NOT be prefixed with `*'. */
|
/* Defined if an absolute indirect call/jump must NOT be prefixed with `*'. */
|
||||||
#undef ABSOLUTE_WITHOUT_ASTERISK
|
#undef ABSOLUTE_WITHOUT_ASTERISK
|
||||||
|
|
||||||
/* Define if you have the <curses.h> header file. */
|
|
||||||
#undef HAVE_CURSES_H
|
|
||||||
|
|
||||||
/* Define if you have the <ncurses.h> header file. */
|
|
||||||
#undef HAVE_NCURSES_H
|
|
||||||
|
|
||||||
/* Define if you have the <ncurses/curses.h> header file. */
|
|
||||||
#undef HAVE_NCURSES_CURSES_H
|
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
|
||||||
#undef HAVE_STRING_H
|
|
||||||
|
|
||||||
/* Define if you have the <strings.h> header file. */
|
|
||||||
#undef HAVE_STRINGS_H
|
|
||||||
|
|
||||||
/* Name of package */
|
|
||||||
#undef PACKAGE
|
|
||||||
|
|
||||||
/* Version number of package */
|
|
||||||
#undef VERSION
|
|
||||||
|
|
||||||
/* Define if C symbols get an underscore after compilation */
|
|
||||||
#undef HAVE_ASM_USCORE
|
|
||||||
|
|
||||||
/* Define it to "addr32" or "addr32;" to make GAS happy */
|
/* Define it to "addr32" or "addr32;" to make GAS happy */
|
||||||
#undef ADDR32
|
#undef ADDR32
|
||||||
|
|
||||||
/* Define it to "data32" or "data32;" to make GAS happy */
|
/* Define it to "data32" or "data32;" to make GAS happy */
|
||||||
#undef DATA32
|
#undef DATA32
|
||||||
|
|
||||||
|
/* Define if C symbols get an underscore after compilation */
|
||||||
|
#undef HAVE_ASM_USCORE
|
||||||
|
|
||||||
|
/* Define if you have the <curses.h> header file. */
|
||||||
|
#undef HAVE_CURSES_H
|
||||||
|
|
||||||
|
/* Define if you have the `curses' library (-lcurses). */
|
||||||
|
#undef HAVE_LIBCURSES
|
||||||
|
|
||||||
|
/* Define if you have the `ncurses' library (-lncurses). */
|
||||||
|
#undef HAVE_LIBNCURSES
|
||||||
|
|
||||||
|
/* Define if you have the `util' library (-lutil). */
|
||||||
|
#undef HAVE_LIBUTIL
|
||||||
|
|
||||||
|
/* Define if you have the <ncurses/curses.h> header file. */
|
||||||
|
#undef HAVE_NCURSES_CURSES_H
|
||||||
|
|
||||||
|
/* Define if you have the <ncurses.h> header file. */
|
||||||
|
#undef HAVE_NCURSES_H
|
||||||
|
|
||||||
/* Define if opendisk() in -lutil can be used */
|
/* Define if opendisk() in -lutil can be used */
|
||||||
#undef HAVE_OPENDISK
|
#undef HAVE_OPENDISK
|
||||||
|
|
||||||
|
/* Define if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
12
debian/changelog
vendored
12
debian/changelog
vendored
|
@ -1,3 +1,15 @@
|
||||||
|
grub (0.5.96) unstable; urgency=low
|
||||||
|
|
||||||
|
* Many, many new features and bugfixes. This is the final test release;
|
||||||
|
the next release will be version 1.0.
|
||||||
|
* Install HTML documentation in addition to Info pages.
|
||||||
|
(closes:bug#42242,bug#42273)
|
||||||
|
* Fix documentation to refer to /usr/sbin/grub as well as
|
||||||
|
/sbin/grub. (closes:bug#67132)
|
||||||
|
* Be more verbose about missing setup files. (closes:bug#71661)
|
||||||
|
|
||||||
|
-- Gordon Matzigkeit <gord@debian.org> Wed, 4 Oct 2000 10:44:42 -0600
|
||||||
|
|
||||||
grub (0.5.95) unstable; urgency=low
|
grub (0.5.95) unstable; urgency=low
|
||||||
|
|
||||||
* ReiserFS support from Jochen Hoenicke.
|
* ReiserFS support from Jochen Hoenicke.
|
||||||
|
|
7
debian/rules
vendored
7
debian/rules
vendored
|
@ -48,6 +48,13 @@ binary-arch: checkroot build
|
||||||
## install files
|
## install files
|
||||||
|
|
||||||
dir=`cd debian/tmp && pwd` && make install DESTDIR=$$dir
|
dir=`cd debian/tmp && pwd` && make install DESTDIR=$$dir
|
||||||
|
|
||||||
|
top=`pwd` && cd debian/tmp/usr/share/doc/grub && \
|
||||||
|
ln -s $$top/docs/{grub,multiboot}.texi . && \
|
||||||
|
texi2html -split_chapter -I$$top/docs grub.texi && \
|
||||||
|
texi2html -split_chapter -I$$top/docs multiboot.texi && \
|
||||||
|
rm -f grub.texi multiboot.texi
|
||||||
|
|
||||||
gzip -f9 debian/tmp/usr/share/info/* debian/tmp/usr/share/man/*/*
|
gzip -f9 debian/tmp/usr/share/info/* debian/tmp/usr/share/man/*/*
|
||||||
strip -s debian/tmp/usr/sbin/grub debian/tmp/usr/bin/mbchk
|
strip -s debian/tmp/usr/sbin/grub debian/tmp/usr/bin/mbchk
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,18 @@
|
||||||
@item How does GNU GRUB differ from Erich's original GRUB?
|
@item How does GNU GRUB differ from Erich's original GRUB?
|
||||||
|
|
||||||
GNU GRUB is the successor of Erich's great GRUB. He couldn't work on
|
GNU GRUB is the successor of Erich's great GRUB. He couldn't work on
|
||||||
GRUB because of some other tasks, so the current maintainer Gordon
|
GRUB because of some other tasks, so the current maintainers OKUJI
|
||||||
Matzigkeit took over the maintainership, and opened the development in
|
Yoshinori and Gordon Matzigkeit took over the maintainership, and opened
|
||||||
order for everybody to participate it.
|
the development in order for everybody to participate it.
|
||||||
|
|
||||||
Technically speaking, GNU GRUB has many features that are not
|
Technically speaking, GNU GRUB has many features that are not seen in
|
||||||
seen in the original GRUB. For example, GNU GRUB can be installed on
|
the original GRUB. For example, GNU GRUB can be installed on UNIX-like
|
||||||
UNIX-like operating system (such as GNU/Linux) via the grub shell
|
operating system (such as GNU/Hurd) via the grub shell
|
||||||
@file{/sbin/grub}, it supports Logical Block Address (LBA) mode that
|
@file{/sbin/grub} (or @file{/usr/sbin/grub} on older systems), it
|
||||||
solves the 1024 cylinders problem, and @kbd{@key{TAB}} completes a
|
supports Logical Block Address (LBA) mode that solves the 1024 cylinders
|
||||||
filename when it's unique. Of course, many bug fixes are done as well,
|
problem, and @kbd{@key{TAB}} completes a filename when it's unique. Of
|
||||||
so it is recommended to use GNU GRUB.
|
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?
|
@item Can GRUB boot my operating system from over 8GB hard disks?
|
||||||
|
|
||||||
|
@ -53,7 +54,8 @@ Copy the GRUB images to @file{/mnt/boot/grub}. Only @file{stage1},
|
||||||
@dfn{stage1.5}s.
|
@dfn{stage1.5}s.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Run the following command:
|
Run the following command (substitute @file{/usr/sbin/grub} for
|
||||||
|
@file{/sbin/grub} if you are using an older system):
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
|
|
|
@ -99,6 +99,7 @@ Part I: The Tutorial Manual
|
||||||
* Installation:: Installing GRUB on your drive
|
* Installation:: Installing GRUB on your drive
|
||||||
* Booting:: How to boot different operating systems
|
* Booting:: How to boot different operating systems
|
||||||
* Network:: Downloading OS images from a network
|
* Network:: Downloading OS images from a network
|
||||||
|
* Serial terminal:: Using GRUB via a serial line
|
||||||
* Configuration:: Writing your own configuration file
|
* Configuration:: Writing your own configuration file
|
||||||
|
|
||||||
Part II: The User Reference Manual
|
Part II: The User Reference Manual
|
||||||
|
@ -135,28 +136,28 @@ Appendices and Indices
|
||||||
|
|
||||||
@iftex
|
@iftex
|
||||||
@page
|
@page
|
||||||
@unnumbered{Part I: The Tutorial Manual}
|
@unnumbered Part I: The Tutorial Manual
|
||||||
@end iftex
|
@end iftex
|
||||||
|
|
||||||
@include tutorial.texi
|
@include tutorial.texi
|
||||||
|
|
||||||
@iftex
|
@iftex
|
||||||
@page
|
@page
|
||||||
@unnumbered{Part II: The User Reference Manual}
|
@unnumbered Part II: The User Reference Manual
|
||||||
@end iftex
|
@end iftex
|
||||||
|
|
||||||
@include user-ref.texi
|
@include user-ref.texi
|
||||||
|
|
||||||
@iftex
|
@iftex
|
||||||
@page
|
@page
|
||||||
@unnumbered{Part III: The Programmer Reference Manual}
|
@unnumbered Part III: The Programmer Reference Manual
|
||||||
@end iftex
|
@end iftex
|
||||||
|
|
||||||
@include prog-ref.texi
|
@include prog-ref.texi
|
||||||
|
|
||||||
@iftex
|
@iftex
|
||||||
@page
|
@page
|
||||||
@unnumbered{Appendices and Indices}
|
@unnumbered Appendices and Indices
|
||||||
@end iftex
|
@end iftex
|
||||||
|
|
||||||
@include appendices.texi
|
@include appendices.texi
|
||||||
|
|
|
@ -368,7 +368,7 @@ map}.
|
||||||
If the INT 13 handler returns, the TF flag is cleared automatically by
|
If the INT 13 handler returns, the TF flag is cleared automatically by
|
||||||
the instruction @code{iret}, and then output the I/O map on the screen.
|
the instruction @code{iret}, and then output the I/O map on the screen.
|
||||||
See the source code for the command @command{ioprobe}
|
See the source code for the command @command{ioprobe}
|
||||||
(@pxref{Command-line-specific commands}), for more information.
|
(@pxref{Command-line and menu entry commands}), for more information.
|
||||||
|
|
||||||
|
|
||||||
@node Memory detection
|
@node Memory detection
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
@set UPDATED 3 April 2000
|
@set UPDATED 7 October 2000
|
||||||
@set EDITION 0.5.97
|
@set EDITION 0.5.97
|
||||||
@set VERSION 0.5.97
|
@set VERSION 0.5.97
|
||||||
|
|
|
@ -171,9 +171,14 @@ commands:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
# cd /boot/grub
|
# @kbd{cd /boot/grub}
|
||||||
# dd if=stage1 of=/dev/fd0 bs=512 count=1
|
# @kbd{dd if=stage1 of=/dev/fd0 bs=512 count=1}
|
||||||
# dd if=stage2 of=/dev/fd0 bs=512 seek=1
|
1+0 records in
|
||||||
|
1+0 records out
|
||||||
|
# @kbd{dd if=stage2 of=/dev/fd0 bs=512 seek=1}
|
||||||
|
153+1 records in
|
||||||
|
153+1 records out
|
||||||
|
#
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -208,14 +213,14 @@ the command @command{kernel}.} to the partition which has your GRUB
|
||||||
images, like this:
|
images, like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> root (hd0,0)
|
grub> @kbd{root (hd0,0)}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
If you are not sure which partition actually holds these files, use the
|
If you are not sure which partition actually holds these files, use the
|
||||||
@command{find} command, like this:
|
@command{find} command, like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> find /boot/grub/stage1
|
grub> @kbd{find /boot/grub/stage1}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
This will search for the filename @file{/boot/grub/stage1} and show the
|
This will search for the filename @file{/boot/grub/stage1} and show the
|
||||||
|
@ -225,7 +230,7 @@ Once you've set the root device correctly, run the command
|
||||||
@command{setup}:
|
@command{setup}:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> setup (hd0)
|
grub> @kbd{setup (hd0)}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
This command will install GRUB on the MBR (@pxref{MBR}) in the first
|
This command will install GRUB on the MBR (@pxref{MBR}) in the first
|
||||||
|
@ -234,7 +239,7 @@ partition instead of the MBR, specify a partition into which you want to
|
||||||
install GRUB:
|
install GRUB:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> setup (hd0,0)
|
grub> @kbd{setup (hd0,0)}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
If you install GRUB into a partition or a drive other than the first
|
If you install GRUB into a partition or a drive other than the first
|
||||||
|
@ -258,19 +263,19 @@ either of a device file or a GRUB's drive/partition. So, this will
|
||||||
install GRUB into the MBR of the first IDE disk under Linux:
|
install GRUB into the MBR of the first IDE disk under Linux:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
# grub-install /dev/hda
|
# @kbd{grub-install /dev/hda}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Likewise, under Hurd, this has the same effect:
|
Likewise, under Hurd, this has the same effect:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
# grub-install /dev/hd0
|
# @kbd{grub-install /dev/hd0}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
If it is the first BIOS drive, this is the same as well:
|
If it is the first BIOS drive, this is the same as well:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
# grub-install '(hd0)'
|
# @kbd{grub-install '(hd0)'}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
But all the above examples assume that you use GRUB images under
|
But all the above examples assume that you use GRUB images under
|
||||||
|
@ -281,10 +286,10 @@ boot floppy with a filesystem. Here is an example:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
# mke2fs /dev/fd0
|
# @kbd{mke2fs /dev/fd0}
|
||||||
# mount -t ext2 /dev/fd0 /mnt
|
# @kbd{mount -t ext2 /dev/fd0 /mnt}
|
||||||
# grub-install --root-directory=/mnt '(fd0)'
|
# @kbd{grub-install --root-directory=/mnt '(fd0)'}
|
||||||
# umount /mnt
|
# @kbd{umount /mnt}
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -294,7 +299,7 @@ doesn't know anything about mountpoints at all. Thus, you need to run
|
||||||
@command{grub-install} like this:
|
@command{grub-install} like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
# grub-install --root-directory=/boot /dev/hda
|
# @kbd{grub-install --root-directory=/boot /dev/hda}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
By the way, as you may already know, it is quite difficult to guess BIOS
|
By the way, as you may already know, it is quite difficult to guess BIOS
|
||||||
|
@ -391,7 +396,7 @@ First, set GRUB's root device to the partition by the command
|
||||||
@command{rootnoverify}:
|
@command{rootnoverify}:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> rootnoverify (hd0,0)
|
grub> @kbd{rootnoverify (hd0,0)}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Second, set the @dfn{active} flag in the partition by the command
|
Second, set the @dfn{active} flag in the partition by the command
|
||||||
|
@ -399,13 +404,13 @@ Second, set the @dfn{active} flag in the partition by the command
|
||||||
modern operating systems.}:
|
modern operating systems.}:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> makeactive
|
grub> @kbd{makeactive}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Third, load the boot loader by the command @command{chainloader}:
|
Third, load the boot loader by the command @command{chainloader}:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> chainloader +1
|
grub> @kbd{chainloader +1}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@samp{+1} indicates that GRUB should read one sector from the start of
|
@samp{+1} indicates that GRUB should read one sector from the start of
|
||||||
|
@ -450,8 +455,8 @@ Load the kernel and the module, like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
grub> kernel /boot/gnumach root=hd0s1
|
grub> @kbd{kernel /boot/gnumach root=hd0s1}
|
||||||
grub> module /boot/serverboot
|
grub> @kbd{module /boot/serverboot}
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -475,14 +480,14 @@ command @code{find /vmlinuz} or similar can help you.
|
||||||
Load the kernel:
|
Load the kernel:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> kernel /vmlinuz root=/dev/hda1
|
grub> @kbd{kernel /vmlinuz root=/dev/hda1}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
If you need to specify some kernel parameters, just append them to the
|
If you need to specify some kernel parameters, just append them to the
|
||||||
command. For example, to set @option{vga} to @samp{ext}, do this:
|
command. For example, to set @option{vga} to @samp{ext}, do this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> kernel /vmlinuz root=/dev/hda1 vga=ext
|
grub> @kbd{kernel /vmlinuz root=/dev/hda1 vga=ext}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
See the documentation in the Linux source tree for the complete
|
See the documentation in the Linux source tree for the complete
|
||||||
|
@ -493,7 +498,7 @@ If you use an initrd, execute the command @command{initrd} after
|
||||||
@command{kernel}:
|
@command{kernel}:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> initrd /initrd
|
grub> @kbd{initrd /initrd}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item
|
@item
|
||||||
|
@ -504,7 +509,7 @@ Finally, run the command @command{boot}.
|
||||||
option to the kernel, to let it use less than actual memory size, you
|
option to the kernel, to let it use less than actual memory size, you
|
||||||
will also have to specify the same memory size to GRUB. To let GRUB know
|
will also have to specify the same memory size to GRUB. To let GRUB know
|
||||||
the size, run the command @command{uppermem} @emph{before} loading the
|
the size, run the command @command{uppermem} @emph{before} loading the
|
||||||
kernel. @xref{Command-line-specific commands}, for more information.
|
kernel. @xref{Command-line and menu entry commands}, for more information.
|
||||||
|
|
||||||
@node FreeBSD
|
@node FreeBSD
|
||||||
@subsection FreeBSD
|
@subsection FreeBSD
|
||||||
|
@ -519,9 +524,9 @@ Thus, we'd recommend loading the very flexible loader
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
grub> root (hd0,a)
|
grub> @kbd{root (hd0,a)}
|
||||||
grub> kernel /boot/loader
|
grub> @kbd{kernel /boot/loader}
|
||||||
grub> boot
|
grub> @kbd{boot}
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -540,7 +545,7 @@ Load the kernel with @command{kernel}. You should append the ugly option
|
||||||
@option{--type=netbsd}, if you want to load an ELF kernel, like this:
|
@option{--type=netbsd}, if you want to load an ELF kernel, like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> kernel --type=netbsd /netbsd-elf
|
grub> @kbd{kernel --type=netbsd /netbsd-elf}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item
|
@item
|
||||||
|
@ -574,8 +579,8 @@ command @command{map} (@pxref{Commands}), like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
grub> map (hd0) (hd1)
|
grub> @kbd{map (hd0) (hd1)}
|
||||||
grub> map (hd1) (hd0)
|
grub> @kbd{map (hd1) (hd0)}
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -600,12 +605,12 @@ first copy, do the following:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
grub> unhide (hd0,0)
|
grub> @kbd{unhide (hd0,0)}
|
||||||
grub> hide (hd0,1)
|
grub> @kbd{hide (hd0,1)}
|
||||||
grub> rootnoverify (hd0,0)
|
grub> @kbd{rootnoverify (hd0,0)}
|
||||||
grub> chainloader +1
|
grub> @kbd{chainloader +1}
|
||||||
grub> makeactive
|
grub> @kbd{makeactive}
|
||||||
grub> boot
|
grub> @kbd{boot}
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -619,10 +624,10 @@ wrong, so you will have to specify the option @option{--force} to
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
grub> rootnoverify (hd1,0)
|
grub> @kbd{rootnoverify (hd1,0)}
|
||||||
grub> chainloader --force +1
|
grub> @kbd{chainloader --force +1}
|
||||||
grub> makeactive
|
grub> @kbd{makeactive}
|
||||||
grub> boot
|
grub> @kbd{boot}
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -666,16 +671,16 @@ Here is an example:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
grub> bootp
|
grub> @kbd{bootp}
|
||||||
Probing... [NE*000]
|
Probing... [NE*000]
|
||||||
NE2000 base ...
|
NE2000 base ...
|
||||||
Address: 192.168.110.23 Netmask: 255.255.255.0
|
Address: 192.168.110.23 Netmask: 255.255.255.0
|
||||||
Server: 192.168.110.14 Gateway: 192.168.110.1
|
Server: 192.168.110.14 Gateway: 192.168.110.1
|
||||||
|
|
||||||
grub> root (nd)
|
grub> @kbd{root (nd)}
|
||||||
grub> kernel /tftproot/gnumach.gz root=sd0s1
|
grub> @kbd{kernel /tftproot/gnumach.gz root=sd0s1}
|
||||||
grub> module /tftproot/serverboot.gz
|
grub> @kbd{module /tftproot/serverboot.gz}
|
||||||
grub> boot
|
grub> @kbd{boot}
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -726,6 +731,58 @@ See the manual about your BOOTP/DHCP server, for more information. The
|
||||||
exact syntax should differ from the example, more or less.
|
exact syntax should differ from the example, more or less.
|
||||||
|
|
||||||
|
|
||||||
|
@node Serial terminal
|
||||||
|
@chapter Using GRUB via a serial line
|
||||||
|
|
||||||
|
This chapter describes how to use the serial terminal support in GRUB.
|
||||||
|
|
||||||
|
If you have many computers or computers with no display/keyboard, it
|
||||||
|
would be very useful to control the computers with serial
|
||||||
|
communications. To connect a computer with another via a serial line,
|
||||||
|
you need to prepare a null-modem (cross) serial cable, and you may need
|
||||||
|
to have multiport serial boards, if your computer doesn't have extra
|
||||||
|
serial ports. In addition, a terminal emulator is also required, such as
|
||||||
|
minicom. Refer to a manual of your operating system, for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
As for GRUB, the instruction to set up a serial terminal is quite
|
||||||
|
simple. First of all, make sure that you haven't specified the option
|
||||||
|
@option{--disable-serial} to the configure script when you built your
|
||||||
|
GRUB images. If you get them in binary form, probably they have serial
|
||||||
|
terminal support already.
|
||||||
|
|
||||||
|
Then, initialize your serial terminal after GRUB starts up. Here is an
|
||||||
|
example:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@group
|
||||||
|
grub> @kbd{serial --unit=0 --speed=9600}
|
||||||
|
grub> @kbd{terminal serial}
|
||||||
|
@end group
|
||||||
|
@end example
|
||||||
|
|
||||||
|
The command @command{serial} initializes the serial unit 0 with the
|
||||||
|
speed 9600bps. The serial unit 0 is usually called @samp{COM1}, so, if
|
||||||
|
you want to use COM2, you must specify @samp{--unit=1} instead. This
|
||||||
|
command accepts many other options, so please refer to @ref{Commands},
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
The command @command{terminal} chooses which type of terminal you want
|
||||||
|
to use. In that case above, the terminal will be a serial terminal, but
|
||||||
|
you can also pass @code{console} to the command, like @samp{terminal
|
||||||
|
serial console}. In this case, a terminal in which you press any key
|
||||||
|
will be selected as a GRUB terminal.
|
||||||
|
|
||||||
|
However, note that GRUB assumes that your terminal emulator is
|
||||||
|
compatible with VT100 by default. This is true for most terminal
|
||||||
|
emulators nowadays, but you should pass the option @option{--dumb} to
|
||||||
|
the command, if your terminal emulator is not VT100-compatible or
|
||||||
|
implement few VT100 escape sequences. If you specify the option, then
|
||||||
|
GRUB doesn't provide you with the menu interface, because the menu
|
||||||
|
requires several fancy features for your terminal. Instead, GRUB only
|
||||||
|
gives you the hidden menu interface and the command-line interface.
|
||||||
|
|
||||||
|
|
||||||
@node Configuration
|
@node Configuration
|
||||||
@chapter Configuration
|
@chapter Configuration
|
||||||
|
|
||||||
|
@ -892,8 +949,9 @@ color light-green/brown blink-red/blue
|
||||||
|
|
||||||
In the last entry, the command @command{color} is used, to change the
|
In the last entry, the command @command{color} is used, to change the
|
||||||
menu colors (try it!). This command is somewhat special, because it can
|
menu colors (try it!). This command is somewhat special, because it can
|
||||||
be used both in the command-line and in the menu (@pxref{General
|
be used both in the command-line and in the menu (@pxref{Command-line
|
||||||
commands}). GRUB has several such commands, see the user reference.
|
and menu commands}). GRUB has several such commands, see the user
|
||||||
|
reference.
|
||||||
|
|
||||||
We hope that you now understand how to use the basic features of
|
We hope that you now understand how to use the basic features of
|
||||||
GRUB. To learn more about GRUB, see the User Reference Manual
|
GRUB. To learn more about GRUB, see the User Reference Manual
|
||||||
|
|
|
@ -430,20 +430,24 @@ returning to the main menu.
|
||||||
@node Commands
|
@node Commands
|
||||||
@chapter The list of available commands
|
@chapter The list of available commands
|
||||||
|
|
||||||
In this chapter, we list the available commands, both in the
|
In this chapter, we list all commands that are available in GRUB.
|
||||||
configuration file and in the command line.
|
|
||||||
|
Commands belong to different groups. A few can only be used in
|
||||||
|
the global section of the configuration file (or ``menu''); most
|
||||||
|
of them can be entered on the command line and can be either used
|
||||||
|
in the menu or in the menu entries.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Menu-specific commands::
|
* Menu-specific commands::
|
||||||
* General commands::
|
* Command-line and menu commands::
|
||||||
* Command-line-specific commands::
|
* Command-line and menu entry commands::
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
|
|
||||||
@node Menu-specific commands
|
@node Menu-specific commands
|
||||||
@section The list of commands for the menu only
|
@section The list of commands for the menu only
|
||||||
|
|
||||||
The semantics are as follows:
|
The semantics used in parsing the configuration file are the following:
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
|
@ -468,25 +472,33 @@ Extra options or text at the end of the line is ignored unless otherwise
|
||||||
specified.
|
specified.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Bad commands are added to the current entry, except before entries
|
Unrecognized commands are added to the current entry, except before entries
|
||||||
start, where they are ignored.
|
start, where they are ignored.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
Commands usable in the menu only.
|
These commands can only be used in the menu:
|
||||||
|
|
||||||
@deffn Command default num
|
@deffn Command default num
|
||||||
Set the default entry to the entry number @var{num} (if not specified,
|
Set the default entry to the entry number @var{num}. Numbering starts
|
||||||
it is 0, the first entry).
|
from 0, and entry number 0 is the default if the command is not used.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command fallback num
|
@deffn Command fallback num
|
||||||
Go into unattended boot mode: if the default boot entry has any errors,
|
Go into unattended boot mode: if the default boot entry has any errors,
|
||||||
instead of waiting for the user to do anything, it immediately starts
|
instead of waiting for the user to do anything, immediately start
|
||||||
over using the @var{num} entry (same numbering as the @code{default}
|
over using the @var{num} entry (same numbering as the @code{default}
|
||||||
command). This obviously won't help if the machine was rebooted by a
|
command). This obviously won't help if the machine was rebooted by a
|
||||||
kernel that GRUB loaded.
|
kernel that GRUB loaded.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@deffn Command hiddenmenu
|
||||||
|
Don't display the menu. If the command is used, no menu will be
|
||||||
|
displayed on the control terminal, and the default entry will be
|
||||||
|
booted after the timeout expired. The user can still request the
|
||||||
|
menu to be displayed by pressing @key{ESC} before the timeout
|
||||||
|
expires.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
@deffn Command password passwd [new-config-file]
|
@deffn Command password passwd [new-config-file]
|
||||||
Disable all interactive editing control (menu entry editor and
|
Disable all interactive editing control (menu entry editor and
|
||||||
command line) and entries protected by the command @command{lock}. If
|
command line) and entries protected by the command @command{lock}. If
|
||||||
|
@ -507,13 +519,14 @@ the line, starting with the first non-space character.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
|
||||||
@node General commands
|
@node Command-line and menu commands
|
||||||
@section The list of general commands
|
@section The list of command-line and menu commands
|
||||||
|
|
||||||
Commands usable both in the menu and in the command line.
|
Commands usable both in the menu and in the command line.
|
||||||
|
|
||||||
@deffn Command bootp
|
@deffn Command bootp
|
||||||
Initialize a network device via the @dfn{BOOTP} protocol.
|
Initialize a network device via the @dfn{BOOTP} protocol. This command
|
||||||
|
is only available if GRUB is compiled with netboot support.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command color normal [highlight]
|
@deffn Command color normal [highlight]
|
||||||
|
@ -602,8 +615,8 @@ image, and/or to fix the drives guessed by GRUB when GRUB fails to
|
||||||
determine them correctly, like this:
|
determine them correctly, like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> device (fd0) /floppy-image
|
grub> @kbd{device (fd0) /floppy-image}
|
||||||
grub> device (hd0) /dev/sd0
|
grub> @kbd{device (hd0) /dev/sd0}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
This command can be used only in the grub shell (@pxref{Invoking the
|
This command can be used only in the grub shell (@pxref{Invoking the
|
||||||
|
@ -611,18 +624,54 @@ grub shell}).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command dhcp
|
@deffn Command dhcp
|
||||||
Initialize a network device via the @dfn{DHCP} protocol. At the moment,
|
Initialize a network device via the @dfn{DHCP} protocol. Currently,
|
||||||
this command is just an alias for @command{bootp}.
|
this command is just an alias for @command{bootp}, since the two
|
||||||
|
protocols are very similar. This command
|
||||||
|
is only available if GRUB is compiled with netboot support.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command hide partition
|
@deffn Command hide partition
|
||||||
Hide @var{partition} by setting the @dfn{hidden} bit in its partition
|
Hide @var{partition} by setting the @dfn{hidden} bit in its partition
|
||||||
type code. This is useful only for DOS or Windows when multiple primary
|
type code. This is useful only when booting DOS or Windows
|
||||||
partitions exist in one disk.
|
and multiple primary FAT partitions exist in one disk.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
@deffn Command part_new part type from to
|
||||||
|
Create a new primary partition. @var{part} is a partition specification
|
||||||
|
in GRUB syntax (@pxref{Naming convention}); @var{type} is the partition
|
||||||
|
type and must be a number in the range @code{0-0xff}; @var{from} and
|
||||||
|
@var{to} are the starting and ending sectors, expressed as an absolute
|
||||||
|
sector number.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
@deffn Command part_type part type
|
||||||
|
Change the type of an existing partition. @var{part} is a partition
|
||||||
|
specification in GRUB syntax (@pxref{Naming convention}); @var{type}
|
||||||
|
is the new partition type and must be a number in the range 0-0xff.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command rarp
|
@deffn Command rarp
|
||||||
Initialize a network device via the @dfn{RARP} protocol.
|
Initialize a network device via the @dfn{RARP} protocol. This command
|
||||||
|
is only available if GRUB is compiled with netboot support.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
@deffn Command serial [@option{--unit=}unit] [@option{--port=}port] [@option{--speed=}speed] [@option{--word=}word] [@option{--parity=}parity] [@option{--stop=}stop] [@option{--device=}dev]
|
||||||
|
Initialize a serial device. @var{unit} is a number in the range 0-3
|
||||||
|
specifying which serial port to use; default is 0, that corresponds
|
||||||
|
the port often called COM1. @var{port} is the I/O port where the UART
|
||||||
|
is to be found; if specified it takes precedence over @var{unit}.
|
||||||
|
@var{speed} is the transmission speed; default is 9600. @var{word} and
|
||||||
|
@var{stop} are the number of data bits and stop bits. Data bits must
|
||||||
|
be in the range 5-8 and stop bits are 1 or 2. Default is 8 data bits
|
||||||
|
and one stop bit. @var{parity} is one of @option{no}, @option{odd},
|
||||||
|
@option{even} and defaults to @option{no}. The option @option{--device}
|
||||||
|
can only be used in the GRUB shell and is used to specify the
|
||||||
|
tty device to be used in the host Operating System.
|
||||||
|
|
||||||
|
The serial port is not used as a communication channel unless the
|
||||||
|
@var{terminal} command is used.
|
||||||
|
|
||||||
|
This command is only available if GRUB is compiled with serial support.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command setkey to_key from_key
|
@deffn Command setkey to_key from_key
|
||||||
|
@ -632,8 +681,8 @@ keys. If you want to exchange the keys, run this command again with the
|
||||||
arguments exchanged, like this:
|
arguments exchanged, like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> setkey capslock control
|
grub> @kbd{setkey capslock control}
|
||||||
grub> setkey control capslock
|
grub> @kbd{setkey control capslock}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
A key must be an alphabet, a digit, or one of these symbols:
|
A key must be an alphabet, a digit, or one of these symbols:
|
||||||
|
@ -752,24 +801,35 @@ character each of the symbols corresponds:
|
||||||
@end table
|
@end table
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@deffn Command terminal [@option{--dumb}] [@option{--timeout=}secs] [console] [serial]"
|
||||||
|
Select a terminal for user interaction. The terminal is assumed to be
|
||||||
|
vt100 compatible unless @option{--dumb} is specified. If both
|
||||||
|
@option{console} and @option{serial} are specified, then GRUB will use
|
||||||
|
the one where a key is entered first. If neither are specified, the
|
||||||
|
current setting is reported. Default is @option{console}.
|
||||||
|
This command is only available if GRUB is compiled with serial support.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
|
||||||
@deffn Command tftpserver ipaddr
|
@deffn Command tftpserver ipaddr
|
||||||
Override a TFTP server address returned by a BOOTP/DHCP/RARP server. The
|
Override a TFTP server address returned by a BOOTP/DHCP/RARP server. The
|
||||||
argument @var{ipaddr} must be in dotted decimal format, like
|
argument @var{ipaddr} must be in dotted decimal format, like
|
||||||
@samp{192.168.0.15}.
|
@samp{192.168.0.15}. This command is only available if GRUB is compiled
|
||||||
|
with netboot support.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command unhide partition
|
@deffn Command unhide partition
|
||||||
Unhide @var{partition} by clearing the @dfn{hidden} bit in its partition
|
Unhide @var{partition} by clearing the @dfn{hidden} bit in its partition
|
||||||
type code. This is useful only for DOS or Windows when multiple primary
|
type code. This is useful only when booting DOS or Windows and multiple
|
||||||
partitions exist in one disk.
|
primary partitions exist in one disk.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
|
||||||
@node Command-line-specific commands
|
@node Command-line and menu entry commands
|
||||||
@section The list of commands in the command line
|
@section The list of command-line and menu entry commands
|
||||||
|
|
||||||
These commands are usable only in the command line and in menu entries.
|
These commands are usable in the command line and in menu entries. If
|
||||||
If you forget some command, run the command @command{help}.
|
you forget a command, you can run the command @command{help}.
|
||||||
|
|
||||||
@deffn Command blocklist file
|
@deffn Command blocklist file
|
||||||
Print the blocklist notation of the file @var{file} (@pxref{Blocklist
|
Print the blocklist notation of the file @var{file} (@pxref{Blocklist
|
||||||
|
@ -777,9 +837,9 @@ syntax}).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command boot
|
@deffn Command boot
|
||||||
This boots the OS/chain-loader which has been loaded. Only necessary if
|
Boot the OS/chain-loader which has been loaded. Only necessary if
|
||||||
running the fully interactive command line (it is implicit at the end of
|
running the fully interactive command line (it is implicit at the end of
|
||||||
a config-file entry).
|
a menu entry).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command cat file
|
@deffn Command cat file
|
||||||
|
@ -787,7 +847,7 @@ Display the contents of the file @var{file}. This command may be useful
|
||||||
to remind you of your OS's root partition:
|
to remind you of your OS's root partition:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> cat /etc/fstab
|
grub> @kbd{cat /etc/fstab}
|
||||||
@end example
|
@end example
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -822,12 +882,10 @@ If they are completely identical, nothing will be printed.
|
||||||
Load @var{file} as a configuration file.
|
Load @var{file} as a configuration file.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command embed stage1_5 device
|
@deffn Command debug
|
||||||
Embed the Stage 1.5 @var{stage1_5} in the sectors after the MBR if
|
Toggle debug mode (by default it is off). When debug mode is on, some
|
||||||
@var{device} is a drive, or in the @dfn{boot loader} area if @var{device}
|
extra messages are printed to show disk activity. This global debug flag
|
||||||
is a FFS partition or a ReiserFS partition.@footnote{The latter feature
|
is mainly useful for GRUB developers when testing new code.
|
||||||
has not been implemented yet.} Print the number of sectors which
|
|
||||||
@var{stage1_5} occupies, if successful.
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command displaymem
|
@deffn Command displaymem
|
||||||
|
@ -841,6 +899,14 @@ at 1MB and going up to the first chipset hole for @dfn{upper memory}
|
||||||
maximum of 64MB).
|
maximum of 64MB).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@deffn Command embed stage1_5 device
|
||||||
|
Embed the Stage 1.5 @var{stage1_5} in the sectors after the MBR if
|
||||||
|
@var{device} is a drive, or in the @dfn{boot loader} area if @var{device}
|
||||||
|
is a FFS partition or a ReiserFS partition.@footnote{The latter feature
|
||||||
|
has not been implemented yet.} Print the number of sectors which
|
||||||
|
@var{stage1_5} occupies, if successful.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
@deffn Command find filename
|
@deffn Command find filename
|
||||||
Search for the filename @var{filename} in all of partitions and print
|
Search for the filename @var{filename} in all of partitions and print
|
||||||
the list of the devices which contain the file. The filename
|
the list of the devices which contain the file. The filename
|
||||||
|
@ -861,7 +927,7 @@ or @command{testload} commands.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command geometry drive [cylinder head sector [total_sector]]
|
@deffn Command geometry drive [cylinder head sector [total_sector]]
|
||||||
Print the information for the drive @var{drive}. In the grub shell, you
|
Print the information for the drive @var{drive}. In the GRUB shell, you
|
||||||
can set the geometry of the drive arbitrarily. The number of the
|
can set the geometry of the drive arbitrarily. The number of the
|
||||||
cylinders, the one of the heads, the one of the sectors and the one of
|
cylinders, the one of the heads, the one of the sectors and the one of
|
||||||
the total sectors are set to CYLINDER, HEAD, SECTOR and TOTAL_SECTOR,
|
the total sectors are set to CYLINDER, HEAD, SECTOR and TOTAL_SECTOR,
|
||||||
|
@ -869,11 +935,18 @@ respectively. If you omit TOTAL_SECTOR, then it will be calculated
|
||||||
based on the C/H/S values automatically.
|
based on the C/H/S values automatically.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@deffn Command halt @option{--no-apm}
|
||||||
|
The commands halts the computer. If the @option{--no-apm} option
|
||||||
|
is specified, no APM BIOS call is performed. Otherwise, the computer
|
||||||
|
is shut down using APM.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
@deffn Command help [pattern @dots{}]
|
@deffn Command help [pattern @dots{}]
|
||||||
Display helpful information about builtin commands. If you do not
|
Display helpful information about builtin commands. If you do not
|
||||||
specify @var{pattern}, this command lists the short documents of all
|
specify @var{pattern}, this command shows short descriptions of all
|
||||||
available commands, and, if you specify one or more @var{pattern}s, it
|
available commands. If you specify any @var{patterns}, it displays
|
||||||
displays long documents of the commands which match @var{pattern}(s).
|
longer information about each of the commands which match those
|
||||||
|
@var{patterns}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command impsprobe
|
@deffn Command impsprobe
|
||||||
|
@ -960,10 +1033,10 @@ Prevent normal users from executing arbitrary menu entries. You must use
|
||||||
the command @command{password} if you really want this command to be
|
the command @command{password} if you really want this command to be
|
||||||
useful.
|
useful.
|
||||||
|
|
||||||
This command will be used like this example:
|
This command is used in a menu, as shown in this this example:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
title This is a too dangerous entry to be executed by normal users
|
title This entry is too dangerous to be executed by normal users
|
||||||
lock
|
lock
|
||||||
root (hd0,a)
|
root (hd0,a)
|
||||||
kernel /no-security-os
|
kernel /no-security-os
|
||||||
|
@ -981,8 +1054,8 @@ necessary when you chain-load some operating systems, such as DOS, if
|
||||||
such an OS resides at a non-first drive. Here is an example:
|
such an OS resides at a non-first drive. Here is an example:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
grub> map (hd0) (hd1)
|
grub> @kbd{map (hd0) (hd1)}
|
||||||
grub> map (hd1) (hd0)
|
grub> @kbd{map (hd1) (hd0)}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The example exchanges the order between the first hard disk and the
|
The example exchanges the order between the first hard disk and the
|
||||||
|
@ -1012,7 +1085,11 @@ change floppies.
|
||||||
|
|
||||||
@deffn Command quit
|
@deffn Command quit
|
||||||
Exit from the GRUB shell @command{grub} (@pxref{Invoking the grub
|
Exit from the GRUB shell @command{grub} (@pxref{Invoking the grub
|
||||||
shell}). This command can be used only in the grub shell.
|
shell}). This command can be used only in the GRUB shell.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
@deffn Command reboot
|
||||||
|
Reboot the computer.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command read addr
|
@deffn Command read addr
|
||||||
|
@ -1041,6 +1118,10 @@ desired. Note that the items mentioned in @command{root} above which
|
||||||
derived from attempting the mount will @emph{not} work correctly.
|
derived from attempting the mount will @emph{not} work correctly.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@deffn Command savedefault
|
||||||
|
Save the current menu entry as default entry.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
@deffn Command setup [@option{--force-lba}] install_device [image_device]
|
@deffn Command setup [@option{--force-lba}] install_device [image_device]
|
||||||
Set up the installation of GRUB automatically. This command uses the
|
Set up the installation of GRUB automatically. This command uses the
|
||||||
more flexible command @command{install} in the backend and installs GRUB
|
more flexible command @command{install} in the backend and installs GRUB
|
||||||
|
@ -1424,6 +1505,7 @@ option in the command line. This is a simple example:
|
||||||
@example
|
@example
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Use /usr/sbin/grub if you are on an older system.
|
||||||
/sbin/grub --batch <<EOT 1>/dev/null 2>/dev/null
|
/sbin/grub --batch <<EOT 1>/dev/null 2>/dev/null
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
setup (hd0)
|
setup (hd0)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
@set UPDATED 3 April 2000
|
@set UPDATED 7 October 2000
|
||||||
@set EDITION 0.5.97
|
@set EDITION 0.5.97
|
||||||
@set VERSION 0.5.97
|
@set VERSION 0.5.97
|
||||||
|
|
82
lib/device.c
82
lib/device.c
|
@ -97,38 +97,6 @@ get_drive_geometry (struct geometry *geom, char **map, int drive)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__GNU__)
|
|
||||||
# warning "Automatic detection of geometries will be performed only \
|
|
||||||
partially. This is not fatal."
|
|
||||||
/* Hurd */
|
|
||||||
{
|
|
||||||
/* For now, Hurd doesn't support the system call to get a geometry
|
|
||||||
from Mach, so get only the number of total sectors. */
|
|
||||||
struct stat st;
|
|
||||||
|
|
||||||
if (fstat (fd, &st) || ! st.st_blocks)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
geom->total_sectors = st.st_blocks;
|
|
||||||
|
|
||||||
/* Set the rest arbitrarily. */
|
|
||||||
if (drive & 0x80)
|
|
||||||
{
|
|
||||||
geom->cylinders = DEFAULT_HD_CYLINDERS;
|
|
||||||
geom->heads = DEFAULT_HD_HEADS;
|
|
||||||
geom->sectors = DEFAULT_HD_SECTORS;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
geom->cylinders = DEFAULT_FD_CYLINDERS;
|
|
||||||
geom->heads = DEFAULT_FD_HEADS;
|
|
||||||
geom->sectors = DEFAULT_FD_SECTORS;
|
|
||||||
}
|
|
||||||
|
|
||||||
close (fd);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
/* FreeBSD, NetBSD or OpenBSD */
|
/* FreeBSD, NetBSD or OpenBSD */
|
||||||
{
|
{
|
||||||
|
@ -146,32 +114,36 @@ partially. This is not fatal."
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
# warning "In your operating system, automatic detection of geometries \
|
/* Notably, defined(__GNU__) */
|
||||||
will not be performed."
|
# warning "Automatic detection of geometries will be performed only \
|
||||||
|
partially. This is not fatal."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
/* Set some arbitrary defaults. */
|
{
|
||||||
if (drive & 0x80)
|
struct stat st;
|
||||||
{
|
|
||||||
/* Hard drive. */
|
/* FIXME: It would be nice to somehow compute fake C/H/S settings,
|
||||||
geom->cylinders = DEFAULT_HD_CYLINDERS;
|
given a proper st_blocks size. */
|
||||||
geom->heads = DEFAULT_HD_HEADS;
|
if (drive & 0x80)
|
||||||
geom->sectors = DEFAULT_HD_SECTORS;
|
{
|
||||||
geom->total_sectors = (DEFAULT_HD_CYLINDERS
|
geom->cylinders = DEFAULT_HD_CYLINDERS;
|
||||||
* DEFAULT_HD_HEADS
|
geom->heads = DEFAULT_HD_HEADS;
|
||||||
* DEFAULT_HD_SECTORS);
|
geom->sectors = DEFAULT_HD_SECTORS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Floppy. */
|
geom->cylinders = DEFAULT_FD_CYLINDERS;
|
||||||
geom->cylinders = DEFAULT_FD_CYLINDERS;
|
geom->heads = DEFAULT_FD_HEADS;
|
||||||
geom->heads = DEFAULT_FD_HEADS;
|
geom->sectors = DEFAULT_FD_SECTORS;
|
||||||
geom->sectors = DEFAULT_FD_SECTORS;
|
}
|
||||||
geom->total_sectors = (DEFAULT_FD_CYLINDERS
|
|
||||||
* DEFAULT_FD_HEADS
|
/* Set the total sectors properly, if we can. */
|
||||||
* DEFAULT_FD_SECTORS);
|
if (! fstat (fd, &st) && st.st_blocks)
|
||||||
}
|
geom->total_sectors = st.st_blocks;
|
||||||
|
else
|
||||||
|
geom->total_sectors = geom->cylinders * geom->heads * geom->sectors;
|
||||||
|
}
|
||||||
|
|
||||||
close (fd);
|
close (fd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2967,7 +2967,7 @@ serial_func (char *arg, int flags)
|
||||||
if (! safe_parse_maxint (&p, &num))
|
if (! safe_parse_maxint (&p, &num))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
port = (unsigned int) num;
|
speed = (unsigned int) num;
|
||||||
}
|
}
|
||||||
else if (grub_memcmp (arg, "--port=", sizeof ("--port=") - 1) == 0)
|
else if (grub_memcmp (arg, "--port=", sizeof ("--port=") - 1) == 0)
|
||||||
{
|
{
|
||||||
|
@ -2977,7 +2977,7 @@ serial_func (char *arg, int flags)
|
||||||
if (! safe_parse_maxint (&p, &num))
|
if (! safe_parse_maxint (&p, &num))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
speed = (unsigned short) num;
|
port = (unsigned short) num;
|
||||||
}
|
}
|
||||||
else if (grub_memcmp (arg, "--word=", sizeof ("--word=") - 1) == 0)
|
else if (grub_memcmp (arg, "--word=", sizeof ("--word=") - 1) == 0)
|
||||||
{
|
{
|
||||||
|
@ -3506,7 +3506,7 @@ setup_func (char *arg, int flags)
|
||||||
grub_sprintf (cmd_arg, "%s %s", stage2, device);
|
grub_sprintf (cmd_arg, "%s %s", stage2, device);
|
||||||
|
|
||||||
/* Notify what will be run. */
|
/* Notify what will be run. */
|
||||||
grub_printf (" Running \"embed %s\"\n", cmd_arg);
|
grub_printf (" Running \"embed %s\"... ", cmd_arg);
|
||||||
|
|
||||||
embed_func (cmd_arg, flags);
|
embed_func (cmd_arg, flags);
|
||||||
if (! errnum)
|
if (! errnum)
|
||||||
|
@ -3519,9 +3519,11 @@ setup_func (char *arg, int flags)
|
||||||
sprint_device (image_drive, image_partition);
|
sprint_device (image_drive, image_partition);
|
||||||
grub_sprintf (buffer, "%s%s", device, config_filename);
|
grub_sprintf (buffer, "%s%s", device, config_filename);
|
||||||
grub_strcpy (config_filename, buffer);
|
grub_strcpy (config_filename, buffer);
|
||||||
|
|
||||||
|
grub_printf ("succeeded\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
goto fail;
|
grub_printf ("failed (this is not fatal)\n");
|
||||||
}
|
}
|
||||||
else if (fsys_table[fsys_type].embed_func != 0)
|
else if (fsys_table[fsys_type].embed_func != 0)
|
||||||
{
|
{
|
||||||
|
@ -3568,7 +3570,7 @@ setup_func (char *arg, int flags)
|
||||||
#endif /* ! NO_BUGGY_BIOS_IN_THE_WORLD */
|
#endif /* ! NO_BUGGY_BIOS_IN_THE_WORLD */
|
||||||
|
|
||||||
/* Notify what will be run. */
|
/* Notify what will be run. */
|
||||||
grub_printf (" Running \"install %s\"\n", cmd_arg);
|
grub_printf (" Running \"install %s\"... ", cmd_arg);
|
||||||
|
|
||||||
/* Make sure that SAVED_DRIVE and SAVED_PARTITION are identical
|
/* Make sure that SAVED_DRIVE and SAVED_PARTITION are identical
|
||||||
with IMAGE_DRIVE and IMAGE_PARTITION, respectively. */
|
with IMAGE_DRIVE and IMAGE_PARTITION, respectively. */
|
||||||
|
@ -3577,7 +3579,9 @@ setup_func (char *arg, int flags)
|
||||||
|
|
||||||
/* Run the command. */
|
/* Run the command. */
|
||||||
if (! install_func (cmd_arg, flags))
|
if (! install_func (cmd_arg, flags))
|
||||||
grub_printf ("Done.\n");
|
grub_printf ("succeeded\nDone.\n");
|
||||||
|
else
|
||||||
|
grub_printf ("failed\n");
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
saved_drive = tmp_drive;
|
saved_drive = tmp_drive;
|
||||||
|
|
|
@ -639,6 +639,18 @@ real_open_partition (int flags)
|
||||||
bsd_evil_hack = 0;
|
bsd_evil_hack = 0;
|
||||||
current_slice = 0;
|
current_slice = 0;
|
||||||
part_start = 0;
|
part_start = 0;
|
||||||
|
|
||||||
|
/* Make sure that buf_geom is valid. */
|
||||||
|
if (buf_drive != current_drive)
|
||||||
|
{
|
||||||
|
if (get_diskinfo (current_drive, &buf_geom))
|
||||||
|
{
|
||||||
|
errnum = ERR_NO_DISK;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
buf_drive = current_drive;
|
||||||
|
buf_track = -1;
|
||||||
|
}
|
||||||
part_length = buf_geom.total_sectors;
|
part_length = buf_geom.total_sectors;
|
||||||
|
|
||||||
/* If this is the whole disk, return here. */
|
/* If this is the whole disk, return here. */
|
||||||
|
|
|
@ -560,7 +560,7 @@ reiserfs_mount (void)
|
||||||
struct reiserfs_super_block super;
|
struct reiserfs_super_block super;
|
||||||
int superblock = REISERFS_DISK_OFFSET_IN_BYTES >> SECTOR_BITS;
|
int superblock = REISERFS_DISK_OFFSET_IN_BYTES >> SECTOR_BITS;
|
||||||
|
|
||||||
if (part_length < sizeof (struct reiserfs_super_block)
|
if (part_length < superblock + (sizeof (super) >> SECTOR_BITS)
|
||||||
|| ! devread (superblock, 0, sizeof (struct reiserfs_super_block),
|
|| ! devread (superblock, 0, sizeof (struct reiserfs_super_block),
|
||||||
(char *) &super)
|
(char *) &super)
|
||||||
|| (substring (REISER2FS_SUPER_MAGIC_STRING, super.s_magic) > 0
|
|| (substring (REISER2FS_SUPER_MAGIC_STRING, super.s_magic) > 0
|
||||||
|
@ -571,7 +571,7 @@ reiserfs_mount (void)
|
||||||
{
|
{
|
||||||
/* Try old super block position */
|
/* Try old super block position */
|
||||||
superblock = REISERFS_OLD_DISK_OFFSET_IN_BYTES >> SECTOR_BITS;
|
superblock = REISERFS_OLD_DISK_OFFSET_IN_BYTES >> SECTOR_BITS;
|
||||||
if (part_length < sizeof (struct reiserfs_super_block)
|
if (part_length < superblock + (sizeof (super) >> SECTOR_BITS)
|
||||||
|| ! devread (superblock, 0, sizeof (struct reiserfs_super_block),
|
|| ! devread (superblock, 0, sizeof (struct reiserfs_super_block),
|
||||||
(char *) &super))
|
(char *) &super))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -52,7 +52,7 @@ set -e
|
||||||
|
|
||||||
# Get GRUB's version from the Grub shell, since we use the
|
# Get GRUB's version from the Grub shell, since we use the
|
||||||
# installed files.
|
# installed files.
|
||||||
VERSION=`$grub_shell --version | sed 's/^.* //'`
|
VERSION=`$grub_shell --version | sed -e 's/^.* \([0-9.]*\).*$/\1/'`
|
||||||
test "X$VERSION" != X
|
test "X$VERSION" != X
|
||||||
|
|
||||||
bootdir=${PACKAGE}-${VERSION}-${context}
|
bootdir=${PACKAGE}-${VERSION}-${context}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue