centos6挂载U盘

编程入门 行业动态 更新时间:2024-10-23 17:35:41

centos6<a href=https://www.elefans.com/category/jswz/34/1769518.html style=挂载U盘"/>

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: 0xcad4ebeaDevice 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包

然后我就在.1.13-2.el6.rf.x86_64.rpm,然后装了glibc也死活不行,

然后又去.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的时间去查看到底是啥系统。

 

转载于:.html

更多推荐

centos6挂载U盘

本文发布于:2024-02-12 06:34:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1686628.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:挂载

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!