Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 4GB pendrive. while trying to formatting, it gives Write protected message. The pendrive is not having write protection notch. I have tried is on Windows as well as on Fedora 13.

cfdisk & fdisk or mkfs; nothing is working they are giving the same message that could not format write protected drive.

Disk /dev/sdb: 4016 MB, 4016046080 bytes
90 heads, 25 sectors/track, 3486 cylinders
Units = cylinders of 2250 * 512 = 1152000 bytes
Disk identifier: 0x000ae90f

Device     Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           4        3487     3917824    b  W95 FAT32


cfdisk /dev/sdb
Opened disk read-only - you have no permission to write

sudo tune2fs -l /dev/sdb
tune2fs 1.41.9 (22-Aug-2009)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb
Couldn't find valid filesystem superblock.
share|improve this question

migrated from serverfault.com Dec 6 '10 at 8:15

This question came from our site for professional system and network administrators.

    
The issue above seems to be that you're trying to use an e2fs tool (tune2fs) on a device that contains a single VFAT file system. Before we go any further, could you say whether you want a vfat or an e2fs filesystem on the USB stick? Could you also say if you get the same write error when you do sudo cfdisk /dev/sdb1? –  MadHatter Dec 4 '10 at 8:43

4 Answers 4

You can use

sudo hdparm -r0 /dev/sdb

(where sdb is the device file of your USB stick) to turn the write protection off.

share|improve this answer

Try this

umount /dev/sdb
fdisk /dev/sdb
mkfs -t vfat /dev/sdb
share|improve this answer
    
If you're creating a partition and trying to format the partition, then the command needs to be mkfs -t vfat /dev/sdb1 (or whatever partition number it is you made) –  DerfK Dec 4 '10 at 13:04
    
I have tried mkfs too, but the message i'm getting in syslog is that, Bad magic number, & drive is mounting read only. & the drive doesnt having write protection notch. I can still copy data from the drive but formatting & deletion is not possible. –  bvishal4u Dec 7 '10 at 12:53
    
cant able to fdisk or sfdisk also. –  bvishal4u Dec 7 '10 at 12:53
    
I think superblock is currupted, how to recover from backup superblock. –  bvishal4u Dec 7 '10 at 13:05
    
Thanks, ubuntu@ubuntu-Latitude-D510:~$ sudo mkfs -t vfat /dev/sdb mkfs.vfat 3.0.9 (31 Jan 2010) mkfs.vfat: unable to open /dev/sdb Still the problem is same of "could not open write protected drive" –  bvishal4u Dec 9 '10 at 11:30

When I had some problems with the usb pendrive formatting, I used the HP USB Disk Storage Format Tool for Windows. Depending on the size of the pendrive, it can take minutes to perform the operation. I hope this can help to solve your problem.

share|improve this answer

Kind of old topic, but I'll write for googlers...

I had similar problem when using my Adata-pendrive on a usb hub. I think it got short circuited or I've removed it while writing (yeah, stupid thing to do). After that, it entered in some sort of write protection mode. Some say the firmware may set the device in write-protection after encounter bad blocks, so I've heard. I've tried everything possible, Hirens-Boot-CD, Gparted, Windows utilities, no luck at all.

What solved my problem was a utility from Adata itself, called

"USB Flash Drive Online Recovery tool"

you can get from official aData website. Of course, the hint is to look after some sort of similar utility from the manufacturer of your pendrive. I think such utilities have ways to unlock the device that general utilities don't.

My pendrive is a 16Gb Usb 3.0. Before the problem, it had 14.7Gb of storage. After recovery, it is 14.2Gb, seems like some nand memory got corrupted and marked as not usable afterwards.

Hope it helps someone...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.