解决CentOS 5.3无法挂载及读写nfts格式的硬盘

一,打上内核的补丁,能解决不能读ntfs格式的问题,但是只读挂载无法写

从CentOS的官网下载的CentOS最新版本是5.3,其内核是2.6.18.128,它对MS的fat、fat32格式支持良好,但竟然不能加载ntfs格式的磁盘。如何让CentOS 5.3支持ntfs分区?
1. 查看自己系统的内核版本
#uname -a
#uname -r
2. 找合适自己系统内核和CPU的NTFS模块下载:
我的:kernel-module-ntfs-2.6.18-128.el5
我在
http://sourceforge.net/project/showfiles.php?group_id=13956 页面找到
http://jaist.dl.sourceforge.net/ kernel-module-ntfs-2.6.18-128.el5
3. 安装
运行rpm -ihv kernel-module-ntfs-2.6.18-53.el5-2.1.27-0.rr.10.11.i686.rpm,安装此RPM包。
运行/sbin/modprobe ntfs加载内核模块。
[root@localhost src]# dmesg | grep NTFS
NTFS driver 2.1.27 [Flags: R/W MODULE].
可以运行cat /proc/filesystems看到已经支持ntfs文件系统了。
出现
nodev autofs
ntfs
表示已经支持ntfs了!
4. 挂载分区
(1).fdisk -l查看分区信息
Disk /dev/hda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/hda2 1913 9725 62757922+ f W95 Ext'd (LBA)
/dev/hda5 1913 4462 20482843+ b W95 FAT32
/dev/hda6 4463 7012 20482843+ 7 HPFS/NTFS
/dev/hda7 7013 7025 104391 83 Linux
/dev/hda8 7026 9725 21687718+ 8e Linux LVM

(2).建立挂载目录
mkdir /media/D
mkdir /media/E
mkdir /media/F

(3).Mount windwos下的所有分区
ntfs 用 mount -t ntfs /dev/sda5 /media/D
vfat 用 mount -t vfat /dev/sda6 /media/E

使用df -h查看是否被mount上来

(4).设置启动自动挂载分区
修改/etc/fstab
添加如下信息:
/dev/sda5 /media/D ntfs umask=000,nls=utf8
/dev/sda6 /media/E ntfs umask=000,nls=utf8
/dev/sda7 /media/F ntfs umask=000,nls=utf8
重启下试下吧!

5.卸载NTFS模块
rpm -qa|grep -i ntfs 查看所安装的版本
rpm -e kernel-module-ntfs-2.6.18-53.el5-2.1.27-0.rr.10.11.i686
即可卸载。

二,安装ntfs-3g及相关依赖包,解决读及写ntfs的问题

[root@syswoody ~] wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
--2010-01-12 19:46:44--  http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
Resolviendo packages.sw.be... 85.13.226.40
Connecting to packages.sw.be|85.13.226.40|:80... conectado.
Petición HTTP enviada, esperando respuesta... 302 Found
Localización: http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.1-1.el5.rf.i386.rpm [siguiendo]
--2010-01-12 19:46:45--  http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
Resolviendo rpmforge.sw.be... 85.13.226.40
Connecting to rpmforge.sw.be|85.13.226.40|:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 16600 (16K) [application/x-rpm]
Saving to: `rpmforge-release-0.5.1-1.el5.rf.i386.rpm'

100%[===================================================================================================================>] 16.600      85,7K/s   in 0,2s

2010-01-12 19:46:46 (85,7 KB/s) - `rpmforge-release-0.5.1-1.el5.rf.i386.rpm' saved [16600/16600]

 

[root@syswoody ]# rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.i386.rpm
Preparando...               ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]

  
[root@syswoody ]# yum install fuse-ntfs-3g.i386 fuse-ntfs-3g-devel.i386
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * addons: distrib-coffee.ipsl.jussieu.fr
 * base: ftp.up.pt
 * extras: ftp.up.pt
 * rpmforge: fr2.rpmfind.net
 * updates: distrib-coffee.ipsl.jussieu.fr
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
---> Package fuse-ntfs-3g.i386 0:2009.11.14-1.el5.rf set to be updated
---> Package fuse-ntfs-3g-devel.i386 0:2009.11.14-1.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                    Arch                         Version                                      Repository                        Size
=============================================================================================================================================================
Installing:
 fuse-ntfs-3g                               i386                         2009.11.14-1.el5.rf                          rpmforge                         552 k
 fuse-ntfs-3g-devel                         i386                         2009.11.14-1.el5.rf                          rpmforge                          67 k

Transaction Summary
=============================================================================================================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 619 k
Is this ok [y/N]:
Downloading Packages:
(1/2): fuse-ntfs-3g-devel-2009.11.14-1.el5.rf.i386.rpm                                                                                |  67 kB     00:00
(2/2): fuse-ntfs-3g-2009.11.14-1.el5.rf.i386.rpm                                                                                      | 552 kB     00:01
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        220 kB/s | 619 kB     00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : fuse-ntfs-3g                                                                                                                          1/2
  Installing     : fuse-ntfs-3g-devel                                                                                                                    2/2

Installed:
  fuse-ntfs-3g.i386 0:2009.11.14-1.el5.rf                                    fuse-ntfs-3g-devel.i386 0:2009.11.14-1.el5.rf

Complete!

 modprobe fuse
FATAL: Module fuse not found.

mount /dev/sdc1
FATAL: Module fuse not found.
ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root

 

命令ntfs-3g可以使用表示安装成功

 

最后测试 : mount -t ntfs-3g /dev/sda1 /mnt/windows

参考ntfs-3g官网:http://www.tuxera.com/community/ntfs-3g-download/

你可能感兴趣的:(centos,Module,download,plugins,2010,transactions)