在linux下挂载ntfs文件系统分区

# rpm -qa | grep fusewindows

fuse-2.7.4-8.el5
 
说明已经安装fuse
 
安装ntfs-3g, 系统默认的软件库更新不到ntfs-3g,能够本身下载编译安装。
下载网址:http://www.tuxera.com/community/ntfs-3g-download/
 
# tar -zxvf ntfs-3g-2010.5.22.tgz
# cd ntfs-3g-2010.5.22
# ls
aclocal.m4    config.h       configure.ac  INSTALL       m4           README
AUTHORS       config.h.in    COPYING       install-sh    Makefile     src
autogen.sh    config.log     COPYING.LIB   libfuse-lite  Makefile.am  stamp-h1
ChangeLog     config.status  CREDITS       libntfs-3g    Makefile.in
compile       config.sub     depcomp       libtool       missing
config.guess  configure      include       ltmain.sh     NEWS
#./configure
#make
#make install
 
完了以后就能够正常mount ntfs 文件了
# mount -t ntfs-3g /dev/sda2 /mnt/D
# ls /mnt/D
 
设置开机自动挂载文件系统
 
编辑/etc/fstab 文件,在其中加入想要加载的分区便可,若是不知道是哪一个分区,可使用fdisk -l
 
# fdisk -l
 
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        3825    30724281    7  HPFS/NTFS
/dev/sda2            3826       29322   204804652+   7  HPFS/NTFS
/dev/sda3   *       29323       31871    20474842+  83  Linux
/dev/sda4           31872       60801   232380225    5  Extended
/dev/sda5           31872       32125     2040223+  82  Linux swap / Solaris
/dev/sda6           32126       34674    20474811   83  Linux
 
如上,我要挂载的是windows下面的D盘,便是/dev/sda2 ,若是想挂载C盘,便是/dev/sda1
 
在/etc/fstab 文件中添加一行:
 
/dev/sda2    /mnt/D      ntfs-3g  defaults  0 0
 
/mnt/D这个文件是我在根目录下建来专门挂载D盘的,你也能够新建在别的地方.