Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ufiformat(8) [debian man page]

ufiformat(8)						      System Manager's Manual						      ufiformat(8)

NAME
ufiformat - 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*. SEE ALSO
fdformat(8), floppy(8), sg(4) "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 ufiformat(8)

Check Out this Related Man Page

mformat(1)						      General Commands Manual							mformat(1)

NAME
mformat - mtools utility to add a DOS file system to a low-level formatted diskette SYNOPSIS
mformat [-t tracks] [-h heads] [-s vectors] [-l volumelabel] drive: OPTIONS
Specifies the number of tracks (not cylinders) on the diskette. Specifies the number of heads (sides) on the diskette. Specifies the num- ber of sectors per track. Specifies the volume label. This is an optional option. DESCRIPTION
Note You must specify the floppy disk storage device that is to be formatted. If you do not specify a device, or if a device is not found, the command may incorrectly format a SCSI device which could be a system or data disk. The mformat command adds a minimal DOS compatible file system (boot sector, FAT, and root directory) to a UNIX formatted diskette. If the diskette is unformatted, you must low-format the disk. You can do this with a PC system, or on Tru64 UNIX using either the scu utility or the fddisk utility, depending on your floppy drive. Tru64 UNIX supports both FDI and SCSI attached 3.5" floppy drives with DD, HD, or ED media. Not all floppy drives are compatible with ED media. The following track/head/sector values are supported: --------------------------------------------------------------- Media Capacity Tracks Heads Sectors type KB/MB Bytes Sectors -t -h -s --------------------------------------------------------------- DD 720KB 737280 1440 80 2 9 HD 1.44MB 1474560 2880 80 2 18 ED 2.88MB 2949120 5760 80 2 36 --------------------------------------------------------------- To format a diskette for other than the ED 2.88MB default capacity, you must specify the number of sectors per track with the -s option. No error is returned if you use mformat to put an ED file system onto an HD floppy, but you will get errors from other utilities if you try to write beyond the physical end of the media. RESTRICTIONS
The following restrictions apply: The mformat command requires a low-level format utility from UNIX. The mformat command does not detect (or record) bad block information. EXIT STATUS
The following exit values are returned: Success. Failure. EXAMPLES
In the following example, a SCSI floppy diskette is formatted at the ED 2.88MB capacity, then a DOS file system is initialized with mfor- mat: $ /sbin/scu -f /dev/rdisk/dsk/6a format density ED $ mformat a: In the following example, an FDI floppy diskette is formatted at the HD 1.44MB capacity, then a DOS file system is initialized with mformat, a file is copied to the diskette, and the mdir command is used to check the contents of the diskette. The mlabel command is used to add a label and mdir is used to again check the diskette contents. Finally, a DD file system is placed on the diskette, mcopy is used to place a file on it, and mdir is used to verify the diskette contents: $ fddisk -fmt /dev/rfd0a NOTE: Setting interleave factor to ``-i2:4''. Use ``-i<nnn>[:<ccc>]'' option to override. Disk type: 3.50 inch, HD (1.44MB) Number of sectors per track: 18 Number of surfaces: 2 Number of cylinders: 80 Sector size: 512 interleave factor: 2:4 Formatting disk... Percentage complete: Format complete, checking... Quick check of disk passes OK. $ mformat -s 18 a: $ mcopy README a: Copying README $ mdir a: Volume in drive A has no label Directory for A:/ README 769 6-04-97 8:59a 1 File(s) 1456640 bytes free $ mlabel a: Volume in drive A is unlabeled Enter the new volume label (11 characters): hddisk $ mdir a:Volume in drive A is hddisk Directory for A:/ README 769 6-04-97 8:59a 1 File(s) 1456640 bytes free $ mformat -s 9 -l dddisk a: $ mcopy README a:README.1 $ mdir a: Volume in drive A is dddisk Directory for A:/ README 1 769 6-04-97 9:16a 1 File(s) 729088 bytes free In the following example, an unformatted 2.8Mb floppy diskette is formatted using the scu command, followed by the mformat command. Once it is formatted by both the scu and mformat commands, it is ready for use: $ /sbin/scu -f /dev/disk/floppy format density ED $ mformat -t 80 -h 2 -s 36 a: FILES
Executable file SEE ALSO
Commands: mlabel(1), mtools(1) Utilities: fddisk(8), scu(8) Floppy disk interface: fd(7) mformat(1)
Man Page