Packetwatch.net

USB floppy drive in FreeBSD



Last modified: Jun. 14, 2009

Contents
1 - Summary
2 - Kernel options
3 - Plug in USB floppy drive
4 - Format floppy disk
5 - Mount floppy disk
6 - Unmount floppy disk


1 - Summary

This guide will show how to use an USB floppy drive in FreeBSD. It explains how
to format a floppy disk, mount and then unmount it. This has been tested in
FreeBSD 7.1.


2 - Kernel options

You will need to have the following options in your kernel.
  device          scbus                   # SCSI bus (required for SCSI)
  device          da                      # Direct Access (disks)
  device          pass                    # Passthrough device (direct SCSI access)
  device          uhci                    # UHCI PCI->USB interface
  device          ohci                    # OHCI PCI->USB interface
  device          ehci                    # EHCI PCI->USB interface (USB 2.0)
  device          usb                     # USB Bus (required)
  device          umass                   # Disks/Mass storage - Requires scbus and da
If you didn't already have them in your kernel you will need to reboot before
using the USB floppy drive.


3 - Plug in USB floppy drive

Log in with a normal user account. Plug in the USB floppy drive into the
computer and check to make sure it was detected properly.
# dmesg | tail -n 11
umass0: NEC NEC USB UF000x, class 0/0, rev 1.10/1.60, addr 2 on uhub0
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0 
(probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:29,0
(probe0:umass-sim0:0:0:0): Power on, reset, or bus device reset occurred
(probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: NEC USB UF000x 1.60 Removable Direct Access SCSI-0 device 
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present


4 - Format floppy disk

Put in a floppy disk and then format it.
# sudo fdformat -f 1440 /dev/da0 
Password:
fdformat: not a floppy disk: /dev/da0

Label the floppy disk.
# sudo bsdlabel -B -w /dev/da0 fd1440
Password:

Create a new filesystem on the flopy disk. In this case, FAT will be used.
# sudo newfs_msdos /dev/da0
Password:
/dev/da0: 2840 sectors in 355 FAT12 clusters (4096 bytes/cluster)
bps=512 spc=8 res=1 nft=2 rde=512 sec=2880 mid=0xf0 spf=2 spt=32 hds=64 hid=0


5 - Mount floppy disk

Mount the floppy disk that has a FAT partition with read/write access.
# sudo mount_msdosfs /dev/da0 /mnt
Password:


6 - Unmount floppy disk

Unmount the floppy disk.
# sudo umount /mnt
Password:


Last modified: Thu Jan 1 00:00:00 1970 UTC
Packetwatch Research 2002-2024.