1fd(7D)                              Devices                             fd(7D)
2
3
4

NAME

6       fd, fdc - drivers for floppy disks and floppy disk controllers
7

SYNOPSIS

9   SPARC
10       /dev/diskette0
11
12
13       /dev/rdiskette0
14
15
16   x86
17       /dev/diskette[0-1]
18
19
20       /dev/rdiskette[0-1]
21
22

DESCRIPTION

24       The fd and fdc drivers provide the interfaces to floppy disks using the
25       Intel 8272, Intel 82077, NEC 765, or compatible disk controllers on x86
26       based systems.
27
28
29       The default partitions for the floppy driver are:
30
31       a    All cylinders except the last
32
33
34       b    Only the last cylinder
35
36
37       c    Entire diskette
38
39
40
41       The fd driver autosenses the density of the diskette.
42
43
44       When  the  floppy is first opened the driver looks for a SunOS label in
45       logical block 0 of the diskette. If attempts to read  the  SunOS  label
46       fail,  the  open will fail. If block 0 is read successfully but a SunOS
47       label is not found, auto-sensed geometry and default  partitioning  are
48       assumed.
49
50
51       The fd driver supports both block and raw interfaces.
52
53
54       The block files (/dev/diskette*) access the diskette using the system's
55       normal buffering mechanism and may be read and written  without  regard
56       to physical diskette records.
57
58
59       There  is  also  a  raw  (/dev/rdiskette*)  interface that provides for
60       direct transmission between the diskette and the user's read  or  write
61       buffer.  A  single  read(2) or write(2) call usually results in one I/O
62       operation; therefore raw I/O is considerably more efficient when larger
63       blocking  factors  are used. A blocking factor of no less than 8 Kbytes
64       is recommended. See the Notes section, below, for  information  on  the
65       number of sectors per track.
66
67   3.5 Diskettes"
68       For 3.5" double-sided diskettes, the following densities are supported:
69
70   SPARC
71       1.7 Mbyte density    80  cylinders,  21  sectors  per  track, 1.7 Mbyte
72                            capacity
73
74
75       high density         80 cylinders, 18 sectors  per  track,  1.44  Mbyte
76                            capacity
77
78
79       double density       80  cylinders,  9  sectors  per  track,  720 Kbyte
80                            capacity
81
82
83   x86
84       extended density     80 cylinders, 36 sectors  per  track,  2.88  Mbyte
85                            capacity
86
87
88       1.7 Mbyte density    80  cylinders,  21  sectors  per  track, 1.7 Mbyte
89                            capacity
90
91
92       high density         80 cylinders, 18 sectors  per  track,  1.44  Mbyte
93                            capacity
94
95
96       double density       80  cylinders,  9  sectors  per  track,  760 Kbyte
97                            capacity
98
99
100   5.25 Diskettes"
101       For 5.25" double-sided diskettes on x86 platforms, the densities listed
102       below are supported:
103
104   SPARC
105       5.25" diskettes are not supported on SPARC platforms.
106
107   x86
108       high density      80  cylinders, 15 sectors per track, 1.2 Mbyte capac‐
109                         ity
110
111
112       double density    40 cylinders, 9 sectors per track, 360 Kbyte capacity
113
114
115       double density    40 cylinders, 8 sectors per track, 320 Kbyte capacity
116
117
118       quad density      80 cylinders, 9 sectors per track, 720 Kbyte capacity
119
120
121       double density    40 cylinders, 16 sectors per  track  (256  bytes  per
122                         sector), 320 Kbyte capacity
123
124
125       double density    40  cylinders,  4  sectors  per track (1024 bytes per
126                         sector), 320 Kbyte capacity
127
128

ERRORS

130       EBUSY     During opening, the partition has been opened  for  exclusive
131                 access  and another process wants to open the partition. Once
132                 open, this error  is  returned  if  the  floppy  disk  driver
133                 attempted  to  pass  a  command to the floppy disk controller
134                 when the controller was busy  handling  another  command.  In
135                 this case, the application should try the operation again.
136
137
138       EFAULT    An  invalid  address  was  specified in an ioctl command (see
139                 fdio(7I)).
140
141
142       EINVAL    The number of bytes read or written is not a multiple of  the
143                 diskette's  sector  size. This error is also returned when an
144                 unsupported command is specified using the FDIOCMD ioctl com‐
145                 mand (see fdio(7I)).
146
147
148       EIO       During  opening,  the diskette does not have a label or there
149                 is no diskette  in  the  drive.  Once  open,  this  error  is
150                 returned  if  the  requested  I/O  transfer could not be com‐
151                 pleted.
152
153
154       ENOSPC    An attempt was made to write past the end of the diskette.
155
156
157       ENOTTY    The floppy disk driver does not support the  requested  ioctl
158                 functions (see fdio(7I)).
159
160
161       ENXIO     The  floppy  disk  device does not exist or the device is not
162                 ready.
163
164
165       EROFS     The floppy disk device is opened for  write  access  and  the
166                 diskette in the drive is write protected.
167
168
169   x86 Only
170       ENOSYS    The  floppy  disk device does not support the requested ioctl
171                 function ( FDEJECT).
172
173

X86 CONFIGURATION

175       The driver attempts to initialize itself using the information found in
176       the configuration file, /platform/i86pc/kernel/drv/fd.conf.
177
178         name="fd"  parent="fdc"  unit=0;
179         name="fd"  parent="fdc"  unit=1;
180
181

FILES

183   SPARC
184       /platform/sun4u/kernel/drv/fd
185
186           driver module
187
188
189       /usr/include/sys/fdreg.h
190
191           structs and definitions for Intel 82072 and 82077 controllers
192
193
194       /usr/include/sys/fdvar.h
195
196           structs and definitions for floppy drivers
197
198
199       /dev/diskette
200
201           device file
202
203
204       /dev/diskette0
205
206           device file
207
208
209       /dev/rdiskette
210
211           raw device file
212
213
214       /dev/rdiskette0
215
216           raw device file
217
218
219   For ucb Compatibility
220       /dev/fd0[a-c]           block file
221
222
223       /dev/rfd0[a-c]          raw file
224
225
226       /dev/diskette0          directory  containing volume management charac‐
227                               ter device file
228
229
230       /dev/rdiskette0         directory containing the volume management  raw
231                               character device file
232
233
234       /dev/aliases/floppy0    symbolic link to the entry in /dev/rdiskette0
235
236
237   x86
238       /platform/i86pc/kernel/drv/fd
239
240           driver module
241
242
243       /platform/i86pc/kernel/drv/fd.conf
244
245           configuration file for floppy driver
246
247
248       /platform/i86pc/kernel/drv/fdc
249
250           floppy-controller driver module
251
252
253       /platform/i86pc/kernel/drv/fdc.conf
254
255           configuration file for the floppy-controller
256
257
258       /usr/include/sys/fdc.h
259
260           structs and definitions for x86 floppy devices
261
262
263       /usr/include/sys/fdmedia.h
264
265           structs and definitions for x86 floppy media
266
267
268   x86 First Drive
269       /dev/diskette      device file
270
271
272       /dev/diskette0     device file
273
274
275       /dev/rdiskette     raw device file
276
277
278       /dev/rdiskette0    raw device file
279
280
281   For ucb Compatibility
282       /dev/fd0[a-c]           block file
283
284
285       /dev/rfd0[a-c]          raw file
286
287
288       /dev/diskette0          directory  containing volume management charac‐
289                               ter device file
290
291
292       /dev/rdiskette0         directory containing the volume management  raw
293                               character device file
294
295
296       /dev/aliases/floppy0    symbolic link to the entry in /dev/rdiskette0
297
298
299   x86 Second Drive
300       /dev/diskette1     device file
301
302
303       /dev/rdiskette1    raw device file
304
305
306   For ucb Compatibility
307       /dev/fd1[a-c]           block file
308
309
310       /dev/rfd1[a-c]          raw file
311
312
313       /dev/diskette1          directory  containing volume management charac‐
314                               ter device file
315
316
317       /dev/rdiskette1         directory containing the volume management  raw
318                               character device file
319
320
321       /dev/aliases/floppy1    symbolic link to the entry in /dev/rdiskette1
322
323

SEE ALSO

325       fdformat(1),  dd(1M), drvconfig(1M), read(2), write(2), driver.conf(4),
326       dkio(7I) fdio(7I)
327

DIAGNOSTICS

329   All Platforms
330       fd<n>: <command name> failed (<sr1> <sr2> <sr3>)
331
332           The <command name> failed after several retries on drive  <n>.  The
333           three hex values in parenthesis are the contents of status register
334           0, status register 1, and status register 2 of the Intel 8272,  the
335           Intel  82072, and the Intel 82077 Floppy Disk Controller on comple‐
336           tion of the command, as documented in the data sheet for that part.
337           This  error  message  is  usually followed by one of the following,
338           interpreting the bits of the status register:
339
340           fd<n>:    not writable
341
342
343           fd<n>:    crc error blk <block number>
344
345                     There was a data error on <block number>.
346
347
348           fd<n>:    bad format
349
350
351           fd<n>:    timeout
352
353
354           fd<n>:    drive not ready
355
356
357           fd<n>:    unformatted diskette or no diskette in drive
358
359
360           fd<n>:    block <block number> is past the end!
361
362                     (nblk=<total number of blocks>)
363
364                     The operation tried to access  a  block  number  that  is
365                     greater than the total number of blocks.
366
367
368           fd<n>:    b_bcount 0x<op_size> not % 0x<sect_size>
369
370                     The  size of an operation is not a multiple of the sector
371                     size.
372
373
374           fd<n>:    overrun/underrun
375
376
377           fd<n>:    host bus error. There was a hardware error  on  a  system
378                     bus.
379
380
381
382   SPARC Only
383       Overrun/underrun  errors occur when accessing a diskette while the sys‐
384       tem is heavily loaded. Decrease the load on the system  and  retry  the
385       diskette access.
386

NOTES

388       3.5"  high  density  diskettes have 18 sectors per track and 5.25" high
389       density diskettes have 15 sectors per track. They  can  cross  a  track
390       (though  not  a  cylinder)  boundary without losing data, so when using
391       dd(1M) or read(2)/write(2) calls to  or  from  the  raw  diskette,  you
392       should  specify  bs=18k  or  multiples  thereof for 3.5" diskettes, and
393       bs=15k or multiples thereof for 5.25" diskettes.
394
395
396       The SPARC fd driver is not an unloadable module.
397
398
399       Under Solaris (x86 Edition), the configuration of the floppy drives  is
400       specified  in CMOS configuration memory. Use the BIOS setup program for
401       the system to define the diskette size and  density/capacity  for  each
402       installed  drive.  Note  that MS-DOS may operate the floppy drives cor‐
403       rectly, even though the CMOS configuration may  be  in  error.  Solaris
404       (x86 Edition) relies on the CMOS configuration to be accurate.
405
406
407
408SunOS 5.11                        2 Mar 2007                            fd(7D)
Impressum