INSTALLBOOT(8)          NetBSD System Manager's Manual          INSTALLBOOT(8)

NNAAMMEE
     iinnssttaallllbboooott - install a bootstrap on an FFS filesystem partition

SSYYNNOOPPSSIISS
     iinnssttaallllbboooott [--nnvvhh] [--aa _k_a_r_c_h] _b_o_o_t _b_o_o_t_x_x _d_e_v_i_c_e

DDEESSCCRRIIPPTTIIOONN
     iinnssttaallllbboooott prepares a FFS filesystem partition for boot-strapping from
     the PROM.  The sparc bootblocks are split into two parts: a small first-
     stage program that is written into the superblock area in a partition
     (and hence is limited in size to SBSIZE - DEV_BSIZE bytes), and a second-
     stage program that resides in the filesystem proper.  The first-stage
     program is loaded into memory by the PROM. After it receiving control, it
     loads the second stage program from a set of filesystem block numbers
     that have been hard-coded into it by the iinnssttaallllbboooott program. The second-
     stage boot program uses the device driver interface to the PROM and the
     stand-alone filesystem code in ``libsa.a'' to locate and load the kernel.
     The second-stage boot program and the prototype code for the first-stage
     bootprogram can be found in _/_u_s_r_/_m_d_e_c_/_b_o_o_t and _/_u_s_r_/_m_d_e_c_/_b_o_o_t_x_x respec-
     tively. The second-stage program commonly resides in the root directory
     as _/_b_o_o_t. The utility _/_u_s_r_/_m_d_e_c_/_b_i_n_s_t_a_l_l can be used to properly copy the
     a second-stage bootprogram to its destination. This script takes care of
     post-processing that is required on non-Openboot machines.

     The options are as follows:

     --aa _k_a_r_c_h
           Set the machine architecture. The argument _k_a_r_c_h can be one of
           ``sun4'', ``sun4c'' or ``sun4m''. Sun 4c models with Openboot PROMs
           need the header to be present, while Sun 4 systems with the ``old
           monitor'' interface require the header to be stripped off. This is
           normally taken care of by iinnssttaallllbboooott automatically, but it's use-
           ful when preparing a bootable filesystem for another system.

     --hh    Leave the a.out(5) header on the installed _b_o_o_t_x_x program. This op-
           tion has been superseded by the --aa _k_a_r_c_h option.

     --nn    Do not actually write anything on the disk.

     --vv    Verbose mode.

     The arguments are:

     _b_o_o_t    the name of the second-stage boot program in the file system
             where the first-stage boot program is to be installed.

     _b_o_o_t_x_x  the name of the prototype file for the first stage boot program.

     _d_e_v_i_c_e  the name of the raw device in which the first-stage boot program
             is to be installed.  This should correspond to the block device
             on which the file system containing _b_o_o_t is mounted.

EEXXAAMMPPLLEESS
     The following command will install the first-stage bootblocks in the root
     filesystem (assumed to be mounted on ``sd0a'') using the file _/_b_o_o_t as
     the second-level boot program:

           installboot /boot /usr/mdec/bootxx /dev/rsd0a

BBUUGGSS
     iinnssttaallllbboooott requires simultaneous access to the mounted file system and
     the raw device, but that is not allowed with the kernel securelevel vari-
     able set to a value greater than zero (the default), so iinnssttaallllbboooott only
     works in single-user mode (or insecure mode - see init(8)).

SSEEEE AALLSSOO
     disklabel(8),  init(8)

HHIISSTTOORRYY
     The iinnssttaallllbboooott first appeared in NetBSD 1.1

4.4BSD                        September 29, 1995                             2
