Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to format a pen-drive (Daiichi-Sankyo) but it's read-only and/or write protected. I list all commands results I made so far:

sudo gparted &

Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only.

This is a dmesg output for /dev/sdb

:~$ sudo dmesg | grep sdb
[  191.911329] sd 6:0:0:0: [sdb] 16384 512-byte logical blocks: (8.38 MB/8.00 MiB)
[  191.913004] sd 6:0:0:0: [sdb] Write Protect is on
[  191.913010] sd 6:0:0:0: [sdb] Mode Sense: 0b 00 80 08
[  191.914389] sd 6:0:0:0: [sdb] No Caching mode page found
[  191.914396] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[  191.922249] sd 6:0:0:0: [sdb] No Caching mode page found
[  191.922256] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[  191.923511]  sdb:
[  191.933448] sd 6:0:0:0: [sdb] No Caching mode page found
[  191.933454] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[  191.933458] sd 6:0:0:0: [sdb] Attached SCSI removable disk
[ 6735.046192] FAT-fs (sdb): Unrecognized mount option "x-gvfs-show" or missing value
[ 8245.875288] sd 7:0:0:0: [sdb] 16384 512-byte logical blocks: (8.38 MB/8.00 MiB)
[ 8245.878455] sd 7:0:0:0: [sdb] Write Protect is on
[ 8245.878463] sd 7:0:0:0: [sdb] Mode Sense: 0b 00 80 08
[ 8245.879828] sd 7:0:0:0: [sdb] No Caching mode page found
[ 8245.879834] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 8245.889213] sd 7:0:0:0: [sdb] No Caching mode page found
[ 8245.889225] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 8245.890452]  sdb:
[ 8245.895956] sd 7:0:0:0: [sdb] No Caching mode page found
[ 8245.895962] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 8245.895968] sd 7:0:0:0: [sdb] Attached SCSI removable disk
[ 8245.945151] scsi 7:0:0:0: [sdb] killing request
[ 8245.945162] scsi 7:0:0:0: [sdb] Unhandled error code
[ 8245.945165] scsi 7:0:0:0: [sdb]  
[ 8245.945172] scsi 7:0:0:0: [sdb] CDB: 
[ 8245.945196] end_request: I/O error, dev sdb, sector 16378
[ 8245.945200] Buffer I/O error on device sdb, logical block 2047
[ 8245.945217] Buffer I/O error on device sdb, logical block 2047
[ 8245.945315] Buffer I/O error on device sdb, logical block 1
[ 8245.945320] Buffer I/O error on device sdb, logical block 1
[ 8245.945327] Buffer I/O error on device sdb, logical block 1
[ 8245.945360] Buffer I/O error on device sdb, logical block 2047
[ 8245.945370] Buffer I/O error on device sdb, logical block 0
[ 8245.945377] Buffer I/O error on device sdb, logical block 0
[ 8245.945383] Buffer I/O error on device sdb, logical block 0
[ 8245.945389] Buffer I/O error on device sdb, logical block 0
[ 8249.197205] sd 8:0:0:0: [sdb] 16384 512-byte logical blocks: (8.38 MB/8.00 MiB)
[ 8249.198210] sd 8:0:0:0: [sdb] Write Protect is on
[ 8249.198219] sd 8:0:0:0: [sdb] Mode Sense: 0b 00 80 08
[ 8249.199452] sd 8:0:0:0: [sdb] No Caching mode page found
[ 8249.199460] sd 8:0:0:0: [sdb] Assuming drive cache: write through
[ 8249.207734] sd 8:0:0:0: [sdb] No Caching mode page found
[ 8249.207741] sd 8:0:0:0: [sdb] Assuming drive cache: write through
[ 8249.209151]  sdb:
[ 8249.213093] sd 8:0:0:0: [sdb] No Caching mode page found
[ 8249.213100] sd 8:0:0:0: [sdb] Assuming drive cache: write through
[ 8249.213104] sd 8:0:0:0: [sdb] Attached SCSI removable disk

I have tried with:

sudo hdparm -r0 /dev/sdb

/dev/sdb:
setting readonly to 0 (off)
readonly      =  0 (off)

and than with:

sudo dd if=/dev/zero of=/dev/sdb bs=512 count=16
dd: opening ‘/dev/sdb’: Read-only file system

The strange thing is this:

sudo fdisk -l /dev/sdb 

Disk /dev/sdb: 8 MB, 8388608 bytes
1 heads, 16 sectors/track, 1024 cylinders, total 16384 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f727265

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   ?  1684955424  3386954047   850999312   6c  Unknown
/dev/sdb2   ?  1998616933  2542722764   272052916   6e  Unknown
/dev/sdb3   ?   538988361  1077964648   269488144   79  Unknown
/dev/sdb4   ?  1394614304  1394635640       10668+  53  OnTrack DM6 Aux3

Partition table entries are not in disk order

I don't have these partions available I have only /dev/sdb :

ls -la /dev/sdb*
brw-rw---- 1 root disk 8, 16 nov  9 11:32 /dev/sdb

My question is how can i make this device RW ?

sudo mount -o rw /dev/sdb /media/krozus/mnt/
mount: block device /dev/sdb is write-protected, mounting read-only
share|improve this question
    
Don't forget some pendrives have a hardware lock. –  Rinzwind Nov 9 '13 at 11:49
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.