Linux系統掛載NTFS分區–最簡單的方法
現在使用Windows 操作系統時最常用的是NTFS的分區格式。但是,因爲這個格式在Linux下默認不能直接使用,所以Linux用戶不能充分利用NTFS格式的硬盤空間。
因爲Linux沒有將掛載NTFS格式這項功能編譯到內核裏面,所以用戶必須重新編譯內核。但是編譯過程比較複雜又很難保證一定能夠掛載NTFS分區。下面介紹一種最簡單有效的方法讓Linux支持掛載NTFS分區(以CentOS爲例)
一.下載所需源碼
fuse最新版本官網下載地址:http://sourceforge.net/projects/fuse/files/fuse-2.X/2.8.3/fuse-2.8.3.tar.gz/download
ntfs-3g最新版本官網下載地址:http://tuxera.com/opensource/ntfs-3g-2010.3.6.tgz
二.安裝源碼
建議安裝前閱讀INSTALL、REDEME文檔裏面有詳細的安裝方法和參數說明。
1.安裝fuse
[root@localhost ~]#tar –zxvf fuse-2.8.3.tar.gz [root@localhost ~]#cd fuse-2.8.3 [root@localhost ~]#./configure [root@localhost ~]#make && make install [root@localhost ~]#modprobe fuse
2.安裝ntfs-3g
[root@localhost ~]#tar –zxvf ntfs-3g-2010.3.6.tgz [root@localhost ~]#cd ntfs-3g-2010.3.6 [root@localhost ~]#./configure [root@localhost ~]#make && make install
三.掛載NTFS分區
查看NTFS分區位置
[root@localhost ~]#fdisk –l
掛載NTFS分區
[root@localhost ~]#mount –t ntfs-3g /dev/sdb1 /mnt/windows
現在已經能完美實現對NTFS分區進行讀寫的操作了,是不是很簡單,前後不到10分鐘的時間。
四.最有可能出現的錯誤
當在安裝fuse時執行”modprobe fuse”命令式出現報錯信息”FATAL: Module fuse not found.”本人認爲是安裝Linux系統時沒有安裝上相應的包所致。然後用google找到了解決方法。
[root@mail ~]# modprobe fuse FATAL: Module fuse not found.
I have searched around but I cannot find an answer to get encfs working. Help!
A:
If you have not done so, refer to the CentOS wiki: http://wiki.centos.org/Repositories and set up the rpmforge repository. Then, yum install –enablerepo=rpmforge fuse dkms dkms-fuse Make sure you have the kernel-devel package that matches your running kernel. If you don't have it, run: yum install kernel-devel before running the first yum command.
Success!
——————http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14292
============================================
How to fix "FATAL: Module fuse not found." on CentOS 4
> cat /etc/*-releasewill tell you your CentOS's version.
First, get rmpforge from HERE according to your OS version.
then,> rpm -ivh rpmforge-release-$version.$arch.rpmCentOS 4
> yum install kernel-smp-devel dkms dkms-fuseCentOS 5
> yum install dkms dkms-fuseThen,
> dkms remove -m fuse -v 2.7.4-1.nodist.rf --all > dkms add -m fuse -v 2.7.4-1.nodist.rf > dkms build -m fuse -v 2.7.4-1.nodist.rf --kernelsourcedir=/usr/src/kernel/yourkenerlsource > dkms install -m fuse -v 2.7.4-1.nodist.rf > modprobe fuseNo error inputs will received.
PS: Above method does not work on my CentOS 4.4 servers, and I figured out another way:
> uname -aTo check your kernel's version. For me, it's 2.6.17.14.
Go to get the kernel's source.> wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.14.tar.bz2 > tar zxjf linux-2.6.17.14.tar.bz2 > cd linux-2.6.17.14 > cp /boot/config-2.6.17.14.WBXsmp .config > make oldconfig > make prepare > make modules_prepareGet fuse's source code down.(I use FUSE for gluster, an open source distributted file system, it pathes fuse for its own optimization)
> wget http://ftp.gluster.com/pub/gluster/glusterfs/fuse/fuse-2.7.4glfs11.tar.gz > tar zxvf fuse-2.7.4glfs11 > cd fuse-2.7.4glfs11 > ./configure --with-kernelsource=/usr/src/linux-2.6.17.14 > ./configure && make && make installIt should be ok. In my case, I still got "Module fuse not found." error once I reboot my system.
I fixed that this way, may be can work for you too:> echo "mknod /dev/fuse -m 0666 c 10 229">>/etc/rc.local