Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fdisk(1M)

init(1M)

mkpart(1M)

fd(7)



          boot(1M)             INTERACTIVE UNIX System             boot(1M)



          NAME
               boot - UNIX System boot program

          DESCRIPTION
               The boot program is responsible for detecting the type of
               machine and its complement of hardware, setting up the
               environment necessary for the execution of the UNIX System
               kernel, and loading and executing the kernel.  The boot pro-
               gram does not perform these functions alone;  the booting
               process demands the cooperation of a number of pieces of
               software.  The booting process varies slightly depending on
               whether the kernel resides on a diskette or fixed disk.

               The booting process begins with a machine in the reset
               state.  This may occur because the machine has just been
               turned on or because a reboot sequence has been entered.
               From this point, the ROM BIOS supplied with the machine
               gains control and goes through its power-on self test (POST)
               sequence.  After this, it will attempt to boot an operating
               system off of a diskette if one is present.  Failing that,
               it will attempt to boot from the fixed disk.

               When booting from a diskette, the ROM BIOS reads sector 1
               from track 0 of cylinder 0 (the first logical sector on the
               disk) and jumps to the beginning of that block.  boot must
               then read in the rest of its program and continue the boot-
               ing process.  The boot program may occupy the entire first
               cylinder on a 5.25-inch or 3.5-inch high density diskette,
               or the first two cylinders on a 3.5-inch double density
               (700Kb) diskette.  This limits the diskette-based boot pro-
               gram to a size of 18Kb.

               Booting from a fixed disk is a more complex operation.  The
               ROM BIOS reads in the first logical sector of the disk.
               This sector contains a small fragment of code called the
               masterboot and a table of partitions called the fdisk table.
               The fdisk table has up to four valid entries, and each entry
               describes a portion of the disk by giving its beginning
               cylinder, head, and sector number, ending cylinder, head,
               and sector, and the logical starting and ending sector
               numbers.  At most, one partition is marked as the active
               partition.

               Note that the logical sector numbers are maintained in 32-
               bit words, which is sufficient for an extremely large disk
               (over a terabyte); however, the other values are packed into
               small fields which limit their ranges:  cylinder values are
               limited to 1024, heads to 16, and sectors to 64.  This means
               that on some disks, it may be possible to set up a UNIX Sys-
               tem partition that cannot be booted from.

               The masterboot program searches the fdisk table for the
               active partition, and reads in the first logical sector of


          Rev. 1.2                                                   Page 1





          boot(1M)             INTERACTIVE UNIX System             boot(1M)



               that partition.  This will be the first block of the boot
               program when the active partition contains the INTERACTIVE
               UNIX Operating System.  As is the case with the diskette
               version, this first block must then read in the remainder of
               the boot program.  Because the UNIX System VTOC structure is
               located in sector 29 of the partition, the fixed disk boot
               program cannot be any larger than 14.5Kb.

               After the boot program is read in from either a diskette or
               a fixed disk, boot attempts to determine which machine it is
               on.  It does this by reading another program,
               /etc/initprog/identify, and executing it.  This program per-
               forms a number of tests, often searching the ROM BIOS for
               identifying strings, until a match is found for a particular
               machine or until all tests fail.  In the latter case, the
               machine is assumed to be a generic PC AT.

               As a part of determining the machine type, a particular
               machine initialization program (or initprog) is selected.
               These programs reside in /etc/initprog.  The selected pro-
               gram is then loaded and executed.  It is responsible for
               doing any machine-dependent operations that may be neces-
               sary.  Certain generic operations such as sizing memory or
               detecting the presence of floating point coprocessors can
               also be done at this time if they require some nonstandard
               code.

               After the execution of the machine-dependent initprog, a
               machine-independent initialization program,
               /etc/initprog/machsetup, is run.  If not done by the depen-
               dent initprog, machsetup determines the location and size of
               memory, the number and types of fixed disks and diskettes,
               and a few other pieces of information.

               All of the information determined by these programs is saved
               in the bootinfo structure, where it is used by the kernel
               and drivers.  It is also available to user programs via a
               sysi86 system call if needed.

               At this time, the UNIX System kernel, /unix, is loaded.  As
               the boot program starts to load /unix, it displays the mes-
               sage:

                 Booting the UNIX system...
                 Loading file /unix
                 Strike any key to interrupt

               During this time the user can interrupt the boot in order to
               specify a different kernel by typing any key.  The boot will
               respond with:

                 Enter the name of a kernel to boot:



          Rev. 1.2                                                   Page 2





          boot(1M)             INTERACTIVE UNIX System             boot(1M)



               The user should enter a UNIX System path name.  The file
               specified must reside within the root file system; the boot
               program is unable to search other file systems.  If the file
               is not found, boot prints a message and asks for another
               file name.  If no response is made within 30 seconds or if
               the user responds with a carriage return, boot will once
               again attempt to load /unix and execute it.

               Once a kernel is determined, it is loaded into memory.  The
               boot program then generates the appropriate page directory
               and page tables for the kernel, sets up an interrupt
               descriptor table and a global descriptor table, turns on
               paging, and does a long jump through a task switch selector
               into the kernel.

               The boot program is installed on a fixed disk by the
               mkpart(1) program when it initializes the disk.  If boot
               becomes damaged, a fresh copy is maintained in /etc/boot,
               and mkpart can be used (with the -b option) to update it.
               Part of the installation of a boot into the UNIX System par-
               tition includes stamping the number of sectors per track
               into it; this makes the installed boot unusable on other
               disks.  However, /etc/boot itself is not modified.

          FILES
               /etc/boot
               /etc/initprog/identify
               /etc/initprog/machsetup
               /etc/initprog/*

          SEE ALSO
               fdisk(1M), init(1M), mkpart(1M), fd(7).

          DIAGNOSTICS
               The masterboot and boot programs display 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 par-
                          tition boot of the active operating system.

               BAD TBL    The bootable partition indicator of at least one
                          of the operating systems in the fdisk table con-
                          tains an unrecognizable code.

               NO OS      There was an unrecoverable error after trying to
                          execute the active operating system's partition
                          boot.

               If boot displays a message other than the ones shown above,
               it is a fatal error and must be corrected before the kernel
               can be booted.  The messages are intended to be self-


          Rev. 1.2                                                   Page 3





          boot(1M)             INTERACTIVE UNIX System             boot(1M)



               explanatory, but are they technically detailed.  If you
               encounter one, be sure to copy it completely and accurately
               and contact your vendor for technical support.

          ADDED VALUE
               This entry, supplied by INTERACTIVE Systems Corporation,
               contains enhancements to UNIX System V.
















































          Rev. 1.2                                                   Page 4



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026