我在 System76 Galago 上运行 Artix Linux。当我插入 USB 设备时,它显示为 /dev/usb/003/00X。
lsusb 输出示例:
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 5986:9102 Acer, Inc BisonCam,NB Pro
Bus 003 Device 002: ID 05dc:a815 Lexar Media, Inc. JumpDrive V10
Bus 003 Device 004: ID 8087:0026 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
并且安装起来遇到很多麻烦。
sudo mount /dev/usb/003/002
=mount: /mnt: /dev/bus/usb/003/002 is not a block device.
sudo fdisk /dev/bus/usb/003/002
=fdisk: cannot open /ddev/bus/usb/003/002: Operation not permitted
sudo cfdisk /dev/bus/usb/003/002 /mnt
=cfdisk: cannot open /dev/bus/usb/003/002: Inappropriate ioctl for device
sudo parted /dev/bus/usb/003/002
= ``` 错误:设备 /dev/bus/usb/003/002 太小,无法存储文件系统或分区表。也许您选择了错误的设备?警告:同步/关闭 /dev/bus/usb/003/002 时出错:参数无效
This is a flash drive that, to the best of my knowledge, has a FAT filesystem with backups.
答案1
你的/dev/bus/usb/003/002
是USB接口的代表。它不是该闪存驱动器上内容的表示(如果它是闪存驱动器)。你无法安装它。
dmesg
插入闪存驱动器后查看一下。您应该看到类似的内容
[5424328.266872] usb 3-1.1.3: New USB device found, idVendor=1307, idProduct=0165
[5424328.266879] usb 3-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[5424328.266882] usb 3-1.1.3: Product: Intenso Business Line
[5424328.266884] usb 3-1.1.3: Manufacturer: USBest Technology
[5424328.266887] usb 3-1.1.3: SerialNumber: <redacted>
[5424328.267303] usb-storage 3-1.1.3:1.0: USB Mass Storage device detected
[5424328.267700] scsi host9: usb-storage 3-1.1.3:1.0
[5424329.289320] scsi 9:0:0:0: Direct-Access Intenso Business 0.00 PQ: 0 ANSI: 2
[5424329.293793] sd 9:0:0:0: Attached scsi generic sg9 type 0
[5424329.294650] sd 9:0:0:0: [sdh] 7897088 512-byte logical blocks: (4.04 GB/3.77 GiB)
[5424329.295624] sd 9:0:0:0: [sdh] Write Protect is off
[5424329.295631] sd 9:0:0:0: [sdh] Mode Sense: 00 00 00 00
[5424329.296650] sd 9:0:0:0: [sdh] Asking for cache data failed
[5424329.296657] sd 9:0:0:0: [sdh] Assuming drive cache: write through
[5424329.517187] sdh: sdh1 sdh2
[5424329.626818] sd 9:0:0:0: [sdh] Attached SCSI removable disk
在这种情况下,/dev/sdh1
或者/dev/sdh2
是您要安装的设备。 (是的,该闪存驱动器有两个分区,因为我需要两个分区)。
如果你想通过 USB 路径来识别分区,你可以使用 中的别名/dev/disk/by-path/
。或者 中的任何其他别名/dev/disk/by-*
,如果您想通过卷标或其他方式识别它。