You are not logged in.

#1 2010-12-25 17:27:17

sant527
Member
Registered: 2009-06-21
Posts: 273

pen drive write protected - Unable to format

I have a usb pen drive mounted. I cannot create any folder or delete any file. It says read only mode.

I also tried to formate it using the gparted tool, it says partition read only

I tried dd command it also says partition is read only file system
sudo dd if=/dev/zero of=/dev/sdb1

Even dmesg gives some errors

sdb: error -123 sending status comand
sdb: error -123 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev sdb, sector 168


I just want my pend drive to work. I am willing to erase all the data. I have searched on google, but there is no answer from linux side. From windows side they have a tool called "HP USB Disk Storage Format Tool SP27608" which does. I dont want to shift to windows for this reason.except that i got a link for a windows software

Offline

#2 2010-12-25 17:33:12

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: pen drive write protected - Unable to format

I would be very careful about using dd command

Can you give output of the command mount

Last edited by Mr Green (2010-12-25 17:33:33)


Mr Green

Offline

#3 2010-12-25 17:45:07

sant527
Member
Registered: 2009-06-21
Posts: 273

Re: pen drive write protected - Unable to format

$mount
proc on /proc type proc (rw,relatime)
sys on /sys type sysfs (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=215447,mode=755)
/dev/disk/by-uuid/f3a6d5c8-57db-48d7-afff-e6762a184f55 on / type ext3 (rw,commit=0)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda2 on /media/GAUR type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
gvfs-fuse-daemon on /home/simha/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=simha)
/dev/sdb1 on /media/disk type vfat (ro,nosuid,nodev,uhelper=hal,uid=1000,utf8,shortname=mixed,flush)

Offline

#4 2010-12-25 17:48:54

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: pen drive write protected - Unable to format

/dev/sdb1 on /media/disk type vfat (ro,nosuid,nodev,uhelper=hal,uid=1000,utf8,shortname=mixed,flush)

Now do

sudo umount /dev/sdb1

Then

sudo cfdisk /dev/sdb

You should get a window come up with partition table

Last edited by Mr Green (2010-12-25 17:49:08)


Mr Green

Offline

#5 2010-12-25 17:49:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pen drive write protected - Unable to format

Maybe you can try the HP USB Disk Storage Format Tool under wine :-)

/dev/sdb1 on /media/disk type vfat (ro,nosuid,nodev,uhelper=hal,uid=1000,utf8,shortname=mixed,flush)

'ro' means read-only. Mount it rw and try again.

Offline

#6 2010-12-25 17:52:35

sant527
Member
Registered: 2009-06-21
Posts: 273

Re: pen drive write protected - Unable to format

$cfdisk /dev/sdb

it says

Opened disk read-only - you have no permission to write

if i go further it shows the following options only

[   Help   ]  [   New    ]  [  Print   ]  [   Quit   ]  [  Units   ]

No write option

Offline

#7 2010-12-25 17:57:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pen drive write protected - Unable to format

Try

mount -o rw /dev/sdb1 /media/disk

Offline

#8 2010-12-25 18:09:14

sant527
Member
Registered: 2009-06-21
Posts: 273

Re: pen drive write protected - Unable to format

$mount -o rw /dev/sdb1 /media/disk
mount: block device /devsdb1 is write-protected, mounting read-only

Offline

#9 2010-12-25 18:15:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pen drive write protected - Unable to format

sant527 wrote:

mount: block device /devsdb1 is write-protected, mounting read-only

I get such output when I mount CDs - are you sure it's a pendrive? ;P
Maybe your pendrive has a lock somewhere on the bottom / on the side (similar to a 3.5" floppy write-protection)?

Can you give us the name & type of your pendrive?

Offline

#10 2010-12-25 18:27:30

sant527
Member
Registered: 2009-06-21
Posts: 273

Re: pen drive write protected - Unable to format

Its transcend company. There is no lock in this system.

Among my many searches in google i found people asking this question in the end.

Just think if it is possible with that windows software i mentioned in my previous post, then why is it not possible in linux.

Offline

#11 2010-12-25 18:29:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pen drive write protected - Unable to format

Was it working OK and then it stopped or was it always write-protected like this?

Offline

#12 2010-12-25 18:53:07

sant527
Member
Registered: 2009-06-21
Posts: 273

Re: pen drive write protected - Unable to format

It was working fine and suddenly problem started

Offline

#13 2010-12-25 19:22:51

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: pen drive write protected - Unable to format

A quick search shows that some drives do have these read only problems.

Did come across storage device manager

https://aur.archlinux.org/packages.php?ID=16992

MrG


Mr Green

Offline

#14 2010-12-25 21:21:53

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: pen drive write protected - Unable to format

I suspect that drive has failed on a hardware level.  There seems to me no reason you could not write directly to the block device on any non-faulty drive unless that drive has a physical mechanism to toggle write-protection.

Offline

#15 2010-12-25 23:17:28

mandog
Member
From: Peru
Registered: 2008-09-17
Posts: 218

Re: pen drive write protected - Unable to format

use parted magic, live cd and do a disc check if unable to disc check you can tranfer the data to another drive and format the pen drive if that fails use any windows machine load the pendrive right click on properties and format it.
I suspect this was caused by not unmounting the pendrive before unplugging this also applies to windows and more so win7 as it writes code to lock the device if it is not unmounted correctly.


I'm dyslexic Please do not complain about puntuation or spelling and remember most dyslexic people have above average iq.

Offline

Board footer

Powered by FluxBB