Penguin
Blame: floppycontrol(1)
EditPageHistoryDiffInfoLikePages
Annotated edit history of floppycontrol(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 floppycontrol
2 !!!floppycontrol
3 Name
4 Note
5 Description
6 General Options
7 One time actions
8 Printing current settings
9 Drive type configuration and autodetection
10 Configuration of the disk change line
11 Timing Parameters
12 Debugging messages
13 Error Handling Options
14 Write error reporting
15 Other drive configuration options
16 See Also
17 ----
18 !!Name
19
20
21 floppycontrol - floppy driver configuration utility
22 !!Note
23
24
25 This manpage has been automatically generated from fdutils's
26 texinfo documentation. However, this process is only
27 approximative, and some items, such as crossreferences,
28 footnotes and indices are lost in this translation process.
29 Indeed, these items have no appropriate representation in
30 the manpage format. Moreover, only the items specific to
31 each command have been translated, and the general
32 information about fdutils has been dropped in the manpage
33 version. Thus I strongly advise you to use the original
34 texinfo doc.
35
36
37 *
38
39
40 To generate a printable copy from the texinfo doc, run the
41 following commands:
42
43
44 __ ./configure; make dvi; dvips fdutils.dvi
45 __
46
47
48 *
49
50
51 To generate a html copy, run:
52
53
54 __ ./configure; make html
55 __A premade html can be found at: `http://www.tux.org/pub/knaff/fdutils'
56
57
58 *
59
60
61 To generate an info copy (browsable using emacs' info mode),
62 run:
63
64
65 __ ./configure; make info
66 __
67
68
69 The texinfo doc looks most pretty when printed or as html.
70 Indeed, in the info version certain examples are difficult
71 to read due to the quoting conventions used in
72 info.
73 !!Description
74
75
76 floppycontrol [[-p] [[--pollstate] [[--printfdstate]
77 [[-a ''operation-abort-threshold''] [[-c ''read-track-threshold''
78
79
80 ]
81 [[-r ''recalibrate-threshold''] [[-R ''reset-threshold''
82
83
84 ]
85 [[-e ''reporting-threshold''] [[-f] [[-x] [[-d ''drive''
86
87
88 ][[-F] [[-T]
89 [[-reset ''condition''
90
91
92 ] [[--debug] [[--nodebug] [[--messages]
93 [[--nomessages] [[--broken_dcl] [[--working_dcl] [[--inverted_dcl]
94 [[--no_inverted_dcl] [[--silent_dcl_clear] [[--noisy_dcl_clear]
95 [[-c''cmos-type''] [[-hlt ''hlt''] [[-hut ''hut''] [[-srt ''srt''] [[-o ''spindown''
96
97
98 ]
99 [[-u ''spinup''] [[-s ''select-delay''] [[-rps ''rotations-per-second''
100
101
102 ]
103 [[-O ''spindown-offset''] [[-track ''max-tracks''] [[-timeout ''seconds''
104
105
106 ]
107 [[-C ''check-interval''] [[-n ''native-format''
108
109
110 ]
111 [[-autodetect ''autodetection-sequence''
112
113
114 ] [[-P] [[--clrwerror]
115 [[--printwerror] [[-h]
116
117
118 The floppycontrol program is used to configure the
119 floppy driver.
120 !!General Options
121
122
123 -h
124
125
126 --help
127
128
129 Print a help screen.
130
131
132 -d ''drive''
133
134
135 --drive ''drive''
136
137
138 Selects the drive to configure. The default is drive 0
139 (`/dev/fd0').
140 !!One time actions
141
142
143 The following floppycontrol options don't set a
144 configuration parameter, but perform a one-time action. They
145 are available to anybody who has write access to the
146 drive
147
148
149 -f
150
151
152 --flush
153
154
155 Flushes (throws away) the dirty data buffers associated with
156 this drive.
157
158
159 -x
160
161
162 --eject
163
164
165 Ejects the disk out of the drive (Sparc). The dirty buffers
166 are first committed to disk before ejecting it. Fails if the
167 disk is mounted.
168
169
170 --reset ''condition''
171
172
173 Resets the FDC under ''condition'' . Condition may be one
174 of the following:
175
176
177 0
178
179
180 resets the FDC only if a reset is needed
181 anyways,
182
183
184 1
185
186
187 resets the FDC also if a raw command has been performed
188 since the last reset, and
189
190
191 2
192
193
194 resets the FDC unconditionally.
195
196
197 This command may be needed after some failed raw commands
198 (see section fdrawcmd).
199
200
201 -F
202
203
204 --formatend
205
206
207 Issues an end format ioctl. This might be needed after
208 exiting a fdformat in an unclean way.
209 superformat is not subject to this.
210 !!Printing current settings
211
212
213 -T
214
215
216 --type
217
218
219 Print out the drive name of a floppy device. This is used by
220 the MAKEFLOPPIES script. The drive name is a letter
221 (describing the drive type) followed by the capacity of the
222 format in bytes. The letter is E for 3.5 ED drives, H for
223 3.5 HD drives, D for 3.5 DD drives, h for 5.25 HD drives and
224 d for 5.25 DD drives. The drive type letter corresponds to
225 the oldest drive type supporting the format of this device
226 node (not necessarily the type of the drive refered by this
227 node.) For the generic format nodes (/dev/fd0 et al.) the
228 name of
229 (null).
230
231
232 -p
233
234
235 --print
236
237
238 Prints out the configuration of the drive. The names of the
239 various fields are the same as the names of the option to
240 set them, see below.
241
242
243 -P
244
245
246 --printstate
247
248
249 Prints out the cached internal state of the driver. The
250 first line lists various attributes about the
251 disk:
252
253
254 drive present
255
256
257 disk present
258
259
260 disk writable
261
262
263 These are only updated when the drive is
264 accessed.
265
266
267 spinup
268
269
270 is the time when the motor became switched on for the last
271 time.
272
273
274 select
275
276
277 is the time when the drive became selected for the last
278 time
279
280
281 first_read
282
283
284 is the time when the first read request after the last spin
285 up completed.
286
287
288 probed_fmt
289
290
291 is the the index of the autodetected format in the
292 autodetection sequence for this drive.
293
294
295 cylinder
296
297
298 is the cylinder where the drive head currently sits. If this
299 number is negative, it has the following
300 meaning:
301
302
303 *
304
305
306 -1 means that the driver doesn't know, but the controller
307 does (a seek command must be issued).
308
309
310 *
311
312
313 -2 means that the controller doesn't know either, but is
314 sure that it not beyond the 80th track. The drive needs a
315 recalibration.
316
317
318 *
319
320
321 -3 means that the head may be beyond the 80th track. The
322 drive needs two successive recalibrations, because at each
323 recalibration, the controller only issues 80 move head
324 commands per recalibration.
325
326
327 maxblock
328
329
330 is the highest block number that has been read.
331
332
333 maxcylinder
334
335
336 is a boolean which is set when a sector that is not on
337 cylinder 0/head 0 has been read. These are used for smart
338 invalidation of the buffer cache on geometry change. The
339 buffer cache of the drive is only invalidated on geometry
340 change when this change actually implies that a block that
341 has already been read changes position. This optimization is
342 useful for mtools which changes the geometry after reading
343 the boot sector.
344
345
346 generation
347
348
349 is roughly the number of disk changes noticed since boot.
350 Disk changes are noticed if the disk is actually changed, or
351 if a flush command is issued and for both cases if any I/O
352 to/from the disk occurs. (i.e. if you insert several disks,
353 but don't do any I/O to them, the generation number stays
354 the same.)
355
356
357 refs
358
359
360 is number of open file descriptors for this drive. It is
361 always at least one, because floppycontrol's file descriptor
362 is counted too.
363
364
365 device
366
367
368 is format type (as derived from the minor device number)
369 which is currently being used.
370
371
372 last_checked
373
374
375 is date (in jiffies) when the drive was last checked for a
376 disk change, and a disk was actually in the
377 drive.
378
379
380 --pollstate
381
382
383 Polls the drive and then prints out the internal state of
384 the driver.(--Printstate only prints out the cached
385 information without actually polling the drive for a disk
386 change.)
387
388
389 --printfdcstate
390
391
392 Prints out the state of the controller where the target
393 drive is attached to.
394
395
396 spec1
397
398
399 spec2
400
401
402 are the current values of those registers.
403
404
405 rate
406
407
408 is current data transfer rate
409
410
411 rawcmd
412
413
414 is true if a raw command has been executed since the last
415 reset. If this is the case, a reset will be triggered when a
416 drive on the same FDC is next opened.
417
418
419 dor
420
421
422 is the value of the digital output register. The 4 high bits
423 are a bit mask describing which drives are spinning, the 2
424 low bits describe the selected drive, bit 2 is used to reset
425 the FDC, and bit 3 describes whether this FDC has hold of
426 the interrupt and the DMA. If you have two FDCs, bit 3 is
427 only set on one of them.
428
429
430 version
431
432
433 is the version of the FDC. See
434 `linux/include/linux/fdreg.h' for a listing of the
435 FDC version numbers.
436
437
438 reset
439
440
441 is true if a reset needs to be issued to the FDC before
442 processing the next request.
443
444
445 need_configure
446
447
448 is true if this FDC needs configuration by the
449 FD_CONFIGURE command.
450
451
452 has_fifo
453
454
455 is set if the FDC understands the FD_CONFIGURE
456 command.
457
458
459 perp_mode
460
461
462 describes the perpendicular mode of this FDC. 0 is
463 non-perpendicular mode, 2 is HD perpendicular mode, 3 is ED
464 perpendicular mode, and 1 is unknown.
465
466
467 address
468
469
470 is the address of the first I/O port of the FDC. Normally,
471 this is 0x3f0 for the first FDC and 0x370 for the
472 second.
473 !!Drive type configuration and autodetection
474
475
476 The following options handle the different available drive
477 types, such as double density vs. high density vs. extra
478 density drives, and 5 1/4 drives vs 3 1/2 drives. Usually
479 the drive type is stored in a non-volatile memory, called
480 CMOS, under the form of an integer ranging from 1 to
481 6.
482
483
484 Different drive types are able to handle and autodetect
485 different formats (different autodetection lists). They also
486 have different
487
488
489 These settings are only changeable by the super
490 user.
491
492
493 -c ''cmos-type''
494
495
496 --cmos ''cmos-type''
497
498
499 Set the virtual CMOS type of the floppy drive. This is
500 useful if
501
502
503 *
504
505
506 the physical CMOS type is wrong (this may happen with BIOSes
507 which use a non-standard mapping),
508
509
510 *
511
512
513 you have more than two drives (the physical CMOS may only
514 describe up to two drives).
515
516
517 *
518
519
520 you have a BIOS that allows swapping drives A: and B: for
521 DOS.
522
523
524 Right now, this CMOS parameter is not used by the kernel,
525 except for feeding it back to other applications (for
526 instance superformat, floppymeter or
527 MAKEFLOPPIES). It is also possible to supply a
528 virtual CMOS type with the cmos boot option (see
529 section Boottime configuration). If possible, I recommend
530 you use the boot option, rather than floppycontrol,
531 because the boot option also sets any parameters derived
532 from the CMOS type, such as the autodetection list and the
533 native format, whereas floppycontrol does
534 not.
535
536
537 -A ''autodetect-seq''
538
539
540 --autodetect ''autodetect-seq''
541
542
543 Set the autodetection sequence (see section Autodetection)
544 The autodetection sequence is a comma-separated list of at
545 most eight format descriptors. Each format descriptor is a
546 format number optionally followed by the letter t.
547 For drive 0, the format number is the minor device number
548 divided by 4. The autodetection sequence is used by the
549 driver to find out the format of a newly inserted disk. The
550 formats are tried one after the other, and the first
551 matching format is retained. To test the format, the driver
552 tries to read the first sector on the first track on the
553 first head when t is not given, or the whole first
554 track when t is given. Thus, autodetection cannot
555 detect the number of tracks. However, this information is
556 contained in the boot sector, which is now accessible. The
557 boot sector can then be used by mtools to configure the
558 correct number of tracks.
559
560
561 Example:
562
563
564 __ 7,4,24t,25
565 __means to try out the formats whose minor device numbers are 28 (1.44M), 16 (720KB), 96 (1.76MB), and 100 (1.92MB), in this order. For the 1.76MB format, try to read the whole track at once.
566
567
568 Reading the whole track at once allows you to distinguish
569 between two formats which differ only in the number of
570 sectors. (The format with the most sectors must be tried
571 first.) If you use mtools, you do not need this feature, as
572 mtools can figure out the number of sectors without any help
573 from the floppy driver, by looking at the boot
574 sector.
575
576
577 Reading the whole track at once may also speed up the first
578 read by 200 milliseconds. However, if, on the other hand,
579 you try to read a disk which has less sectors than the
580 format, you lose some time.
581
582
583 I suggest that you put the most often used format in the
584 first place (barring other constraints), as each format that
585 is tried out takes 400 milliseconds.
586
587
588 -n ''native-format''
589
590
591 --native_format ''native-format''
592
593
594 Set the native format of this drive. The native format of a
595 drive is the highest standard format available for this
596 drive. (Example: For a 5 1/4 HD drive it is the usual 1200K
597 format.) This is format is used to make up the format name
598 for the generic device (which is the name of the native
599 format). This drive name is read back from the kernel by the
600 MAKEFLOPPIES script which uses it to decide which
601 device nodes to create.
602 !!Configuration of the disk change line
603
604
605 --broken_dcl
606
607
608 Assumes that the disk change line of the drive is broken. If
609 this is set, disk changes are assumed to happen whenever the
610 device node is first opened. The physical disk change line
611 is ignored.
612
613
614 This option should be used if disk changes are either not
615 detected at all, or if disk changes are detected when the
616 disk was actually not changed. If this option fixes the
617 problem, I'd recommend that you try to trace the root cause
618 of the problem. Indeed, this options results in reduced
619 performance due to spurious cache flushes.
620
621
622 The following hardware problems may lead to a bad disk
623 change line:
624
625
626 *
627
628
629 If the floppy cable is not inserted straight, or if it is
630 kinked, the disk change line is likely to suffer, as it is
631 on the edge of the cable. Gently press on both connectors of
632 the cable (drive and controller) to insure that all wires
633 make contact. Visually inspect the cable, and if it shows
634 obvious traces of damage, get a new one.
635
636
637 *
638
639
640 On some drives, the locations disk change line may be chosen
641 by jumper. Make sure that your floppy controller and your
642 drive agree on which line is the disk change
643 line.
644
645
646 *
647
648
649 Some older drives (mostly double density 5 1/4 drives) don't
650 have a disk change line. In this case, you have no choice
651 other than to leave the broken_dcl option
652 on.
653
654
655 --working_dcl
656
657
658 Assumes that the disk change line works all right. Switching
659 from broken to working may lead to unexpected results after
660 the first disk change.
661
662
663 --inverted_dcl
664
665
666 Assumes that this disk drive uses an inverted disk change
667 line. Apparently this is the case for IBM
668 thinkpads.
669
670
671 --no_inverted_dcl
672
673
674 Assumes that this drive follows the standard convention for
675 the disk change line.
676
677
678 --noisy_dcl_clear
679
680
681 Switches off silent disk change line clearing for this
682 drive.
683 !!Timing Parameters
684
685
686 This section describes how to configure drive timings. To
687 set these parameters, you need superuser privileges. All
688 times are in
689
690
691 --hlt ''hlt''
692
693
694 Set the head load time (in microseconds) for this floppy
695 drive. The head load time describes how long the floppy
696 controller waits after seeking or changing heads before
697 allowing access to a track.
698
699
700 --hut ''hut''
701
702
703 Set the head unload time (in microseconds) for this floppy
704 drive. The head unload time describes how long the floppy
705 controller waits after an access before directing its
706 attention to the other head, or before seeking.
707
708
709 --srt ''srt''
710
711
712 Set the step rate (in microseconds) for this floppy drive.
713 The step rate describes how long the drive head stays on one
714 cylinder when seeking. Setting this value to low (too fast
715 seeks) may make seeks fail, because the motor doesn't follow
716 fast enough.
717
718
719 -u ''spinup-time''
720
721
722 --spinup ''spinup-time''
723
724
725 Set the spinup time of the floppy drive. In order to do read
726 or write to the floppy disk, it must spin. It takes a
727 certain time for the motor to reach enough speed to read or
728 write. This parameter describes this time. The floppy driver
729 doesn't try to access the drive before the spinup time has
730 elapsed. With modern controllers, you may set this time to
731 zero, as the controller itself enforces the right
732 delay.
733
734
735 -o ''spindown-time''
736
737
738 --spindown ''spindown-time''
739
740
741 Set the spindown time of this floppy drive. The motor is not
742 stopped immediately after the operation completes, because
743 there might be more operations following. The spindown time
744 is the time the driver waits before switching off the
745 motor.
746
747
748 -O ''spindown-offset''
749
750
751 --spindown_offset
752 ''spindown-offset''
753
754
755 Set the spindown offset of this floppy drive. This parameter
756 is used to set the position in which the disk stops. This is
757 useful to minimize the next access time. (If the first
758 sector is just near the head at the very moment at which the
759 disk has reached enough speed, you win 200 milliseconds
760 against the most unfavorable situation).
761
762
763 This is done by clocking the time where the first I/O
764 request completes, and using this time to calculate the
765 current position of the disk.
766
767
768 -s ''select-delay''
769
770
771 --select_delay ''select-delay''
772
773
774 Set the ''select delay'' of this floppy drive. This is
775 the delay that the driver waits after selecting the drive
776 and issuing the first command to it. For modern
777 controllers/drives, you may set this to zero.
778
779
780 -C ''check-interval''
781
782
783 --checkfreq ''check-interval''
784
785
786 Set the maximal disk change check interval. The disk change
787 line is checked whenever a read or write to the device is
788 issued, and it has not been checked for more than
789 ''interval'' jiffies.
790 !!Debugging messages
791
792
793 This subsection describes how to switch the available
794 debugging messages on and off.
795
796
797 --debug
798
799
800 Switch debugging output on. The debugging information
801 includes timing information. This option might be useful to
802 fine-tune the timing options for your local setups. (But for
803 most normal purposes, the default values are good
804 enough.)
805
806
807 --nodebug
808
809
810 Switch debugging output off.
811
812
813 --messages
814
815
816 Print informational messages after autodetection, geometry
817 parameter clearing and dma over/underruns.
818
819
820 --nomessages
821
822
823 Don't print informational messages after these
824 events.
825 !!Error Handling Options
826
827
828 The following options configure the behavior of the floppy
829 driver in case of read/write errors. They may be used by any
830 user who has write privileges for the drive. Whenever the
831 floppy driver encounters an error, a retry counter is
832 incremented. If the value of this counter gets bigger than
833 the thresholds described below, the corresponding actions
834 are performed at the next retry. The counter is reset when
835 the read or write finally terminates, whether successfully
836 or not.
837
838
839 -a ''operation-abort-trshld''
840
841
842 --abort ''operation-abort-trshld''
843
844
845 Tell the floppy driver to stop trying to read/write a sector
846 after ''operation-abort-trshld'' retries, and signal the
847 I/O error to the user.
848
849
850 -t ''read-track-trshld''
851
852
853 --readtrack ''read-track-trshld''
854
855
856 Tell the floppy driver to switch from track-reading mode to
857 sector-at-a-time-mode after ''read-track-trshld''
858 retries.
859
860
861 -r ''recalibrate-trshld''
862
863
864 --recalibrate
865 ''recalibrate-trshld''
866
867
868 Tell the floppy driver to recalibrate the drive after
869 ''recalibrate-trshld'' retries.
870
871
872 -R ''reset-treshold''
873
874
875 --reset ''reset-threshold''
876
877
878 Tell the floppy driver to reset the controller after
879 ''reset-threshold'' retries. After a controller reset,
880 the floppy driver also recalibrates all drives connected to
881 that controller.
882
883
884 -e ''error-report-trshld''
885
886
887 --reporting ''error-report-trshld''
888
889
890 Tell the floppy driver to start printing error messages to
891 the console after ''error-report-trshld''
892 retries.
893 !!Write error reporting
894
895
896 Due to the buffer cache, write errors cannot always be
897 reported to the writing user program as soon as the write
898 system call returns. Indeed, the actual writing may take
899 place much later. If a write error is encountered, the
900 floppy driver stores information about it in its per drive
901 write error structure. This write error structure stays
902 until explicitly cleared. It can for example be queried by a
903 backup program which wants to make sure that the data has
904 been written successfully.
905
906
907 --clrwerror
908
909
910 Clears the write error structure.
911
912
913 --printwerror
914
915
916 Prints the contents of the write error
917 structure:
918
919
920 write_errors
921
922
923 is a count of how many write errors have occurred since the
924 structure was last cleared.
925
926
927 badness
928
929
930 is the maximal number of retries that were needed to
931 complete an operation (reads, writes and
932 formats).
933
934
935 first_error_sector
936
937
938 is where the first (chronologically) write error
939 occurred.
940
941
942 first_error_generation
943
944
945 is the disk change generation in which did the first write
946 error occurred. The disk change generation is a number which
947 is incremented at each disk change.
948
949
950 last_error_sector
951
952
953 and
954
955
956 last_error_generation
957
958
959 are similar.
960 !!Other drive configuration options
961
962
963 This subsection lists per drive configuration options, which
964 don't fit in any other category. They are available only to
965 the superuser:
966
967
968 --tracks ''max-tracks''
969
970
971 Set the maximal numbers of physical tracks that this drive
972 may handle. If you have a drive which is only able to handle
973 80 tracks (making strange noises when you try to format or
974 read a disk with more than 80 tracks), use this option to
975 prevent unprivileged users of damaging your drive by
976 repeatedly reading disks with more than 80
977 tracks.
978
979
980 If you trust your users and your disks, you don't need this.
981 With most drives you don't need to worry anyways. See
982 section More cylinders for details.
983
984
985 -i ''sector-interleave''
986
987
988 --interleave ''sector-interleave''
989
990
991 Set the number of sectors beyond which sector interleaving
992 will be used. This option will only be used by the
993 FDFMTTRK ioctl. The fdformat command,
994 which is now considered obsolete, uses FDFMTTRK
995 ioctl, but superformat does not.
996 !!See Also
997
998
999 Fdutils' texinfo doc
1000 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.