[SLL] getting files out of a munged vfat fs

Mike Leary leary at nwlink.com
Tue Nov 6 16:59:41 EST 2001


I have a hard disk image sitting around waiting for me to do a similar
thing -- mostly jpegs and other media files are of interest.

JPEGs start with a magic binary sequence, so I thought of reading bytes
until the buffer was a valid jpeg -- but I'm not sure of what library to
use...  Haven't really given the project much effort yet.  If the jpegs are
all sequential, maybe you could just read from magic bytes to magic bytes
and call it a file...

Anyway, let me know if you come up with something clever. :)


On Tue, Nov 06, 2001 at 01:34:21AM -0800, Ben Johnson wrote:
> Hey.
> 
> I got a digital camera a little while ago.  very nice little machine.
> it supposed to be compatible with Linux but I'm having trouble with it.
> 
> The way it's supposed to work is I attach the camera to my computer with
> a usb-cable, load the usb-storage kernel module and mount it as a scsi
> drive with a vfat filesystem.  It worked the first several times I
> tried, but now both of the memory cards seem to have been messed up
> somehow.  (I was trying some tricky stuff for kicks.)
> 
> I believe the memory cards are formatted well when the arrive from the
> manufacturer but when the cards are formatted by the camera the become
> unmountable by Linux.  too bad.
> 
> I am able to copy the partition from the camera to a file on my system
> though and look it over as a regular binary file.  I know the jpegs are
> contained inside of this file.  And, I see some file names so it looks
> like there is a file system image.  I just don't know how to make use of
> it.  (yet)
> 
> Does anyone have some tips for me?  I tried mounting the copy of the
> partition on a loop device and I got the same error from mount...
> 
> mount: wrong fs type, bad option, bad superblock on /dev/loop0,
>        or too many mounted file systems
> 
> ...typical uninformative error message.  So now I'm thinking about
> somehow finding and extracting the jpegs from the partition without mount
> command.  I need to know either enough about the vfat filesystem to find
> the files and pull them out, or I have to learn how to search random
> binary crap for jpeg images.
> 
> How does that sound for a project?  Sound fun to me.  I don't know what
> the best route to take is though.  Does anyone know how to find jpegs
> buried in a partition?  or... is a vfat file system easy enough to
> decipher?  Which method would be easiest and/or most reliable?
> 
> Thanks,
> 
> - Ben
> 
> (sorry for the long post. brevity is not my strong suit at 1:30am.)
> 
> _______________________________________________
> linux-list mailing list --> linux-list at ssc.com
> http://www.ssc.com/mailman/listinfo/linux-list

-- 
"You mean, I'm the bad guy?"  --Bill Foster, aka D-FENS




More information about the linux-list mailing list