LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 03-06-2005, 03:28 PM   #1
Avatar33
Member
 
Registered: May 2003
Location: South Africa
Distribution: Ubuntu
Posts: 75

Rep: Reputation: 15
Unhappy 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
gives
Code:
mount: special device /dev/sda1 does not exist
I've also tried mounting read-only but this does not help.
Also
Code:
fdisk /dev/sda
gives
Code:
Unable to read /dev/sda
I know the drive is mounted on /dev/sda because that is what harddrake reports :-)

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
 
Old 03-06-2005, 03:43 PM   #2
Avatar33
Member
 
Registered: May 2003
Location: South Africa
Distribution: Ubuntu
Posts: 75

Original Poster
Rep: Reputation: 15
Sorry about that the device is a Jetflash 128MB
lsusb reports this info:
Code:
idVendor           0x066f SigmaTel, Inc.
iProduct                2 JetFlashM Audio Player
Any other info needed?
 
Old 03-07-2005, 01:52 AM   #3
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 03-09-2005, 02:20 PM   #4
Avatar33
Member
 
Registered: May 2003
Location: South Africa
Distribution: Ubuntu
Posts: 75

Original Poster
Rep: Reputation: 15
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
dd: writing to `/dev/sda1': No space left on device
1697+0 records in
1696+0 records out

fdisk /dev/sda1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

You must set cylinders.
You can do this from the extra functions menu.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Do flash drives use cylinders??
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
 
Old 03-09-2005, 09:51 PM   #5
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 03-12-2005, 07:50 AM   #6
Avatar33
Member
 
Registered: May 2003
Location: South Africa
Distribution: Ubuntu
Posts: 75

Original Poster
Rep: Reputation: 15
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
dd: writing to `/dev/sda': Input/output error
1+0 records in
0+0 records out
and
Code:
cfdisk /dev/sda
FATAL ERROR: Cannot read disk drive
Does this confirm that the device is truly dead?

Cheers
Avatar
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot mount ext3 filesystem on damaged hard drive Mathieu_G Linux - Hardware 3 04-01-2005 10:51 PM
Recovering data from damaged CD corn Linux - Hardware 4 09-23-2004 12:32 AM
recover data from physically damaged drive kc8tbe Linux - General 11 05-29-2004 01:58 PM
Diagnosis of Damaged Drive lsgko Linux - Hardware 0 11-12-2003 03:54 PM
RH 7.3 Install damaged 2nd drive,, can I recover??? dmkelly Linux - General 3 08-02-2002 02:04 PM


All times are GMT -5. The time now is 11:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration