*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> fdcontrol (8)              
Title
Content
Arch
Section
 

FDCONTROL(8)

Contents


NAME    [Toc]    [Back]

     fdcontrol -- display and modify floppy disk parameters

SYNOPSIS    [Toc]    [Back]

     fdcontrol [-F] [-d dbg] [-f fmt] [-s fmtstr] [-v] device

DESCRIPTION    [Toc]    [Back]

     The fdcontrol utility allows the modification of the run-time behavior of
     the fdc(4) driver for the device specified by device.

     Commands are implemented to query the current device density settings as
     well as the underlying device hardware as registered with the driver, to
     manipulate debugging levels, and to adjust the device density settings.
     All the operations that manipulate the kernel settings are restricted to
     the superuser (by the device driver), while all inquiry requests only
     require read access to device.

     The device argument should always be given as a full path name, e.g.
     /dev/fd0.

   Inquiry Commands    [Toc]    [Back]
     Running the fdcontrol utility without any of the optional flags will
     report the drive type that is registered with the device driver.  In the
     shortest form, a single string describing the drive type will be
     returned.	Possible values are: ``360K'', ``1.2M'', ``720K'', ``1.44M'',
     ``2.88M'', or ``unknown''.  This information is primarily intended to be
     easily parsable by scripts.

     In order to add some descriptive text that makes the output better human
     readable, the flag -v can be added.

     Specifying flag -F will report the device's density settings in a form
     that is suitable as input to the -s fmtstr option (see below).  Again,
     together with -v, some more text will be returned, including the total
     capacity of the density settings in kilobytes.

   Debug Control    [Toc]    [Back]
     If the fdc(4) driver was configured with the FDC_DEBUG option, by
     default, device debugging information is still disabled since it could
     produce huge amounts of kernel messages.  It needs to be turned on using
     fdcontrol together with ``-d 1'', usually immediately before starting an
     operation on the respective device the debug information is wanted for,
     and later turned off again using ``-d 0''.  Note that debugging levels
     are a driver's global option that will affect any drives and controllers
     using the fdc(4) driver, regardless which device was specified on the
     fdcontrol command line.

   Density Control    [Toc]    [Back]
     The fdc(4) control utilities support two different options how to specify
     device density settings.  The first form uses -f fmt to specify the format
 of the medium in kilobytes.  Depending on the underlying drive type,
     the value is compared against a table of known commonly used device density
 settings for that drive, and if a match is found, those settings
     will be used.  Currently, the following values for the respective drive
     types are acceptable:

     2.88M and 1.44M drives:
	   KB	  sectrac   secsize   ncyls   speed   heads   flags
	   1721   21	    2 (512)   82      500     2       MFM
	   1476   18	    2 (512)   82      500     2       MFM
	   1440   18	    2 (512)   80      500     2       MFM
	   1200   15	    2 (512)   80      500     2       MFM
	    820   10	    2 (512)   82      250     2       MFM

	    800   10	    2 (512)   80      250     2       MFM
	    720   9	    2 (512)   80      250     2       MFM

     1.2M drives:
	   KB	  sectrac   secsize    ncyls   speed   heads   flags
	   1200   15	    2 (512)    80      500     2       MFM
	   1232   8	    3 (1024)   77      500     2       MFM
	   1476   18	    2 (512)    82      500     2       MFM
	   1440   18	    2 (512)    80      500     2       MFM
	   1200   15	    2 (512)    80      500     2       MFM
	    820   10	    2 (512)    82      300     2       MFM
	    800   10	    2 (512)    80      300     2       MFM
	    720   9	    2 (512)    80      300     2       MFM
	    360   9	    2 (512)    40      300     2       MFM,2STEP
	    640   8	    2 (512)    80      300     2       MFM

     720K drives:
	   KB	 sectrac   secsize   ncyls   speed   heads   flags
	   720	 9	   2 (512)   80      250     2	     MFM

     360K drives:
	   KB	 sectrac   secsize   ncyls   speed   heads   flags
	   360	 9	   2 (512)   40      250     2	     MFM

     The second form to specify a device density uses -s fmtstr to explicitly
     specify each parameter in detail.	The argument fmtstr is a comma-separated
 list of values of the form:

     sectrac,secsize,datalen,gap,ncyls,speed,heads,f_gap,f_inter,offs2,flags

     The meaning of the parameters is:

     sectrac  The number of sectors per track.

     secsize  The sector size code, 0 = 128 bytes (or less), 1 = 256 bytes, 2
	      = 512 bytes, 3 = 1024 bytes.

     datalen  The actual sector size if the size code is 0, or the (ignored)
	      value 0xFF for larger size codes.

     gap      The length of the gap 3 parameter for read/write operations.

     ncyls    The number of cylinders.

     speed    The transfer speed in kilobytes per second.  Can be 250, 300,
	      500, or 1000, but each drive type only supports a subset of
	      these values.

     heads    The number of heads.

     f_gap    The length of the gap 3 when formatting media.

     f_inter  The sector interleave to be applied when formatting.  0 means no
	      interleave, 1 means 1:1 etc.

     offs2    The offset of the sector numbers on side 2 (i.e. head number 1).
	      Normally, sector numbering on both sides starts with 1.

     flags    A list from one of the following flag values:

	      +mfm	Use MFM encoding.
	      -mfm	Use FM (single-density) encoding.
	      +2step	Use 2 steps per each cylinder (for accessing 40-cylinder
 media in 80-cylinder drives).
	      -2step	Do not use 2 steps per cylinder, i.e. access each
			physical cylinder of the drive.
	      +perpend	Use perpendicular recording (for 2.88 MB media, currently
 not supported).
	      -perpend	Use longitudinal recording.

     For any missing parameter, the current value will be used, so only actual
     changes need to be specified.  Thus to turn off a flag bit (like +mfm
     which is the default for all drive types), the form with a leading minus
     sign must explicitly be used.

EXAMPLES    [Toc]    [Back]

     A simple inquiry about the drive type:

     $ fdcontrol /dev/fd0
     1.44M

     Same as above, but with verbose output.  Note that the result is about
     the drive type, as opposed to a device density, so it is independent from
     the actual subdevice being used for device.

     $ fdcontrol -v /dev/fd1.360
     /dev/fd1.360: 1.2M drive (5.25" high-density)

     Inquiry about the density settings of a particular subdevice.

     $ fdcontrol -F /dev/fd0.720
     18,512,0xff,0x1b,80,500,2,0x6c,1,0,+mfm

     Note that just accessing a new subdevice for the first time will clone
     this device using the default density settings for the drive type, as
     explained in fdc(4).  Thus, albeit the device name in the example above
     suggests a 720 KB media density, it has actually been initialized (by the
     driver) to 1440 KB.  So, in order to adjust it for standard 720 KB double-density
 media, one of the following fdcontrol commands needs to be
     run:

     # fdcontrol -s 9,,,0x20,,250,,0x50 /dev/fd0.720
     # fdcontrol -f 720 /dev/fd0.720

     As indicated, trailing commas in the parameter list may be omitted.

     In order to access archaic 160 KB single-density (FM encoded) 5.25 media
     in a modern 1.2M drive, something like the following definition would be
     needed.  (Note that not all controller hardware is actually capable of
     handling FM encoding at all.)

     # fdcontrol -s 16,128,0x80,0x2,40,300,,0x10,,,-mfm,+2step /dev/fd1.1

SEE ALSO    [Toc]    [Back]

      
      
     fdc(4)

HISTORY    [Toc]    [Back]

     The fdcontrol utility appeared in FreeBSD 2.0, and was vastly overhauled
     in FreeBSD 5.0.

AUTHORS    [Toc]    [Back]

     The program and this man page was contributed by Jorg Wunsch, Dresden.


FreeBSD 5.2.1		       December 25, 2001		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
fd Linux floppy disk device
fd Tru64 Floppy disk interface
fdformat Linux Low-level formats a floppy disk
rx OpenBSD DEC RX02 floppy disk interface
fdc FreeBSD PC architecture floppy disk controller driver
floppy HP-UX direct flexible or ``floppy'' disk access
picobsd FreeBSD floppy disk based FreeBSD system
fdc OpenBSD NEC765 compatible floppy disk driver
smfd IRIX driver for SCSI floppy and floptical disk drives
dvhtool IRIX modify and obtain disk volume header information
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service