USB pen drive suddenly became read-only

29,347

You can try booting into a Linux system, and remounting it as read-write.

First, boot up your computer to any Linux. Then, plug your usb drive into your computer. (assuming the drive isn't dead from driving)

In this case, I will assume your drive is called

/dev/sdb
You can check this by doing fdisk -l when the drive is not plugged in, and doing it again when it is. Then compare the results.

Once you have found out what it is called, you can try remounting it as read-write.

sudo mount -o remount,rw /dev/sdb

At this point, it may complain that it is write-protected. In that case, you may also have to run sudo hdparm -r0 /dev/sdb

Then try remounting read-write again.

You should then be able to format it. You can do this with:

sudo dd if=/dev/zero of=/dev/sdb

Be careful with this command, a mistype with dd can format your HDD.

If you want to work on a specific partition, you will have to specify a number after the drive name. (eg.

/dev/sdb1
is your drive, partition 1)

If none of this works, can you try posting dmesg | tail after plugging it in?

Share:
29,347

Related videos on Youtube

masterofsql
Author by

masterofsql

Updated on September 18, 2022

Comments

  • masterofsql
    masterofsql over 1 year

    Kingston DTSE9 16 Gb USB pen drive (genuine one) suddenly becomes read-only. It has been used in a car, permanently plugged in into the USB socket as music collection for approx 6 months. It was barely written to, 5 times max. It could have been exposed to extremely low temperatures (-2 degree Celcius, Manchester, UK).

    Any attempt to format or partition fails. I have searched internet. I have tried OSX, Windows and Ubuntu. I can afford to throw it away and buy 10 new ones (wasted much more time already trying to format it) - but it's a matter of principle, right?

    My guts telling me it is possible to mount it manually in Unix/Linux in a special way - but I'm not strong in that. Any suggestions from a unix command line gurus who appreciate matter of principle? Or is it the time when machines are beating human yet? I know this site is the best on the internet, so if no-one here can help then no point fighting it further.

    Oh. There is no physical write protection switch on the drive

    Image on the pen drive: no physical switch

    Attempt to partition pen drive using OS X

    • Burgi
      Burgi almost 8 years
      The car could have been writing to the drive each time you... er... went for a drive, if you catch my meaning. The combined constant usage and extreme temperatures (having the car sit in the sun all day may have also cooked it) may have dramatically shortened the life of the drive.
    • fixer1234
      fixer1234 almost 8 years
      It seems like a very short life, but 1) Flash drives are notorious for the proportion of them that are made from crappy components that fail quickly, even the brand names. 2) Suddenly going read-only is symptomatic of the drive running out of spare blocks. It goes read-only to allow retrieving the contents before it completely dies. See if the manufacturer will replace it under warranty.