On Thu, 5 Apr 2007, Styma, Robert E (Robert) wrote:

> I just joined this group.  Found the mailing list name
> while doing a "strings" on the usb_storage module
> in FC7T3.  Sorry if this is a common question, but
> googling has not been very helpful.
> 
> A friend of mine pulled hist usb stick out of his 
> Windows machine without using the "stop" icon one
> too many times.  Of course he did not have any
> backups of the data.  He asked me to see if I
> could retrieve any of his data.  
> 
> It looks like the partition table is messed up.

Maybe, maybe not.  Can you show the contents of the partition table?

> If I put the stick in a windows box, it shows
> up as 2 drive letters (there originally was only
> one).  If you attempt to open either one, it 
> tells you to put media in the drive. (not good).

This may be a problem with the partition's boot sector.  But again, it's 
hard to tell.

> Plugging it into my FC7T3 box (which as front
> USB connectors) detects the drive and the
> size.  It then says write protect is on.  I
> opened the case and did a close inspection for
> damage and found none and also found no write
> protect switch.

Some devices have a software-settable switch, which can be controlled 
through a Windows utility program.

> What I have done on real disks with trashed partition
> tables is reallocate the partitions over the correct
> areas.   Some of the data is often recoverable.  I
> was going to try this on the USB stick, since I don't
> know any better. :-)
> 
> Now the question.  Is there a parameter to 
> modprobe usb_storage
> to force writable?  Then I could try do use fdisk on this.

There isn't.  However it is possible to edit the source code in a way that 
will accomplish the same thing.  (BTW, you _can_ use fdisk even on 
write-protected devices.  You won't be able to alter anything but you will 
be able to display the contents of the partition table.)

You should be aware that fooling the kernel into thinking the device is 
write-enabled may not accomplish anything.  If the device itself still 
thinks it is write-protected, what the kernel does won't matter.

> Thank you for your time and any pointers.
> 
> If there are better techniques, pointers to the appropriate 
> documentation would be most welcome.

Before you start trying to destroy all the data on that USB stick, it 
might be a good idea to make a safe copy of it.  :-)

Better yet, you might try to mount the partitions read-only on the Linux 
system and see if you can recover all the files directly.

In the end you may find that there is no way to rewrite the partition 
table except through Windows.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to