boot(1M) UNIX System V(Base System) boot(1M)
NAME
boot - UNIX system boot program
DESCRIPTION
The boot program interactively loads and executes stand-alone UNIX
programs. While boot is used primarily for loading and executing the
UNIX system kernel, it can load and execute any other programs that are
linked for stand-alone execution. The boot program is a required part of
the UNIX Base Operating System software set and must be present in the
root file system to ensure successful loading of the UNIX System kernel.
Note that during installation of the UNIX operating system, a custom
masterboot is placed on the hard disk. The masterboot program resides on
sector 0 of the hard disk and is the default boot program for hard-disk
boot procedures.
The system invokes the boot program each time the computer is started.
It tries to locate the boot program on the floppy disk drive first; if
the floppy disk drive is empty, the system invokes the hard-disk boot
procedure. The boot procedure depends on whether you are booting from a
floppy disk or hard disk, as described below.
The floppy-disk boot procedure has two stages:
1. The boot block in sector 0 of the file system loads boot.
2. boot executes and prompts the user.
The hard-disk boot procedure has three stages:
1. The ROMs load in the masterboot block from sector 0 on the hard
disk.
2. The masterboot boot block then loads the partition boot block
from sector 0 of the active partition [see fdisk(1M)].
3. The remainder of boot is loaded from the next 29 sectors of the
hard disk.
When first invoked, boot displays the following status message:
Booting the UNIX System ...
To instruct boot to use the default kernel and values specified in the
boot default file, /stand/boot, press RETURN. If you press any key other
than RETURN, boot pauses and prompts you for custom information. If you
have just loaded the boot program from the distribution diskette, press
RETURN so boot will use the default values.
To load a program that is not the default program, press any key to
interrupt boot. The boot program pauses and prompts you with the
following message for the name of the program you want to load:
10/89 Page 1
boot(1M) UNIX System V(Base System) boot(1M)
Enter the name of a kernel to boot:
The system waits at this point for you to type the name of the program
you want to load and press RETURN. The length of the pause is the number
of seconds specified with the TIMEOUT option in /stand/boot (see ``boot
Options''). If you have not typed something after the specified number
of seconds and AUTOBOOT is set to YES in /stand/boot, boot times out and
behaves as though you pressed
RETURN. The boot program proceeds through the boot process, and init(1M)
is passed an -a flag with no prompt argument.
If you are booting from a program other than the boot program on the
distribution diskette, you must specify the location of the program by
providing a filename (if the program you want to load is on the default
boot device). The filename must include the full pathname of the file
containing the stand-alone program. To indicate a program other than the
boot program on the distribution diskette, use the following format:
filename
where filename is the standard UNIX system pathname. If filename is the
only argument typed at the boot prompt, boot looks for the filename on
the default boot device and tries to boot from it.
boot Options
Options for the boot program can be set or changed with keywords in
/stand/boot The following keywords are recognized by boot:
AUTOBOOT=YES or NO Indicates whether or not boot starts loading
the kernel immediately or displays a boot
prompt first.
BOOTMSG=string The default boot message is changed to
string.
BOOTPROMPT=string The default boot prompt is changed to
string.
DEFBOOTSTR=bootstring Sets default bootstring to bootstring. This
is the string used by boot when the user
presses RETURN only to the boot prompt or
when boot times out.
INITPROG=path Specifies an initialization program to be
loaded and run before boot sizes memory.
MEMRANGE=range[,range...] Tells boot where to look when sizing memory.
A range is a pair of decimal addresses,
separated by a dash (such as 1M-4M),
followed by a one-byte set of flags. This
set of flags should be encoded as an integer
in the range of 0-255. Use a colon (:) to
Page 2 10/89
boot(1M) UNIX System V(Base System) boot(1M)
separate addresses from flags. Note that
only two values are currently defined: 0
(indicates no special properties) and 1
(indicates memory for which DMA is not
allowed). All other flags are currently
undefined and reserved for future use. Both
upward (such as 15M-16M) and downward (such
as 16M-15M) address ranges are supported.
The first address in the pair is inclusive;
the last address is exclusive.
MEMREQ=size Tells boot to enforce a minimum memory size
of size. If boot dosen't find at least size
bytes of
memory, it will print a message and halt.
size is given in the same format as
adddresses for MEMRANGE.
MREQMSG1=string This sets the message printed when the
MEMREQ memory requirement is not met.
MREQMSG2=string Specifies an optional second line for the
MREQMSG1 message.
TIMEOUT=number If boot is waiting for a boot line from the
user and TIMEOUT is set, boot will wait for
number seconds, then use the default boot
line defined by DEFBOOTSTR.
Customizing the Boot Process
You can set the boot process up to be automatic. To set up boot to run
automatically, using the default configuration information in the
/stand/boot file, set AUTOBOOT to YES in the /stand/boot file. This
causes boot to display the default boot message and load the program. If
an error occurs or a key is pressed during this automatic boot process,
boot returns to the boot prompt and tries to load the program again. The
boot program on the UNIX operating system installation diskette performs
this automatic boot procedure.
If AUTOBOOT is set to NO in the /stand/boot file, boot gives you an
opportunity to type a bootstring before boot begins loading the program.
If you do not type a bootstring at the prompt, boot assumes the user
wants the default configuration. At this point, boot behaves as though
AUTOBOOT is set to YES in the /stand/boot file. The boot program reads
the configuration in the /stand/boot file then displays the default boot
message (BOOTMSG) and begins loading the program.
the filesystem type of the root file system can also be specified, as
follows:
10/89 Page 3
boot(1M) UNIX System V(Base System) boot(1M)
rootfstype=fstype
where fstype is the filesystem type, probably either s5 or ufs.
Kernel Configuration
The boot program passes any boot string typed at the boot prompt to the
kernel except for the prompt string. The kernel reads the boot string to
determine which peripherals are the root, pipe, swap, and dump devices.
If no devices are specified in either the /stand/boot description or on
the command line, the default devices compiled into the kernel are used.
Additional arguments in the boot string can override the default. These
additional arguments have the following form:
dev=xx(m,o)
where
- dev is the desired system device (root[dev], pipe[dev], swap[dev], or
dumpdev).
- xx is the device name (``hd'' for the hard disk or ``fd'' for floppy
diskette device).
- m is the minor device number.
- o is the offset in the partition (usually 0).
If any combination of root, pipe, swap, or dumpdev is specified, those
system devices will reside on that device with the unspecified system
devices using the defaults compiled in the kernel. Setting one device
does not affect the default values for the other system devices.
FILES
/stand/boot
SEE ALSO
fdisk(1M), init(1M), fd(7), hd(7).
DIAGNOSTICS
The masterboot and boot programs have different error messages. The
masterboot program displays an error message and locks the system. The
following is a list of the most common masterboot messages and their
meanings:
IO ERR An error occurred when trying to read in the partition boot of
the active operating system.
BAD TBL The bootable partition indicator of at least one of the
operating systems in the fdisk table contains an
unrecognizable code.
Page 4 10/89
boot(1M) UNIX System V(Base System) boot(1M)
NO OS There was an unrecoverable error after trying to execute the
active operating system's partition boot.
The boot program displays an error message, then returns to its prompt.
Some boot messages indicate fatal errors that cause the system to halt
and require rebooting. Other boot messages are not fatal but indicate
that the boot program is not running properly.
The following four messages indicate fatal errors. When one of these
messages occurs, you will need to correct the problem described in the
message and reboot the system:
Error reading bootstrap
The boot program could not locate the bootstrap, or the bootstrap
is not readable. Make sure that the bootstrap is properly located
on the specified boot device and is compatible with the kernel you
are booting. Then reboot the system.
No active partition on hard disk
There is currently no active partition from which to run the boot
program. Activate an appropriate partition and reboot the system.
No file system to boot
The boot program could not locate a /stand or root file system on
the specified boot device. Make sure the boot device has a /stand
or root file system and reboot the system.
The following list describes boot warning messages. When one of these
messages occurs, you will need to correct the problem described in the
message and restart the boot program:
Cannot load initprog
The boot program cannot locate the initialization program specified
with the INITPROG option, or the initialization program is not set
up properly for execution. Make sure that the path argument to
INITPROG is a valid path and the file is executable. Then restart
boot.
Cannot open defaults file
The boot program cannot locate the /stand/boot file on the boot
device, or the file is not readable. Make sure that the
/stand/boot file exists on the boot device and that the file is
readable. Then restart boot.
command argument missing or incorrect
The boot program received a command with no argument or with an
invalid argument. Make sure that command in /stand/boot has the
correct number of arguments and that all the arguments are valid,
then restart boot.
10/89 Page 5
boot(1M) UNIX System V(Base System) boot(1M)
Cannot load file; file not opened
The boot program cannot locate file on the specified device, or
file is not set up properly for execution. Check that file exists
on the specified device and restart boot.
Cannot load file; cannot read COFF header
The specified Common Object File Format (COFF) file contains no
file header, or the file header is not readable. Make sure that
file contains a readable file header, then restart boot.
Cannot load file; not an 80386 ELF or COFF binary
The specified file is not an 80386 ELF or COFF binary. Check that
the file you want to load is a valid COFF binary that is compatible
with 80386 systems and restart boot.
Cannot load file; cannot read segment/sections
The specified file does not contain a section header, or the
section header is not readable. Check that file contains a
readable section header and restart boot.
Cannot load file; cannot read BKI section
The specified file does not include the bootstrap-kernel interface
(BKI) section, or the BKI section is not readable. Make sure the
BKI section of file is accurate for your version of the kernel and
bootstrap, then restart boot.
Cannot load file; BKI too old
The BKI of the current bootstrap is not compatible with the BKI of
the program (file) you are loading. Make sure that the BKI of the
bootstrap and file are compatible and restart boot.
Cannot load file; BKI too new
The BKI of the current bootstrap is not compatible with the BKI of
the program (file) you are loading. Make sure that the BKI of the
bootstrap and file are compatible and restart boot.
Cannot load file; missing text or data segment
The specified file does not contain a necessary text or data
segment. Check that file contains the proper text and data
segments, then restart boot.
Cannot load file; missing BKI segment
The specified file does not contain the BKI segment. Make sure
that the BKI segment in file exists and is compatible with the BKI
of the bootstrap.
Cannot load file
not present The amount of memory available for the kernel is not
present or is inadequate. Make sure you have allocated enough
memory for the kernel you want to load, then restart boot.
Page 6 10/89
boot(1M) UNIX System V(Base System) boot(1M)
Too many lines in defaults file; extra lines ignored
The file/stand/boot contains too many lines. All extra lines will
be ignored.
NOTES
The computer always tries to boot from any diskette in the floppy
diskette drive first. If the diskette does not contain a valid bootstrap
program, errors occur.
The boot program cannot be used to load programs that have not been
linked for standalone execution. To create stand-alone programs, use the
option of the UNIX system linker [ ld (1)] and special stand-alone
libraries.
Although stand-alone programs can operate in real or protected mode, they
must not be large or huge model programs. Programs in real mode can use
the input/output routines of the computer's startup ROM.
10/89 Page 7