Announcement

Collapse
No announcement yet.

How do I repair an unmountable USB flash drive?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I repair an unmountable USB flash drive?

    Hi, I have an AMD 128 MB flash drive that will not mount. The LED inside it lights up when plugged in, but nothing happens. I have tried using Testdisk to fix it, but only get the message "Partition: read error". I was able to recover some files off it using PhotoRec, but now I'd like to try to resurrect the disk so I can use it again before I just throw it out. It has been unusable for a couple years now, just sitting in a desk drawer. Is it possible to reformat it or something? Or should I just junk it?

    #2
    Re: How do I repair an unmountable USB flash drive?

    Do you have a copy of GParted (LiveCD)? If you do, fire it up and plug in the USB flash drive and see if GParted 'sees' it. If it does, have GParted format it (if it isn't physically damaged to the point that formatting won't take).
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: How do I repair an unmountable USB flash drive?

      what kind of filesystem is on it? if it's a FAT (windows) filesystem, try plugging it into a windows box and run scandisk on it. If it's an ext fs, plug it in and fsck it.
      # make install --not-war

      Comment


        #4
        Re: How do I repair an unmountable USB flash drive?

        Ok, I don't have gparted, so am downloading it now. I tried plugging it into my Windows XP laptop, but it says that it has 0 free space and 0 used space. Scandisk won't do anything to it. In the Windows troubleshooting it says the device is working properly. I will try gparted when I get it downloaded.

        Comment


          #5
          Re: How do I repair an unmountable USB flash drive?

          The only way I've ever revived a buggered USB stick is to "dd" it. And that does not always work -- sometimes they are just dead no matter what you do.

          So, "dd" stands for "Data Destroyer" --

          No, it doesn't really, but it is a Damned Dangerous command and needs to be used with an abundance of caution. It will, in the process of possibly resetting your USB stick to "new, unformatted" condition, delete everything that was ever on it. I'll let you use Google to research the dd command. Connect your USB stick, then open an Konsole window and enter
          Code:
          sudo fdisk -lu
          Be VERY SURE that you understand which /dev/sdx device(s) is your hard drive(s), and which one is the USB stick. You DO NOT want to be wrong on this!

          So, let's say your USB stick turns out to be /dev/sdc1, as shown by fdisk. Here is the command:

          Code:
          sudo dd if=/dev/zero of=/dev/sdc bs=512 count=1

          Note that it is not /dev/sdc1, it is /dev/sdc.

          Now you can remove the stick, and then if you want to format it FAT16 or FAT32, you can use GParted or Windows or whatever to do that.

          I'll cross my fingers ....

          Comment


            #6
            Re: How do I repair an unmountable USB flash drive?

            Better to zero out the whole flash drive, not just 512 bytes (which would be the MBR of a non-syslinux bootable UFD).

            sudo dd if=/dev/zero of=/dev/sdc

            WHERE sdc IS YOUR FLASH DRIVE (and not some other drive).
            It'll take some time, I can't recall how much, but 128 MB should go fast (1 minute? 2 minutes? less?).

            Then use GParted Live CD to partition and format it again (FAT32 perhaps?).

            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: How do I repair an unmountable USB flash drive?

              Ok, I made the live cd of gparted and ran it. The thumbdrive does not show up, but neither does the one I have that does work. My XD camera card showed up just fine. Any suggestions?

              Comment


                #8
                Re: How do I repair an unmountable USB flash drive?

                I tried fdisk -lu in Konsole, but it didn't do anything. It just went back to the prompt line again.

                Does it matter that this drive doesn't do anything when I put it in? The LED light is on in it, but the computer doesn't seem to know that anything was plugged in.

                By the way, I'm running Hardy 8.04.

                Thanks!

                Comment


                  #9
                  Re: How do I repair an unmountable USB flash drive?

                  128 MB flash drive
                  Workaround: Get rid of it and buy a new one.
                  Kubuntu 16.04 on two computers and Kubuntu 17.04 on DELL Latitude 13

                  Comment


                    #10
                    Re: How do I repair an unmountable USB flash drive?

                    It is
                    sudo fdisk -lu
                    (using sudo gives you root privileges)

                    GParted Live CD:
                    Plug in the flash drive, put the GParted disk in, re-boot the PC, let GParted start up to give you the main screen. Look over on the right top area where the drives are listed (click the arrow).
                    And/or: At the top, GParted, Devices? or Refresh Devices? Something like that.

                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #11
                      Re: How do I repair an unmountable USB flash drive?

                      Originally posted by reidun
                      I tried fdisk -lu in Konsole, but it didn't do anything. It just went back to the prompt line again.
                      Ooops -- yes, as Mike says, it needs to be preceded by "sudo" -- my bad. I will edit and fix that post.

                      The "dd" command I gave only zeroizes the initial 512 bytes, which is where the MBR and partition table live. With that "lobotomized", it is as if the entire stick is blanked. I'm pretty sure it doesn't matter whether there was or wasn't data on the rest of it, once the MBR, including partition table, is all zeroes. But, as Mike says, you can use the command to write zeroes across the entire stick. Here are a couple of references:

                      Linux system administration By M. Carling, Stephen Degler, James Dennis

                      http://homepage.smc.edu/morgan_david...nts/assgt4.htm

                      Comment


                        #12
                        Re: How do I repair an unmountable USB flash drive?

                        Yeah, you can see the MBR:
                        sudo dd if=/dev/sdc count=1 | hexdump -C

                        It's such a small drive, it won't take long (2 or 3 MB/s) to zero it and thus restore it to "factory-like" new; and, if there is any malicious crap on it, it'll be gone.
                        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                        Comment


                          #13
                          Re: How do I repair an unmountable USB flash drive?

                          Ok, I ran sudo fdisk -lu, and the non-working flash drive does not show up. I know this because I tried it with my working flash drive which shows up just fine and very obvious to which one it is. So if it doesn't show up in fdisk, does that mean it's junk? I'll give gparted another try to see what happens.

                          Comment


                            #14
                            Re: How do I repair an unmountable USB flash drive?

                            I just ran the gparted live cd, and the drive does not show up in the top right corner. Only my hard drive shows up. So does that mean this thing is junk?

                            Comment


                              #15
                              Re: How do I repair an unmountable USB flash drive?

                              Well, if it doesn't show up, then you don't know what to call it (e.g., sdb or sdc or?), so that is a problem (for using dd or GParted). Got me. TestDisk won't fix it or even detect it?
                              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                              Comment

                              Working...
                              X