外接USB光驱被识别为SCSI,无法安装

外接USB光驱被识别为SCSI,无法安装

我正在尝试在运行 Raspbian 的 Raspberry Pi 4 上连接 USB DVD/RW 光驱。

$uname -a
Linux ras4 4.19.93-v7l+ #1290 SMP Fri Jan 10 16:45:11 GMT 2020 armv7l GNU/Linux

驱动器完全工作;我已经在 Windows 上对其进行了测试,几年前它在 Bananian 上运行(作为驱动器 /dev/sr0)。

当我将它附加到我的 Raspberry 时,以下条目将添加到系统日志中:

Apr 13 00:11:34 ras4 kernel: [6312011.699514] usb 1-1.2.4.2: new high-speed USB device number 79 using xhci_hcd
Apr 13 00:11:36 ras4 vhusbdarm[669]: Found High speed device [152e:1640] "HLDS Inc, SuperMulti RW   " at address 11242
Apr 13 00:11:36 ras4 kernel: [6312014.270562] usb 1-1.2.4.2: New USB device found, idVendor=152e, idProduct=1640, bcdDevice= 1.59
Apr 13 00:11:36 ras4 kernel: [6312014.270581] usb 1-1.2.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 13 00:11:36 ras4 kernel: [6312014.270596] usb 1-1.2.4.2: Product: SuperMulti RW
Apr 13 00:11:36 ras4 kernel: [6312014.270608] usb 1-1.2.4.2: Manufacturer: HLDS Inc
Apr 13 00:11:36 ras4 kernel: [6312014.270621] usb 1-1.2.4.2: SerialNumber: 00101016400014AB5
Apr 13 00:11:36 ras4 kernel: [6312014.272784] usb-storage 1-1.2.4.2:1.0: USB Mass Storage device detected
Apr 13 00:11:36 ras4 kernel: [6312014.273308] scsi host1: usb-storage 1-1.2.4.2:1.0
Apr 13 00:11:36 ras4 mtp-probe: checking bus 1, device 79: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4.2"
Apr 13 00:11:36 ras4 mtp-probe: bus: 1, device: 79 was not an MTP device
Apr 13 00:11:36 ras4 mtp-probe: checking bus 1, device 79: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4.2"
Apr 13 00:11:36 ras4 mtp-probe: bus: 1, device: 79 was not an MTP device
Apr 13 00:11:37 ras4 kernel: [6312015.301669] scsi 1:0:0:0: CD-ROM            HL-DT-ST DVDRAM GE20NU10  EE06 PQ: 0 ANSI: 0
Apr 13 00:11:37 ras4 kernel: [6312015.302557] scsi 1:0:0:0: Attached scsi generic sg1 type 5

没有可用的设备 /dev/sr* 或 /dev/cdrom。系统日志不包含行“Attached scsi CD-ROM sr0”

尝试挂载 /dev/sg1 失败,并显示消息“不是块设备”,并且 lsblk 未列出它:

$lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 465,8G  0 disk
├─sda1        8:1    0   256M  0 part
└─sda2        8:2    0 465,5G  0 part /
mmcblk0     179:0    0  29,7G  0 disk
└─mmcblk0p1 179:1    0  29,7G  0 part /boot

我能做些什么?难道内核不支持这个设备吗?

答案1

我已经找到问题了。

由于某种原因,无法加载内核模块“sr_mod”。可能是我的内核出了问题。

$ modprobe sr_mod.ko
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.93-v7l+/modules.dep                                                                                                             .bin'
modprobe: FATAL: Module sr_mod not found in directory /lib/modules/4.19.93-v7l+

奇怪的是 sr_mod.so 实际上是存在的:

$ ls /lib/modules/4.19.97*/kernel/drivers/scsi/sr_mod.ko
-rw-r--r-- 1 root root 28K Feb  3 13:50 /lib/modules/4.19.97+/kernel/drivers/scsi/sr_mod.ko
-rw-r--r-- 1 root root 30K Feb  3 13:50 /lib/modules/4.19.97-v7+/kernel/drivers/scsi/sr_mod.ko
-rw-r--r-- 1 root root 30K Feb  3 13:50 /lib/modules/4.19.97-v7l+/kernel/drivers/scsi/sr_mod.ko
-rw-r--r-- 1 root root 37K Feb  3 13:50 /lib/modules/4.19.97-v8+/kernel/drivers/scsi/sr_mod.ko

$ uname -a
Linux ras4 4.19.93-v7l+ #1290 SMP Fri Jan 10 16:45:11 GMT 2020 armv7l GNU/Linux

解决办法是重新安装内核并重启系统:

$ apt install --reinstall raspberrypi-bootloader raspberrypi-kernel
$ reboot

重启后,模块 sr_mod 会自动加载,/dev/sr0 将变为可用。

相关内容