CentOS 5.5 挂载Windows NTFS 文件系统


首先确认fuse,CentOS 5.5 带有fuse,可以使用 rpm -qa | grep fuse 查看是否安装。

[root@localhost ntfs-3g-2010.5.22]# rpm -qa | grep fuse
fuse-2.7.4-8.el5

说明已经安装fuse

2,安装ntfs-3g, 系统默认的软件库更新不到ntfs-3g,可以自己下载编译安装。
下载帮客之家在FTP里

FTP地址:ftp://www.6688.cc/

用户名:www.bkjia.net

密码:www.6688.cc

在2010年LinuxIDC.com\9月\CentOS 5.5 挂载Windows NTFS 文件系统\

下载完后安装,安装方法下载点有。

简单介绍一下, 下载后解压

[root@localhost packages]# tar -zxvf ntfs-3g-2010.5.22.tgz

进入解压后的目录

[root@localhost packages]# cd ntfs-3g-2010.5.22
[root@localhost ntfs-3g-2010.5.22]#

文件夹中的文件  

[root@localhost 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
[root@localhost ntfs-3g-2010.5.22]#

接着依次执行    

[root@localhost ntfs-3g-2010.5.22]#./configure
[root@localhost ntfs-3g-2010.5.22]#make
[root@localhost ntfs-3g-2010.5.22]#make install

完了之后就可以正常mount ntfs 文件了

[root@localhost ntfs-3g-2010.5.22]# mount -t ntfs-3g /dev/sda2 /mnt
[root@localhost ntfs-3g-2010.5.22]# ls /mnt
centos    RECYCLER                                vm2k3
IDE       System Volume Information               vmdesk
Incoming  TDDOWNLOAD                              w2003SP2.iso
kankan    the brothers four                       windows 
music     Ubuntustudio-10.04-alternate-amd64.iso  读书
news      vm

3, 设置开机自动挂载文件系统

编辑/etc/fstab 文件, 在其中加入想要加载的分区即可,
如果不知道是哪个分区,可以使用fdisk -l

[root@localhost ~]# 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
[root@localhost ~]#

如上,我要挂载的是windows下面的D盘,即是/dev/sda2 ,如果想挂载C盘,即是/dev/sda1

好了,开始往/etc/fstab 文件 中添加如下一行:

/dev/sda2    /winD      ntfs-3g  defaults  0 0

/winD这个文件是我在根目录下建来专门挂载D盘的,你也可以新建在别的地方,例如: /mnt/wind
如此,则要改成 /dev/sda2    /mnt/wind      ntfs-3g  defaults  0 0  了。

好正式编辑:

[root@localhost ~]# vi /etc/fstab


LABEL=/                 /                       ext3    defaults        1 1
LABEL=/home             /home                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                 devpts  gid=5,mode=620   0 0
sysfs                   /sys                     sysfs   defaults        0 0
proc                    /proc                    proc    defaults        0 0
LABEL=SWAP-sda5         swap                     swap    defaults       0 0
/dev/sda2               /winD                    ntfs-3g defaults        0 0

wq!保存退出了。 开机试试看有没有自动挂载吧!

 

另外一个解决方法,还没有实验过,先拿过来了:

1. 查看自己系统的内核版本
#uname -a

#uname -r

2. 找合适自己系统内核和CPU的NTFS模块下载:
比如我的:kernel-module-ntfs-2.6.18-53.el5

google搜索,找到后下载.
我在http://sourceforge.net/project/showfiles.php?group_id=13956页 面找到
http://jaist.dl.sourceforge.net/sourceforge/linux-ntfs/kernel-module-ntfs-2.6.18-53.1.4.el5-2.1.27-0.rr.10.11.i686.rpm

  • 1
  • 2
  • 下一页

相关内容