Ubuntu – USB flash drive stuck in RO after DDing ISO

partitioningusb-drive

After I used dd to make a USB drive from an Ubuntu ISO, I am unable to format it for normal use.

I ran:

sudo dd if="ubuntu-16.04-desktop-amd64.iso" of="/dev/sdb" bs=4M

In order to create a bootable USB drive.

However, after I was done with it, I wanted to format it as FAT32 and use it like a normal USB drive.

No problem, should be easy, right? WRONG.

I have tried:

  • Using the included Disks application to format it. It threw an error about corrupt GPT tables and wouldn't give me an override option.
  • Using Gparted the erase the current partition table and write a new MBR table [completed successfully]
  • After that I created a FAT32 partition spanning the entire volume, and remounted. [Showed up in Files, good so far]
  • Attempted to copy a file to it. It thre an error saying the medium was read-only.
  • Erased the partition table again in Gparted and this time created an NTFS partition spanning the entire disk. [Same RO error when attempting to copy a file onto it]
  • Repeated the procedure trying this time with EXT4 [Same RO error]
  • Repeated procedure trying a GTP table instead of an MBR table. {Same error]

Finally, I tried running:

sudo hdparm -r0 /dev/sdb

And remounted. Still the same error. Keep in mind that I remounted it after formatting it each time.

I am at a total loss. Has dd bricked my USB drive?

Best Answer

I can't really be sure which of the things I did fixed it, but it turns out that something must not have been synced.

Simply rebooting the computer fixed the issue. However I did try plugging it into a different Ubuntu system and it didn't work there either. So it was definitely something I did that fixed it.


For anyone else facing this issue, I would recommend running these commands to make sure it is usable again:

sudo dd if="/dev/zero" of="/dev/sdX" bs=1M count=10 #Replace "X" with your USB's letter
sudo reboot
Related Question