你永远不懂我伤悲,就像白天不懂夜的黑
分类: LINUX
2013-08-14 15:39:39
Linux下挂载NTFS分区和挂载分区的方法
如果你的磁盘格式为NTFS就按照以下步骤如果不是就直接跳下一步
首先去下载个 NTFS-3G
下载地址:
然后把下载好的压缩包上传到root文件夹内
列如:文件名为:ntfs-3g_ntfsprogs-2013.1.13.tgz
解压:tar zxvf ntfs-3g_ntfsprogs-2013.1.13.tgz
进入解压文件夹:cd ntfs-3g_ntfsprogs-2013.1.13
运行:
./configure
make
make install
到这里已经安装完成
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
查看分区信息:fdisk -l
如:
[root@PC ntfs-3g_ntfsprogs-2013.1.13]# fdisk -l
Disk /dev/vda: 21.5 GB, 21474836480 bytes
16 heads, 63 sectors/track, 41610 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000acae9
Device Boot Start End Blocks Id System
/dev/vda1 * 3 409 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/vda2 409 8731 4194304 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/vda3 8731 41611 16571392 83 Linux
Partition 3 does not end on cylinder boundary.
Disk /dev/vdb: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5f72ecd9
Device Boot Start End Blocks Id System
/dev/vdb1 1 7832 62910508+ 42 SFS (我需要挂载的ntfs格式分区)
然后到/etc/fstab
打开fstab在添加一段自动挂载的代码
/dev/vdb1 /www ntfs-3g defaults 0 0
如果你的不是 ntfs格式呢就加你磁盘格式就好了
如:
/dev/vdb1 /www ext3 defaults 0 0
解释:
/dev/vdb1 为你的分区名称 在上步可以查看
/www 为需要挂载到文件夹