Linux下掛載NTFS分區和掛載分區的方法

Linux下掛載NTFS分區和掛載分區的方法

如果你的磁盤格式爲NTFS就按照以下步驟如果不是就直接跳下一步
首先去下載個 NTFS-3G
下載地址:http://www.tuxera.com/community/ntfs-3g-download/
然後把下載好的壓縮包上傳到root文件夾內

列如:文件名爲:ntfs-3g_ntfsprogs-2013.1.13.tgz


解壓:tar zxvfntfs-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 爲需要掛載到文件夾

本文摘自 wdlinux論壇http://www.wdlinux.cn/bbs/ ,歡迎轉載~

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章