ufiformat(8) Format a USB floppy disk.

SYNOPSIS

ufiformat [ -hiqvV ] [ -f|--format [size]] [ devicepath ]

OPTIONS

-f, --format [size]
Specify format capacity SIZE in KB. Without -f option, the format of the current media will be used.
-V, --verify
Verify the medium after formatting. Only meaningful without -i option.
-F, --force
Do not perform any safety checks.
-i, --inquire
Show device information, instead of performing format. Without devicepath argument, list all USB floppy disk devices attached to the system.
-v, --verbose
Be verbose.
-q, --quiet
Suppress minor diagnostics.
-h, --help
Show help message.

DESCRIPTION

ufiformat is a raw level formatting disk utility for USB floppy devices.

Raw level format is to write gap,index,sectors to the unformatted disk using special commands specific to the disk controller, to make the plain magneto-sensitive film into sector-addressable medium. Note that raw level format is NOT about creating filesystems (fs(5)) on the disk.

After mid-1990's, floppy disks are sold generally pre-formatted in MS-DOS 2HD format: 80 cylinder, 2 heads, 18 sectors/track, 512 bytes/sector; it is seldom in need for raw formatting. Nevertheless raw formatting could cure some disk and drive mismatchings.

WARNING: You will NOT raw format an LS-120 disks or (removable) hard disks; they are precision formatted in factory and cannot be raw reformatted.

ufiformat supports only the following format capacities:


   1440/1232/1200 (for 2HD disk)
   720/640        (for 2DD disk)
The device should support the capacities also, otherwise ufiformat shows an error message.

The above format capacities are predefined in the program, but each USB floppy device also has a limited set of formats (defined internally) that it can format media to. The allowed format capacities are obtained by querying (-i) the device, but this only returns the total format capacity and not CHS (cylinder, heads and sectors), hence a mapping is required in the program.

EXAMPLES

Inquiry the device for available format:
# modprobe sg
# ufiformat -i /dev/sda
vendor:  Y-E DATA
product: USB-FDU
write protect: off
media type: 2HD
status      block size   kb
formatted    2880  512 1440
formattable  2880  512 1440
formattable  1232 1024 1232
formattable  2400  512 1200
Format the floppy disk in 1.44MB, and create a FAT filesystem:
# ufiformat -f 1440 /dev/sda
# mkdosfs -I /dev/sda

PREREQUISTES

ufiformat needs /dev/sg* SCSI pass-thru device to operate. If the device does not exist, add the driver by invoking modprobe sg.

You often need to be root to do anything with /dev/sd*.