fdformat, like mkfs, has trouble with floppy drives that are not /dev/fd*.
I've figured out how to make mkfs work. The command
Code:
mkfs -t vfat /dev/sda
fails, but
Code:
mkfs -t vfat /dev/sda1
works. mkfs balks when no partition number is given,. In the case of ext2, it prompts for confirmation (as the first note in this thread illustrates). In the case of vfat, it just fails with a meaningless error message.
As the man page explains, mkfs is just a front-end to various other commands to make specific types of file systems. However, since mkfs is trying to present a consistent user interface, it would be nice if the commands themselves worked more consistently. (Also, for floppy drives, it is really more correct to refer to the entire device rather than a partition thereof.) Still, this discrepancy would be only a minor annoyance, except for the fact that the error message returned by "mkfs -t vfat" when the wrong device is given--"Will not try to make filesystem on '/dev/sda'"--is useless. It gives no information about why the command fails or how one might correct it.
You can force mkfs to work without adding the partition number to the device: for ext2, use the -F option (which skips the warning prompt), and for vfat use the -I option. Also, as a slight correction to kilgoretrout's first post in this thread, mkfs.msdos and mkfs.vfat are in fact hard links to the same file, so they do the same thing (create a vfat file system).
I have not yet figured out how to make fdformat work with a USB drive. "fdformat /dev/sda" and "fdformat /dev/sda1" both fail with an "Invalid argument" error. The man page implies fdformat is hard-coded to recognize only drives with a major number of 2. (USB drives are major number 8.)