7

I'm really upset by now, I've been trying 2hours straight to format a stupid usb drive (I'm new to ubuntu and I don't know if I will last long at this rate)

Basically this was the lubuntu boot usb key

I tried to remove files with sudo rm
I tried to format disk with disk utility
I tried to format disk with gparted (with unmounting beforehand)

Nothing works. I can't delete a file. I can't move a file to the usb key. I can't do anything. This is really infuriating.. I don't know what to do!

Here are some gparted errors while trying to format to fat32 after unmounting

error fsyncing/closing/dev/sdb: input/output error 
input/output error during write on /dev/sdb

When I try to remove by hand, it says "read-only file"

4
  • 2
    perhaps the usb drive is bad ?
    – Panther
    Nov 28, 2013 at 22:37
  • How is the device connected (I know by USB, but in what way - Is it a USB hard disk)? Also, what formatting is the drive currently?. Has the drive worked previously, how was it made to its current state etc (installation, formatting....).
    – Wilf
    Nov 28, 2013 at 22:41
  • well I installed lubuntu yesterday with it so I guess it's supposed to work. its in fat32 ad was created with universal boot installer. I also just tried to format it with fdisk : doesnt work. THe only mistake I maybe made wast try to alt+del everything in the usb drive (first think I tried, some files got actually deleted). Its just a 2gb usb drive
    – fuqda
    Nov 28, 2013 at 22:46
  • Well..last end solution.. delete partition create new ntfs partition using gparted!...i doubt..ur usb disk got write protected..then you should search for how to remove read-only property of usb
    – minigeek
    Oct 16, 2016 at 16:41

2 Answers 2

3

Yeah, this is a pain in the butt and it caused me many head-aches too. I finally figured out how to get mine working again by doing the following.

First we're going to be using the terminal and the command dd. This can be dangerous so take it slow and double check everything. Triple check actually because this will delete everything on your usb key and it can delete everything on your computer if you mess this up.

First run:

sudo fdisk -l

This will show you the devices that are plugged into your computer. You want to find the name of the usb key you want to format. It will probably be sdb, BUT IT MAY NOT. Look for a device with two partitions and with the size of your usb key.

Next run:

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

replace x with the letter of the usb key from the last command. We don't care about the numbers following that letter. Make sure you get this part right; otherwise you may kill your computer!

This will make your usb key all zero. This command will take some time to run.

Now use Gparted and format it to whatever you want. If it gives any error just click through it and try again until it does it.

13
  • ok thanks just tried the comand line, for now the @host line didnt show up againI guess that means its running
    – fuqda
    Nov 28, 2013 at 22:56
  • Try restarting your computer, and trying this again if the drive is still showing Lubuntu on it. Nov 28, 2013 at 23:08
  • yea its still showing up on the drive.. gonna try again
    – fuqda
    Nov 28, 2013 at 23:18
  • actually I can see the disk in the xplorer but the system doesnt recognzie it (doesnt appear in fdisk -l, doesnt appear in gparted) actually gparted is just stuck on scanning device indefinitly
    – fuqda
    Nov 28, 2013 at 23:19
  • take it out and put it in a different usb port and see if anything changes. Nov 28, 2013 at 23:21
1

This might be a controversial suggestion, but if all else fails I'd try formatting the USB using a Windows PC! I'm no Ubuntu expert, but I've had problems using GParted and other tools to format a USB stick after messing up the files on it. However, Windows always seems to somehow get the drive back to plain FAT32. Don't ask me why, it's just my personal experience.

Please bear in mind that this could very well be my limited knowledge of all the options GParted has to offer, rather than Windows doing a better job!

1
  • I tried this and it still didn't work. I had a hard time even formatting the thing; I kept getting write protection errors. Then, when it was formatted, I still couldn't mount it!
    – Marcel
    Jan 4, 2016 at 2:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .