我有一个自系统崩溃以来受到写保护的 USB 闪存驱动器。在dmesg中,设备写保护先关闭,再开启。
这是dmesg:
sd 2:0:0:0: [sdb] 60566016 512-byte logical blocks: (31.0 GB/28.9 GiB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 2b 00 00 08
sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sdb: sdb1 sdb2 sdb3 sdb4
sd 2:0:0:0: [sdb] Write Protect is on
sd 2:0:0:0: [sdb] Mode Sense: 2b 00 80 08
sd 2:0:0:0: [sdb] Attached SCSI removable disk
EXT4-fs (sdb3): INFO: recovery required on readonly filesystem
EXT4-fs (sdb3): write access unavailable, cannot proceed (try mounting with noload)
/dev/sdb4: Can't open blockdev
这是命令的结果hdparm /dev/sdb
:
/dev/sdb:
multcount = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 29573/64/32, sectors = 60566016, start = 0
我也在badblocks
/deb/sdb 上运行过,它没有发现坏块。
我尝试了该命令hdparm -r0 /dev/sdb
,但没有成功。hdparm 安全命令不再成功,例如:
hdparm --security-mode m --user-master m --security-unlock p /dev/sdb
这个命令说:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
hdparm -I /dev/sdb
给出以下结果:
/dev/sdb:
ATA device, with non-removable media
Standards:
Likely used: 1
Configuration:
Logical max current
cylinders 0 0
heads 0 0
sectors/track 0 0
--
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 0 MBytes
device size with M = 1000*1000: 0 MBytes
cache/buffer size = unknown
Capabilities:
IORDY not likely
Cannot perform double-word IO
R/W multiple sector transfer: not supported
DMA: not supported
PIO: pio0
有没有办法关闭写保护,或者我的 USB 闪存驱动器肯定丢失了?
USB 很可能有硬件故障,这种情况经常发生,尤其是使用便宜的 USB 驱动器。
您的问题有一个广泛的答案:
https ://askubuntu.com/a/1028453/1177212