LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to format a usb flash drive (https://www.linuxquestions.org/questions/linux-software-2/how-to-format-a-usb-flash-drive-436677/)

eypros 04-19-2006 04:46 AM

How to format a usb flash drive
 
Hello,

firstly I am not sure if it's more hardware than software issue.
Anyway I have a 512MB flash drive/ radio. I used it to transfer files from a win98 in work to Fedora Core 3/winXP system back home.

First the XP stopped to recognise the drive saying it was unformatted. It didn't mind me much since fedora worked fine as win98 also.

But then win98 failed and finally fedora also.

Now only Suse 10 recognise it but it crashes after a while if I see it with Konqueror.

I tried to format it with XP failde, I figured with linux it would be ok if I choose fat32.

With mkfs.ext3 all seemed to work but when the process is over nothing has changed. Old data are still on the flash. The same occur with mkfs.fat (or something like that I can't remember whether is fat32 or fat).

How could I low level format it. And I guess formatting means lossing all data right. I can't figure why is this happening.

My radio now it doesn't work either and just displays "wrong file system" and shuts down.

Help for any ideas

oneandoneis2 04-19-2006 05:42 AM

You could use "shred" to completely wipe out the whole disk. Or "dd if=/dev/zero of=/dev/sda" would do much the same (Replace /dev/sda with whatever's correct)

Wim Sturkenboom 04-19-2006 06:08 AM

Quote:

Originally Posted by eypros
I can't figure why is this happening.

It might be that your flashdisk is at the end of it's life. The amount of write cycles is limited. Each time you write a file to disk, the fat is updated. Maybe the fat can't be updated anymore and got corrupted.

edeCh 04-19-2006 12:08 PM

usb survival guide link
 
hello! well i am not really an expert but on the page

http://www.4p8.com/eric.brasseur/suse9.1_usb_stick.html

there was an intro that helped me quite a lot (thanx a lot eric!:p ) you can also have a look which slot was used by the command dmesg:
Code:

dmesg
....
[4331776.608000] usb 5-2: USB disconnect, address 3
[4331779.024000] usb 5-2: new high speed USB device using ehci_hcd and address 4
[4331779.103000] scsi1 : SCSI emulation for USB Mass Storage devices
[4331779.105000] usb-storage: device found at 4
[4331779.105000] usb-storage: waiting for device to settle before scanning
[4331784.106000]  Vendor: SanDisk  Model: Cruzer Micro      Rev: 0.1
[4331784.106000]  Type:  Direct-Access                      ANSI SCSI revision: 02
[4331784.109000] SCSI device sda: 501759 512-byte hdwr sectors (257 MB)
[4331784.110000] sda: Write Protect is off
[4331784.110000] sda: Mode Sense: 03 00 00 00
[4331784.110000] sda: assuming drive cache: write through
[4331784.114000] SCSI device sda: 501759 512-byte hdwr sectors (257 MB)
[4331784.115000] sda: Write Protect is off
[4331784.115000] sda: Mode Sense: 03 00 00 00
[4331784.115000] sda: assuming drive cache: write through
[4331784.115000]  /dev/scsi/host1/bus0/target0/lun0: p1
[4331784.125000] Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
[4331784.133000] usb-storage: device scan complete
[4331784.701000] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
....

the "sda:" entries tell you which device was used; sda(1) here (only one partition on my usb-stick ;))

hope that helps!


cu ede

Mermer 04-19-2006 01:06 PM

Why are you formating the drive with EXT3? You might want to check the partion table using cfdisk or parted.

Try this:

parted /dev/sda (or whatever you drive is linked to)
(parted) mkfs 1 fat32

Make a fat32 file system on partition 1.


All times are GMT -5. The time now is 08:12 PM.