WFD(4)

NAME
wfd - ATAPI floppy driver (LS-120 floppy driver)

SYNOPSIS
options ATAPI
options ATAPI_STATIC
device wfd0

DESCRIPTION
The wfd driver provides support for ATAPI floppy disks, typically LS-120 style 120mb/1.4mb floppy drives. In general the interfaces are similar to those described by wd(4) sd(4) and od(4).

As the IDE controllers are probed during boot, the IDE buses are scanned for devices. Any devices found which answered as ‘Floppy’ and ‘removable’ type device will be attached to the wfd driver. The first device found will be attached as wfd0 and the next, wfd0, and so on.

When used with a LS-120 drive, this driver will read/write the following types of floppy disk:
120mb
1.44mb
1.25mb (PC-9801 series format)
1.2mb
720kb

PARTITIONING
The wfd driver allows the disk to have two levels of partitioning. One layer, called the “slice layer”, is used to separate the FreeBSD areas of the disk from areas used by other operating systems. The second layer is the native 4.4BSD partitioning scheme, disklabel(5), which is used to subdivide the FreeBSD slices into areas for individual filesystems. For more information, see fdisk(8) and disklabel(8), respectively.

If an uninitialized disk is opened, the slice table will be initialized with a fictitious FreeBSD slice spanning the entire disk. Similarly, if an uninitialized (or non-FreeBSD) slice is opened, its disklabel will be initialized with parameters returned by the drive and a single ‘c’ partition encompassing the entire slice.

EXAMPLES
Making LS-120/ZIP disks can be a bit more complicated than usual depending upon whether or not you chose to use the slice code or not. LS-120 floppies are typically considered floppy devices and do not carry a slice table. On the other hand, Zip disks, which use the same driver, are considered hard disks by the vendor, so for compatibility, you should use a slice table.

The driver will handle either type of disk with or without a slice table, but for compatibility, you should generally create disks that follow the vendor's behavior.

To create a UFS LS-120 disk (no slice table), First, make sure there is no slice table on the disk):
    # dd if=/dev/zero of=/dev/wfd0 count=16
Next, disklabel the disk:
    # disklabel -rw wfd0 fd120m
Then newfs as usual:
    # newfs /dev/rfd0a
To create a standard 1.44mb floppy in a LS-120 drive, do the same procedure, but use fd1440 as the disk layout when using the disklabel command.

KERNEL CONFIGURATION
Only one wfd device is necessary in the config file; data structures are dynamically allocated as disks are found on the IDE buses.

NOTES
This driver is attached to the wdc(4) IDE/ATAPI disk controller driver. It will not work unless IDE controllers have been configured and enabled in the kernel.

BUGS
Floppy formatting is not yet supported.

This driver is still a beta version. If you have problems, please report them to <bugs@FreeBSD.org> and the author.

FILES
/dev/rwfdu
    raw mode ATAPI floppy u, accessed as an unpartitioned device
/dev/wfdusn
    block mode ATAPI floppy disk unit u, slice n, accessed as an unpartitioned device
/dev/rwfdusn
    raw mode ATAPI floppy disk unit u, slice n, accessed as an unpartitioned device
/dev/wfdup
    block mode ATAPI floppy disk unit u, first FreeBSD slice, partition p
/dev/rwfdup
    raw mode ATAPI floppy disk unit u, first FreeBSD slice, partition p
    /dev/wfdusnp block mode ATAPI floppy disk unit u, nth slice, partition p
    /dev/rwfdusnp raw mode ATAPI floppy disk unit u, nth slice, partition p

SEE ALSO
fdisk(1), wd(4), wcd(4), disklabel(5), disklabel(8)

AUTHORS
Junichi Satoh <junichi@jp.FreeBSD.org>

HISTORY
The wfd driver first appeared in FreeBSD 2.2.6.