BOOT(8)             OpenBSD System Manager's Manual (i386)             BOOT(8)

NAME
     boot, boot.conf - i386-specific second-stage bootstrap

DESCRIPTION
     The main purpose of this program is to load the system kernel, dealing
     with the downfalls of the PC BIOS architecture.

     As described in boot_i386(8) this program is loaded by the biosboot(8)
     primary bootstrap loader and provides a convenient way to load the ker-
     nel.  This program acts as an enhanced boot monitor for PC systems, pro-
     viding common interface for the kernel to start from.

     Basic operations include:
     o   Detecting and switching between multiple consoles.
     o   Loading kernels from any device supported by your system BIOS.
     o   Loading kernels compressed by gzip(1).
     o   Passing system parameters queried from the BIOS to the kernel.
     o   Providing an interactive command line.

     The sequence of its operation is as follows: initialization, parsing the
     configuration file, then an interactive command line.  While at the com-
     mand line you have 5 seconds to type any commands, if needed. If time ex-
     pires, the kernel will be loaded according to the current variable set-
     tings (See the set command).  Each time a kernel load fails, the timeout
     is increased by one second. The sequence of boot operations is as fol-
     lows:

     1.   Set up a protected mode environment which catches and reports pro-
          cessor exceptions, and provides a simple protected-mode BIOS inter-
          face.

     2.   Probe for console devices, which includes the (default) PC VGA+Key-
          board console (pc0) and up to four serial consoles (com0 through
          com3) connected to the serial ports. Display messages to the default
          console about the devices found.

     3.   Detect memory. Conventional memory is detected by quering the BIOS.
          Extended memory is detected by probing page-by-page through the ad-
          dress space, rather than asking the BIOS; many BIOS cannot report
          larger than 64M of memory.  All the memory found is reported to the
          default console device.

     4.   Probe for APM support in the BIOS. Message printed if support is
          present.

     5.   If the file /etc/boot.conf exists on the filesystem boot was loaded
          from, open and parse it. This file may contain any commands boot ac-
          cepts at the interactive prompt.  Though default settings usually
          suffice, they can be changed here.

     6.   The header line

                OpenBSD BOOT [x.xx]

          is displayed to the active console, where x.xx is a version number
          of the boot program, followed by the

                boot>

          prompt, which means you are in the interactive mode and may enter
          commands. If you do not, boot will proceed loading kernel with the
          current parameters after the timeout period has expired.

COMMANDS
     The following commands are accepted at the boot prompt:

     boot [image [-abcds]]   Boots kernel image specified by image with any
                             options given. Image specification consists of a
                             pair device: filename, either or both of each
                             maybe omitted (':' is not needed if both are
                             omitted), in which case values from boot vari-
                             ables will be used.

     echo [args]             Displays args on the console device.

     help                    Prints a list of available commands and machine
                             dependent commands, if any.

     machine [command]       Issues machine-dependent commands. These are de-
                             fined for i386 architecture:

                             diskinfo   Prints list of hard disks installed on
                                        your system including: BIOS device
                                        number, and the BIOS geometry.

                             memory     If used without any arguments this
                                        command will print out the memory con-
                                        figuration as determined through BIOS
                                        routines.  Otherwise the arguments
                                        would specify the expressions to modi-
                                        fy the memory configuration. The ex-
                                        pression would have a form of:

                                              [+-]<size>@<address>

                                        Meaning to add(+) or exempt(-) the
                                        specified by the <size> amount of mem-
                                        ory at the location specified by the
                                        <address> argument.  Both size and
                                        base address could be specified as oc-
                                        tal, decimal, or hexadecimal numbers,
                                        as accepted by the stroul(3) routine.
                                        Memory segments are not required to be
                                        adjucent to each other, the only re-
                                        quirement is that there is real physi-
                                        cal memory under the range added.  For
                                        example:

                                              machine mem +0x2000000@0x1000000

                                        would add 32M of memory right after
                                        first 16M.  The other usefull command
                                        would be to winthdraw some range of
                                        memory form OS usage (as might be
                                        wrongfully reported as usefull by
                                        BIOS):

                                              machine mem -0x100000@0xf00000

                                        which effectively excludes 15-16M
                                        range from the map of usefull memory.

                             regs       Prints contents of processor registers
                                        if compiled with DEBUG.

     ls [directory]          Prints contents of the specified directory in
                             long format including: attributes and file type,


                             owner, group, size, filename.

     reboot                  Reboots machine by initiating a warm boot proce-
                             dure.

     set [varname [value]]   If invoked without arguments, prints a list of
                             variables and their values.  If only varname is
                             specified, displays contents of that variable.
                             If varname and value are both specified, sets
                             that variable to the given value.  Variables in-
                             clude:

                             addr     Address at which to load the kernel.
                             howto    Options to pass to the loaded kernel.
                             debug    Debug flag if boot was compiled with DE-
                                      BUG defined.
                             device   Boot device name (ie: fd0a, sd0a).
                             tty      Active console device name (ie: com0,
                                      com1, pc0)
                             image    File name containing the kernel image.

     stty [device [speed]]   Displays or sets the speed for a console device.
                             If changing baudrate for the currently active
                             console, gives you five seconds of pause before
                             changing the baud rate to allow you to change
                             your terminal's speed to match.  If changing
                             speed not for the active console, sets the bau-
                             drate value to be used the next time you switch
                             to a serial console.  The baudrate value is not
                             used for the pc0 console.

                             The default baudrate if not specifically set is
                             9600 baud.

     time                    Displays system time and date.

FILES
     /usr/mdec/biosboot    first stage bootstrap
     /boot                 system bootstrap
     /etc/boot.conf        system bootstrap's startup file
     /bsd                  kernel image

SEE ALSO
     gzip(1), boot_i386(8), fdisk(8), installboot(8)

     RFC 1950 describes the zlib library interface.

     The official home page for the version of zlib used in this operating
     system see http://quest.jpl.nasa.gov/zlib/ .

BUGS
     Well, nobody is perfect.

HISTORY
     This program was written by Michael Shalayeff for OpenBSD 2.1.

OpenBSD 2.8                    September 1, 1997                             3
