9.1. Running the ROM-Resident Code
The system board inside a Unix box contains a minimal amount of
permanent, non-volatile memory. Often called the ROM
(read-only memory), PROM (programmable read-only memory),
NVRAM (non-volatile random-access memory), or firmware, this
device has stored on it a set of instructions which are executed automatically
when the system is powered on. These instructions cause the system
to perform a number of very simple yet crucial tasks. (It is
also possible to interact directly with the ROM; each vendor
provides a different method for doing this.)
The common tasks performed by the ROM code
are:
9.1.1. The Power-On Self Test (POST)
The first set of instructions from the PROM cause the machine to
test its hardware, such as the RAM, system board, the CPU, the
peripheral devices, etc.
9.1.2. Probing the Bus for Boot Device
Most commercial Unix systems today (except those based on the Intel
architecture) use a SCSI bus to
connect to possible boot media (such as a system disk or CD-ROM).
A simple SCSI probe command in the PROM attempts to seek
the boot media. On a number of systems, a default SCSI target ID
is searched first (for example, SCSI ID 0 on Sun Ultras, ID 3
on older Suns, etc.).
On Intel architecture (and on some of the newer, PCI-bus based
Unix systems such as a Sun Ultra 5), SCSI is not available
by default. Hence, the PCI bus is probed to seek a boot device.
Of course, if you have access to the ROM, you can boot any
bootable device explicitly (for example, by typing
boot cdrom on Suns). Depending on the Unix flavor, it is
possible to boot from
a local or remote (networked) hard disk, CD-ROM drive, floppy drive, or tape.
9.1.3. Reading the Boot Program
Once the boot device is found, the boot program
is sought at a predictable location on the boot device
(such as block 0 of the root disk). If found, the boot program
is read in and executed. The purpose of the boot program is
to read in the Unix kernel from a boot device.
It is important to note that the process listed above is
entirely outside the Unix context and is therefore highly vendor
dependent. (For more info, try looking up the man pages for boot, pdc,
and isl under HP-UX 10.20, for initrd
under RedHat Linux, and for boot under Solaris.)