在Linux环境中使用USB接口的存储设备(转帖)

在Linux环境中使用USB接口的存储设备

(转自:(赛迪网社区Linux俱乐部)http://bbs.ccidnet.com/showthread.php?threadid=211409)

如何在Linux环境中使用USB接口的存储设备?这是各大电脑论坛上出现得比较多的一个问题,同此可见这也是摆在许多电脑玩家面前的一道难题。本文就为您提供一套完美的解决方案,通过下面的方法,您仅可以在Linux环境中方便地使用U盘、USB硬盘盒,而且还能将数码相机作为USB大容量存储器。这里就以Red  Hat  Linux  7.2为例,来一步一步地介绍如何在Linux环境中使用USB存储器。

  1.在X-Windows环境中打开“控制中心”,展开“信息→USB设备”控制台树,查看Linux是否已经正确识别您的USB存储器,如果没有看到USB设备信息,那么您就应该要检查USB端口是否已经在BIOS中打开,或USB存储器与电脑的物理连接有没有连接好了。图1所示为笔者的 FinePix数码相机信息。


图1

  2.在控制台状态下输入如下命令:

  fdisk  -l  /dev/sda

  注意:不要在sda后面加通配符“*”或“?”,否则运行命令后返回的信息将不正常。如果您有多个USB设备话,则设备名在Linux下分别表示为sda、sdb、sdc等。

  运行上面的命令后,笔者的电脑上返回如图2所示信息,表示系统已经找到笔者的USB设备,设备名称为/dev/sda1、可启动(Boot下面的那个*表示是活动分区),容量8MB、文件系统为FAT12。


图2

  3.在/mnt目录下建立一个挂装USB存储器的目录:

  mkdir  /mnt/usb

  4.然后再运行装载设备命令,将USB设备挂装到/mnt/usb目录下:

  mount  -t  msdos  /dev/sda1  /mnt/usb 

  注意:如果在图2中显示您的USB设备的文件系统为FAT32,请使用mount  -t  vfat  /dev/sda1  /mnt/usb命令装载USB设备。

  5.运行如下命令即可查看USB存储器中的文件信息:

  ls  /mnt/usb

  然后您就可以像对待硬盘一样对USB存储器中的数据进行拷贝、删除等操作了。

  如果您不习惯于在控制台下敲敲打打,还可以在KDE桌面上建立一个指向USB存储器的快捷方式,用鼠标完成所有的文件操作,就像在Windows中一样简单,建立快捷方式的操作非常简单:用鼠标在桌面空白处单击鼠标,从弹出的快捷菜单中选择“新建/硬盘”,右键单击新创建的快捷方式,选择“属性”菜单命令,切换到“设备”选项卡,分别输入USB存储器的设备名称、安装点和文件系统类型,如图3所示。以后只需要单击该快捷方式即可方便地访问USB存储器了。


图3

2 thoughts on “在Linux环境中使用USB接口的存储设备(转帖)”

  1.   按照上文的方法,切换到KDE下,在控制中心的信息查看中找到了sedy890,

      如图如示:

    但是就是不能加载(在GNOME下也是如此),始终报告:mount: /dev/sda1 is not a valid block device

      运行命令: /bin/dmesg | more

      有关sedy890的usb设备段落如下:


    hub.c: new USB device 00:07.2-2, assigned address 2

    usb.c: USB device 2 (vend/prod 0xe8d/0x2) is not claimed by any active driver.

    SCSI subsystem driver Revision: 1.00

    Initializing USB Mass Storage driver...

    usb.c: registered new driver usb-storage

    scsi0 : SCSI emulation for USB Mass Storage devices

      Vendor: MEDIATEK  Model:  FLASH DISK       Rev: 218B

      Type:   Direct-Access                      ANSI SCSI revision: 02

    WARNING: USB Mass Storage data integrity not assured

    USB Mass Storage device found at 2

    USB Mass Storage support registered.

    Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: sda1

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

     I/O error: dev 08:00, sector 0

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

     I/O error: dev 08:00, sector 0

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    usb.c: USB disconnect on device 00:07.2-2 address 2

    Device not ready.  Make sure there is a disc in the drive.

    sda : READ CAPACITY failed.

    sda : status = 1, message = 00, host = 0, driver = 08

    Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready

    sda : block size assumed to be 512 bytes, disk size 1GB. 

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    hub.c: connect-debounce failed, port 2 disabled

    hub.c: new USB device 00:07.2-2, assigned address 3

    WARNING: USB Mass Storage data integrity not assured

    USB Mass Storage device found at 3

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    SCSI device (ioctl) reports ILLEGAL REQUEST.

    SCSI device sda: 124544 512-byte hdwr sectors (64 MB)

    sda: Write Protect is off

     sda: I/O error: dev 08:00, sector 0

     I/O error: dev 08:00, sector 0

     unable to read partition table

    网上也有类似的问题报告,可是还没有找到一个解决的办法。

Comments are closed.