Ok so here's what happened.

I had been using a USB stick to re-install Windows 10 and quickly reformat my dads laptop. Now I used the existing Windows 10 to create the live USB drive and I guess it write protected the stick.

Now I've been trying a bunch of things to get my stick back:

  • Bootice
  • Gparted (Format to, Delete)
  • Windows Disk Utility
  • Linux (Cinnamon?) Disk Utility
  • Dispart (clean, recover)
  • Windows quick format

So I pretty much am just getting errors

Unable to format because of I/O Error

Unable to open drive read-write. Drive opened read-only

Unable to format because it's opened read-only

If you have any suggestions on what to do. I have a Linux and a Windows 10 installation so I can try both :)

  • Is it possible that the USB stick hardware got corrupted? – Yaron Jul 16 '17 at 12:21
  • Sure but I noticed right after installing Win10 with it. – NDTS Jul 16 '17 at 12:42
  • I had a similar issue with an external usb hdd. Not sure if it'll help with yours but using Ubuntu 14.04 as root not sudo worked. For sudo I kept getting permission error so as root I chmod 777 the entire usb hdd then formatted as root and all was well. – Software_Programineer Jul 17 '17 at 15:32

"Clean" the partition table and file allocation tables.

1: Zero out partition table... and a little more

dd if=/dev/zero of=/dev/sdx bs=2048 count=4

2: Create partitions (use cli "fdisk" or gui "gparted")

Create partition table "msdos"

Create partition(s) (NTFS fat32 ext3 ...)

Format partitions. (gparted does the partition creation and format in 1 step when you choose the partition type)

3: test USB


  • "live" OS is perferred but not required.
  • partition creation program like gparted or fdisk
  • PC to work on. A virtual machine will do.


Boot from the "live" ISO parted magic in a virtual machine. I prefer PartedMagic because everything I need is there in one ISO.

Pass through the USB to the virtual machine. /dev/sdx

Using this live ISO, remember that you are root and please verify that the correct drive is passed through to the virtual machine because if you inadvertently erase the wrong drive there is no undo.

Proceed with step 1.

  • I'm getting "failed to open /dev/sdb: Read-only file system" – NDTS Jul 19 '17 at 9:43
  • Not good. What command, and OS is giving you this error? Are you able to delete the partitions with gparted? – jc__ Jul 19 '17 at 15:42
  • the exact commands would be: "sudo dd if=/dev/zero of=/dev/sdb1 bs=2048 count=4" and "sudo dd if=/dev/zero of=/dev/sdb bs=2048 count=4". I am using Antergos. I am not able to do anything with gparted. – NDTS Jul 19 '17 at 21:05
  • sudo dd if=/dev/zero of=/dev/sdb bs=2048 count=4 would be the one you want because it is "outside" of the partitions. The drive must not be mounted at this time. – jc__ Jul 19 '17 at 21:13
  • Could you paste the output of sudo fdisk -l /dev/sdb, or sudo fdisk -l. Also if no gparted you could attempt to delete a partition with sudo fdisk /dev/sdb. If you could zero out the partition table there would not be any partitions to delete, but you could create them with fdisk. – jc__ Jul 19 '17 at 21:16

Your USB stick is in read-only mode because it is failing. All attempts at low-level manipulation (fdisk etc) will mysteriously fail.

Recover your data. SD cards provide the same feature before absolute failure, it’s very handy. If only Windows/etc reported the failure... wouldn’t that be great?

See https://superuser.com/a/543116


Format the disc into vfat using your Ubuntu installation.

sudo fsck.vfat -f -p <partition name>

Install smartmontools and run a test on your pendrive.

sudo apt-get install smartmontools 


sudo smartctl -a /dev/sda | less

to print drive health data, attributes, and available test results. To quit less, type q. Alternatively

sudo smartctl -H /dev/sda

to just print health data.

To begin a new short (a few minutes) or long (up to many hours) self test in background:

sudo smartctl -t [short|long]

Take a look at https://askubuntu.com/a/539185/680673 for more details about testing the pendrive.

  • 1
    make sure to umount \dev\<device name> before you format i.e before running the above command – GypsyCosmonaut Jul 16 '17 at 13:54
  • Ok I made sure the drive is not mounted in any way. Then I get "Currently, only 1 or 2 FATs are supported, not 0." – NDTS Jul 16 '17 at 17:05
  • Can you try mkfs.vfat /dev/<device name>, and then try to mount it? – Hunter.S.Thompson Jul 16 '17 at 17:41
  • yes did that and got: "mkfs.vfat: unable to open /dev/sdb1: Read-only file system" – NDTS Jul 16 '17 at 19:39
  • Please run a test on your pendrive, to see if it is corrupt or not. – Hunter.S.Thompson Jul 16 '17 at 20:17

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.