

boot                          Driver                         boot




Boot block for hard-disk partition/nine-sector diskette


To be bootable, a COHERENT  file system must contain a boot block
that lives  in the first block of the  file system.  In addition,
all hard  disks must  contain the master  boot block mboot  or an
equivalent.

boot is a boot block for  a hard-disk partition or a floppy disk.
It must be installed as the first sector of the partition or dis-
kette; for  example, the following  commands format and  create a
file system on a high-density, 5.25-inch diskette:


        /etc/fdformat -v -i 4 /dev/fha0
        /etc/mkfs /dev/fha0 2400
        /bin/cp /conf/boot.fha /dev/fha0


boot searches  its root directory  `/' for file  _a_u_t_o_b_o_o_t.  If it
finds this  kernel, bboooott loads and runs  it.  Otherwise, it gives
the  prompt ?,  to  which the  user  must type  the  name of  the
operating-system  kernel to  load (typically,  ``coherent'').  If
bboooott cannot find the requested kernel or if an error occurs, boot
does not print an error message, but re-prompts with `?'.

***** Creating a Bootable Floppy Disk *****

In  some  cases, it  is  necessary to  create  a mini-version  of
COHERENT that can be booted from a floppy disk.  For example, you
may wish to  test a device driver or a  tricky program written in
assembly language;  by using  a floppy-disk version  of COHERENT,
you can test your program  yet protect your hard disk's file sys-
tems from damage should something go wrong.

The following  describes how to  create a floppy-disk  version of
COHERENT.  If  your drive A is  a 5.25-inch, high-density device,
type:


        export DEV=/dev/fha0
        export BS=30b


If,  however, your  drive A is  a 3.5-inch,  high-density device,
type:


        export DEV=/dev/fva0
        export BS=36b


The rest of the commands will be the same for either device.



COHERENT Lexicon                                           Page 1




boot                          Driver                         boot



The next step is to copy disk 1 of your COHERENT release onto the
hard disk.  Insert disk 1 into drive A and type:


        dd if=$DEV of=_f_i_l_e__n_a_m_e count=80 bs=$BS


where file_name is the file into which you are copying the disk.

Now, remove  the COHERENT release disk and  insert a blank floppy
disk.  The next step is to format it; type the following command:


        /etc/fdformat $DEV


Now, copy  the file that  contains your copy  of COHERENT release
disk 1 onto the newly formatted floppy disk:


        dd if=_f_i_l_e__n_a_m_e of=$DEV count=80 bs=$BS


where file_name is the file that holds COHERENT.

Now, mount the new floppy disk:


        /etc/mount $DEV /f0


From this point on, you  must have superuser status.  If you have
not yet done so, type


        su root


and type the password if prompted.

The final steps further prepare the new floppy disk:


        cd /f0
        mv begin autoboot
        rm Coh_300.1
        cd etc
        rm brc*
        rm build


The bootable  floppy is now  done.  Type <ctrl-D>  to return from
superuser status, and then type the command




COHERENT Lexicon                                           Page 2




boot                          Driver                         boot




        /etc/umount $DEV


to unmount the floppy disk.  Put it away in a safe place.

Your  bootable  floppy   disk  contains  about  700  blocks  (350
kilobytes) of  an information.  We  suggest that you put  on it a
handful  of  the   most  commonly  used  programs,  such  as  the
MicroEMACS screen editor.

***** Files *****

/ccoonnff/bboooott* -- Various diskette boot blocks

***** See Also *****

device drivers, fdisk, mboot, mkfs







































COHERENT Lexicon                                           Page 3


