zhyiwww
用平实的笔,记录编程路上的点点滴滴………
posts - 536,comments - 394,trackbacks - 0
Linux 中如何mount usb存储(1)

 

 安装、以root身份登录linux,

1.检查核心是否加载USB模块
# dmesg | grep usb

有输出如"usb.c: registered....."信息说明模块已加载,否则需要执行:

# modprobe usb-uhci
# modprobe usb-storage

# dmesg |grep usb
....
....
registered new drver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.259 $ time 17:36:49 Sep 6 2001
usb-uhci.c: High bandwidth mode enabled
PCI: Enabling device 00:07.2 (0000 -> 0001)
PCI: Assigned IRQ 9 for device 00:07.2
usb-uhci.c: USB UHCI at I/O 0x10e0, IRQ 9
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.251:USB Universal Host Controller Interface driver
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.

2.连接好USB硬盘,

# dmesg tail

....
....
hub.c: USB new device connect on bus1/2, assigned device number 3
usb-uhci.c: interrupt, status 3, frame# 1489
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 19640880 512-byte hdwr sectors (10056 MB)
sda: sda1

WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 3
usb.c: USB disconnect on device 3
usb.c: USB disconnect on device 2

发现USB设备,对应的设备为 /dev/sda1

# mkdir /mnt/usbdisk
# mount -t vfat /dev/sda1 /mnt/usbdisk

这样您就可以通过usbdisk目录访问usb的文件了.

-t vfat 只能mount fat文件系统..
对于ntfs的文件系统mount就稍复杂一点了.



|----------------------------------------------------------------------------------------|
                           版权声明  版权所有 @zhyiwww
            引用请注明来源 http://www.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|
posted on 2006-06-19 14:48 zhyiwww 阅读(8926) 评论(2)  编辑  收藏 所属分类: linux

FeedBack:
# re: Linux 中如何mount usb存储(1)(转载)
2007-05-15 18:38 | zhyiwww
访问ntfs的文件系统,只需要安装一个ntfs-3g就可以了
yum install ntfs-3g
然后就可以加载了
mount /dev/sdb1 /mnt/ntfs7 -t ntfs-3g
就可以了  回复  更多评论
  
# re: Linux 中如何mount usb存储(1)(转载)
2008-09-14 01:53 | wayne wang
我的机子输出没有 "usb.c: registered....." 那该怎么办  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: