Linux 系统检测到 USB 设备但无法使用,并出现“未找到介质”错误

Linux 系统检测到 USB 设备但无法使用,并出现“未找到介质”错误

今天,我的主要 USB 密钥出现了一个奇怪的问题,我希望有办法从中提取一些数据。在 Linux 系统上,USB 正在工作,但过了一会儿就变成了只读模式。所以我卸载了它,无法再次安装它。

当我插入 USB 时,我在 dmesg 输出中看到:

[  130.015152] usb 2-1.1: USB disconnect, device number 4
[  148.668176] usb 2-1.1: new high-speed USB device number 5 using ehci-pci
[  148.778233] usb 2-1.1: New USB device found, idVendor=0c76, idProduct=0005
[  148.778237] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  148.778240] usb 2-1.1: Product: USB Mass Storage
[  148.778242] usb 2-1.1: Manufacturer: GENERIC 
[  148.778786] usb-storage 2-1.1:1.0: USB Mass Storage device detected
[  148.778997] scsi host4: usb-storage 2-1.1:1.0
[  149.805608] scsi 4:0:0:0: Direct-Access     GENERIC  USB Mass Storage 1.00 PQ: 0 ANSI: 4 CCS
[  149.806163] sd 4:0:0:0: Attached scsi generic sg2 type 0
[  149.808241] sd 4:0:0:0: [sdb] Attached SCSI removable disk

lsusb 命令显示它是 Transcend Flash Disk:

Bus 002 Device 003: ID 05c6:9204 Qualcomm, Inc. 
Bus 002 Device 005: ID 0c76:0005 JMTek, LLC. Transcend Flash disk
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 17ef:480f Lenovo Integrated Webcam [R5U877]
Bus 001 Device 003: ID 0a5c:217f Broadcom Corp. BCM2045B (BDC-2.1)
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsscsi 显示它附加为 ID 4:

[0:0:0:0]    disk    ATA      SanDisk SDSSDA24 30RL  /dev/sda 
[1:0:0:0]    cd/dvd  Optiarc  DVD RW AD-7930H  1.D0  /dev/sr0 
[4:0:0:0]    disk    GENERIC  USB Mass Storage 1.00  /dev/sdb

该设备在 /dev 中显示为块设备,但没有分区:

% ls -l /dev/sdb* /dev/disk/by-id/usb-GENERIC_USB_Mass_Storage-0:0 
lrwxrwxrwx 1 root root     9 ott 23 14:52 /dev/disk/by-id/usb-GENERIC_USB_Mass_Storage-0:0 -> ../../sdb
brw-rw---- 1 root disk 8, 16 ott 23 14:52 /dev/sdb

Now, whatever I try to execute on the device I got a Medium not found or cannot open file error:

% sudo fdisk -l /dev/sdb
fdisk: cannot open /dev/sdb: No medium found


% sudo testdisk /dev/sdb
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org

Unable to open file or device /dev/sdb: No medium found
```

% sudo dd if=/dev/sdb of=/tmp/disk.img
dd: failed to open '/dev/sdb': No medium found

% sudo gpart /dev/sdb

*** Fatal error: open(/dev/sdb): No medium found.

我怀疑分区表已经消失了,我能否从该设备中获取数据?

更新:我注意到磁盘未列在下面,/dev/disk/by-uuid而它有指向/dev/disk/by-id和朋友的链接。这证实了主要问题是存储似乎处于非活动状态,而板载控制器处于活动状态(猜测)。

相关内容