删除 USB 驱动器上的写保护

删除 USB 驱动器上的写保护

我有一个 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 闪存驱动器肯定丢失了?

答案1

最有可能的是 USB 出现硬件故障,这种情况经常发生,尤其是便宜的 USB 驱动器。
您的问题有一个广泛的答案:
https://askubuntu.com/a/1028453/1177212

相关内容