1.1usb start 在使用u盘之前必须启动此命令以初始化好fat文件系统环境,笔者的输出如下:
linuxidc # usb start
(Re)start USB...
USB: Starting the controller
scanning bus for devices... 5 USB Device(s) found
scanning bus for storage devices... usb_stor_get_info->1431,blksz:512
Device NOT ready
Request Sense returned 02 3A 00
2 Storage Device(s) found
1.2 usb dev 查看检测到的usb设备,笔者的输出如下:
linuxidc # usb dev
USB device 0: Vendor: Lexar Rev: 1100 Prod: USB Flash Drive
Type: Removable Hard Disk
Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)
1.3 usb info可列出usb host的属性,笔者的输出如下:
linuxidc # usb dev
USB device 0: Vendor: Lexar Rev: 1100 Prod: USB Flash Drive
Type: Removable Hard Disk
Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)
linuxidc # usb info
1: Hub, USB Revision 1.10
- OHCI Root Hub
- Class: Hub
- PacketSize: 8 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 0.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 2 Interval 255ms
2: Hub, USB Revision 2.0
- USB2.0 Hub
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x05e3 Product 0x0608 Version 133.54
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 255ms
3: Hub, USB Revision 2.0
- USB2.0 Hub
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x05e3 Product 0x0608 Version 133.54
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 255ms
4: Mass Storage, USB Revision 2.0
- Lexar USB Flash Drive AA066NWLMLMLBQPX
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x05dc Product 0xa813 Version 17.0
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 1 In Bulk MaxPacket 64
- Endpoint 2 Out Bulk MaxPacket 64
5: Mass Storage, USB Revision 2.0
- Generic Ultra Fast Media 000000225001
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x2240 Version 1.152
Configuration: 1
- Interfaces: 1 Bus Powered 96mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 64
- Endpoint 2 In Bulk MaxPacket 64
1.4 usb storage 可列出u盘设备信息:
linuxidc # usb storage
Device 0: Vendor: Lexar Rev: 1100 Prod: USB Flash Drive
Type: Removable Hard Disk
Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)
Device 1: Vendor: Generic Rev: 1.98 Prod: Ultra HS-COMBO
Type: Removable Hard Disk
Capacity: not available
1.5 usb tree 列出设备树:
linuxidc # usb tree
Device Tree:
1 Hub (12 Mb/s, 0mA)
| OHCI Root Hub
|
+-2 Hub (12 Mb/s, 100mA)
| USB2.0 Hub
|
+-3 Hub (12 Mb/s, 100mA)
| | USB2.0 Hub
| |
| +-4 Mass Storage (12 Mb/s, 200mA)
| Lexar USB Flash Drive AA066NWLMLMLFEPX
|
+-5 Mass Storage (12 Mb/s, 96mA)
Generic Ultra Fast Media 000000135404
1.6 usb part 列出u盘的分区表
linuxidc # usb part
Partition Map for USB device 0 -- Partition Type: DOS