Re: Problems accessing USB Mass Storage

From: Jonathan Corbet (corbet@lwn.net)
Date: Tue Sep 17 2002 - 13:15:13 EST


Don't know if this is helpful or not, but, based on my messing around with
SmartMedia USB stuff...

SmartMedia cards are weird in that they have a (seemingly) random amount of
waste space at the beginning of the card. Your 8MB card, in particular,
has nothing of interest in the first 25 sectors. Some cards have a
reasonable partition table in the first sector, and some don't. Modern
Windows systems (and cameras, of course) seem to be able to access the
filesystem on the card without needing to see a partition table.

A little while I posted a Lexar SmartMedia driver patch which hacked around
this by substituting a fake partition table when the first sector was read.
I'm not sure it's the right solution, though. A better way, perhaps, is a
little user-space program which writes the appropriate partition table
depending on the card capacity. Note that fdisk doesn't (easily) work for
this purpose, since it wants partitions to start on cylinder boundaries.

You might try just using dd to copy your card to disk with an offset of 25
sectors, and see of you can mount the resulting image.

Then again, the interface to some SmartMedia readers is vastly more
complicated, as the sddr09 driver shows.

jon

Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Sep 23 2002 - 22:00:19 EST