Initial import from FreeBSD RELENG_4:
[dragonfly.git] / share / man / man4 / man4.i386 / wfd.4
1 .\" Copyright (c) 1997 Junichi Satoh
2 .\"   All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the author nor the names of any co-contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY FreeBSD, Inc. AND CONTRIBUTORS ``AS IS''
17 .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL FreeBSD, Inc.  OR CONTRIBUTORS BE
20 .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 .\" POSSIBILITY OF SUCH DAMAGE.
27 .\"
28 .\" $FreeBSD: src/share/man/man4/man4.i386/wfd.4,v 1.12.2.3 2001/12/21 10:07:09 ru Exp $
29 .\"
30 .Dd January 16, 1998
31 .Dt WFD 4 i386
32 .Os
33 .Sh NAME
34 .Nm wfd
35 .Nd ATAPI floppy driver (LS-120 floppy driver)
36 .Sh SYNOPSIS
37 .Cd options ATAPI
38 .Cd options ATAPI_STATIC
39 .Cd device wfd
40 .Pp
41 .Sh DESCRIPTION
42 The
43 .Nm
44 driver provides support for
45 .Em ATAPI
46 floppy disks, typically LS-120 style 120mb/1.4mb floppy drives.
47 In general the interfaces are similar to those described by
48 .Xr wd 4 .
49 .Pp
50 As the IDE controllers are probed during boot, the
51 .Em IDE
52 buses are scanned for devices.
53 Any devices found which answered as
54 .Sq Em Floppy
55 and
56 .Sq Em removable
57 type device will be attached to the
58 .Nm
59 driver.
60 The first device found will be attached as
61 .Em wfd0
62 and the next,
63 .Em wfd1 ,
64 and so on.
65 .Pp
66 When used with a LS-120 drive, this driver will read/write the following
67 types of floppy disk:
68 .Bl -tag -width 1.25MB -compact
69 .It 120mb
70 .It 1.44mb
71 .It 1.25mb (PC-9801 series format)
72 .It 1.2mb
73 .It 720kb
74 .El
75 .Sh PARTITIONING
76 The
77 .Nm
78 driver allows the disk to have two levels of partitioning.
79 One layer, called the
80 .Dq slice layer ,
81 is used to separate the
82 .Fx
83 areas of the disk from areas used by other operating systems.
84 The second layer is the native
85 .Bx 4.4
86 partitioning scheme,
87 .Xr disklabel 5 ,
88 which is used to subdivide the
89 .Fx
90 slices into areas for individual filesystems.
91 For more information, see
92 .Xr fdisk 8
93 and
94 .Xr disklabel 8 ,
95 respectively.
96 .Pp
97 If an uninitialized disk is opened, the slice table will be
98 initialized with a fictitious
99 .Fx
100 slice spanning the entire disk.  Similarly, if an uninitialized
101 (or
102 .No non- Ns Fx )
103 slice is opened, its disklabel will be initialized with parameters
104 returned by the drive and a single
105 .Sq Li c
106 partition encompassing the entire slice.
107 .Sh EXAMPLES
108 Making LS-120/ZIP disks can be a bit more complicated than usual depending
109 upon whether or not you chose to use the slice code or not.
110 LS-120 floppies are typically considered floppy devices and do not carry
111 a slice table.  On the other hand, Zip disks, which use the same driver,
112 are considered hard disks by the vendor, so for compatibility, you should
113 use a slice table.
114 .Pp
115 The driver will handle either type of disk with or without a slice
116 table,  but for compatibility, you should generally create disks
117 that follow the vendor's behavior.
118 .Pp
119 To create a UFS LS-120 disk (no slice table),
120 First, make sure there is no slice table on the disk):
121 .Dl # dd if=/dev/zero of=/dev/wfd0 count=16
122 .Pp
123 Next, disklabel the disk:
124 .Dl # disklabel -rw wfd0 fd120m
125 .Pp
126 Then newfs as usual:
127 .Dl # newfs /dev/rwfd0a
128 .Pp
129 To create a standard 1.44mb floppy in a LS-120 drive, do the same
130 procedure, but use
131 .Ar fd1440
132 as the disk layout when using the
133 .Nm disklabel
134 command.
135 .Sh KERNEL CONFIGURATION
136 Only one
137 .Nm
138 device is necessary in the config file; data structures are dynamically
139 allocated as disks are found on the
140 .Tn IDE
141 buses.
142 .Sh NOTES
143 This driver is attached to the
144 .Xr wdc 4
145 IDE/ATAPI disk controller driver.  It will not work unless
146 IDE controllers have been configured and enabled in the kernel.
147 .Sh BUGS
148 Floppy formatting is not yet supported.
149 .Pp
150 This driver is still a beta version.
151 If you have problems, please report them to
152 .Aq bugs@FreeBSD.org
153 and the author.
154 .Sh FILES
155 .Bl -tag -width /dev/rwfdXXXXX -compact
156 .It Pa /dev/rwfd Ns Ar u
157 raw mode
158 .Tn ATAPI
159 floppy
160 .Ar u ,
161 accessed as an unpartitioned device
162 .Sm off
163 .It Pa /dev/wfd Ar u Pa s Ar n
164 .Sm on
165 block mode
166 .Tn ATAPI
167 floppy disk unit
168 .Ar u ,
169 slice
170 .Ar n ,
171 accessed as an unpartitioned device
172 .Sm off
173 .It Pa /dev/rwfd Ar u Pa s Ar n
174 .Sm on
175 raw mode
176 .Tn ATAPI
177 floppy disk unit
178 .Ar u ,
179 slice
180 .Ar n ,
181 accessed as an unpartitioned device
182 .It Pa /dev/wfd Ns Ar u Ns Ar p
183 block mode
184 .Tn ATAPI
185 floppy disk unit
186 .Ar u ,
187 first
188 .Fx
189 slice, partition
190 .Ar p
191 .It Pa /dev/rwfd Ns Ar u Ns Ar p
192 raw mode
193 .Tn ATAPI
194 floppy disk unit
195 .Ar u ,
196 first
197 .Fx
198 slice, partition
199 .Ar p
200 .Sm off
201 .It Pa /dev/wfd Ar u Pa s Ar n Ar p
202 .Sm on
203 block mode
204 .Tn ATAPI
205 floppy disk unit
206 .Ar u ,
207 .Ar n Ns th
208 slice, partition
209 .Ar p
210 .Sm off
211 .It Pa /dev/rwfd Ar u Pa s Ar n Ar p
212 .Sm on
213 raw mode
214 .Tn ATAPI
215 floppy disk unit
216 .Ar u ,
217 .Ar n Ns th
218 slice, partition
219 .Ar p
220 .El
221 .Sh SEE ALSO
222 .Xr wcd 4 ,
223 .Xr wd 4 ,
224 .Xr disklabel 5 ,
225 .Xr disklabel 8 ,
226 .Xr fdisk 8
227 .Sh AUTHORS
228 .An "Junichi Satoh" Aq junichi@jp.FreeBSD.org
229 .Sh HISTORY
230 The
231 .Nm
232 driver first appeared in
233 .Fx 2.2.6 .