Write Protect Errors Creating Bootable USB Thumb Drives





Last Updated on 02/28/2014 by dboth

I have created many bootable USB thumb drives, both straight installation ISO images as well as bootable live media devices from which a complete version of Fedora Linux can be booted and run. I have also run into a number of issues that can occur while creating these devices.

There are two types of errors I have run into that seem to be related and which appear to have the same resolution. There are a number of web pages that I have found which provide an apparent solution but those solutions have not worked reliably for me.

The primary errors I have run into on both brand new and older thumb drives are I/O errors and some sort of write protection issue. The latter is not a mechanical write protect switch that can be found on some USB devices, but appears to be software based. The result is that the device cannot be partitioned or formatted and data cannot be copied to it.

I usually run into the write protect issue when attempting to partition, format or copy an image to a USB memory stick that has been used as a bootable device before, but it can also happen on a new, previously unused device although that is very rare.

The usual reason given on the Internet, usually as related to others experiencing these problems by the tech support of the vendor, is that the devices are getting old and this is a symptom of that. As I have mentioned, this problem can occur on brand new devices.

The main solution I have discovered on the net is to write over the first MB or GB or so of the device with zeros using the dd command such as shown below. The assumption is that the USB device is /dev/sdg and 8MB seems to be a common number for block size.

dd if=/dev/zero of=/dev/sdg bs=8MB count=1

I have found that, most of the time, this still leaves the device “write protected.” I have found that not specifying the block size and block count seems to resolve this problem almost all of the time. Using the command below simply overwrites the entire USB memory device.

dd if=/dev/zero of=/dev/sdg