Floppies for the New Millennium
Some of us old-fogy x86 Linux users have been slow to warm to USB. In the 2.2 kernel days, we initially heard of people needing to solve driver problems to benefit their fancy digital cameras and thought “better them than us”. Linux USB support was first pioneered by Inaky Perez Gonzalez, and then rewritten by Linus Torvalds, Greg Kroah-Hartman and others, and was initially rough going.
Then, USB scanners, printers, mice, video cameras, ISDN and xDSL devices, modems, floppy drives, loudspeakers, joysticks, digital tablets, MP3 players, wireless devices, PDAs, sundry mass-storage devices and just about everything else hit the market—USB started looking a whole lot less like the Useless Serial Bus we used to joke about. Fortunately, the kernel's driver support caught up in the interim, but its architecture may be a bit unfamiliar to many. If you're lucky, your distribution will have made the messy details fade to background, but in case it hasn't, read on.
Linux's USB support starts with the kernel needing to recognise your motherboard's USB chipset, which will be a UHCI (Intel) or OHCI-class (Compaq and others) device, requiring the usb-uhci or usb-ohci kernel driver, respectively. (Both also will need the usbcore driver.) If lspci -v returns USB information that includes I/O ports at, then you have a UHCI controller. If the returned USB-controller text includes Memory at, then it's OHCI.
When you're done tweaking module loading (if necessary), the output of lsmod should include all three required drivers. For example, my laptop machine lists:
Module Size Used by Not tainted usb-uhci 20676 0 (unused) usb-storage 97120 1 usbcore 48000 1 [usb-uhci usb-storage]
The usb-storage driver is a translator that lets random-access-type USB devices be addressed using SCSI block-device names—we'll return to that later. Without it, you'd need some other intermediary to access files from the USB layers, such as the gPhoto2 application.
If you're running a 2.3.38 or later kernel (and you should really upgrade to 2.4.x or later, at this point), you also should add the following line to /etc/fstab to enable USB device tracking:
none /proc/bus/usb usbdevfs defaults 0 0
After this, type mount -a. Now, you're all done except for mounting the actual mass-storage device. The above step does not mount the device—usbdevfs is strictly an abstract support filesystem similar to /proc, used by the USB subsystem.
All of the above USB-configuration details should be taken care of automatically by modern Linux installer programs, but it is covered here in case it's not. If you're reasonably lucky, all you need to do is plug the drive in to a USB port or hub and mount it.
I created a mountpoint directory of /mnt/fob from which to hang the flash drive. That name owes to the drive being about the same size as a key fob or an old pocket watch (fob watch), lurking in one's trouser pockets in roughly the same fashion.
That was the easy part. Next was a wild ride trying to chase down how to mount it properly. My browsing of on-line materials suggested that USB flash drives, as with Iomega Zip disks, would be treated as SCSI. A glance at /proc/scsi/scsi after plugging in the Easy Disk clarifies that it's recognised as the first SCSI device and moreover that it's a rebranded DiskOnKey unit OEMed from M-Systems, Inc. Intuition therefore suggested mounting /dev/sda1 (on an otherwise IDE-based system), but intuition turned out to be dead wrong in the Easy Disk's case. Making the attempt resulted in this puzzling error:
guido:~# mount -t vfat /dev/sda1 /mnt/fob mount: block device /dev/sda1 is write-protected, mounting read-only mount: /dev/sda1 is not a valid block device
Some other USB flash drives reportedly do mount precisely in that way, whereas I found out that the Easy Disk mounts as /dev/sda, not /dev/sda1 or any other partition number—that is, it treats the drive as a device lacking the ability to house a partition table. The explanation of this curiosity turns out to lie in the ATAPI Removable Media Device (ARMD) BIOS Specification, laid down by Compaq and Phoenix in 1997 to generalise how a floppy-like drive should behave on the ATA bus in anticipation of traditional floppy drives going the way of the dodo. ARMD devices are basically big floppy disks, which per the spec have no partition table. Thus, the Easy Disk happens to be an ARMD (floppy-like) device. Apparently, many other USB flash disks are, by contrast, treated as regular ATAPI drives.
Like most flash devices, the Easy Disk came preformatted with the MS-DOS FAT filesystem. That raises, of course, the question of whether it might be rewritten to use less antique disk formats instead. I never tested that, partly because FAT, for all its faults, is supported by almost all UNIX workstations, Macs and MS Windows boxes. Partly, I shied away from attempting other filesystems in order to reduce device fatigue.
Now, some further elaboration of the mount command:
# mount -o uid=1000,gid=1000,noatime -t vfat \ /dev/sda /mnt/fob/
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Validate an E-Mail Address with PHP, the Right Way
- New Products
- Trying to Tame the Tablet
- Developer Poll
- not living upto the mobile revolution
57 min 39 sec ago - Deceptive Advertising and
1 hour 33 min ago - Let\'s declare that you have
1 hour 34 min ago - Alterations in Contest Due
1 hour 35 min ago - At a numbers mindset, your
1 hour 36 min ago - Do not get Just Almost any
1 hour 39 min ago - A fantastic rule-of-thumb to
1 hour 41 min ago - Keren mastah..
Penting,
2 hours 38 min ago - mini tablet compare
3 hours 57 min ago - Looking Good
7 hours 30 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




Comments
hi
Thanx for sharing this with all of us. Of course, what a great site and informative posts, I will bookmark this site. keep doing your great job and always gain my support. Thank you for sharing this beautiful articles. Legal Funding
Re: Floppies for the New Millennium
Hello,
I'm running Fedora Core 2 (test3) Kernel 2.6:
[root@neo root]# mount -all
mount: none already mounted or /proc/bus/usb busy
mount: according to mtab, usbdevfs is already mounted on /proc/bus/usb
[root@neo root]# mount -t vfat /dev/sda1 /mnt/usb
mount: /dev/sda1 already mounted or /mnt/usb busy
However,
[root@neo root]# cat /proc/scsi/usb-storage/2
Host scsi2: usb-storage
Vendor: LEXAR MEDIA
Product: CF CARD
Serial Number: 1115321335949
Protocol: Transparent SCSI
Transport: Bulk
Quirks:
What am I missing? I'd appreciate any help.
Thx,
Erasmo
Re: Device to Device Wireless Floppies
see www.memsen.com ultra wideband
Re: Floppies for the New Millennium
Wireless USB at memsen.com
Wireless Memory Disks for P2P file sharing
Ultra Wideband enabled USB Drives
see www.memsen.com
Memsen
David Buzzelli
Wireless USB Wireless USB
Wireless USB see www.memsen.com founded by David Buzzelli
Re: Floppies for the New Millennium
ok, I just realized one mistake I made. I should have used /dev/sda2:
[root@neo root]# mount /dev/sda2 /mnt/usb
/dev/sda2 looks like swapspace - not mounted
mount: you must specify the filesystem type
But when I try:
[root@neo root]# mount -t vfat /dev/sda2 /mnt/usb
mount: /dev/sda2 already mounted or /mnt/usb busy
I continue to be clueless....
Use devlabel
If you have more than 1 device, the scsi you get will depend on the order you plug in devices. You should look at devlabel, which comes with fedora. This will not only give consistent labels for devices, but can also automount them.
Re: Floppies for the New Millennium
I'm reading a thread on the gentoo forums that says you should mount with sync and dirsync to prevent delayed buffer writes and data corruption. Care to comment?
Thanks for the noatime tip also!