Usb boot device totally unable to be formatted
Solution 1
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.
Solution 2
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!
Related videos on Youtube
fuqda
Updated on September 18, 2022Comments
-
fuqda over 1 year
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"
-
Panther over 10 yearsperhaps the usb drive is bad ?
-
Wilf over 10 yearsHow 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....).
-
fuqda over 10 yearswell 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
-
minigeek over 7 yearsWell..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
-
-
fuqda over 10 yearsok thanks just tried the comand line, for now the @host line didnt show up againI guess that means its running
-
Paul Tanzini over 10 yearsTry restarting your computer, and trying this again if the drive is still showing Lubuntu on it.
-
fuqda over 10 yearsyea its still showing up on the drive.. gonna try again
-
fuqda over 10 yearsactually 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
-
Paul Tanzini over 10 yearstake it out and put it in a different usb port and see if anything changes.
-
fuqda over 10 yearsok I did that and now I'm trying to unmount it with gparted, and apparently it's stuck on that operation. thanks for your help but 3 hours and still couldnt format a 2gb usb drive even with a command that set all data to 0.. thats too much for me. Will do it with w7 when I can
-
Paul Tanzini over 10 yearsIf Gparted doesn't want to work you can try this command instead
sudo mkfs.vfat /dev/sdx
replace x with letter of usb. It will format it to fat32. -
Paul Tanzini over 10 yearsand use
sudo umount /dev/sdx
to unmount it first. sorry. -
fuqda over 10 yearswell I cant do that, the drive seems quite messed up since even sudo fdisk -l cant see it (so I cant mount/unmount or anything) -even if the explorer actually recognize it when I plug it
-
fuqda over 10 yearsactually mkfs gives "device or ressource busy" (managed to get to the disk with an other usb port)
-
Paul Tanzini over 10 yearsGparted may be screwing with it. You may need to reboot again and just use those command line commands.
-
fuqda over 10 yearsfor now the command line seems to be running as no new @host appeared
-
Marcel over 8 yearsI 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!