无法格式化带有乱码文本的 USB 驱动器

无法格式化带有乱码文本的 USB 驱动器

问题始于 Windows,驱动器名称打印出乱码和奇怪的字符,并且一些文件和文件夹自动创建了相同的乱码。通过 Windows 格式化并尝试不同类型的修复指南都没有帮助,主要是因为它被写保护了。

启动 Ubuntu 尝试修复此问题,正常格式化会导致错误消息

Error wiping device: Command-line `wipefs -a "/dev/sdb1"' exited with non-zero exit status 1: wipefs: error: /dev/sdb1: probing initialization failed: Read-only file system
 (udisks-error-quark, 0)

尝试使用 gparted,但卸载驱动器会导致此错误

Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only.

(gpartedbin:6382): glibmm-CRITICAL **: 
unhandled exception (type Glib::Error) in signal handler:
domain: g_convert_error
code  : 1
what  : Invalid byte sequence in conversion input

尝试更改读写权限但似乎没有效果

sudo hdparm -r0 /dev/sdb

/dev/sdb:
 setting readonly to 0 (off)
 readonly      =  0 (off)

gparted 相同的输出和

sudo mkfs -t vfat /dev/sdb1
mkfs.fat 3.0.27 (2014-11-12)
mkfs.vfat: unable to open /dev/sdb1: Read-only file system

sudo mkfs -t vfat /dev/sdb
mkfs.fat 3.0.27 (2014-11-12)
mkfs.vfat: unable to open /dev/sdb: Read-only file system

chmod 也不起作用

find /dev/sdb -type d -execdir chmod 777 -Rv {} +
find /dev/sdb1 -type d -execdir chmod 777 -Rv {} +

fdisk -l 输出

Partition 2 does not start on physical sector boundary.


Partition table entries are not in disk order.
Disk /dev/sdb: 7.4 GiB, 7985954816 bytes, 15597568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x462b2602

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        1392 15597567 15596176  7.4G  b W95 FAT32

答案1

您已将驱动器安装为只读 - chmod 将不起作用,因为它是一项写入操作。

您需要重新安装具有读写权限的驱动器:

sudo mount -o remount, rw `/dev/sdb1`

替换sdb为您的设备名称。

相关内容