Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hi. I have a pair of 4GB USB flash drives that I can't use. To be specific, these drives can't be written to at all. I've attempted most of the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! leisa's Avatar
    Join Date
    Jun 2008
    Location
    The World Wide Web
    Posts
    13

    Can't write to USB Flash Drive


    Hi.

    I have a pair of 4GB USB flash drives that I can't use. To be specific, these drives can't be written to at all.

    I've attempted most of the obvious things. I've tried to remove/reformat the FAT32 partitions using Gparted. Fdisk doesn't recognize the partitions at all. Cfdisk outputs that "Partition begins after end-of-disk," Dosfsck finds all sorts of errors on thee drives but refuses to correct them. Mkdosfs didn't do anything. I tried to zero-out the drives using DD to no avail. Ditto for badblocks.

    There is a small amount of data (one file) on each of these drives but nothing important. I don't care about recovering the data. I just want to be able to make these drives usable again.

    Anyone have any suggestions?

    --Leisa

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    A) Do the USB sticks have a little switch on them (physically) that makes them read-only?

    B) If not:

    Code:
    shred -vz -n 1 /dev/sdX
    *Replace X with the correct drive from fdisk -l.

    If that is failing, why? Check /var/log/messages, etc. I/O Error = HW problem.

  3. #3
    Just Joined! leisa's Avatar
    Join Date
    Jun 2008
    Location
    The World Wide Web
    Posts
    13
    Hi,


    Quote Originally Posted by HROAdmin26 View Post
    A) Do the USB sticks have a little switch on them (physically) that makes them read-only?
    There's no switch.



    B) If not:

    shred -vz -n 1 /dev/sdX
    Tried it as you suggested. Got all sorts of I/O errors (as expected).



    If that is failing, why? Check /var/log/messages, etc. I/O Error = HW problem.
    Here's a sampling of the error messages in 'messages'.

    Code:
    Jun  8 19:29:09 laptop kernel: [256364.911826] sd 2:0:0:0: [sdb] Sense Key : Medium Error [current] 
    Jun  8 19:29:09 laptop kernel: [256364.911831] sd 2:0:0:0: [sdb] Add. Sense: Cannot write medium - incompatible format
    Jun  8 19:29:09 laptop kernel: [256364.911838] end_request: I/O error, dev sdb, sector 1007579
    Jun  8 19:29:09 laptop kernel: [256364.924364] sd 2:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
    It's worth noting that both of these drives went for a dump immediately after being inserted in (two different) Windows machines. This wasn't something that I thought important when the first one went several months ago but when the second one went down last week immediately after being used in an attempt to transfer data from my old XP laptop, I realized that these two incidents have something in common.

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    Not much else to do. The write command being issued to the device is failing with a HW error message.

    SCSI Sense Codes => Cannot write medium - incompatible format

  5. #5
    Just Joined! leisa's Avatar
    Join Date
    Jun 2008
    Location
    The World Wide Web
    Posts
    13
    Yeah. I had a feeling that these drives were toast. Wish I knew exactly what caused it though.

    Thanks anyway.

    --Leisa

  6. #6
    Just Joined!
    Join Date
    Aug 2008
    Posts
    1
    Did you tried changing the file system?
    My Linux Notebook: Problem Writing to USB Flash Drive on Linux

  7. #7
    Just Joined! leisa's Avatar
    Join Date
    Jun 2008
    Location
    The World Wide Web
    Posts
    13
    Yes...

    ...but changing the file system requires writing to the drive.

  8. #8
    Banned
    Join Date
    Jan 2008
    Posts
    79
    Are these drives brand new? It's hard to believe they're toast already.

    I bought a USB Flash drive recently and can use it fine in Linux.

    Did you try booting up your OS and then inserting the USB flash drive afterwards?

    Which Linux OS are you using? You could even test in on a LiveCD.

    If you use an off-shoot Debian OS, you could try.... System -> Monitoring -> kdiskfree or kwikdisk (or System -> Applications -> kwikdisk)

    See if the application 'sees it.' GParted should be able to see it, though. Try using other usb ports as well.

    For some reason, it might not be mounting.

  9. #9
    Just Joined! leisa's Avatar
    Join Date
    Jun 2008
    Location
    The World Wide Web
    Posts
    13
    Quote Originally Posted by kopete View Post
    Are these drives brand new? It's hard to believe they're toast already.
    They're almost new.

    Did you try booting up your OS and then inserting the USB flash drive afterwards?
    Yes.

    See if the application 'sees it.' GParted should be able to see it, though. Try using other usb ports as well.
    I can see these drives in Gparted. I can go through the motions of deleting /changing the file system or formatting the drives. But Gparted won't actually carry out the commands.

    Mounting these drives isn't the problem. They mount just fine. I can read them. I just can't write to them in any way, regardless of operating system.

    As I mentioned earlier in this thread, they initially worked fine in Linux. Only after I tried to use the drives to transfer files from Windows machines did they break.

  10. #10
    Banned
    Join Date
    Jan 2008
    Posts
    79
    Quote Originally Posted by leisa View Post
    They're almost new.

    I can see these drives in Gparted. I can go through the motions of deleting /changing the file system or formatting the drives. But Gparted won't actually carry out the commands.

    Mounting these drives isn't the problem. They mount just fine. I can read them. I just can't write to them in any way, regardless of operating system.

    As I mentioned earlier in this thread, they initially worked fine in Linux. Only after I tried to use the drives to transfer files from Windows machines did they break.
    Windows machines? XP? Vista? Were the files in a partition using NTFS format or FAT32? If it was NTFS, your Linux OS needs ntfs-3g installed. I think Ubuntu has it installed by default but I'm not sure. It could be part of the problem, perhaps.

    You're saying you can't write to the usb drives in Linux from Linux either anymore? I would find out which /dev/sdXn (where X is the letter and n the number designation) Ubuntu is assigning it and try to create a directory for it. Then try to write something to it. Try doing it as root.

    I would look at that and then go from there (eventually, you'll want to format but perhaps, see if there's any issues there?).

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •