挂接移动硬盘.doc_第1页
挂接移动硬盘.doc_第2页
挂接移动硬盘.doc_第3页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

挂接移动硬盘对linux系统而言,USB接口的移动硬盘是当作SCSI设备对待的。插入移动硬盘之前,应先用fdisk l 或 more /proc/partitions查看系统的硬盘和硬盘分区情况。root at pldyrouter /# fdisk -lDisk /dev/sda: 73 dot 4 GB, 73407820800 bytes255 heads, 63 sectors/track, 8924 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 1 4 32098+ de Dell Utility/dev/sda2 * 5 2554 20482875 7 HPFS/NTFS/dev/sda3 2555 7904 42973875 83 Linux/dev/sda4 7905 8924 8193150 f Win95 Extd (LBA)/dev/sda5 7905 8924 8193118+ 82 Linux swap在这里可以清楚地看到系统有一块SCSI硬盘/dev/sda和它的四个磁盘分区/dev/sda1 - /dev/sda4, /dev/sda5是分区/dev/sda4的逻辑分区。接好移动硬盘后,再用fdisk l 或 more /proc/partitions查看系统的硬盘和硬盘分区情况root at pldyrouter /# fdisk -lDisk /dev/sda: 73 dot 4 GB, 73407820800 bytes255 heads, 63 sectors/track, 8924 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 1 4 32098+ de Dell Utility/dev/sda2 * 5 2554 20482875 7 HPFS/NTFS/dev/sda3 2555 7904 42973875 83 Linux/dev/sda4 7905 8924 8193150 f Win95 Extd (LBA)/dev/sda5 7905 8924 8193118+ 82 Linux swapDisk /dev/sdc: 40.0 GB, 40007761920 bytes255 heads, 63 sectors/track, 4864 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sdc1 1 510 4096543+ 7 HPFS/NTFS/dev/sdc2 511 4864 34973505 f Win95 Extd (LBA)/dev/sdc5 511 4864 34973473+ b Win95 FAT32大家应该可以发现多了一个SCSI硬盘/dev/sdc和它的两个磁盘分区/dev/sdc1?、/dev/sdc2,其中/dev/sdc5是/dev/sdc2分区的逻辑分区。我们可以使用下面的命令挂接/dev/sdc1和/dev/sdc5。#mkdir -p /mnt/usbhd1#mkdir -p /mnt/usbhd2注:建立目录用来作挂接点(mount point)#mount -t ntfs /dev/sdc1 /mnt/usbhd1#mount -t vfat /dev/sdc5 /mnt/usbhd2 注:对ntfs格式的磁盘分区应使用-t ntfs 参数,对fat32格式的磁盘分区应使用-t vfat参数。若汉字文件名显示为乱码或不显示,可以使用下面的命令格式。#mount -t ntfs -o iocharset=cp936 /dev/sdc1 /mnt/usbhd1#mount -t vfat -o iocharset=cp936 /dev/sdc5 /mnt/usbhd2linux系统下使用fdisk分区命令和mkfs文件系统创建命令可以将移动硬盘的分区制作成linux系统所特有的ext2、ext3格式。这样,在linux下使用就更方便了。使用下面的命令直接挂接即可。#mount /dev/sdc1 /mnt/usbhd1挂接U盘和USB接口的移动硬盘一样对linux系统而言U盘也是当作SCSI设备对待的。使用方法和移动硬盘完全一样。插入U盘之前,应先用fdisk l 或 more /proc/partitions查看系统的硬盘和硬盘分区情况。root at pldyrouter root# fdisk -lDisk /dev/sda: 73 dot 4 GB, 73407820800 bytes255 heads, 63 sectors/track, 8924 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 1 4 32098+ de Dell Utility/dev/sda2 * 5 2554 20482875 7 HPFS/NTFS/dev/sda3 2555 7904 42973875 83 Linux/dev/sda4 7905 8924 8193150 f Win95 Extd (LBA)/dev/sda5 7905 8924 8193118+ 82 Linux swap插入U盘后,再用fdisk l 或 more /proc/partitions查看系统的硬盘和硬盘分区情况。root at pldyrouter root# fdisk -lDisk /dev/sda: 73 dot 4 GB, 73407820800 bytes255 heads, 63 sectors/track, 8924 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 1 4 32098+ de Dell Utility/dev/sda2 * 5 2554 20482875 7 HPFS/NTFS/dev/sda3 2555 7904 42973875 83 Linux/dev/sda4 7905 8924 8193150 f Win95 Extd (LBA)/dev/sda5 7905 8924 8193118+ 82 Linux swapDisk /dev/sdd: 131 MB, 131072000 bytes9 heads, 32 sectors/track, 888 cylindersUnits = cylinders of 288 * 512 = 147456 bytesDevice Boot Start End Blocks Id System/dev/sdd1 * 1 889 127983+ b Win95 FAT32Partition 1 has different physical/logical endings:phys=(1000, 8, 32) logical=(888, 7, 31)系统多了一个SCSI硬盘/dev/sdd和一个磁盘分区/dev/sdd1,/dev/sdd1就是我们要挂接的U盘。#mkdir -p

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论