Linux - Hardware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
12-22-2015, 08:41 AM
|
#1
|
Member
Registered: Apr 2015
Posts: 98
Rep: 
|
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.
|
|
|
12-22-2015, 09:29 AM
|
#2
|
LQ Addict
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316
|
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.
|
|
|
12-22-2015, 09:40 AM
|
#3
|
Member
Registered: Apr 2015
Posts: 98
Original Poster
Rep: 
|
Quote:
Originally Posted by berndbausch
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?
|
|
|
12-22-2015, 09:57 AM
|
#4
|
Senior Member
Registered: Oct 2003
Posts: 3,015
|
If you can't return it, I would try to unmount sdb1 and zero fill the mbr on the drive like so:
Code:
# umount /dev/sdb1
# dd if=/dev/zero of=/dev/sdb bs=512 count=1
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.
|
|
|
12-22-2015, 11:14 AM
|
#5
|
Member
Registered: Apr 2015
Posts: 98
Original Poster
Rep: 
|
Quote:
Originally Posted by kilgoretrout
If you can't return it, I would try to unmount sdb1 and zero fill the mbr on the drive like so:
Code:
# umount /dev/sdb1
# dd if=/dev/zero of=/dev/sdb bs=512 count=1
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.
|
|
|
12-28-2015, 11:27 AM
|
#6
|
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
|
Quote:
Originally Posted by MattFly
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:
Any way/program to force formating this? Any idea will be helpfull.
|
take read only off of usb stick try that
Code:
sudo hdparm -r0 /dev/sdb
|
|
|
10-11-2019, 07:14 PM
|
#7
|
Member
Registered: Sep 2003
Location: Canada
Distribution: Fedora 30
Posts: 341
Rep:
|
Exactly what I am looking for! Thx
$ sudo yum install hdparm
Yes my device is /dev/sdb. Did you do an
$fdisk -l to determine yours first. Of course you did!
$ sudo hdparm -r0 /dev/sdb
/dev/sdb:
setting readonly to 0 (off)
readonly = 0 (off)
I could just chuck this silly device but why not just fix it!?
|
|
|
10-12-2019, 02:43 PM
|
#8
|
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 4,137
|
After zeroing a drive with dd, I like to verify that it's zeroe'd with cmp.
# dcfldd if=/dev/zero of=/dev/mydisk# bs=4M
# cmp /dev/zero /dev/mydisk#
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.
|
|
|
All times are GMT -5. The time now is 11:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|