The FreeBSD 'zine

May 2000 : USB Devices

Using a USB Floppy Drive
by Jim Mock <[email protected]>

Introduction

Before I get too involved in the details of how to make a USB floppy drive work under FreeBSD, allow me to provide some background information. I recently acquired a Sony VAIO Z505HE laptop, and the floppy drive provided with it was a USB floppy drive. This worked fine during the initial install process, but failed to work after FreeBSD was installed. At first, I didn't really mind since I don't use a floppy drive all that much -- I usually only use it for installs. A few weeks ago, I bought a Sony Mavica digital camera that stores its images on a floppy disk. Suddenly, I had a reason to make use of the floppy drive, so I decided to look into making it work.

The way things actually work are quite simple. There is no specific USB floppy device driver for FreeBSD -- it uses the umass driver instead. The umass driver is a USB device driver for disks and mass storage. When you read from the floppy, you are actually reading it from a SCSI device, therefore umass requires the scbus and da SCSI devices as shown below.

Kernel Configuration

The first thing you will need to do is make sure that you have the following SCSI devices in your kernel configuration file:

	device	scbus
	device	da

If you are using a GENERIC kernel, these devices are already present. If you are using a custom kernel and have removed all of the SCSI devices from it since none are present in your system, you will need to add them to the configuration.

In addition to the above devices, you will also need USB support compiled into the kernel as well. Here's the options in my kernel configuration:

	device	uhci
	device	ohci
	device	usb
	device	ugen
	device	umass

Once you have the above in your kernel configuration file, recompile your kernel and reboot as normal. Keep in mind, plugging in your USB floppy now would be a good idea so it is detected when your machine comes back up.

Using Your USB Floppy Drive

When your machine has finished rebooting, you should be able to use your USB floppy as any other SCSI device. Since my digital camera uses MS-DOS formatted floppy disks, to mount the disk, I simply do the following:

	# mount -t msdos /dev/da0 /mnt

After the disk activity is over, I can read the floppy on /mnt just like any other filesystem. Additional options to the mount command are available in the mount(8) man page.

Conclusion

After performing the above steps, you should be able to make use of your USB floppy drive as if it were a 'normal' floppy drive. If you have any questions or corrections, please feel free to contact me.

- jim

Current Issue
. Issue #06 : July 2000

Old Issues
. Issue #01 : February 2000
. Issue #02 : March 2000
. Issue #03 : April 2000
. Issue #04 : May 2000
. Issue #05 : June 2000

Quick Links
. Table of Contents
. Mailing Lists
. FreeBSD Events
. User Group Calendar
. Site Statistics
. Old Articles
. Latest News
. Press Releases
. Contribute
. Send us Feedback
. Other Resources
. Submit an Article
. Submit an Event

Today's Fortune
Every word is like an unnecessary stain on silence and nothingness. -- Beckett

FreeBSD 'zine Poll
Are you going to BSDCon?
Yes.
No.
Maybe.
What the hell is BSDCon?
Results More polls

Sponsors
. VicFUG

Download
. Issue #01 : Download
. Issue #02 : Download
. Issue #03 : Download
. Issue #04 : Download
. Issue #05 : Download
. Issue #06 : Download

Search

Runs on FreeBSD

Add Channel to My Netscape

DaemonNews

Contact: <[email protected]>
This site and the tarballs are built every 6 hours.
Copyright � 1998-2000, The FreeBSD 'zine
Code revision: 07/24/2000��All rights reserved.