歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> CentOS 5.5 掛載Windows NTFS 文件系統

CentOS 5.5 掛載Windows NTFS 文件系統

日期:2017/2/28 16:30:51   编辑:Linux教程

首先確認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,可以自己下載編譯安裝。
下載Linux公社在FTP裡

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

用戶名:www.linuxidc.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

Copyright © Linux教程網 All Rights Reserved