usb drive mounted only as read-only and nothing I do can format it
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
usb drive mounted only as read-only and nothing I do can format it
Just wondering if I could get this back to its original state. Don't mind what is on it, the thing is that nothing I try can format it:
Code:
#dmesg | tail
[52972.857024] scsi host15: usb-storage 1-1:1.0
[52973.857471] scsi 15:0:0:0: Direct-Access SanDisk Cruzer Blade 1.26 PQ: 0 ANSI: 5
[52973.858255] sd 15:0:0:0: Attached scsi generic sg1 type 0
[52973.859130] sd 15:0:0:0: [sdb] 62530624 512-byte logical blocks: (32.0 GB/29.8 GiB)
[52973.859988] sd 15:0:0:0: [sdb] Write Protect is on
[52973.859999] sd 15:0:0:0: [sdb] Mode Sense: 43 00 80 00
[52973.860263] sd 15:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA '
[52973.868617] sdb: sdb1
[52973.870216] sd 15:0:0:0: [sdb] Attached SCSI removable disk
[53339.873378] dumpe2fs[31395]: segfault at 0 ip 00007f7cbd65e6fa sp 00007fffb6114108 error 4 in libc-2.21.so[7f7cbd5d3000+1c0000]
# fsck -n /dev/sdb1
fsck de util-linux 2.26.2
fsck.fat 3.0.28 (2015-05-16)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automatically removing dirty bit.
Leaving filesystem unchanged.
/dev/sdb1: 7 files, 320278/1953029 clusters
# sudo hdparm -r0 /dev/sdb
/dev/sdb:
setting readonly to 0 (off)
readonly = 0 (off)
# mkfs.vfat /dev/sdb1
mkfs.fat 3.0.28 (2015-05-16)
mkfs.vfat: unable to open /dev/sdb1: Read-only file system
It was mkfs.vfat formated (linux envoriment) and when I was writing on it a lot of files it just sudenlly stop for ever allowing do write.
I've already tried another computer, live usb, gparted,parted, fsck; on windows: deep format tools, chkdsk, diskparted, a lot of software. Nothing seens possible do be done, everything returns a error message that the device is read only or has write protection.
That was a expensive device for me and I am up to try everything that whould be thought.Is a recent drive althought it has no warranty anymore.
Any way/program to force formating this? Any idea will be helpfull.
Google "SanDisk Cruzer Blade read only" and you will find quite a few results. Among them some that indicate a hardware fault that requires returning the product. I would talk to SanDisk.
Google "SanDisk Cruzer Blade read only" and you will find quite a few results. Among them some that indicate a hardware fault that requires returning the product. I would talk to SanDisk.
Unfortunantly I can't do that. What can you say about the two first outputs of my last post? Doesn't it seens to be a bad formated drive with end up by locking write permissions to safety?
If that doesn't work, try zero filling the entire drive:
Code:
# dd if=/dev/zero of=/dev/sdb
If the above runs, then try partitioning and formatting the drive. If there is a firmware lock on the drive as appears to be the case, there's not much you can do unless the manufacturer has a tool to unlock the drive which does not appear to be the case from my limited googling. The above code is worth a try anyway before giving up on the drive.
If that doesn't work, try zero filling the entire drive:
Code:
# dd if=/dev/zero of=/dev/sdb
If the above runs, then try partitioning and formatting the drive. If there is a firmware lock on the drive as appears to be the case, there's not much you can do unless the manufacturer has a tool to unlock the drive which does not appear to be the case from my limited googling. The above code is worth a try anyway before giving up on the drive.
Yes I tried it:
Code:
# dd if=/dev/zero of=/dev/sdb bs=512 count=1
dd: failed to open “/dev/sdb”: Read only file system
# dd if=/dev/zero of=/dev/sdb
dd: failed to open “/dev/sdb”: Read only file system
I was just suposing this firmware lock. I'll look for something realted at the official website.
if it fails before end of device, it didn't take the dd writes. Some SD hardware fails to read-only hardware wise. Or near read-only states. I've had several fail over the years. Not that many technically, but I tend to buy new ones and run the OS on the new ones every six-ish months (paranoia level). Recalling that some of the early nand flash things were never meant to have more than a dozen writes to any one byte over it's lifetime. Fine for photos that you write once and forget about, not so great for operating systems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.