Recovering damaged flash drive
Hi all.
A friend of mine gave me his flash drive and asked me to take a look at it. It's giving I/O errors on Windows so I though I'd give it a format using linux. Unfortunetly the problem on linux is more severe. I can not even mount the device. Code:
mount -t vfat /dev/sda1 /mnt/flash Code:
mount: special device /dev/sda1 does not exist Also Code:
fdisk /dev/sda Code:
Unable to read /dev/sda Does anyone have any suggestions for formatting this disk? Or how can I find out if the device is even supported under linux. Using lsusb reports that the device is at least detected. Thanks in Advance. Avatar |
Sorry about that the device is a Jetflash 128MB
lsusb reports this info: Code:
idVendor 0x066f SigmaTel, Inc. |
First of all, you need to make sure /dev/sda.../dev/sdz is there. If it is not there, you have to load a few modules. As root or su or sudo, load up sd_mod and usb-storage. Probably you do need to load up usb-storage.
Use dd to clean up any mess it has. Then disconnect it. Next reconnect it. Fourth, use fdisk or cfdisk to make a partition. Use type b for the partition type if you want to put a FAT filesystem on it. Next disconnect it and reconnect it. Finally format it. Flash mediums has limited writes which means it wears out after so many times you can write data to it. The FAT filesystem is not very helpful on the lifespan of flash mediums because it writes multiple times per file and per directory (around 20 to 50 times). Cheap brands can only do about hundred-thousand (100000) writes. More expensive brands can reach near a million (1000000) writes. You can not bring back flash mediums from the dead like magnetic mediums, so do not bother. However there is another medium called FRAM that has unlimited writes and it is much faster, but it has limited capacity at this time. |
Thanks for the reply and sorry for the delay.
I'm not sure exactly what commands I'm supposed to try. This is what I did: Code:
dd if=/dev/zero of=/dev/sda1 If looked on the specs page for the device on the web, but it does not say anything about cylinders. How do I proceed from here? Cheers Avatar |
You should have done dd if=/dev/zero of=/dev/sda instead of dd if=/dev/zero of=/dev/sda1 because it will give you a clean start. /dev/sda1 is the partition not the real drive. The real device is /dev/sda. For fdisk to work you have to specify /dev/sda. I suggest using cfdisk because it is a lot easier to use and you do not have to remember a lot of syntax.
Flash mediums do not have heads, sectors, and cylinders. They have rows and columns of memory banks. The software in Flash based drives virtualizes the heads, sectors, and cylinders. |
Thanks again for your reply Electro
Here is the output of the commands that you gave me: Code:
dd if=/dev/zero of=/dev/sda Code:
cfdisk /dev/sda Cheers Avatar |
All times are GMT -5. The time now is 05:39 AM. |