LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-07-2004, 12:52 PM   #1
Garibaldi3489
Member
 
Registered: Oct 2004
Posts: 172

Rep: Reputation: 30
Help Reformatting USB Flash Drive


A friend of mine has a USB Flash drive that he uses on his mac that recently stopped working. OS X would give him the error: "You have inserted a volume that mac os cannot read." I then tried it on windoze and on linux and they both recognized it but wouldn't reformat it because it is "write-protected." I checked the slot on the side of the drive and it is in the unlock position. What can I do (qtparted only mounts it as read only) so I can reformat this drive and use it?
More info here:
http://www.videohelp.com/forum/viewt...126525#1126525
Thanks.
Garibaldi
 
Old 12-07-2004, 02:04 PM   #2
ahmed4linux
LQ Newbie
 
Registered: Aug 2004
Posts: 23

Rep: Reputation: 15
i cant get exactly how did u make it work under linux
if it unlocked button open then it should work

lets do step by step

first check
____1 usb-core
2 <usb-chi>
these two packages will be there by default in RH9

install usb-storage module
#modprobe usb-storage

then
cd mnt
mkdir usb

edit fstab
add entry
/dev/sda1 /mnt/usb vfat noauto,user,umask=0 0 0

then plug in usb
#mount /mnt/usb

i hope it should be mounted and u may be able to format it.
or do as u like.
 
Old 12-07-2004, 04:21 PM   #3
Garibaldi3489
Member
 
Registered: Oct 2004
Posts: 172

Original Poster
Rep: Reputation: 30
Quote:
i cant get exactly how did u make it work under linux
if it unlocked button open then it should work

lets do step by step

first check
____1 usb-core
2 <usb-chi>
these two packages will be there by default in RH9

install usb-storage module
#modprobe usb-storage

then
cd mnt
mkdir usb

edit fstab
add entry
/dev/sda1 /mnt/usb vfat noauto,user,umask=0 0 0

then plug in usb
#mount /mnt/usb

i hope it should be mounted and u may be able to format it.
or do as u like.
Thanks for the quick reply! My hd install is Slackware, & I'm guessing that it comes with usb-core and <usb-chi> installed. I didn't use that to mount it in linux however because I could just use the Knoppix 3.6 live-cd for this since once I give the flash drive back to my friend I won't have any use for the extra line in fstab, and its easier because Knoppix autodetects the drive. So in Knoppix I opened up QT parted in a terminal (check out the link I provided above for a complete error) and it said that it could only mount /dev/sda as read only. I then tried to create a new allocation table on the drive but it gave me an error. So I don't have as much trouble with recognizing it as accessing data on it because I need to reformat it to reset the permissions. I tried changing permissions for the drive in KDE as well but that also gave me an error.
 
Old 12-07-2004, 04:30 PM   #4
Garibaldi3489
Member
 
Registered: Oct 2004
Posts: 172

Original Poster
Rep: Reputation: 30
One more thing, right now I'm in the Slax live-cd, which didn't auto detect the usb flash drive. So I went to a konsole and tried dmesg to see about my connected devices, and here is the error it gave about /dev/sda:
]
Quote:
sda: Unit Not Ready, sense:
Info fld=0x0, Current 00:00: sns = f0 2
ASC=3a ASCQ= 0
Raw sense data:0xf0 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0x0, Current sd00:00: sns = f0 2
ASC=3a ASCQ= 0
Raw sense data:0xf0 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: test WP failed, assume Write Enabled
/dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0
I/O error: dev 08:00, sector 0
 
Old 12-08-2004, 02:31 AM   #5
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
Try leaving it unmounted and run cfdisk /dev/sda - reformatting it may fix it.
 
Old 12-08-2004, 09:17 PM   #6
Garibaldi3489
Member
 
Registered: Oct 2004
Posts: 172

Original Poster
Rep: Reputation: 30
Quote:
Try leaving it unmounted and run cfdisk /dev/sda - reformatting it may fix it.
I tried that, cfdisk could only read it, not write. So any way that you look at it for some reason this USB flash drive will only mount read only- why? This makes no sense. Is there some way I can bypass everything and completely corrupt it so I can format it and override this mysterious write protection, which exists for no reason (the button is in the un lock position and it was working fine and then one day it would only mount read only)??
 
Old 12-09-2004, 02:28 AM   #7
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
You could try

dd if=/dev/zero of=/dev/sda

to completely corrupt it. . .
 
Old 12-09-2004, 02:53 AM   #8
TiMiN8R
Member
 
Registered: Oct 2004
Location: Holland
Distribution: SuSE 9.1 Personal, SuSE 9.2, Mandrake 10 Off., Ubuntu 4.10 "Warty"
Posts: 34

Rep: Reputation: 15
Ihave had the same problem. does the flash drive have a oti2168 controller? mine does and i can only format it with the software that came with it, if i try any other way i get the same errors. you can download the software and win98 drivers here . never mind the brand, as long as it's the same controller it will work. if it's a different controller you will have to find out which one it is and find corresponding software/drivers
 
Old 12-09-2004, 03:58 PM   #9
Garibaldi3489
Member
 
Registered: Oct 2004
Posts: 172

Original Poster
Rep: Reputation: 30
Quote:
Ihave had the same problem. does the flash drive have a oti2168 controller? mine does and i can only format it with the software that came with it, if i try any other way i get the same errors. you can download the software and win98 drivers here . never mind the brand, as long as it's the same controller it will work. if it's a different controller you will have to find out which one it is and find corresponding software/drivers
I tried this but I have XP so it won't install. I even changed the compatibility to 98 but it still wouldn't install. Do you have any other suggestions? Maybe I'll try and find a computer with win 98.

Quote:
You could try

dd if=/dev/zero of=/dev/sda

to completely corrupt it. . .
So would this corrupt the drive and fix the read-only problem, so I could then reformat it, or would it just require a reformat in which case I wouldn't have accomplished anything?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Flash drive trainee Slackware 3 05-18-2005 01:50 PM
USB Flash Drive LunarEagle Linux - Newbie 5 03-22-2005 04:11 PM
help about USB flash drive deepdark SUSE / openSUSE 13 01-05-2005 11:38 PM
USB flash drive crazyking Linux - Newbie 1 05-17-2004 11:25 AM
USB 2.0 Flash Drive fusee Linux - Hardware 3 04-16-2004 05:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:58 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration