summaryrefslogtreecommitdiff
path: root/usr/src/man/man7d/fd.7d
blob: ecd82a7be6a3c4d30e711aa1cb79726e383e4831 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
'\" te
.\"  Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH FD 7D "Mar 2, 2007"
.SH NAME
fd, fdc \- drivers for floppy disks and floppy disk controllers
.SH SYNOPSIS
.SS "SPARC"
.LP
.nf
\fB/dev/diskette0\fR
.fi

.LP
.nf
\fB/dev/rdiskette0\fR
.fi

.SS "x86"
.LP
.nf
\fB/dev/diskette[0-1]\fR
.fi

.LP
.nf
\fB/dev/rdiskette[0-1]\fR
.fi

.SH DESCRIPTION
.sp
.LP
The \fBfd\fR and \fBfdc\fR drivers provide the interfaces to floppy disks using
the Intel 8272, Intel 82077, NEC 765, or compatible disk controllers on x86
based systems.
.sp
.LP
The default partitions for the floppy driver are:
.sp
.ne 2
.na
\fBa\fR
.ad
.RS 5n
All cylinders except the last
.RE

.sp
.ne 2
.na
\fBb\fR
.ad
.RS 5n
Only the last cylinder
.RE

.sp
.ne 2
.na
\fBc\fR
.ad
.RS 5n
Entire diskette
.RE

.sp
.LP
The \fBfd\fR driver autosenses the density of the diskette.
.sp
.LP
When the floppy is first opened the driver looks for a SunOS label in logical
block 0 of the diskette. If attempts to read the SunOS label fail, the open
will fail. If block 0 is read successfully but a SunOS label is not found,
auto-sensed geometry and default partitioning are assumed.
.sp
.LP
The \fBfd\fR driver supports both block and raw interfaces.
.sp
.LP
The block files (\fB/dev/diskette*\fR) access the diskette using the system's
normal buffering mechanism and may be read and written without regard to
physical diskette records.
.sp
.LP
There is also a raw (\fB/dev/rdiskette*\fR) interface that provides for direct
transmission between the diskette and the user's read or write buffer. A single
\fBread\fR(2) or \fBwrite\fR(2) call usually results in one I/O operation;
therefore raw I/O is considerably more efficient when larger blocking factors
are used. A blocking factor of no less than 8 Kbytes is recommended. See the
Notes section, below, for information on the number of sectors per track.
.SS "3.5" Diskettes"
.sp
.LP
For 3.5" double-sided diskettes, the following densities are supported:
.SS "SPARC"
.sp
.ne 2
.na
\fB1.7 Mbyte density\fR
.ad
.RS 21n
80 cylinders, 21 sectors per track, 1.7 Mbyte capacity
.RE

.sp
.ne 2
.na
\fBhigh density\fR
.ad
.RS 21n
80 cylinders, 18 sectors per track, 1.44 Mbyte capacity
.RE

.sp
.ne 2
.na
\fBdouble density\fR
.ad
.RS 21n
80 cylinders, 9 sectors per track, 720 Kbyte capacity
.RE

.SS "x86"
.sp
.ne 2
.na
\fBextended density\fR
.ad
.RS 21n
80 cylinders, 36 sectors per track, 2.88 Mbyte capacity
.RE

.sp
.ne 2
.na
\fB1.7 Mbyte density\fR
.ad
.RS 21n
80 cylinders, 21 sectors per track, 1.7 Mbyte capacity
.RE

.sp
.ne 2
.na
\fBhigh density\fR
.ad
.RS 21n
80 cylinders, 18 sectors per track, 1.44 Mbyte capacity
.RE

.sp
.ne 2
.na
\fBdouble density\fR
.ad
.RS 21n
80 cylinders, 9 sectors per track, 760 Kbyte capacity
.RE

.SS "5.25" Diskettes"
.sp
.LP
For 5.25" double-sided diskettes on x86 platforms, the densities listed below
are supported:
.SS "SPARC"
.sp
.LP
5.25" diskettes are not supported on SPARC platforms.
.SS "x86"
.sp
.ne 2
.na
\fBhigh density\fR
.ad
.RS 18n
80 cylinders, 15 sectors per track, 1.2 Mbyte capacity
.RE

.sp
.ne 2
.na
\fBdouble density\fR
.ad
.RS 18n
40 cylinders, 9 sectors per track, 360 Kbyte capacity
.RE

.sp
.ne 2
.na
\fBdouble density\fR
.ad
.RS 18n
40 cylinders, 8 sectors per track, 320 Kbyte capacity
.RE

.sp
.ne 2
.na
\fBquad density\fR
.ad
.RS 18n
80 cylinders, 9 sectors per track, 720 Kbyte capacity
.RE

.sp
.ne 2
.na
\fBdouble density\fR
.ad
.RS 18n
40 cylinders, 16 sectors per track (256 bytes per sector), 320 Kbyte capacity
.RE

.sp
.ne 2
.na
\fBdouble density\fR
.ad
.RS 18n
40 cylinders, 4 sectors per track (1024 bytes per sector), 320 Kbyte capacity
.RE

.SH ERRORS
.sp
.ne 2
.na
\fB\fBEBUSY\fR\fR
.ad
.RS 10n
During opening, the partition has been opened for exclusive access and another
process wants to open the partition. Once open, this error is returned if the
floppy disk driver attempted to pass a command to the floppy disk controller
when the controller was busy handling another command. In this case, the
application should try the operation again.
.RE

.sp
.ne 2
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
An invalid address was specified in an ioctl command (see \fBfdio\fR(7I)).
.RE

.sp
.ne 2
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
The number of bytes read or written is not a multiple of the diskette's sector
size. This error is also returned when an unsupported command is specified
using the \fBFDIOCMD\fR ioctl command (see \fBfdio\fR(7I)).
.RE

.sp
.ne 2
.na
\fB\fBEIO\fR\fR
.ad
.RS 10n
During opening, the diskette does not have a label or there is no diskette in
the drive. Once open, this error is returned if the requested I/O transfer
could not be completed.
.RE

.sp
.ne 2
.na
\fB\fBENOSPC\fR\fR
.ad
.RS 10n
An attempt was made to write past the end of the diskette.
.RE

.sp
.ne 2
.na
\fB\fBENOTTY\fR\fR
.ad
.RS 10n
The floppy disk driver does not support the requested ioctl functions (see
\fBfdio\fR(7I)).
.RE

.sp
.ne 2
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
The floppy disk device does not exist or the device is not ready.
.RE

.sp
.ne 2
.na
\fB\fBEROFS\fR\fR
.ad
.RS 10n
The floppy disk device is opened for write access and the diskette in the drive
is write protected.
.RE

.SS "x86 Only"
.sp
.ne 2
.na
\fB\fBENOSYS\fR\fR
.ad
.RS 10n
The floppy disk device does not support the requested ioctl function (
\fBFDEJECT\fR).
.RE

.SH X86 CONFIGURATION
.sp
.LP
The driver attempts to initialize itself using the information found in the
configuration file, \fB/platform/i86pc/kernel/drv/fd.conf\fR.
.sp
.in +2
.nf
name="fd"  parent="fdc"  unit=0;
name="fd"  parent="fdc"  unit=1;
.fi
.in -2

.SH FILES
.SS "SPARC"
.sp
.ne 2
.na
\fB\fB/platform/sun4u/kernel/drv/fd\fR\fR
.ad
.sp .6
.RS 4n
driver module
.RE

.sp
.ne 2
.na
\fB\fB/usr/include/sys/fdreg.h\fR\fR
.ad
.sp .6
.RS 4n
structs and definitions for Intel 82072 and 82077 controllers
.RE

.sp
.ne 2
.na
\fB\fB/usr/include/sys/fdvar.h\fR\fR
.ad
.sp .6
.RS 4n
structs and definitions for floppy drivers
.RE

.sp
.ne 2
.na
\fB\fB/dev/diskette\fR\fR
.ad
.sp .6
.RS 4n
device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/diskette0\fR\fR
.ad
.sp .6
.RS 4n
device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rdiskette\fR\fR
.ad
.sp .6
.RS 4n
raw device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rdiskette0\fR\fR
.ad
.sp .6
.RS 4n
raw device file
.RE

.SS "For ucb Compatibility"
.sp
.ne 2
.na
\fB\fB/dev/fd0[a-c]\fR\fR
.ad
.RS 24n
block file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rfd0[a-c]\fR\fR
.ad
.RS 24n
raw file
.RE

.sp
.ne 2
.na
\fB\fB/dev/diskette0\fR\fR
.ad
.RS 24n
directory containing volume management character device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rdiskette0\fR\fR
.ad
.RS 24n
directory containing the volume management raw character device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/aliases/floppy0\fR\fR
.ad
.RS 24n
symbolic link to the entry in \fB/dev/rdiskette0\fR
.RE

.SS "x86"
.sp
.ne 2
.na
\fB\fB/platform/i86pc/kernel/drv/fd\fR\fR
.ad
.sp .6
.RS 4n
driver module
.RE

.sp
.ne 2
.na
\fB\fB/platform/i86pc/kernel/drv/fd.conf\fR\fR
.ad
.sp .6
.RS 4n
configuration file for floppy driver
.RE

.sp
.ne 2
.na
\fB\fB/platform/i86pc/kernel/drv/fdc\fR\fR
.ad
.sp .6
.RS 4n
floppy-controller driver module
.RE

.sp
.ne 2
.na
\fB\fB/platform/i86pc/kernel/drv/fdc.con\fRf\fR
.ad
.sp .6
.RS 4n
configuration file for the floppy-controller
.RE

.sp
.ne 2
.na
\fB\fB/usr/include/sys/fdc.h\fR\fR
.ad
.sp .6
.RS 4n
structs and definitions for x86 floppy devices
.RE

.sp
.ne 2
.na
\fB\fB/usr/include/sys/fdmedia.h\fR\fR
.ad
.sp .6
.RS 4n
structs and definitions for x86 floppy media
.RE

.SS "x86 First Drive"
.sp
.ne 2
.na
\fB\fB/dev/diskette\fR\fR
.ad
.RS 19n
device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/diskette0\fR\fR
.ad
.RS 19n
device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rdiskette\fR\fR
.ad
.RS 19n
raw device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rdiskette0\fR\fR
.ad
.RS 19n
raw device file
.RE

.SS "For ucb Compatibility"
.sp
.ne 2
.na
\fB\fB/dev/fd0[a-c]\fR\fR
.ad
.RS 24n
block file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rfd0[a-c]\fR\fR
.ad
.RS 24n
raw file
.RE

.sp
.ne 2
.na
\fB\fB/dev/diskette0\fR\fR
.ad
.RS 24n
directory containing volume management character device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rdiskette0\fR\fR
.ad
.RS 24n
directory containing the volume management raw character device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/aliases/floppy0\fR\fR
.ad
.RS 24n
symbolic link to the entry in /dev/rdiskette0
.RE

.SS "x86 Second Drive"
.sp
.ne 2
.na
\fB\fB/dev/diskette1\fR\fR
.ad
.RS 19n
device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rdiskette1\fR\fR
.ad
.RS 19n
raw device file
.RE

.SS "For ucb Compatibility"
.sp
.ne 2
.na
\fB\fB/dev/fd1[a-c]\fR\fR
.ad
.RS 24n
block file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rfd1[a-c]\fR\fR
.ad
.RS 24n
raw file
.RE

.sp
.ne 2
.na
\fB\fB/dev/diskette1\fR\fR
.ad
.RS 24n
directory containing volume management character device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/rdiskette1\fR\fR
.ad
.RS 24n
directory containing the volume management raw character device file
.RE

.sp
.ne 2
.na
\fB\fB/dev/aliases/floppy1\fR\fR
.ad
.RS 24n
symbolic link to the entry in \fB/dev/rdiskette1\fR
.RE

.SH SEE ALSO
.sp
.LP
\fBfdformat\fR(1), \fBdd\fR(1M), \fBdrvconfig\fR(1M), \fBread\fR(2),
\fBwrite\fR(2), \fBdriver.conf\fR(4), \fBdkio\fR(7I) \fBfdio\fR(7I)
.SH DIAGNOSTICS
.SS "All Platforms"
.sp
.ne 2
.na
\fB\fBfd<n>: <command name> failed (<sr1> <sr2> <sr3>)\fR\fR
.ad
.sp .6
.RS 4n
The <command name> failed after several retries on drive <n>. The three hex
values in parenthesis are the contents of status register 0, status register 1,
and status register 2 of the Intel 8272, the Intel 82072, and the Intel 82077
Floppy Disk Controller on completion of the command, as documented in the data
sheet for that part. This error message is usually followed by one of the
following, interpreting the bits of the status register:
.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBnot writable\fR
.RE

.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBcrc error blk <block number>\fR
.sp
There was a data error on <block number>.
.RE

.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBbad format\fR
.RE

.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBtimeout\fR
.RE

.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBdrive not ready\fR
.RE

.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBunformatted diskette or no diskette in drive\fR
.RE

.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBblock <block number> is past the end!\fR
.sp
\fB(nblk=<total number of blocks>)\fR
.sp
The operation tried to access a block number that is greater than the total
number of blocks.
.RE

.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBb_bcount 0x<op_size> not % 0x<sect_size>\fR
.sp
The size of an operation is not a multiple of the sector size.
.RE

.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBoverrun/underrun\fR
.RE

.sp
.ne 2
.na
\fB\fBfd<\fR\fIn\fR\fB>:\fR\fR
.ad
.RS 10n
\fBhost bus error\fR. There was a hardware error on a system bus.
.RE

.RE

.SS "SPARC Only"
.sp
.LP
Overrun/underrun errors occur when accessing a diskette while the system is
heavily loaded. Decrease the load on the system and retry the diskette access.
.SH NOTES
.sp
.LP
3.5" high density diskettes have 18 sectors per track and 5.25" high density
diskettes have 15 sectors per track. They can cross a track (though not a
cylinder) boundary without losing data, so when using \fBdd\fR(1M) or
\fBread\fR(2)/\fBwrite\fR(2) calls to or from the raw diskette, you should
specify \fBbs=18k\fR or multiples thereof for 3.5" diskettes, and \fBbs=15k\fR
or multiples thereof for 5.25" diskettes.
.sp
.LP
The SPARC \fBfd\fR driver is \fInot\fR an unloadable module.
.sp
.LP
Under Solaris (x86 Edition), the configuration of the floppy drives is
specified in \fBCMOS\fR configuration memory. Use the \fBBIOS\fR setup program
for the system to define the diskette size and density/capacity for each
installed drive. Note that \fBMS-DOS\fR may operate the floppy drives
correctly, even though the \fBCMOS\fR configuration may be in error. Solaris
(x86 Edition) relies on the \fBCMOS\fR configuration to be accurate.