6

I have been striving hard to format my USB drive. I cannot format it. Whenever I try it using the disks utility I get the following error message:

Error unmounting /dev/sdc: Command-line `umount  "/media/ramvignesh/AGALYA SRI"' exited with non-zero exit status 1: umount: /media/ramvignesh/AGALYA SRI: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
 (udisks-error-quark, 14)

Whenever I try it using GParted, it wasn't opening normally. I got the following window:

Libparted Bug Found! - window

Help me resolve the issues and reuse my USB drive.

6
  • It seems that your USB drive itself (likely) or something else in the USB stack (less likely) is broken. Does the USB drive work on other machines? Can your machine read and write other USB drives? Sep 30, 2014 at 16:50
  • My machine writes and reads other usb drives with no issues. The usb drive isn't working well in any machine.
    – Ramvignesh
    Sep 30, 2014 at 16:55
  • I recently inserted my pendrive into a pc with windows 7 ultimate. As soon as I inserted it, an avast antivirus application detected a virus in my pendrive. LNK:Jenxcus-D[Trj]. Can this be a reason for the I/O error?
    – Ramvignesh
    Oct 3, 2014 at 5:09
  • Weird… I don't see how the two can be related. If Linux isn't even able to read from the drive, it cannot read and execute potentially existing malware on it – and that is before disregarding the fact that in general Windows malware doesn't run on Linux even if the hardware is intact. Oct 3, 2014 at 14:59
  • So, is my pendrive alive or dead?
    – Ramvignesh
    Oct 3, 2014 at 15:54

4 Answers 4

6

Test this:

Plug Your usb drive.

Open a terminal:

Run it:

sudo -i
#Verify that your device is /dev/sdc with fdisk:
fdisk -l
umount /dev/sdc
fdisk /dev/sdc
o ---#Create a new empty partition table
n ---#Create a new partition  
w ---#Write the new partition table and exit 
#Format partition in ext4 filesystem 
mkfs.ext4 /dev/sdc1

The fdisk menu:

Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
1
  • It isn't working. fdisk /dev/sdb shows an error message: fdisk: unable to read /dev/sdb: Input/output error
    – Ramvignesh
    Sep 30, 2014 at 15:30
2

According to your comment the USB drive is broken. It looks as if one cannot format it or write to it in this state.

Some commands that are able to verify this by trying to read the drive are (assuming the device node is /dev/sdc):

sudo fdisk -l /dev/sdc
sudo dd if=/dev/sdc of=/dev/null bs=1m count=1

If they abort with an I/O error, the device is likely broken.

6
  • Is there a command or software to check whether a usb drive is broken?
    – Ramvignesh
    Oct 1, 2014 at 16:22
  • :( dd shows I/O error. I can't digest that my usb is dead!
    – Ramvignesh
    Oct 3, 2014 at 16:18
  • It's a pretty common thing actually. Always make backups! Oct 3, 2014 at 16:20
  • Backup isn't a problem yaar. I have backups. But, can't afford buy one more usb. And, I still wonder why windows shows virus.
    – Ramvignesh
    Oct 3, 2014 at 16:22
  • Is there a way to get confirmation via windows that my usb is dead?
    – Ramvignesh
    Oct 3, 2014 at 16:25
1

After giving up on the USB stick, instead of throwing it away, you may try to disassemble it to see if its memory is in the form of an sd card (micro). Sometimes the USB reader electronics will fail, but the memory is still OK. Try using the card in an adapter or card reader to see if it is usable. I have successfully saved one micro sd card this way from a completely dead USB.

2
  • Interesting! Can I get an image based guide on what you said?
    – Ramvignesh
    Oct 3, 2014 at 16:29
  • Sorry, I didn't take any, but every stick is different anyway.
    – ubfan1
    Oct 3, 2014 at 17:03
0

You might want to try a "Slow Erase" with "Empty Partitioning". That was how I solved it when I came across this problem.

1
  • Welcome to Ask Ubuntu! I recommend to edit this answer to expand it with specific details about how to do this. (See also How do I write a good answer? for general advice about what sorts of answers are considered most valuable on Ask Ubuntu.) Jun 25, 2018 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.