

floppy disks          Technical Information          floppy disks




The COHERENT system lets you read or write to floppy disks, using
a variety  of different formats.  You can  choose the format that
best suits the task at hand.

***** Disks Supported *****

COHERENT  lets you  use either  3.5-inch  or 5.25-inch  disks, in
either high or low density; what you use depends upon the type of
hardware that you  have.  The following table gives some commonly
used diskette device names and formats:


_D_e_v_i_c_e _n_a_m_e_S_e_c_t_o_r_s/_T_r_a_c_k _H_e_a_d_s _S_e_c_t_o_r_s  _B_y_t_e_s_F_o_r_m_a_t
/dev/f9a0      9         2     720   360 KB5.25"
/dev/f9a1      9         2     720   360 KB5.25"
/dev/fqa0      9         2    1440   720 KB 3.5"
/dev/fqa1      9         2    1440   720 KB 3.5"
/dev/fha0     15         2    2400   1.2 MB5.25"
/dev/fha1     15         2    2400   1.2 MB5.25"
/dev/fva0     18         2    2880   1.44 MB3.5"
/dev/fva1     18         2    2880   1.44 MB3.5"


Device names ending in `0' indicate drive A:, names ending in `1'
indicate  drive  B:.   For  a  fuller description  of  COHERENT's
floppy-disk devices, see the Lexicon entry for ffdd.

***** MS-DOS Format *****

COHERENT lets you read or  write to floppy disks that contain MS-
DOS file  systems.  Both tasks use the  command ddooss. This command
is discussed in full in its Lexicon entry.

To  read files  from  a MS-DOS  disk,  use the  ddooss command's  -xx
option,  with the  appropriate  device name  for the  floppy-disk
device that you will be using (as given in the above table).  For
example, to read  file ffrreedd.eexxee from a low-density, 5.25-inch MS-
DOS floppy disk in drive A, use the following command:


  dos -x /dev/f9a0 fred.exe


The following command  reads all files from a high-density, 5.25-
inch MS-DOS floppy disk in drive B:


       dos -x /dev/fha1


To write a file to a  preformatted MS-DOS floppy disk, use the -rr
option  to  the  MS-DOS  command.   For  example, to  write  file
ffrreedd.mmss, which contains  text, to a low-density, 5.25-inch MS-DOS
floppy disk in drive A, use the following command:


COHERENT Lexicon                                           Page 1




floppy disks          Technical Information          floppy disks





  dos -ra /dev/f9a0 fred.ms


Note  that the  `a' flag  in the command  line tells  COHERENT to
convert linefeeds to the linefeed/carriage return combination, as
used  by  MS-DOS.  You  will  want  to use  this  flag _o_n_l_y  when
transferring text files to or from an MS-DOS floppy disk.

The following  command copies all files  in the current directory
to a high-density, 3.5-inch MS-DOS floppy disk in drive B:


       dos -r /dev/fva1


Note that when you copy a file to an MS-DOS floppy disk, COHERENT
observes the MS-DOS  file-name conventions: it permits only eight
characters to  the left of the period,  and only three characters
to the right of it.

(It should be  noted in passing that you can  use the ddooss command
to read files from or write  files to an MS-DOS partition on your
hard  disk.  All  that is  necessary  is to  replace the  name of
floppy-disk  device with  that of  the  hard-disk device  for the
partition in  question.  See the Lexicon entry for  aatt for a list
of hard-disk devices; see  the entry for ffddiisskk for information on
how to read  the layout of your hard disk;  and see the entry for
ddooss for details of how to use the command.)

Finally, COHERENT lets you format a floppy disk and create an MS-
DOS  file system  on it.   To  do so,  you must  use the  command
ffddffoorrmmaatt as  well as ddooss. ffddffoorrmmaatt is described  in detail in its
Lexicon article.

To format  a high-density, 5.25-inch  floppy disk in  drive B and
write an MS-DOS file system onto it, use the following commands:


 /etc/fdformat -av /dev/fha1
       dos -F /dev/fha1


To  write files  to your  newly created file  system, use  the -rr
option to the ddooss command, as described above.

***** COHERENT Format *****

If you  wish, you can create  a COHERENT file system  on a floppy
disk,  mount it,  and manipulate  the files  on it  with standard
COHERENT commands.  This is  a good illustration of the fact that
to COHERENT a file system is a file system, whether it resides on
a hard, a floppy disk, or any other mass-storage device.  You can
use such  mountable floppy disks as an easy  method of backing up


COHERENT Lexicon                                           Page 2




floppy disks          Technical Information          floppy disks



files, or  as a flexible extension to any  other file system that
you have currently mounted.

To create a  COHERENT file system on a floppy  disk, you must use
the commands  ffddffoorrmmaatt, bbaaddssccaann, and mmkkffss.   Each is described in
detail in its own Lexicon article.  The following example creates
a COHERENT  file system on  a high-density, 3.5-inch  floppy disk
placed in drive B:


  /etc/fdformat -a /dev/fva1
/etc/badscan -v -o proto /dev/fva1 2880
  /etc/mkfs /dev/fva1 proto
           rm proto


In this  example, command  ffddffoorrmmaatt formatted the  disk.  bbaaddssccaann
then scanned  the disk for any bad blocks,  and wrote its results
into file  pprroottoo. Finally, command mmkkffss reads  pprroottoo and used its
contents to create a COHERENT file system on the disk.

Now that the  file system is created on the  disk, you must mount
it.  While it is  customary to mount file systems under directory
`/', you are  not required to do it.  For  example, if your login
identifier is ffrreedd and  your home directory is /uussrr/ffrreedd, you can
mount  the  floppy  disk's file  system  onto  a subdirectory  of
/uussrr/ffrreedd and so make the floppy disk, in effect, an extension of
your home directory.  The following command does this for the 3.-
5-inch disk we formatted in the above example:


/etc/mount /dev/fva1 /usr/fred/temp


Now, all  files you copy into  directory /uussrr/ffrreedd/tteemmpp using the
ccpp command  will be written directly onto  the floppy disk.  Note
that you  may need to  log in as  the superuser rroooott  and use the
command cchhoowwnn  to ensure that  ffrreedd owns the file  system on that
floppy disk.  For details on cchhoowwnn, see its entry in the Lexicon.

One last  point about mounting file systems:  before you remove a
COHERENT-formatted floppy disk from its drive, you mmuusstt first use
the command  /eettcc/uummoouunntt to unmount  its file system.   If you do
not, all data that COHERENT has stored in its buffers will not be
written to the  disk, and may be lost.  Worse,  if you remove one
COHERENT disk and  insert another without unmounting the old disk
and mounting  the new  one, COHERENT will  write all data  in its
buffers  onto the  new  disk without  regard for  what that  disk
contains; in  all likelihood, this will trash  the file system on
the new disk and render  its data unreadable.  So, the lesson is:
_a_l_w_a_y_s _u_n_m_o_u_n_t  _a _f_l_o_p_p_y _d_i_s_k _b_e_f_o_r_e _y_o_u  _r_e_m_o_v_e _i_t!.  To unmount
the floppy disk we used in our previous example, use the command:





COHERENT Lexicon                                           Page 3




floppy disks          Technical Information          floppy disks



    /etc/umount /dev/fva1


By the  way, that's  not a misprint:  the command is  uummoouunntt, not
``unmount''.

***** Raw Format *****

Finally, COHERENT lets you use  floppy disks in their raw form as
a backup medium, much as you  would use magnetic tape on a larger
computer.  You  must first use  the command ffddffoorrmmaatt  with the -vv
option to format  the floppy disks you will be  using; it is also
wise to label  and number the disks so you  can keep them in some
reasonable order.   Then you can use  any of COHERENT's archiving
utilities, such as uussttaarr, ccppiioo, or dduummpp to archive directories or
entire file  systems onto the disks.  It  is recommended that you
format a generous supply of floppy disks before you begin; if you
run short  of disks while archiving your files,  you will have to
abort, format more disks, and begin again.  For details on how to
use the  archiving programs, see their  respective entries in the
Lexicon.

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

bbaaddssccaann, ccppiioo,  ddooss, dduummpp,  ffdd, ffddffoorrmmaatt, mmkkffss,  mmoouunntt, tteecchhnniiccaall
iinnffoorrmmaattiioonn, uummoouunntt, uussttaarr































COHERENT Lexicon                                           Page 4


