Флешка монтируется только read-only. Помогите.
делаю
mount /dev/sdb1 /media/kin/
mount: block device /dev/sdb1 is write-protected, mounting read-only
и даже так
mount -o rw,noexec /dev/sdb1 /media/kin/
mount: block device /dev/sdb1 is write-protected, mounting read-only
dmesg | tail
[ 4715.584568] sd 9:0:0:0: Attached scsi generic sg2 type 0
[ 4716.873369] sd 9:0:0:0: [sdb] 63037440 512-byte logical blocks: (32.2 GB/30.0 GiB)
[ 4716.873857] sd 9:0:0:0: [sdb] Write Protect is on
[ 4716.873861] sd 9:0:0:0: [sdb] Mode Sense: 23 00 80 00
[ 4716.873864] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[ 4716.877347] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[ 4716.877353] sdb: sdb1
[ 4716.926237] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[ 4716.926244] sd 9:0:0:0: [sdb] Attached SCSI removable disk
[ 4728.401660] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
fdisk -l
Disk /dev/sdb: 32.3 GB, 32275169280 bytes
5 heads, 32 sectors/track, 393984 cylinders
Units = cylinders of 160 * 512 = 81920 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 51 393984 31514688 c W95
FAT32 (LBA)
гуглил, не помогло. Что дальше? Инфу переписали, нужно отформатировать. На борту Debian 607.
Где то советовали сайт flashboot.ru но нету под рукой вин.(не ставить же ее )))) Как быть.
cannot remount /dev/sda2 read-write, is write-protected [duplicate]
I’m using ubuntu 16.04LTS on intel Core i3-6006U, 2.0GHz Asus pc.When I boot the pc I realized that there are some hard drive problems and it’s not able to boot on ubuntu. I tried the answer mentioned in this question: fsck error on boot: /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY and I run this command:
- sudo fsck -Af -M
- mount -o remount / it returns : mount: cannot remount /dev/sda2 read-write, is write-protected
and the other solutions mentioned in the question but no vain.How can I fix this? Should I reinstall ubuntu or does this due to a hardware problem?
sudo apt install smartmontools then a sudo smartctl —all /dev/sda What’s the output? Please edit your answer and put the output there.
`E: failed to fetch tn.archive.ubuntu.com/ubuntu/pool/main/s/smartmontools/… Could not open file /var/cache/apt/archives/partial/smartmontools_6.4+svn4214-1_amd64.deb — open (30: Read-only file system) [IP: 91.189.88.162 80]
1 Answer 1
From the comments.
You don’t need to install smartmontools to check SMART status. Just start the Disks application, select the disk, select SMART Data & Tests .
@heynnema I selected Smart Data & Tests and I try the tests
in the Overall Assessment I have Disk is OK, 5776 bad sectors
Because of the number of bad sectors, your hard disk may be defective.
Be prepared to backup your data, if possible.
However, lets try the following test.
To check the file system on your Ubuntu partition.
- boot to the GRUB menu
- choose Advanced Options
- choose Recovery mode
- choose Root access
- at the # prompt, type sudo fsck -f /
- repeat the fsck command if there were errors
- type reboot
If for some reason you can’t do the above.
- boot to a Ubuntu Live DVD/USB
- start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
- quit gparted
- open a terminal window
- type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
- repeat the fsck command if there were errors
- type reboot
USB turn write protection off
@micha — what kind of USB device is it — obviously you’ve checked if it has a hardware switch? any errors if you attempt to mount it? sudo mount /dev/sdb1 -v ?
micha, fair enough. Have you tried running efsck or used Ubuntu’s Disk Utility to check the health status of the flash disk? If it was working fine & then stopped working all of a sudden there could be a hardware malfunction.
@kingmilo e2fsck : Bad magic number in super-block while trying to open /dev/sdb1 SuperBlock is not readable.
@micha — very well, still doesn’t mean it’s not faulty though unfortunately. It’s common for storage devices to appear to work normally when in fact they are faulty, just at a different stage of faulty. I think with all the activity on this question you should ask for small donations to replace the drive, it would be easier 😜
8 Answers 8
To turn off disk device`s write protect, we use the low level system utility hdparm like this:
sudo apt-get install hdparm sudo hdparm -r0 /dev/sdb
where we asume that /dev/sdb is the Physical disk device we’re working on. If the device has partitions that are mounted as read-only, you should re-mount ’em as read-write in order to write data to them.
@OP I had the same as you, which is: sdxc card mounted read-only whatever the computer; hdparm -r shows «1 — on» then after unlocking with r0 : «0 — off» but mount read-only anyway. But mounting my SanDisk sd card in another adapter and I couuld mount it rw. It turns out two of my microSD-to-SD adapters have a broken pin between two connectors. And these two will mount read-only whatever I do. Kuddos to @Angel_Genchev he answer has the most command in it.
@lliseil It’s more than likely the reader’s write protect switch is being pressed upon by the card inserted into it, normally by the tab on the card but the switch (not the tab) can become bent and stuck on. you can fix the sdcard reader by cutting off the write-protect switch pins, the ones that make physical contact with the lock tab on the card. When the switch in the reader is open, write-protect is off, when it is closed (by being pressed upon the the tab on the card) write protect is on. Removing one or both of the switches metal arms will permanently disable write-protect on the reader.
After researching your question it appears that this is a not-too-uncommon problem with certain brands of USB flash drives (some older Samsung, a Kingston model) that would essentially just «crap out» for no known reason. People had tried opening them and jumping two leads (maybe from a flaky switch?) to no avail. If you still have this drive and it’s still in warranty I’d return it and get a replacement.
I hate to break the bad news to you =\ but it appears you’re out of luck in this situation as everything I’ve read points to hardware failure.
Edit 05/27/2016: I experienced an issue personally with a flash drive flaking out on me recently. In my case, this was a Corsair Flash Voyager 128GB that started slowing down pretty drastically on me. While it didn’t show the symptoms noted here, it occasionally would not mount and showed up as a «Silicon Power» device. This was a result of the drive having accrued a large amount of bad sectors and dropping into diagnostic/programming mode. Since this is one of my more popular answers and this also falls into the category of «failing flash drives,» I figured I’d include it here for reference.
Update 2: Regarding that Corsair Flash Voyager, I sent mine in for an RMA, only to have my second one fail on me in the same fashion. The problem actually turned out to be mechanical. The sliding mechanism seems to put a small amount of pressure on the PCB. Ordinarily, this wouldn’t have caused an issue in the normal life span of the device. But for this particular model, it seems to have had weak solder joints that the pressure from the sliding action exacerbated — leading to oxidation in the cracked joint and eventual failure. Rather than doing yet another RMA, I took matters into my own hands. I opened the case, shaved some of the plastic casing away to give the PCB some wiggle room and then reflowed the NAND chip to repair the broken solder joints. It’s working great to this day!