> Linux教程 > Linux学习 >

Linux下挂载移动硬盘和USB的方法

USB和IDE接口

[USB接口]

(1)lsusb看usb设备状态或者system tools->hardware browser

[root@DBRAC root]# lsusb
Bus 004 Device 001: ID 0000:0000 
Bus 004 Device 002: ID 0402:5621 ALi Corp.
Bus 003 Device 001: ID 0000:0000 
Bus 003 Device 002: ID 0ed1:6685 
Bus 002 Device 001: ID 0000:0000 
Bus 001 Device 001: ID 0000:0000 

(2)fdisk -l 将所有物理接口列出来

注意:如果不出来USB,进入hardware browser,将激活USB的扫描!

[root@DBRAC root]# fdisk -l

Disk /dev/sda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1        13    104391   83  Linux
/dev/sda2            14      4092  32764567+  83  Linux
/dev/sda3          4093      4353   2096482+  82  Linux swap
/dev/sda4          4354     19929 125114220    f  Win95 Ext'd (LBA)
/dev/sda5          4354     19929 125114188+  83  Linux

Disk /dev/sdb: 129 MB, 129895424 bytes
4 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 248 * 512 = 126976 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1   ?  15727761  13193526 1833238533   86  NTFS volume set
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(774, 46, 63) logical=(15727760, 1, 1)
Partition 1 has different physical/logical endings:
     phys=(951, 124, 34) logical=(13193525, 1, 50)
Partition 1 does not end on cylinder boundary.
/dev/sdb2   ?   4104472    655495 1719810560   33  Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(80, 96, 0) logical=(4104471, 1, 47)
Partition 2 has different physical/logical endings:
     phys=(459, 192, 16) logical=(655494, 3, 42)
Partition 2 does not end on cylinder boundary.
/dev/sdb3   ?         1         1         0    0  Empty
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(963, 235, 55) logical=(0, 0, 1)
Partition 3 has different physical/logical endings:
     phys=(0, 0, 0) logical=(17318416, 2, 4)
Partition 3 does not end on cylinder boundary.

Partition table entries are not in disk order

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1      2550  20482843+   7  HPFS/NTFS
/dev/hda2   *      2551      5161  20972857+  83  Linux
/dev/hda3          5162      5292   1052257+  82  Linux swap

Disk /dev/hdb: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1      5222  41945683+   7  HPFS/NTFS
/dev/hdb2          5223     19929 118133977+   f  Win95 Ext'd (LBA)
/dev/hdb5          5223      9139  31463271    7  HPFS/NTFS
/dev/hdb6          9140     16972  62918541    7  HPFS/NTFS
/dev/hdb7         16973     19929  23752071    7  HPFS/NTFS

说明:2 个IDE接口的硬盘,1个USB接口的硬盘,1 个USB接口的U盘。

可以加载U盘:mount -t msdoc /dev/sdb /mnt

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

  mkdir /mnt/usb

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

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

加载硬盘,指定特定分区:

[root@DBRAC /]# mount -t ext3 /dev/sda5 /mnt
[root@DBRAC /]# cd /mnt
[root@DBRAC mnt]# ls
home  lost+found

 为了方便浏览:

(1)采用KDE方式,支持中文(logout后选择设定即可)

(2)KDE下在桌面空白处mouse右键,Create New->Hard Disk,输入设备名,若还没有mount,则输入

mount point。

(3)点开硬盘图标,就可方便浏览文件,支持中文。


(责任编辑:IT)