ufiformat(8) | System Manager's Manual | ufiformat(8) |
ufiformat - Format a USB floppy disk.
ufiformat [ -hiqvV ] [ -f|--format [size]] [ devicepath ]
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:
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.
# 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
# ufiformat -f 1440 /dev/sda # mkdosfs -I /dev/sda
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*.
"Universal Serial Bus Mass Storage Class - UFI Command
Specification" Revision 1.0 December 14 1998
http://www.usb.org/developers/devclass_docs/usbmass-ufi10.pdf