无法格式化 USB 记忆棒

无法格式化 USB 记忆棒

2 小时前,我插入了我的 USB 记忆棒并使用“启动盘创建器”将 Ubuntu-iso 刻录到我的记忆棒上。

现在,我无法格式化我的 USB 记忆棒,我尝试使用磁盘、终端命令和 GPart。

我收到诸如“无法卸载驱动器...”之类的错误,还有其他一些错误。当我插入 Ubuntu/Windows 时,该驱动器甚至无法被识别

答案1

有时,装有实时 Ubuntu 的驱动器不能像其他此类驱动器那样轻松地格式化。

你也可以尝试磁盘再次 - 但没有齿轮按钮上的选项:来自右上角的选项(3 行,3 个点),即“格式化磁盘”。

在此处输入图片描述

您也可以删除所有分区并重新开始创建一个新的分区。

此外,我有时看到mintstickgparted 无法格式化 live-Ubuntu 棒。请参阅

答案2

在移除之前,您是否正确弹出了该棒?如果它表明无法卸载,则意味着仍在对其进行操作。如果您在它上面写有任何东西时将其插入,则文件系统可能已损坏 - 这可以解释为什么 Windows“无法识别它”(它可以识别它,但找不到要安装的有效文件系统)。

尝试注销并重新登录,或者最好重新启动,然后再次使用 gparted 格式化您的记忆棒。

答案3

首先,找出内核使用什么设备来操作 USB 驱动器。你应该先检查一下现在有哪些存储设备:

[alessandro@localhost ~]$ ls /dev/sd?
/dev/sda
[alessandro@localhost ~]$

然后插入 USB 并再次检查:

[alessandro@localhost ~]$ ls /dev/sd?
/dev/sda  /dev/sdb
[alessandro@localhost ~]$

sdb 刚刚出现,这是您的 USB 存储设备。或者,您可以在插入 USB 棒时检查系统日志:

[alessandro@localhost ~]$ $ tail -fn0 /var/log/syslog
Sep  6 11:54:31 localhost kernel: usb 2-1.3: new high-speed USB device number 6 using ehci-pci
Sep  6 11:54:31 localhost kernel: usb-storage 2-1.3:1.0: USB Mass Storage device detected
Sep  6 11:54:31 localhost kernel: scsi host8: usb-storage 2-1.3:1.0
Sep  6 11:54:31 localhost mtp-probe: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3"
Sep  6 11:54:31 localhost mtp-probe: bus: 2, device: 6 was not an MTP device
Sep  6 11:54:32 localhost kernel: scsi 8:0:0:0: Direct-Access     General  USB Flash Disk   1.0  PQ: 0 ANSI: 2
Sep  6 11:54:32 localhost kernel: sd 8:0:0:0: [sdb] 7831552 512-byte logical blocks: (4.00 GB/3.73 GiB)
Sep  6 11:54:32 localhost kernel: sd 8:0:0:0: [sdb] Write Protect is off
Sep  6 11:54:32 localhost kernel: sd 8:0:0:0: [sdb] Mode Sense: 03 00 00 00
Sep  6 11:54:32 localhost kernel: sd 8:0:0:0: Attached scsi generic sg2 type 0
Sep  6 11:54:32 localhost kernel: sd 8:0:0:0: [sdb] No Caching mode page found
Sep  6 11:54:32 localhost kernel: sd 8:0:0:0: [sdb] Assuming drive cache: write through
Sep  6 11:54:32 localhost kernel: sdb:
Sep  6 11:54:32 localhost kernel: sd 8:0:0:0: [sdb] Attached SCSI removable disk
[alessandro@localhost ~]$ 

如果在读取 syslog 文件时遇到权限错误,则可能必须使用 sudo 在 tail 命令前面添加前缀。

无论哪种方式,在您弄清楚必须使用什么设备来访问 USB 驱动器后,您应该检查驱动器是否未安装任何分区:

[alessandro@localhost ~]$ mount | grep /dev/sdb
[alessandro@localhost ~]$ 

没有输出,没有安装分区。如果命令返回已安装分区的列表,则卸载每个分区。然后,检查驱动器的分区表在系统中是否正常。
旧命令,旧分区格式(MBR 分区表),经典且稳定:

[root@localhost ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 3,8 GiB, 4009754624 bytes, 7831552 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: 0x00000000

[root@localhost ~]# 

新的命令、新的分区格式(GPT)、更多功能:

[root@localhost ~]# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.10

Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!

Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: damaged

Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.)
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer:

在这种情况下,我的 USB 出现问题,分区表混乱。我告诉 gdisk 使用它找到的 GPT 数据来尝试恢复存储设备:

Your answer: 2
Disk /dev/sdb: 7831552 sectors, 3.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 86EA5119-B15E-4964-A485-DC0C687C187C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7831518
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1050623   512.0 MiB   8300  Linux filesystem
   2         1050624         3147775   1024.0 MiB  8300  Linux filesystem
   3         3147776         4536319   678.0 MiB   8300  Linux filesystem
   4         4536320         4798463   128.0 MiB   8300  Linux filesystem
   5         4798464         7831518   1.4 GiB     8300  Linux filesystem
[root@localhost ~]# 

您可能会得到一个空的分区表,如果是这样,您应该创建一个新的分区表。保存新分区后,您应该有 /dev/sdb1、sdb2... 设备,您可以在其上创建新的文件系统,然后挂载并使用。希望这很容易理解。

相关内容