如何使用不可移动介质格式化 USB 驱动器?

如何使用不可移动介质格式化 USB 驱动器?

我有一个带有不可移动介质的 USB 驱动器。我想格式化该 USB 驱动器并使其再次工作。以下是 hdparm 命令的输出:

hdparm -I /dev/sdb

/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

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 时的 dmesg 输出:

dmesg |tail -n200

[ 3266.268096] usb 3-6: new high-speed USB device number 8 using ehci-pci
[ 3266.401773] usb 3-6: New USB device found, idVendor=090c, idProduct=1000
[ 3266.401780] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3266.401784] usb 3-6: Product: USB Flash Disk
[ 3266.401786] usb 3-6: Manufacturer: General
[ 3266.401789] usb 3-6: SerialNumber: 0337515100009553
[ 3266.402281] usb-storage 3-6:1.0: USB Mass Storage device detected
[ 3266.402592] scsi host11: usb-storage 3-6:1.0
[ 3267.618456] scsi 11:0:0:0: Direct-Access     General  USB Flash Disk   1100 PQ: 0 ANSI: 4
[ 3267.619440] sd 11:0:0:0: Attached scsi generic sg3 type 0
[ 3267.622028] sd 11:0:0:0: [sdc] 31752576 512-byte logical blocks: (16.2 GB/15.1 GiB)
[ 3267.623260] sd 11:0:0:0: [sdc] Write Protect is on
[ 3267.623268] sd 11:0:0:0: [sdc] Mode Sense: 43 00 80 00
[ 3267.624237] sd 11:0:0:0: [sdc] Attached SCSI removable disk
[ 3267.635867]  sdc:
[ 3267.829180] FAT-fs (sdc): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 3269.192053] usb 7-2: new low-speed USB device number 126 using uhci_hcd
[ 3269.316066] usb 7-2: device descriptor read/64, error -71
[ 3269.544068] usb 7-2: device descriptor read/64, error -71
[ 3269.760053] usb 7-2: new low-speed USB device number 127 using uhci_hcd
[ 3269.884060] usb 7-2: device descriptor read/64, error -71
[ 3270.112055] usb 7-2: device descriptor read/64, error -71
[ 3270.332048] usb 7-2: new low-speed USB device number 2 using uhci_hcd
[ 3270.744038] usb 7-2: device not accepting address 2, error -71
[ 3270.856050] usb 7-2: new low-speed USB device number 3 using uhci_hcd
[ 3271.268047] usb 7-2: device not accepting address 3, error -71
[ 3271.268080] usb usb7-port2: unable to enumerate USB device
[ 3271.404090] usb 7-2: new low-speed USB device number 4 using uhci_hcd
[ 3271.732096] usb 7-2: device descriptor read/64, error -71
[ 3272.160097] usb 7-2: device descriptor read/64, error -71
[ 3272.376086] usb 7-2: new low-speed USB device number 5 using uhci_hcd
[ 3272.500051] usb 7-2: device descriptor read/64, error -71
[ 3272.928094] usb 7-2: device descriptor read/64, error -71
[ 3273.144096] usb 7-2: new low-speed USB device number 6 using uhci_hcd
[ 3273.560077] usb 7-2: device not accepting address 6, error -71
[ 3273.672076] usb 7-2: new low-speed USB device number 7 using uhci_hcd
[ 3274.080075] usb 7-2: device not accepting address 7, error -71
[ 3274.080105] usb usb7-port2: unable to enumerate USB device
[ 3274.216058] usb 7-2: new low-speed USB device number 8 using uhci_hcd
[ 3274.336065] usb 7-2: device descriptor read/64, error -71
[ 3274.560059] usb 7-2: device descriptor read/64, error -71
[ 3274.776042] usb 7-2: new low-speed USB device number 9 using uhci_hcd
[ 3275.100044] usb 7-2: device descriptor read/64, error -71
[ 3275.324075] usb 7-2: device descriptor read/64, error -71
[ 3275.544081] usb 7-2: new low-speed USB device number 10 using uhci_hcd
[ 3275.956060] usb 7-2: device not accepting address 10, error -71
[ 3276.068064] usb 7-2: new low-speed USB device number 11 using uhci_hcd
[ 3276.476066] usb 7-2: device not accepting address 11, error -71
[ 3276.476103] usb usb7-port2: unable to enumerate USB device
[ 3276.816077] usb 7-2: new low-speed USB device number 12 using uhci_hcd
[ 3276.940061] usb 7-2: device descriptor read/64, error -71
[ 3277.164064] usb 7-2: device descriptor read/64, error -71
[ 3277.584066] usb 7-2: new low-speed USB device number 13 using uhci_hcd
[ 3277.704084] usb 7-2: device descriptor read/64, error -71
[ 3277.932073] usb 7-2: device descriptor read/64, error -71
[ 3278.148077] usb 7-2: new low-speed USB device number 14 using uhci_hcd
[ 3278.560064] usb 7-2: device not accepting address 14, error -71
[ 3278.672062] usb 7-2: new low-speed USB device number 15 using uhci_hcd
[ 3279.080024] usb 7-2: device not accepting address 15, error -71
[ 3279.080051] usb usb7-port2: unable to enumerate USB device
[ 3279.420067] usb 7-2: new low-speed USB device number 16 using uhci_hcd
[ 3279.540040] usb 7-2: device descriptor read/64, error -71
[ 3279.764042] usb 7-2: device descriptor read/64, error -71
[ 3279.980061] usb 7-2: new low-speed USB device number 17 using uhci_hcd
[ 3280.304062] usb 7-2: device descriptor read/64, error -71
[ 3280.329991] usb 3-6: USB disconnect, device number 8
[ 3280.528067] usb 7-2: device descriptor read/64, error -71
[ 3281.152066] usb 7-2: new low-speed USB device number 18 using uhci_hcd
[ 3281.560060] usb 7-2: device not accepting address 18, error -71
[ 3281.672060] usb 7-2: new low-speed USB device number 19 using uhci_hcd
[ 3282.080056] usb 7-2: device not accepting address 19, error -71
[ 3282.080086] usb usb7-port2: unable to enumerate USB device
[ 3282.216077] usb 7-2: new low-speed USB device number 20 using uhci_hcd
[ 3282.544071] usb 7-2: device descriptor read/64, error -71
[ 3282.768069] usb 7-2: device descriptor read/64, error -71
[ 3283.392078] usb 7-2: new low-speed USB device number 21 using uhci_hcd
[ 3283.516095] usb 7-2: device descriptor read/64, error -71
[ 3283.740092] usb 7-2: device descriptor read/64, error -71
[ 3283.956041] usb 7-2: new low-speed USB device number 22 using uhci_hcd
[ 3284.364066] usb 7-2: device not accepting address 22, error -71
[ 3284.884087] usb 7-2: new low-speed USB device number 23 using uhci_hcd
[ 3285.296075] usb 7-2: device not accepting address 23, error -71
[ 3285.296108] usb usb7-port2: unable to enumerate USB device
[ 3285.432078] usb 7-2: new low-speed USB device number 24 using uhci_hcd
[ 3285.556085] usb 7-2: device descriptor read/64, error -71
[ 3285.984081] usb 7-2: device descriptor read/64, error -71
[ 3286.404078] usb 7-2: new low-speed USB device number 25 using uhci_hcd
[ 3286.528091] usb 7-2: device descriptor read/64, error -71
[ 3286.956084] usb 7-2: device descriptor read/64, error -71
[ 3287.172087] usb 7-2: new low-speed USB device number 26 using uhci_hcd
[ 3287.584057] usb 7-2: device not accepting address 26, error -71
[ 3287.696073] usb 7-2: new low-speed USB device number 27 using uhci_hcd
[ 3288.104079] usb 7-2: device not accepting address 27, error -71
[ 3288.104112] usb usb7-port2: unable to enumerate USB device
[ 3288.240083] usb 7-2: new low-speed USB device number 28 using uhci_hcd
[ 3288.364109] usb 7-2: device descriptor read/64, error -71
[ 3288.588076] usb 7-2: device descriptor read/64, error -71
[ 3288.804079] usb 7-2: new low-speed USB device number 29 using uhci_hcd
[ 3289.128060] usb 7-2: device descriptor read/64, error -71
[ 3289.356048] usb 7-2: device descriptor read/64, error -71
[ 3289.572186] usb 7-2: new low-speed USB device number 30 using uhci_hcd
[ 3289.984069] usb 7-2: device not accepting address 30, error -71
[ 3290.096062] usb 7-2: new low-speed USB device number 31 using uhci_hcd
[ 3290.504048] usb 7-2: device not accepting address 31, error -71
[ 3290.504092] usb usb7-port2: unable to enumerate USB device
[ 3290.640059] usb 7-2: new low-speed USB device number 32 using uhci_hcd
[ 3290.764058] usb 7-2: device descriptor read/64, error -71
[ 3290.992078] usb 7-2: device descriptor read/64, error -71
[ 3291.208076] usb 7-2: new low-speed USB device number 33 using uhci_hcd
[ 3291.332043] usb 7-2: device descriptor read/64, error -71
[ 3291.760066] usb 7-2: device descriptor read/64, error -71
[ 3291.976069] usb 7-2: new low-speed USB device number 34 using uhci_hcd
[ 3292.392051] usb 7-2: device not accepting address 34, error -71
[ 3292.504047] usb 7-2: new low-speed USB device number 35 using uhci_hcd
[ 3292.920051] usb 7-2: device not accepting address 35, error -71
[ 3292.920086] usb usb7-port2: unable to enumerate USB device
[ 3293.260071] usb 7-2: new low-speed USB device number 36 using uhci_hcd
[ 3293.384039] usb 7-2: device descriptor read/64, error -71
[ 3293.608091] usb 7-2: device descriptor read/64, error -71
[ 3293.824073] usb 7-2: new low-speed USB device number 37 using uhci_hcd
[ 3294.152072] usb 7-2: device descriptor read/64, error -71
[ 3294.376075] usb 7-2: device descriptor read/64, error -71
[ 3294.592087] usb 7-2: new low-speed USB device number 38 using uhci_hcd
[ 3295.008036] usb 7-2: device not accepting address 38, error -71
[ 3295.120078] usb 7-2: new low-speed USB device number 39 using uhci_hcd
[ 3295.532069] usb 7-2: device not accepting address 39, error -71
[ 3295.532102] usb usb7-port2: unable to enumerate USB device
[ 3295.668059] usb 7-2: new low-speed USB device number 40 using uhci_hcd
[ 3295.788062] usb 7-2: device descriptor read/64, error -71
[ 3296.012063] usb 7-2: device descriptor read/64, error -71
[ 3296.432106] usb 7-2: new low-speed USB device number 41 using uhci_hcd
[ 3296.560107] usb 7-2: device descriptor read/64, error -71
[ 3296.784065] usb 7-2: device descriptor read/64, error -71
[ 3297.000045] usb 7-2: new low-speed USB device number 42 using uhci_hcd
[ 3297.408037] usb 7-2: device not accepting address 42, error -71
[ 3297.520118] usb 7-2: new low-speed USB device number 43 using uhci_hcd
[ 3297.936043] usb 7-2: device not accepting address 43, error -71
[ 3297.936079] usb usb7-port2: unable to enumerate USB device
[ 3298.072096] usb 7-2: new low-speed USB device number 44 using uhci_hcd
[ 3298.196200] usb 7-2: device descriptor read/64, error -71
[ 3298.420046] usb 7-2: device descriptor read/64, error -71
[ 3298.844059] usb 7-2: new low-speed USB device number 45 using uhci_hcd
[ 3299.172063] usb 7-2: device descriptor read/64, error -71
[ 3299.396051] usb 7-2: device descriptor read/64, error -71
[ 3299.612052] usb 7-2: new low-speed USB device number 46 using uhci_hcd
[ 3300.024042] usb 7-2: device not accepting address 46, error -71
[ 3300.136084] usb 7-2: new low-speed USB device number 47 using uhci_hcd
[ 3300.552048] usb 7-2: device not accepting address 47, error -71
[ 3300.552082] usb usb7-port2: unable to enumerate USB device
[ 3300.688093] usb 7-2: new low-speed USB device number 48 using uhci_hcd
[ 3300.812083] usb 7-2: device descriptor read/64, error -71
[ 3301.040074] usb 7-2: device descriptor read/64, error -71
[ 3301.256065] usb 7-2: new low-speed USB device number 49 using uhci_hcd
[ 3301.380065] usb 7-2: device descriptor read/64, error -71
[ 3301.608079] usb 7-2: device descriptor read/64, error -71
[ 3301.824056] usb 7-2: new low-speed USB device number 50 using uhci_hcd
[ 3302.236063] usb 7-2: device not accepting address 50, error -71
[ 3302.348078] usb 7-2: new low-speed USB device number 51 using uhci_hcd
[ 3302.764057] usb 7-2: device not accepting address 51, error -71
[ 3302.764091] usb usb7-port2: unable to enumerate USB device
[ 3302.900096] usb 7-2: new low-speed USB device number 52 using uhci_hcd
[ 3303.024046] usb 7-2: device descriptor read/64, error -71
[ 3303.252078] usb 7-2: device descriptor read/64, error -71
[ 3303.468062] usb 7-2: new low-speed USB device number 53 using uhci_hcd
[ 3303.596071] usb 7-2: device descriptor read/64, error -71
[ 3303.824056] usb 7-2: device descriptor read/64, error -71
[ 3304.040059] usb 7-2: new low-speed USB device number 54 using uhci_hcd
[ 3304.456037] usb 7-2: device not accepting address 54, error -71
[ 3304.568044] usb 7-2: new low-speed USB device number 55 using uhci_hcd
[ 3304.980049] usb 7-2: device not accepting address 55, error -71
[ 3304.980088] usb usb7-port2: unable to enumerate USB device
[ 3305.320079] usb 7-2: new low-speed USB device number 56 using uhci_hcd
[ 3305.444104] usb 7-2: device descriptor read/64, error -71
[ 3305.672050] usb 7-2: device descriptor read/64, error -71
[ 3306.092097] usb 7-2: new low-speed USB device number 57 using uhci_hcd
[ 3306.216053] usb 7-2: device descriptor read/64, error -71
[ 3306.440072] usb 7-2: device descriptor read/64, error -71
[ 3306.636070] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 3306.656080] usb 7-2: new low-speed USB device number 58 using uhci_hcd
[ 3307.068042] usb 7-2: device not accepting address 58, error -71
[ 3307.180067] usb 7-2: new low-speed USB device number 59 using uhci_hcd
[ 3307.592025] usb 7-2: device not accepting address 59, error -71
[ 3307.592067] usb usb7-port2: unable to enumerate USB device
[ 3307.729153] usb 7-2: new low-speed USB device number 60 using uhci_hcd
[ 3307.852067] usb 7-2: device descriptor read/64, error -71
[ 3308.076072] usb 7-2: device descriptor read/64, error -71
[ 3308.292050] usb 7-2: new low-speed USB device number 61 using uhci_hcd
[ 3308.412045] usb 7-2: device descriptor read/64, error -71
[ 3308.636078] usb 7-2: device descriptor read/64, error -71
[ 3308.852038] usb 7-2: new low-speed USB device number 62 using uhci_hcd
[ 3309.260076] usb 7-2: device not accepting address 62, error -71
[ 3309.372087] usb 7-2: new low-speed USB device number 63 using uhci_hcd
[ 3309.780079] usb 7-2: device not accepting address 63, error -71
[ 3309.780112] usb usb7-port2: unable to enumerate USB device
[ 3309.916078] usb 7-2: new low-speed USB device number 64 using uhci_hcd
[ 3310.040083] usb 7-2: device descriptor read/64, error -71
[ 3310.264055] usb 7-2: device descriptor read/64, error -71
[ 3310.480041] usb 7-2: new low-speed USB device number 65 using uhci_hcd
[ 3310.600082] usb 7-2: device descriptor read/64, error -71

答案1

重要的:确保/dev/sdb这是您的 USB 闪存驱动器的设备!

用于lsblk确认它是/dev/sdb第一个:

$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb            8:16   1  14.4G  0 disk 
├─sdb4         8:20   1   1.4G  0 part /media/rick/Ubuntu 18.04 LTS amd64
├─sdb2         8:18   1     1M  0 part 
├─sdb5         8:21   1   6.4G  0 part /media/rick/casper-rw
├─sdb3         8:19   1   244M  0 part 
└─sdb1         8:17   1   6.4G  0 part /media/rick/usbdata
sr0           11:0    1  1024M  0 rom  
sda            8:0    0 931.5G  0 disk 
├─sda4         8:4    0   450M  0 part 
├─sda2         8:2    0   128M  0 part 
├─sda5         8:5    0  11.4G  0 part 
├─sda3         8:3    0   919G  0 part /mnt/d
└─sda1         8:1    0   500M  0 part 
nvme0n1      259:0    0   477G  0 disk 
├─nvme0n1p5  259:5    0   858M  0 part 
├─nvme0n1p3  259:3    0    16M  0 part 
├─nvme0n1p1  259:1    0   450M  0 part 
├─nvme0n1p8  259:8    0     9G  0 part /mnt/e
├─nvme0n1p6  259:6    0  23.7G  0 part /
├─nvme0n1p4  259:4    0 363.2G  0 part /mnt/c
├─nvme0n1p10 259:10   0  27.2G  0 part 
├─nvme0n1p2  259:2    0    99M  0 part /boot/efi
├─nvme0n1p9  259:9    0   7.9G  0 part [SWAP]
└─nvme0n1p7  259:7    0  44.6G  0 part /mnt/old

非常非常小心地输入以下命令:

sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1
  • 命令完成后稍等片刻。
  • 拔下并重新插入 USB 闪存盘。

验证其是否已被格式化:

$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb            8:16   1  14.4G  0 disk 
sr0           11:0    1  1024M  0 rom  
sda            8:0    0 931.5G  0 disk 
├─sda4         8:4    0   450M  0 part 
├─sda2         8:2    0   128M  0 part 
├─sda5         8:5    0  11.4G  0 part 
├─sda3         8:3    0   919G  0 part /mnt/d
└─sda1         8:1    0   500M  0 part 
nvme0n1      259:0    0   477G  0 disk 
├─nvme0n1p5  259:5    0   858M  0 part 
├─nvme0n1p3  259:3    0    16M  0 part 
├─nvme0n1p1  259:1    0   450M  0 part 
├─nvme0n1p8  259:8    0     9G  0 part /mnt/e
├─nvme0n1p6  259:6    0  23.7G  0 part /
├─nvme0n1p4  259:4    0 363.2G  0 part /mnt/c
├─nvme0n1p10 259:10   0  27.2G  0 part 
├─nvme0n1p2  259:2    0    99M  0 part /boot/efi
├─nvme0n1p9  259:9    0   7.9G  0 part [SWAP]
└─nvme0n1p7  259:7    0  44.6G  0 part /mnt/old
  • 注意,下面的所有分区/dev/sdb现在都消失了

现在您可以运行gparted来重新格式化闪存驱动器。

相关内容