Sanddisk 驱动器写保护

Sanddisk 驱动器写保护

我的 sanddisk usb 写保护,我试过了

ashokkrishna@ashokkrishna-Lenovo-B560:~$ sudo mount -o rw /dev/sdc1 /mnt
mount: block device /dev/sdc1 is write-protected, mounting read-only

# sudo mkfs -t vfat /dev/sdb1
mkfs.fat 3.0.26 (2014-03-07)
mkfs.vfat: unable to open /dev/sdb1: Read-only file system


sudo hdparm -r0 /dev/sdb1

我也尝试了 fsck 命令

Start cluster field in VFAT long filename slot is not 0 (but 0xdb2c).
1: Fix.
2: Leave it.
? 1
Unfinished long file name "쀸雉梆Ồ궏꾧썏ᔘ钾꾲彪Ꮦ".
  (Start may have been overwritten by ─Σæ#)
1: Delete LFN
2: Leave it as it is.
3: Fix numbering (truncates long name and attaches it to short name ─Σæ#)
? 1
Reserved field in VFAT long filename slot is not 0 (but 0xdc).
1: Fix.
2: Leave it.
? 1
Start cluster field in VFAT long filename slot is not 0 (but 0xdb2c).
1: Fix.
2: Leave it.
? 1
Unfinished long file name "쀸雉梆Ồ궏꾧썏ᔘ钾꾲彪Ꮦ".
  (Start may have been overwritten by ─Σæ#)
1: Delete LFN
2: Leave it as it is.
3: Fix numbering (truncates long name and attaches it to short name ─Σæ#)
? 1
Reserved field in VFAT long filename slot is not 0 (but 0xdc).
1: Fix.
2: Leave it.
? 1
Start cluster field in VFAT long filename slot is not 0 (but 0xdb2c).
1: Fix.
2: Leave it.
? 1
Unfinished long file name "쀸雉梆Ồ궏꾧썏ᔘ钾꾲彪Ꮦ".
  (Start may have been overwritten by ─Σæ#)
1: Delete LFN
2: Leave it as it is.
3: Fix numbering (truncates long name and attaches it to short name ─Σæ#)
? 1
/SEKAHR2/SEKHAR/Sekhar/English/Spoken English/Vasundra/All/AB
  Has a large number of bad entries. (948/1008)
Drop directory ? (y/n) 
1
Invalid input.
Drop directory ? (y/n) 1
Invalid input.
Drop directory ? (y/n) 1
Invalid input.
Drop directory ? (y/n) y
1


Read 32 bytes at 283836416:Input/output error

ashokkrishna@ashokkrishna-Lenovo-B560:~$ sudo fdisk /dev/sdb
You will not be able to write the partition table.

Command (m for help): o
Building a new DOS disklabel with disk identifier 0x8c87117f.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-30965759, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-30965759, default 30965759): 
Using default value 30965759

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

Command (m for help): w
fdisk: unable to write /dev/sdb: Bad file descriptor

但我无法格式化它,有什么解决办法吗?

答案1

听起来你的 USB 驱动器可能有坏块,坏块太多,内核强制只读挂载。要检查这是否属实,请使用检查内核消息缓冲区并sudo dmesg查找诸如Volume was not properly unmounted. Some data may be corrupted. Please run fsck或 之类的标志Input/Output error,最重要的是Filesystem has been set read-only。如果是这种情况,很可能没有保存(即你的驱动器快要坏了),但是你可以尝试下面的方法让它恢复一些生命(虽然它可能不起作用)。

我的 SD 卡快坏了,我曾经遇到过这个问题。您可以尝试创建一个全新的分区表(而不仅仅是重新格式化),然后重新格式化。

要创建一个全新的分区表(这将破坏驱动器上的所有数据),请运行fdisk /dev/path/to/device(您需要设备本身而不是单独的分区 - 在您的情况下它看起来像fdisk /dev/sdc并且不是/dev/sdc1)。

在 fdisk 提示符下,

  • 输入o新的分区表,然后
  • n对于新分区(并接受所有默认设置),
  • t然后c将分区类型更改为适合 FAT 文件系统的类型
  • 然后w将更改写入磁盘

此时您应该有一个带有新分区的设备(类似于/dev/sdc1:您可以用 进行检查lsblk。尝试格式化该分区。祝你好运。

相关内容