[0m


SCSIDM(8)	    UNIX Programmer's Manual		SCSIDM(8)



[1mNAME
     [0mscsidm - configure a Direct Access SCSI device

[1mSYNOPSIS
     /etc/scsidm [0m[ _d_e_v_i_c_e ] [ _c_o_m_m_a_n_d [ _a_r_g_u_m_e_n_t... ] ]

[1mDESCRIPTION
     [0m_S_c_s_i_d_m is used by the system administrator to configure SCSI
     devices.  Although it is mainly intended for use with Direct
     Access class devices, _s_c_s_i_d_m also provides a limited subset
     of commands for all other device classes.	Device class Opt-
     ical Memory is treated as a synonym for Direct Access.

     _S_c_s_i_d_m may be used to:

     o+	  list active devices on the SCSI bus

     o+	  format a device,

     o+	  verify a device,

     o+	  divide the disk between RISC OS and RISCiX,

     o+	  create & manipulate partition tables,

     o+	  associate textual names with RISCiX partitions,

     o+	  define and list defective data blocks,

     o+	  run a set of diagnostic routines,

     o+	  read/write mode sense/select data.

     Without any arguments, _s_c_s_i_d_m will prompt for commands from
     the standard input.  If arguments are supplied, _s_c_s_i_d_m
     interprets the first argument as a device, the second as a
     command, and all remaining arguments as parameters to the
     command.  The standard input may be redirected, causing
     _s_c_s_i_d_m to read commands from a file.

     If _s_c_s_i_d_m prompts for a command, any necessary parameters
     may be passed with the command; if they are not, _s_c_s_i_d_m will
     prompt for them.  Whenever _s_c_s_i_d_m prompts for input, enter-
     ing `help' or `?' should produce a few lines of context sen-
     sitive help, after which _s_c_s_i_d_m re-prompts for the input.
     Commands may be abbreviated; the following is the list of
     recognised commands:

     [1mquit
	  [0mLeave _s_c_s_i_d_m.

     [1m? [0m[ _c_o_m_m_a_n_d ... ]



Printed 8/7/99	    Revision 1.5 of 08/08/90			1






SCSIDM(8)	    UNIX Programmer's Manual		SCSIDM(8)



     [1mhelp [0m[ _c_o_m_m_a_n_d ... ]
	  Print a short description of each _c_o_m_m_a_n_d specified in
	  the argument list, or, if no arguments are given, a
	  list of the recognised commands.

     [1mdevice [0m[ _d_e_v_n_a_m_e ]
	  Select _d_e_v_n_a_m_e as the current device, or, if no argu-
	  ment is given, print the current device.  If _d_e_v_n_a_m_e
	  does not contain any pathname separators (`/'), _s_c_s_i_d_m
	  will prepend the default device pathname of `/dev',
	  i.e.

			 [1mdevice rsd0h

	  [0mis identical to

			 [1mdevice /dev/rsd0h

	  [0mbut
			 [1mdevice expcards/rct

	  [0mwill not be expanded.

	  _D_e_v_n_a_m_e must be a character special file for a device
	  that uses the SCSI expansion card.  If the device is a
	  Winchester disk, then _d_e_v_n_a_m_e must also reference a
	  valid partition on that device.  In the absence of any
	  other choice, use the ALL partition (partition 7) which
	  is always valid.

     [1mdiagnose
	  [0mAsks the current device to run a set of internal diag-
	  nostics.  The results can be no more sophisticated than
	  either `pass', or `fail' with an appropriate error code
	  returned by the device.

     [1mformat [0m[ _d_e_f_e_c_t_s [ _i_n_t_e_r_l_e_a_v_e ] ]
	  Format the current device using the given _i_n_t_e_r_l_e_a_v_e.
	  _D_e_f_e_c_t_s is a yes/no boolean which indicates whether the
	  current grown list of defects (GLIST) is to be
	  preserved.  _F_o_r_m_a_t will ask for confirmation before the
	  command is started, this has to be given in response to
	  a prompt, it cannot be passed as an argument.

     [1mmapdefects [0m[ _f_n_a_m_e [ _t_r_u_n_c_a_t_e ] ]
	  Add the list of (hexadecimal) bad block numbers in
	  _f_n_a_m_e to the GLIST.  _T_r_u_n_c_a_t_e is a yes/no boolean sig-
	  nalling whether or not to truncate the list of defects
	  in _f_n_a_m_e; this is usually a good idea, as the blocks
	  are no longer defective once they have been mapped out.

     [1mmkdisktab [0m[ _f_n_a_m_e ]



Printed 8/7/99	    Revision 1.5 of 08/08/90			2






SCSIDM(8)	    UNIX Programmer's Manual		SCSIDM(8)



	  Write a sample /etc/disktab entry out to the file
	  _f_n_a_m_e.  This entry specifies the disk shape and size of
	  all valid partitions; it is not a good idea to specify
	  /etc/disktab as _f_n_a_m_e, because all existing entries
	  will be lost: it is up to the user to integrate this
	  sample entry into /etc/disktab in a sensible manner.

     [1mnamepart [0m[ _p_t_l_i_s_t [ _t_e_x_t ... ] ]
	  Define new text strings for the partitions named in
	  _p_t_l_i_s_t.

     [1mpartition [0m[ _p_t_l_i_s_t [ _s_i_z_e_s ] ]
	  Write the RISCiX partition table.  _P_t_l_i_s_t specifies
	  which partitions are to be defined, and _s_i_z_e_s is a list
	  of start block and length for each partition in _p_t_l_i_s_t.
	  Note that the start of a partition is measured from
	  block 0 on the disk, not the first block of the RISCiX
	  area.

	  When setting up a new disk, the size of the RISCiX area
	  must have been specified with the [1msection [0mcommand
	  before using [1mpartition[0m.

     [1mprdefects
	  [0mPrint the GLIST for the current device.

     [1mprptable
	  [0mPrint the RISCiX partition table, and a map of the disk
	  space occupied by all defined partitions.

     [1mprobe
	  [0mPrint a list of SCSI devices attached to the system.

     [1mscanptable
	  [0mIntended for use when the partition table gets cor-
	  rupted, this command reads [1mevery [0mblock on the disk,
	  looking for spare copies of the partition table which
	  are written by the _p_a_r_t_i_t_i_o_n command, separate tables
	  being identified by a timestamp.  When the scan is com-
	  plete, _s_c_a_n_p_t_a_b_l_e lists all blocks which look like a
	  partition table (i.e. have the correct magic number).
	  It then provides the capability to inspect these tables
	  in greater detail, and then choose one as the replace-
	  ment for the lost / corrupt table.

     [1msection [0m[ _d_u_a_l [ _r_s_i_z_e ] ]
	  Divide the disk between RISC OS and RISCiX.  If the
	  boolean _d_u_a_l is `no', then the entire disk is used for
	  RISC OS.  If, however, _d_u_a_l is `yes', then _r_s_i_z_e
	  defines the number of blocks allocated to RISC OS.
	  _R_s_i_z_e is rounded up to an integer number of complete
	  cylinders (an historical restriction imposed by RISC



Printed 8/7/99	    Revision 1.5 of 08/08/90			3






SCSIDM(8)	    UNIX Programmer's Manual		SCSIDM(8)



	  OS), and the rest of the disk is allocated to RISCiX.

     [1msensemode [0m[ _p_a_g_e_s [  _p_a_g_n_o [ _r_t_y_p_e ] ] ]
	  This command provides an interface to the SCSI mode
	  sense command.  _P_a_g_e_s is a yes/no boolean signalling
	  whether or not to work with the CCS-4.B standard for
	  page formats: stating `no' restricts the command to
	  those bytes defined in the mode sense parameter list.
	  If _p_a_g_e_s is `yes', then _p_a_g_n_o gives the page number,
	  while _r_t_y_p_e can be one of the following:

	       0 - report current values

	       1 - report changeable values

	       2 - report default values

	       3 - report saved values

     [1mselectmode [0m[ _p_a_g_e_s [ _p_a_g_n_o [ _d_o_s_a_v_e [ _b_l_i_s_t  _d_a_t_a ] ] ] ]
	  This command provides an interface to the SCSI mode
	  select command.  _P_a_g_e_s is a yes/no boolean signalling
	  whether or not to work with the CCS-4.B standard for
	  page formats: stating `no' restricts the command to
	  those bytes defined in the mode select parameter list.
	  If _p_a_g_e_s is `yes', then _p_a_g_n_o gives the page number;
	  _d_o_s_a_v_e is a yes/no boolean flagging whether to save the
	  new data, or simply update the current values (a dis-
	  tinction defined by SCSI); _b_l_i_s_t is a comma-separated
	  list of bytes within _p_a_g_n_o to be changed; & _d_a_t_a is a
	  comma-separated list of hexadecimal values for the
	  bytes in _b_l_i_s_t.

     [1mverify [0m[ _n_i_t_e_r [ _a_u_t_o_m_a_p ] ]
	  Verify the current device.  _N_i_t_e_r is the number of
	  iterations for the main verify loop.	If the boolean
	  _a_u_t_o_m_a_p is `yes', then any defects detected will
	  automatically written to the GLIST at the end of the
	  current iteration; if _a_u_t_o_m_a_p is `no', then _v_e_r_i_f_y will
	  report all bad blocks found, but do nothing about them.

[1mSEE ALSO
     [0mmkfs(8), newfs(8), disktab(5), sd(4)

[1mBUGS
     [0mThe maximum interleave allowed on a format is 1 less than
     the number of tracks per sector on the drive.  If mode
     select is used to change the block size on a device, this
     also affects the number of tracks per sector, but neither
     figure changes until the format takes place, and so an
     interleave that was acceptable to the format command may be
     rejected by the device as an `illegal request: illegal field



Printed 8/7/99	    Revision 1.5 of 08/08/90			4






SCSIDM(8)	    UNIX Programmer's Manual		SCSIDM(8)



     in command data block'.






















































Printed 8/7/99	    Revision 1.5 of 08/08/90			5



[0m