xref: /illumos-gate/usr/src/grub/grub-0.97/INSTALL (revision 1b8adde7)
17c478bd9Sstevel@tonic-gate-*- Text -*-
27c478bd9Sstevel@tonic-gate
37c478bd9Sstevel@tonic-gateThis is the GRUB.  Welcome.
47c478bd9Sstevel@tonic-gate
57c478bd9Sstevel@tonic-gateThis file contains instructions for compiling and installing the GRUB.
67c478bd9Sstevel@tonic-gate
77c478bd9Sstevel@tonic-gateThe Requirements
87c478bd9Sstevel@tonic-gate================
97c478bd9Sstevel@tonic-gate
107c478bd9Sstevel@tonic-gateGRUB depends on some software packages installed into your system. If
117c478bd9Sstevel@tonic-gateyou don't have any of them, please obtain and install them before
127c478bd9Sstevel@tonic-gateconfiguring the GRUB.
137c478bd9Sstevel@tonic-gate
147c478bd9Sstevel@tonic-gate* GCC
157c478bd9Sstevel@tonic-gate
167c478bd9Sstevel@tonic-gate  Probably every recent GCC should work, but we recommend GCC 2.95 and
177c478bd9Sstevel@tonic-gate  later, since you can create smaller binary images. See the web page
187c478bd9Sstevel@tonic-gate  <http://gcc.gnu.org/>.
197c478bd9Sstevel@tonic-gate
207c478bd9Sstevel@tonic-gate* GNU Make
217c478bd9Sstevel@tonic-gate
227c478bd9Sstevel@tonic-gate  For now, the Makefiles produced by Automake depends on GNU Make. See
237c478bd9Sstevel@tonic-gate  the web page <http://www.gnu.org/software/make/make.html>.
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gate* GNU binutils 2.9.1.0.23 or later
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gate  Binutils has changed the behavior of 16bit assembler between 2.9.1
287c478bd9Sstevel@tonic-gate  and 2.9.1.0.x, and we support only 2.9.1.0.x and higher. In
297c478bd9Sstevel@tonic-gate  particular, we recommend using binutils 2.10, since it is the only
307c478bd9Sstevel@tonic-gate  public release that supports real 16bit mode. Please take a look at
317c478bd9Sstevel@tonic-gate  the web page <http://sourceware.cygnus.com/binutils/>, for more
327c478bd9Sstevel@tonic-gate  information. Note that you don't have to install it into any system
337c478bd9Sstevel@tonic-gate  directory. See the section "Operation Controls", if you want to
347c478bd9Sstevel@tonic-gate  install binutils into your own directory.
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gateIf you'd like to develop GRUB, these below are also required. Don't
377c478bd9Sstevel@tonic-gateforget to specify the option `--enable-maintainer-mode' when running the
387c478bd9Sstevel@tonic-gateconfigure script.
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gate* Texinfo 4.0 or later
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gate  We use some new macros in the documents, so you need a recent
437c478bd9Sstevel@tonic-gate  Texinfo release. See the web page
447c478bd9Sstevel@tonic-gate  <http://www.gnu.org/software/texinfo/texinfo.html>.
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gate* Developers: GNU Autoconf 2.5x and GNU Automake 1.7 or later
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gate  You should not need Automake just to compile GRUB, but you will need
497c478bd9Sstevel@tonic-gate  it if you edit any of the build files (Makefile.am, configure.in,
507c478bd9Sstevel@tonic-gate  etc).  We use the new "per-executable flags" feature found in the
517c478bd9Sstevel@tonic-gate  latest release of automake.  See the web page
527c478bd9Sstevel@tonic-gate  <http://www.gnu.org/software/automake/automake.html>.
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gateConfiguring the GRUB
567c478bd9Sstevel@tonic-gate====================
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gateThe `configure' shell script attempts to guess correct values for
597c478bd9Sstevel@tonic-gatevarious system-dependent variables used during compilation.  It uses
607c478bd9Sstevel@tonic-gatethose values to create a `Makefile' in each directory of the package.
617c478bd9Sstevel@tonic-gateIt may also create one or more `.h' files containing system-dependent
627c478bd9Sstevel@tonic-gatedefinitions.  Finally, it creates a shell script `config.status' that
637c478bd9Sstevel@tonic-gateyou can run in the future to recreate the current configuration, a
647c478bd9Sstevel@tonic-gatefile `config.cache' that saves the results of its tests to speed up
657c478bd9Sstevel@tonic-gatereconfiguring, and a file `config.log' containing compiler output
667c478bd9Sstevel@tonic-gate(useful mainly for debugging `configure').
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gateIf you need to do unusual things to compile the package, please try to
697c478bd9Sstevel@tonic-gatefigure out how `configure' could check whether to do them, and mail
707c478bd9Sstevel@tonic-gatediffs or instructions to the address given in the `README' so they can
717c478bd9Sstevel@tonic-gatebe considered for the next release.  If at some point `config.cache'
727c478bd9Sstevel@tonic-gatecontains results you don't want to keep, you may remove or edit it.
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gateThe file `configure.in' is used to create `configure' by a program
757c478bd9Sstevel@tonic-gatecalled `autoconf'.  You only need `configure.in' if you want to change
767c478bd9Sstevel@tonic-gateit or regenerate `configure' using a newer version of `autoconf'.
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gateBuilding the GRUB
807c478bd9Sstevel@tonic-gate=================
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gateThe simplest way to compile this package is:
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gate  1. `cd' to the directory containing the package's source code and
857c478bd9Sstevel@tonic-gate     type `./configure' to configure the package for your system.  If
867c478bd9Sstevel@tonic-gate     you're using `csh' on an old version of System V, you might need
877c478bd9Sstevel@tonic-gate     to type `sh ./configure' instead to prevent `csh' from trying to
887c478bd9Sstevel@tonic-gate     execute `configure' itself.
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gate     Running `configure' takes awhile.  While running, it prints some
917c478bd9Sstevel@tonic-gate     messages telling which features it is checking for.
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate  2. Type `make' to compile the package.
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate  3. Optionally, type `make check' to run any self-tests that come with
967c478bd9Sstevel@tonic-gate     the package.
977c478bd9Sstevel@tonic-gate
987c478bd9Sstevel@tonic-gate  4. Type `make install' to install the programs and any data files and
997c478bd9Sstevel@tonic-gate     documentation.
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gate  5. You can remove the program binaries and object files from the
1027c478bd9Sstevel@tonic-gate     source code directory by typing `make clean'.  To also remove the
1037c478bd9Sstevel@tonic-gate     files that `configure' created (so you can compile the package for
1047c478bd9Sstevel@tonic-gate     a different kind of computer), type `make distclean'.  There is
1057c478bd9Sstevel@tonic-gate     also a `make maintainer-clean' target, but that is intended mainly
1067c478bd9Sstevel@tonic-gate     for the package's developers.  If you use it, you may have to get
1077c478bd9Sstevel@tonic-gate     all sorts of other programs in order to regenerate files that came
1087c478bd9Sstevel@tonic-gate     with the distribution.
1097c478bd9Sstevel@tonic-gate
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gateCompiling For Multiple Architectures
1127c478bd9Sstevel@tonic-gate====================================
1137c478bd9Sstevel@tonic-gate
1147c478bd9Sstevel@tonic-gateYou can compile the package for more than one kind of computer at the
1157c478bd9Sstevel@tonic-gatesame time, by placing the object files for each architecture in their
1167c478bd9Sstevel@tonic-gateown directory.  `cd' to the directory where you want the object files
1177c478bd9Sstevel@tonic-gateand executables to go and run the `configure' script.  `configure'
1187c478bd9Sstevel@tonic-gateautomatically checks for the source code in the directory that
1197c478bd9Sstevel@tonic-gate`configure' is in and in `..'.
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gate
1227c478bd9Sstevel@tonic-gateInstallation Names
1237c478bd9Sstevel@tonic-gate==================
1247c478bd9Sstevel@tonic-gate
1257c478bd9Sstevel@tonic-gateBy default, `make install' will install the package's files in
1267c478bd9Sstevel@tonic-gate`/usr/local/bin', `/usr/local/man', etc.  You can specify an
1277c478bd9Sstevel@tonic-gateinstallation prefix by giving `configure' the option `--prefix=PATH'.
1287c478bd9Sstevel@tonic-gate
1297c478bd9Sstevel@tonic-gateYou can specify separate installation prefixes for
1307c478bd9Sstevel@tonic-gatearchitecture-specific files and architecture-independent files.  If
1317c478bd9Sstevel@tonic-gateyou give `configure' the option `--exec-prefix=PATH', the package will
1327c478bd9Sstevel@tonic-gateuse PATH as the prefix for installing programs and libraries.
1337c478bd9Sstevel@tonic-gateDocumentation and other data files will still use the regular prefix.
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gateIn addition, if you use an unusual directory layout you can give
1367c478bd9Sstevel@tonic-gateoptions like `--bindir=PATH' to specify different values for
1377c478bd9Sstevel@tonic-gateparticular kinds of files.  Run `configure --help' for a list of the
1387c478bd9Sstevel@tonic-gatedirectories you can set and what kinds of files go in them.
1397c478bd9Sstevel@tonic-gate
1407c478bd9Sstevel@tonic-gateIf the package supports it, you can cause programs to be installed
1417c478bd9Sstevel@tonic-gatewith an extra prefix or suffix on their names by giving `configure'
1427c478bd9Sstevel@tonic-gatethe option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1437c478bd9Sstevel@tonic-gate
1447c478bd9Sstevel@tonic-gatePlease note, however, that the GRUB knows where it is located in the
1457c478bd9Sstevel@tonic-gatefilesystem.  If you have installed it in an unusual location, the
1467c478bd9Sstevel@tonic-gatesystem might not work properly, or at all.  The chief utility of these
1477c478bd9Sstevel@tonic-gateoptions for the GRUB is to allow you to "install" in some alternate
1487c478bd9Sstevel@tonic-gatelocation, and then copy these to the actual root filesystem later.
1497c478bd9Sstevel@tonic-gate
1507c478bd9Sstevel@tonic-gate
1517c478bd9Sstevel@tonic-gateSharing Defaults
1527c478bd9Sstevel@tonic-gate================
1537c478bd9Sstevel@tonic-gate
1547c478bd9Sstevel@tonic-gateIf you want to set default values for `configure' scripts to share,
1557c478bd9Sstevel@tonic-gateyou can create a site shell script called `config.site' that gives
1567c478bd9Sstevel@tonic-gatedefault values for variables like `CC', `cache_file', and `prefix'.
1577c478bd9Sstevel@tonic-gate`configure' looks for `PREFIX/share/config.site' if it exists, then
1587c478bd9Sstevel@tonic-gate`PREFIX/etc/config.site' if it exists.  Or, you can set the
1597c478bd9Sstevel@tonic-gate`CONFIG_SITE' environment variable to the location of the site script.
1607c478bd9Sstevel@tonic-gateA warning: not all `configure' scripts look for a site script.
1617c478bd9Sstevel@tonic-gate
1627c478bd9Sstevel@tonic-gate
1637c478bd9Sstevel@tonic-gateOperation Controls
1647c478bd9Sstevel@tonic-gate==================
1657c478bd9Sstevel@tonic-gate
1667c478bd9Sstevel@tonic-gate   `configure' recognizes the following options to control how it
1677c478bd9Sstevel@tonic-gateoperates.
1687c478bd9Sstevel@tonic-gate
1697c478bd9Sstevel@tonic-gate`--cache-file=FILE'
1707c478bd9Sstevel@tonic-gate     Use and save the results of the tests in FILE instead of
1717c478bd9Sstevel@tonic-gate     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
1727c478bd9Sstevel@tonic-gate     debugging `configure'.
1737c478bd9Sstevel@tonic-gate
1747c478bd9Sstevel@tonic-gate`--help'
1757c478bd9Sstevel@tonic-gate     Print a summary of the options to `configure', and exit.
1767c478bd9Sstevel@tonic-gate
1777c478bd9Sstevel@tonic-gate`--quiet'
1787c478bd9Sstevel@tonic-gate`--silent'
1797c478bd9Sstevel@tonic-gate`-q'
1807c478bd9Sstevel@tonic-gate     Do not print messages saying which checks are being made.
1817c478bd9Sstevel@tonic-gate
1827c478bd9Sstevel@tonic-gate`--srcdir=DIR'
1837c478bd9Sstevel@tonic-gate     Look for the package's source code in directory DIR.  Usually
1847c478bd9Sstevel@tonic-gate     `configure' can determine that directory automatically.
1857c478bd9Sstevel@tonic-gate
1867c478bd9Sstevel@tonic-gate`--version'
1877c478bd9Sstevel@tonic-gate     Print the version of Autoconf used to generate the `configure'
1887c478bd9Sstevel@tonic-gate     script, and exit.
1897c478bd9Sstevel@tonic-gate
1907c478bd9Sstevel@tonic-gate`--enable-maintainer-mode'
1917c478bd9Sstevel@tonic-gate     Enable make rules and dependencies not useful (and sometimes
1927c478bd9Sstevel@tonic-gate     confusing) to the casual installer. If you are a GRUB developer,
1937c478bd9Sstevel@tonic-gate     it is a good idea to specify this option.
1947c478bd9Sstevel@tonic-gate
1957c478bd9Sstevel@tonic-gate`--disable-ext2fs'
1967c478bd9Sstevel@tonic-gate     Omit the ext2fs support in Stage 2.
1977c478bd9Sstevel@tonic-gate
1987c478bd9Sstevel@tonic-gate`--disable-fat'
1997c478bd9Sstevel@tonic-gate     Omit the FAT support in Stage 2.
2007c478bd9Sstevel@tonic-gate
2017c478bd9Sstevel@tonic-gate`--disable-ffs'
2027c478bd9Sstevel@tonic-gate     Omit the FFS support in Stage 2.
2037c478bd9Sstevel@tonic-gate
2047c478bd9Sstevel@tonic-gate`--disable-minix'
2057c478bd9Sstevel@tonic-gate     Omit the Minix fs support in Stage 2.
2067c478bd9Sstevel@tonic-gate
2077c478bd9Sstevel@tonic-gate`--disable-reiserfs'
2087c478bd9Sstevel@tonic-gate     Omit the ReiserFS support in Stage 2.
2097c478bd9Sstevel@tonic-gate
2107c478bd9Sstevel@tonic-gate`--disable-vstafs'
2117c478bd9Sstevel@tonic-gate     Omit the VSTa filesystem support in Stage 2.
2127c478bd9Sstevel@tonic-gate
2137c478bd9Sstevel@tonic-gate`--disable-jfs'
2147c478bd9Sstevel@tonic-gate     Omit the JFS support in Stage 2.
2157c478bd9Sstevel@tonic-gate
2167c478bd9Sstevel@tonic-gate`--disable-xfs'
2177c478bd9Sstevel@tonic-gate     Omit the XFS support in Stage 2.
2187c478bd9Sstevel@tonic-gate
2197c478bd9Sstevel@tonic-gate`--disable-ufs2'
2207c478bd9Sstevel@tonic-gate     Omit the UFS2 support in Stage 2.
2217c478bd9Sstevel@tonic-gate
2227c478bd9Sstevel@tonic-gate`--disable-iso9660'
2237c478bd9Sstevel@tonic-gate     Omit the ISO9660 support in Stage 2.
2247c478bd9Sstevel@tonic-gate
2257c478bd9Sstevel@tonic-gate`--disable-gunzip'
2267c478bd9Sstevel@tonic-gate     Omit the decompression support in Stage 2.
2277c478bd9Sstevel@tonic-gate
2287c478bd9Sstevel@tonic-gate`--disable-md5-password'
2297c478bd9Sstevel@tonic-gate     Omit the MD5 password support in Stage2.
2307c478bd9Sstevel@tonic-gate
2317c478bd9Sstevel@tonic-gate`--with-binutils=PATH'
2327c478bd9Sstevel@tonic-gate     Search the path PATH to find binutils. If you have installed your
2337c478bd9Sstevel@tonic-gate     binutils executables into an unusual location where GCC doesn't
2347c478bd9Sstevel@tonic-gate     search by default, use this option.
2357c478bd9Sstevel@tonic-gate
2367c478bd9Sstevel@tonic-gate`--without-curses'
2377c478bd9Sstevel@tonic-gate     Don't use the curses library.
2387c478bd9Sstevel@tonic-gate
2397c478bd9Sstevel@tonic-gate`--disable-hercules'
2407c478bd9Sstevel@tonic-gate     Omit the hercules console support in Stage 2.
2417c478bd9Sstevel@tonic-gate
2427c478bd9Sstevel@tonic-gate`--disable-serial'
2437c478bd9Sstevel@tonic-gate     Omit the serial terminal support in Stage 2.
2447c478bd9Sstevel@tonic-gate
2457c478bd9Sstevel@tonic-gate`--enable-serial-speed-simulation'
2467c478bd9Sstevel@tonic-gate     Simulate the slowness of a serial device in the grub shell. This
2477c478bd9Sstevel@tonic-gate     option is useful for GRUB developers, as you can test the
2487c478bd9Sstevel@tonic-gate     performance of a terminal emulation even on pseudo terminals.
2497c478bd9Sstevel@tonic-gate
2507c478bd9Sstevel@tonic-gate`--enable-preset-menu=FILE'
2517c478bd9Sstevel@tonic-gate     Preset a menu file FILE in Stage 2. This is useful, if you cannot
2527c478bd9Sstevel@tonic-gate     put a configuration file on a filesystem for some reason (e.g. when
2537c478bd9Sstevel@tonic-gate     you need to set the default terminal to a serial terminal in an
2547c478bd9Sstevel@tonic-gate     embedded system).
2557c478bd9Sstevel@tonic-gate
2567c478bd9Sstevel@tonic-gate`--enable-example-kernel'
2577c478bd9Sstevel@tonic-gate     Build the example Multiboot kernel in the directory "docs". You
2587c478bd9Sstevel@tonic-gate     will be able to boot the image "kernel" with GRUB.
2597c478bd9Sstevel@tonic-gate
2607c478bd9Sstevel@tonic-gate`--disable-auto-linux-mem-opt'
2617c478bd9Sstevel@tonic-gate     Don't pass the "mem=" option automatically, when booting Linux.
2627c478bd9Sstevel@tonic-gate     You can also disable the feature at run time.
2637c478bd9Sstevel@tonic-gate
2647c478bd9Sstevel@tonic-gate
2657c478bd9Sstevel@tonic-gate`configure' also accepts several options for the network support. See
2667c478bd9Sstevel@tonic-gatethe file `netboot/README.netboot', for more information.
267