USB Pen Drives: Large, Portable Storage in a Tiny Package - Page 2

By  Carla Schroder | Dec 22, 2003
Page 2 of 3   |  Back to Page 1
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Making It Work on Linux

On modern Linux distributions, it should Just Work. USB support first appeared in the 2.2 kernels, and hotplug support appeared in 2.4 (and has been backported as far as 2.2.18). But really, use a modern kernel — sheesh, it doesn't cost anything but a few minutes of your time to update it. And hotplugging is what really makes USB devices worth having.

If you have a reasonably modern Linux, chances are a fully-functioning hotplug subsystem is already in place, so all you need to do is plug in your kewl new pen drive and go to work. No need to mess with mounting and unmounting, which can be ever so tedious. Typically, the pen drives are factory-formatted in some form of FAT, which Linux handles just fine. Of course, you can partition and format it any way you like.

To find out what the file format is, use this command:

#fdisk -l /dev/sda

or whatever the drive designation is.

If you have other SCSI drives, it will be sdb or sdc or something similar. fdisk -l shows all mounted partitions. Linux mounts USB in the SCSI subsystem. Yes, it's fake SCSI, just like ide-scsi for CD writers.

To format a pen drive, or more precisely, to create a FAT32 filesystem:

# mkfs -t vfat /dev/sda1

To create a DOS filesystem:

# mkfs -t msdos /dev/sda1

etc., you know what to do.

Note that on a pen drive, it doesn't matter what filesystem you use. Use FAT32 or FAT16 if you want both Windows and Linux to read the files. You can use ext2, ext3, Reiser — any of them. (Please note that for devices like flash cards for cameras, you shouldn't monkey with the filesystem — you could render the card unreadable for the device.)

Page 3: The Hard Way

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter
Helpful Links
  • Yankee Group Mobile WAN Optimization Report

    Mobile work continues to evolve. Your organization must keep up with the demands of its mobile workforce. This report introduces the concept of mobile WAN optimization and provides three case studies including RCM, PRTM and Einstein that highlight how this emerging technology can help IT departments achieve what previously appeared to be conflicting goals. Read >

  • Network Security Resources

    More threats than ever before pose a danger to today's enterprise network. Get the latest tips and intel on the newest risks in our guide to network security resources. Read >

  • Extreme Savings: Cutting Costs with WAN Optimization

    Did you know it's possible to cut IT costs without impacting day-to-day IT operations? In fact, when you download this whitepaper from Riverbed on cost-savings through WAN optimization, you'll discover how businesses of all different sizes have realized a return on investment in just a few months through significant hard cost savings in areas such as bandwidth reduction and IT consolidation. It's called Extreme Savings and its only from Riverbed. Read >