zoukankan      html  css  js  c++  java
  • centos6挂载U盘

    一、FAT格式的U盘

    插入U盘

    [root@localhost ~]# dmesg | grep usb
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: EHCI Host Controller
    usb usb1: Manufacturer: Linux 2.6.32-431.el6.x86_64 ehci_hcd
    usb usb1: SerialNumber: 0000:00:0b.0
    usb usb1: configuration #1 chosen from 1 choice
    usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb2: Product: OHCI Host Controller
    usb usb2: Manufacturer: Linux 2.6.32-431.el6.x86_64 ohci_hcd
    usb usb2: SerialNumber: 0000:00:06.0
    usb usb2: configuration #1 chosen from 1 choice
    usbcore: registered new interface driver hiddev
    usbcore: registered new interface driver usbhid
    usbhid: v2.6:USB HID core driver
    usb 1-1: new high speed USB device number 2 using ehci_hcd
    usb 1-1: New USB device found, idVendor=0951, idProduct=1666
    usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    usb 1-1: Product: DataTraveler 3.0
    usb 1-1: Manufacturer: Kingston
    usb 1-1: SerialNumber: 60A44C3FACC9F21109990161
    usb 1-1: configuration #1 chosen from 1 choice
    usbcore: registered new interface driver usb-storage
    usb-storage: device found at 2
    usb-storage: waiting for device to settle before scanning
    usb-storage: device scan complete
    usb 1-1: USB disconnect, device number 2
    [root@localhost ~]# fdisk -l
    Disk /dev/sdb: 15.5 GB, 15472047104 bytes
    255 heads, 63 sectors/track, 1881 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xcad4ebea
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb4   *           1        1882    15109293    c  W95 FAT32 (LBA)
    [root@localhost ~]# mkdir /mnt/usb
    [root@localhost ~]# mount /dev/sdb4 /mnt/usb/
    [root@localhost ~]# df -h
    Filesystem                    Size  Used Avail Use% Mounted on
    /dev/mapper/VolGroup-lv_root   50G  880M   46G   2% /
    tmpfs                         1.9G     0  1.9G   0% /dev/shm
    /dev/sda1                     485M   33M  427M   8% /boot
    /dev/mapper/VolGroup-lv_home   65G  180M   62G   1% /home
    /dev/sdb4                      15G  5.3G  9.2G  37% /mnt/usb

    二、NTFS格式挂载

    我自己的移动硬盘为NTFS格式,共3个分区

    连接上之后dmesg | grep usb可以看到USB设备已经连接了。

    然后centos6.5默认是不识别NTFS分区的(微软专利,得谈合作),所以需要安装NTFSde rpm包

    然后我就在https://pkgs.org/下载了fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64.rpm,然后装了glibc也死活不行,

    然后又去https://pkgs.org/下载了fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64.rpm,执行

    yum install -y fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64.rpm

    然后搞定了。哎!不能求新丫!!!

    modprobe usb-storage    #fdisk看不到就执行这条命令
    fdisk -l 
    mount  /dev/sdb2 /mnt/usb/
    mount -t ntfs-3g /dev/sdb2 /mnt/usb/
    mount.ntfs /dev/sdb2 /mnt/usb/

    以上3个命令都可以,只不过不指定mount文件系统的时候系统会多花1s的时间去查看到底是啥系统。

  • 相关阅读:
    透明PNG格式图片兼容IE6浏览器
    CSS英文单词强制换行
    未能加载文件或程序集“Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=89b483f429c47342”或它的某一个依赖项。试图加载格式不正确的程序
    使用IIS 无法命中Application_Start中的断点问题
    win7 x64 后蓝牙u盘搜索不到其他设备
    使用Html.BeginForm<T>后客户端脚本验证出错的问题
    为什么使用sealed修饰符
    vs2010调试时发生监视显示表达式为false,但却进入了if块中
    MicrosoftMvcJQueryValidation.js 启用客户端验证,form无法提交
    Jquery 操作页面中iframe自动跟随窗口大小变化,而不出现滚动条,只在iframe内部出滚动条
  • 原文地址:https://www.cnblogs.com/tcicy/p/8492553.html
Copyright © 2011-2022 走看看