Can't format after using USB Image writer,USB sticks bricked

Questions about applications and software
Forum rules
Before you post please read how to get help

Can't format after using USB Image writer,USB sticks bricked

Postby turqoisehex on Sat May 04, 2013 6:54 pm

This is a bizarre issue, that I hope someone can help with.

I used USB image writer on a stick, it took hours, and in the end the image didn't work. I tried both mint 11 (for an older box) and Peppermint 3, from inside Mint 14 Cinnamon.
I tried to do it again, with the same result. But even as admin (gksudo nemo), I couldn't get the files off the drive since it's a "read-only filesystem"...
OK, so I decided to format it using gparted, except gparted says it has no partition table :roll: so I created one, and while doing so it gave me a generic error. Now that stick is a brick, and a new partition table can't be written to it, it seems.

I thought it might be the stick, so I did it again with another one. This time it wrote it faster, but again the image wasn't bootable, I'm guessing because mint 11 is too old for the DD image write to work properly. Did it again with peppermint 3, no luck!

So now the question is, how do I get this image off of my USB??? elevated privelages doesn't work, I can't even reformat the USB stick, what is going on here? Again gparted said it had no partition table and so I made one, and the most bizarre thing is all the peppermint 3 data is still there. It shows that it has no partition, and when I try to write one says that it can't be written since it's in use by the system.

It would be amazing if the program offered an undo function to wipe the stick.
turqoisehex
Level 1
Level 1
 
Posts: 45
Joined: Tue Aug 03, 2010 9:33 pm

Linux Mint is funded by ads and donations.
 

Re: Can't format after using USB Image writer,USB sticks bri

Postby catweazel on Sat May 04, 2013 7:34 pm

You can try this:
Code: Select all
$ tr "\000" "\377" < /dev/zero | dd ibs=1k count=100 of=paddedfile.bin
$ sudo dd if=paddedfile.bin of=/dev/usbX bs=5M count=1

Where /dev/usbX is the device path. The commands will write 5MBs of FFs (instead of zeroes) beginning at the start of the device. You should then be able to create a new partition table on it using gparted.

I use this method to quickly clobber SandForce-based SSDs, and the occasional recalcitrant flash drive.
Mint Testing Team & Mint Donor #3606
KDE 4.12.0, custom preemptive kernel 3.12.5,
Intel i7 4770K @ 4.7GHz, 16GB 2666MHz XMP,
4 Samsung 840 PRO 512GB SSDs in RAID0,
6TB HW RAID10, dual 24" Acer X243H,
Gigabyte nVidia GTX 680 Super Overclock
User avatar
catweazel
Level 7
Level 7
 
Posts: 1656
Joined: Fri Oct 12, 2012 9:44 pm

Re: Can't format after using USB Image writer,USB sticks bri

Postby turqoisehex on Sat May 04, 2013 11:20 pm

Thanks for that. For the second one I mounted and unmounted it a few times, and eventually got it to create a new table. For the first one I'll try your suggestion, so thanks.
turqoisehex
Level 1
Level 1
 
Posts: 45
Joined: Tue Aug 03, 2010 9:33 pm

Re: Can't format after using USB Image writer,USB sticks bri

Postby spamazoid on Sat May 04, 2013 11:40 pm

I had a similar issue and found an alternative workaround.
I had a USB stick that would keep coming up as a CD device with 2 partition tables and was mountable but errored everytime that Windows had used it and had not removed it cleanly which was bogus
it was locked in Gparted and couldn't and in windows it came up with no errors.

I tried reformatting in Linux and WIndows and it made no difference everytime it came to the same result
My fix was within windows atleast, wipe the drive with Zero's (aurely there's a Linux way to do that too) then create a new partition table and it was useable again without errors.
Image
spamazoid
Level 1
Level 1
 
Posts: 21
Joined: Thu Nov 10, 2011 5:15 am
Location: Adelaide, South Australia


Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 18 guests