插入u盘
# usb 3-1: new SuperSpeed USB device using xhci_hcd and address 2
xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
scsi1 : usb-storage 3-1:1.0
scsi 1:0:0:0: Direct-Access ORICO-U3 1.00 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 16195584 512-byte logical blocks: (8.29 GB/7.72 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Assuming drive cache: write through
sda:
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Attached SCSI removable disk
说明已经找到u盘
查看/dev下是否有sda ,u盘挂载设备为sda,并且是sda1. 有的u盘识别为sda1
有.直接mount
没有
先看看/sys/block下面有没有U盘的设备目录,没有的话说名内核没识别出你的U盘,你要确定usb_storage,ehci_hcd,uhci_hcd,ohci_hcd这四个模块都加载了,如果/sys/block下有U盘的设备目录的话,看看/dev下有没有U盘的设备文件,如果没有,说明udev的规则文件有问题,这个要不自己写,要不找个相同版本的系统直接copy过来,在/etc/udev/rules.d下,如果/dev有设备文件的话,手动mount
如果没有使用udev 那么
# cat /proc/partitions
结果如下:
major minor #blocks name 31 0 32768 mtdblock0 31 1 16 mtdblock1 31 2 8 mtdblock2 31 3 2048 mtdblock3 31 4 512 mtdblock4 31 5 512 mtdblock5 31 6 4096 mtdblock6 31 7 4096 mtdblock7 31 8 5120 mtdblock8 31 9 102400 mtdblock9 31 10 102400 mtdblock10 31 11 303104 mtdblock11 8 0 3834912 sda 8 4 3834880 sda4
mknod /dev/sda b 8 0如果设备建立不对.那么就有这个错误
usb mount , failed: No such device or address usb挂载不了
# mount /dev/sda /tmp/my
FAT: IO charset cp936 not found
# mount -o charset=cp936 /dev/sda /tmp/my
Unable to load NLS Charset cp936
FAT:IO charset cp936 not found
有了之前那个ntfs的经验后,结合网上搜的一些资料,猜想可能是内核里也有对应的一个选项是用来支持cp936的,打开.config文件,果然不出所料,赫然写着#CONFIG_NLS_CODEPAGE_936 is not set,将其改为#CONFIG_NLS_CODEPAGE_936 = y,再次重新编译内核,然后mount带-o参数时就不会报错了。这样,中文不被支持的问题也得到了解决。
http://blog.csdn.net/nakemind/article/details/8686704