DDEFS(1M) (UniSoft Value Added) DDEFS(1M)
NAME
ddefs - disk definition information manager
SYNOPSIS
/etc/ddefs [-dddefsdir] -n[diskname]
/etc/ddefs [-dddefsdir] -erpdiskname
DESCRIPTION
The ddefs utility is used to add to or modify the
information that describes disks. The disk definitions are
contained in files in the /etc/dskdefs directory. The files
in /etc/dskdefs are read by the dinit(1M) program to obtain
format information about the disks.
To specify the directory, use the -d option followed by a
directory name on the command line, as shown in the SYNOPSIS
section. If no ddefsdir is given, the default is
/etc/dskdefs.
The diskname is either a ``device'', specified as
/dev/rdsk/devicename, or a ``ddefs file'' in the directory
ddefsdir.
The ddefs program provides several options both for
interactive and non-interactive use. System V/68 and System
V/88 support only a 182Mb CDC WREN ESDI drive with a MVME323
controller, however this command contains additional options
for other controllers and drives. The options are:
-n [diskname]
(Interactive) Create a new disk definition, where
diskname corresponds to the type values Tisted for
dinit(1M) (e.g., m323182 for a 182Mb CDC ESDI drive).
If a name is given that already exists, the program
automatically shifts to edit mode (-e option). If no
diskname is given, the user is prompted for a name.
When creating a new definition, ddefs will prompt for
the name of a ``template'' disk. The template disk is
usually one with similar, but not identical,
attributes.
Page 1 May 1989
DDEFS(1M) (UniSoft Value Added) DDEFS(1M)
-e diskname
(Interactive) Edit an existing disk definition. If
the diskname given does not exist, the program switches
automatically to create mode (-n option).
-r diskname
(Interactive) Edit an existing disk definition (read-
only).
-p diskname
(Non-interactive) Print an existing disk definition.
For every type of operation, the user has the option of
specifying a directory for the disk definition file. If an
existing definition is being edited, this is the directory
where the definition file can be found. If a new definition
is being created, this is the directory where the definition
file will be placed. It is also the directory where the
template can be found when this feature is used.
Each disk definition is formatted as a series of lines, each
line giving a parameter name followed by a value. To modify
a definition, move the cursor to the appropriate line and
type the new value. When creating a new definition file,
ddefs will not write the definition until all parameters are
initialized (changed).
To obtain ``help'' information about a parameter, type a ?
after the parameter name. The elements of the definition
file and the help information for each are given in the
following paragraphs.
When diskname is a ``ddefs file'', all parameters are
readable and writeable. When diskname is a device, the
following conventions are used to indicate how a parameter
may be accessed: a single asterisk (*) following a parameter
name indicates that the user has read access in interactive
mode; a double asterisk (**) indicates that the parameter
may be read and written in interactive mode; no asterisk
indicates that the parameter is not applicable for a raw
Page 2 May 1989
DDEFS(1M) (UniSoft Value Added) DDEFS(1M)
device (i.e., the parameter exists only in the ddefs file).
Comment
This information is general comments. It cannot
contain more than one line. Usually, the comment
information is a description of the drive type
supported by the definition file. If no comment is
desired, type none.
Disk type**
This value is any unique integer that is used to
identify the disk drive type. Each size drive on each
controller should have a different type.
Format command
The format program, if specified, is called by
dinit(1M) to format a disk drive. The format program
line should specify all options necessary to format the
disk. All drives supported by System V/68 and System
V/88 can be formatted directly by dinit(1M). Therefore
this field should be specified as none.
Diagnostic tracks*
To reserve diagnostic tracks, type yes. If not, type
no.
Bad spot strategy*
If the controller only supports perfect media, type
perfect.
BAD TRACKS: If bad track replacement is done by
the bad track replacement software, type software.
If the controller automatically performs bad track
replacement, type hardware.
BAD SECTORS: If the controller supports automatic
bad sector replacement and requires the cylinder,
head, and sector of each bad sector, then type
sector.
BAD SPOTS: If the controller supports automatic
bad spot replacement and requires the cylinder,
head, and byte offset of each bad spot, then type
Page 3 May 1989
DDEFS(1M) (UniSoft Value Added) DDEFS(1M)
spot.
Maximum number of bad spots
This value is the maximum number of bad spots expected
on a disk of this type. This many alternate spots
(sectors or tracks) will be allocated for this drive.
Number of sectors**
This value is the total number of sectors on the disk
drive.
Sector size (in bytes)**
This value is the disk sector size (specified in
bytes). Currently, it must be 128, 256, or 512 bytes.
Sectors per track**
This value is the number of usable sectors per track on
the formatted media.
Cylinders**
This value is the total number of cylinders on the disk
media.
Heads**
This value is the number of read/write heads on the
drive. It is equivalent to the number of tracks per
cylinder.
Precompensation cylinder**
This value is the disk cylinder number to start write
precompensation.
Sector interleave**
This value is the sector interleave factor used during
disk formatting. For no interleave (or one-to-one
interleave), type 1. Some controllers will
automatically select an appropriate interleave factor
when given an interleave value of 0.
Spiral offset*
Page 4 May 1989
DDEFS(1M) (UniSoft Value Added) DDEFS(1M)
This value is the spiral offset applied when formatting
disks. If no spiral offset is wanted, then type 0.
Step rate**
This value is the seek step rate used when accessing
the disk. Some controllers will automatically select
an appropriate step rate when given a step rate of 0.
Starting head number**
This value is the starting head number of the drive.
Most drives and controllers require a starting head
number of zero.
ECC error length**
This value is the error correcting code data burst
length.
Attributes mask (hex)**
This value is the disk attributes mask. Bits in this
mask determine which bits in the attributes word are
valid.
Extended attributes mask (hex)**
This value is the extended attributes mask.
Attributes word (hex)**
This value is the disk attributes word. The
(hexadecimal) bit definitions are:
NAME BIT FIELD USE BIT OFF BIT ON
ATWAS 0x0400 Alternate sectors? no yes
ATWFS 0x0200 Floppy size 5.25" 8"
ATWPC 0x0100 Precomp style pre-write post-read
ATWSK 0x0080 Seek after head change? no yes
ATWDD 0x0040 Track density of drive single double
ATWEN 0x0020 Encoding method FM MFM
ATWDT 0x0010 Disk type floppy hard
ATWSN 0x0008 Sector Numbering Motorola IBM
Page 5 May 1989
DDEFS(1M) (UniSoft Value Added) DDEFS(1M)
ATWDS 0x0004 Number of sides single double
ATWTD 0x0002 Track density of floppy 8" floppy 5.25" floppy
ATWMF 0x0001 Data density of medium single double
Extended attributes word (hex)**
This value is the extended attributes word.
Gap byte 1 (hex)**
This value is the first `gap byte' required for
formatting a disk. This parameter is controller-and
drive-specific and may not be used by some controllers.
Gap byte 2 (hex)**
This value is the second `gap byte' required for
formatting a disk. This parameter is controller-and
drive-specific and may not be used by some controllers.
Gap byte 3 (hex)**
This value is the third `gap byte' required for
formatting a disk. This parameter is controller-and
drive-specific and may not be used by some controllers.
Gap byte 4 (hex)**
This value is the fourth `gap byte' required for
formatting a disk. This parameter is controller-and
drive-specific and may not be used by some controllers.
Controller attribute (hex)**
This value is controller-and drive-specific information
and may not be used by some controllers.
Unformatted sector size**
This value is the unformatted sector size on the disk
including the headers, gaps, ECC, and data. This
parameter is controller and drive-specific, and may not
be used by some controllers.
Sector slip count**
This value is the sector slip count used while
Page 6 May 1989
DDEFS(1M) (UniSoft Value Added) DDEFS(1M)
formatting to implement controller supported sector
slipping. This count is the number of `slip' sectors
per track.
Slice count*
This value is the dynamic slice count. If zero, the
driver will not use dynamic slicing. Legal non-zero
slice counts are 8, 16, 32, 64, and 128. Some
controllers support only a subset of these legal slice
counts.
Root file system offset*
This value is the 1024-byte block offset of the root
file system.
Root file system size
This value, if non-zero, is the size of the root file
system (in 512-byte blocks) created on slice zero of
the drive after it is formatted. If no file system is
desired, then type 0.
/usr file system size
This value, if non-zero, is the size of the /usr file
system (in 512-byte blocks) created in slice one or two
after the drive is formatted. If no /usr file system
is desired, type 0. The /usr file system is created
only if a root file system is also created.
/usr file system slice
This value specifies the slice for the /usr file
system. This value must not be zero but may coincide
with the swap slice.
Swap size
This value, if non-zero, specifies the size of the
system swap space (in 512-byte blocks). The swap space
will be placed following the root file system if the
swap slice is set to zero. If the swap slice and the
/usr file system slice are both one, swap follows the
/usr file system in slice one.
Page 7 May 1989
DDEFS(1M) (UniSoft Value Added) DDEFS(1M)
Swap slice
This value specifies the swap slice. It may be set to
zero (to share the root file system slice), or to one
(to occupy its own slice or share with the /usr file
system), or to two (to occupy its own slice following
the /usr file system slice).
End-of-disk reserved area
This value is the number of blocks reserved for system
use at the end of the disk. This area may be used for
bad track alternates or for diagnostic tracks.
Alternates list
To add to the alternates list, type add #[-#]. To
delete from the alternates list, type delete #[-#].
The `#' is any non-zero number. The sequence `#-#'
specifies a range of non-zero numbers (including the
end-points). To have no alternates, type none. The
value printed in parentheses is the total number of
alternates in the list.
When creating a disk description using ddefs, the following
information must be given to have dinit(1M) create a slice
table:
⊕ A non-zero slice count; currently restricted to 0, 8,
16, 32, 64, 128.
⊕ The root file system offset.
⊕ The root file system size.
⊕ The size of swap (if any).
⊕ If swap is defined, what slice it resides on (allowable
slices: 0, 1, 2).
⊕ The /usr files system size (if any).
⊕ If /usr is defined, what slice it resides on (allowable
Page 8 May 1989
DDEFS(1M) (UniSoft Value Added) DDEFS(1M)
slices:
0, 1, 2).
⊕ The size of the ``end-of-disk'' reserved area. This
area is used for diagnostic and/or alternate tracks.
FILES
/etc/dskdefs/* disk definition file
SEE ALSO
dinit(1M).
Page 9 May 1989