在我的Ubuntu 12.04上,当我插入usb设备时,在dev目录树下usb设备添加如下:
/dev/bus/usb/001/001
在我的CentOS 5上添加如下:
/dev/bus/usb/devices/2-1.4/
lsusb需要在/ dev下创建usb设备,就像第一个一样.为了解决这个问题,当我尝试手动链接它们时,操作系统会给出“没有这样的文件或目录错误.”,但链接同一目录可以在ubuntu下完成而没有问题.
CentOS的:
ln -s /dev/bus/usb/devices/2-1.4/descriptors /sys/bus/usb/001/001 ln: creating symbolic link `/sys/bus/usb/001/001' to `/dev/bus/usb/devices/2-1.4/descriptors': No such file or directory
在ubuntu中,在/ dev / bus / usb下创建不会出错.
当我在CentOS下插入我的USB设备时,日志是这样的:
Dec 5 12:20:18 2012 kernel: [74465.103460] usb 2-1.4: new high-speed USB device number 36 using ehci_hcd Dec 5 12:20:18 2012 kernel: [74465.194011] scsi62 : usb-storage 2-1.4:1.0 Dec 5 12:20:18 2012 kernel: [74465.194091] scsi63 : usb-storage 2-1.4:1.1 Dec 5 12:20:19 2012 kernel: [74466.196062] scsi 62:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2 Dec 5 12:20:19 2012 kernel: [74466.196441] scsi 63:0:0:0: Direct-Access HUAWEI TF CARD Storage PQ: 0 ANSI: 2 Dec 5 12:20:19 2012 kernel: [74466.198548] sr0: scsi-1 drive Dec 5 12:20:19 2012 kernel: [74466.198630] sr 62:0:0:0: Attached scsi generic sg1 type 5 Dec 5 12:20:19 2012 kernel: [74466.198719] sd 63:0:0:0: Attached scsi generic sg2 type 0 Dec 5 12:20:19 2012 kernel: [74466.201555] sd 63:0:0:0: [sdb] Attached SCSI removable disk Dec 5 12:20:22 2012 udevd-event[18390]: wait_for_sysfs: waiting for \'/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host62/ioerr_cnt\' Failed Dec 5 12:20:22 2012 udevd-event[18391]: wait_for_sysfs: waiting for \'/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.1/host63/ioerr_cnt\' Failed Dec 5 12:20:25 2012 udevd-event[18443]: wait_for_sysfs: waiting for \'/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.1/host63/target63:0:0/ioerr_cnt\' Failed Dec 5 12:20:25 2012 udevd-event[18442]: wait_for_sysfs: waiting for \'/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host62/target62:0:0/ioerr_cnt\' Failed
可能是什么原因以及如何解决?