CentOS 5.4挂载可读写NTFS—RHEL5.4同样适用!
系统环境
# cat /etc/redhat-release
CentOS release 5.4 (Final)
#
# uname -a
Linux it 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
#
所需软件
其一:
fuse-2.7.4-8.el5.i386.rpm
fuse-2.7.4-8.el5.x86_64.rpm #CentOS 5.4系统盘自带
下载地址:
mirror.centos.org/centos/5/os/i386/CentOS/
mirror.centos.org/centos/5/os/x86_64/CentOS/
其二:
fuse-ntfs-3g-2009.4.4-2.el5.rf.i386.rpm #32位
fuse-ntfs-3g-2009.4.4-2.el5.rf.x86_64.rpm #64位
下载地址:
packages.sw.be/fuse-ntfs-3g/fuse-ntfs-3g-2009.4.4-2.el5.rf.i386.rpm
packages.sw.be/fuse-ntfs-3g/fuse-ntfs-3g-2009.4.4-2.el5.rf.x84_64.rpm
或者
www.tuxera.com/community/ntfs-3g-download/
选择自己的版本,然后按照提示安装。
如果选择的源码,就解压后通过以下命令安装
./configure
make
make install # 或者 ‘sudo make install‘ (如果不是以root权限登陆)
安装以上两个软件包后,就可以挂载ntfs分区了,挂载方法如下:
mount -t ntfs-3g /dev/xxx /mnt/xxx -o iocharset=utf8,umask=000
以下是实例:
系统环境;
# cat /etc/redhat-release
CentOS release 5.4 (Final)
#
~~~~~~~~~~~~~~~~~~~
# uname -a
Linux it 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
~~~~~~~~~~~~~~~~~~~
# fdisk -l
Disk /dev/hda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 2551 20490876 7 HPFS/NTFS
/dev/hda2 2552 7181 37190475 83 Linux
/dev/hda3 7182 19929 102398310 f W95 Ext’d (LBA)
/dev/hda5 7182 12281 40965718+ b W95 FAT32
/dev/hda6 12282 12412 1052226 82 Linux swap / Solaris
~~~~~~~~~~~~~~~~~~~
还没安装前挂载报错
~~~~~~~~~~~~~~~~~~~
# mkdir /mnt/hda1
# mount /dev/hda1 /mnt/hda1
mount: unknown filesystem type ‘ntfs’
#
~~~~~~~~~~~~~~~~~~~
# rpm -ivh fuse-2.7.4-8.el5.x86_64.rpm
warning: fuse-2.7.4-8.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing… ########################################### [100%]
1:fuse ########################################### [100%]
# rpm -ivh fuse-ntfs-3g-2009.4.4-2.el5.rf.x86_64.rpm
warning: fuse-ntfs-3g-2009.4.4-2.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing… ########################################### [100%]
1:fuse-ntfs-3g ########################################### [100%]
#
~~~~~~~~~~~~~~~~~~~
# mount -t ntfs-3g -o iocharset=utf8,umask=000 /dev/hda1 /mnt/hda1
# ls /mnt/hda1
AUTOEXEC.BAT boot.ini CONFIG.SYS Documents and Settings grub4 Inetpub MSDOS.SYS ntldr Program Files System Volume Information wmpub
bootfont.bin Config.Msi d grldr grubaf IO.SYS NTDETECT.COM pagefile.sys RECYCLER WINDOWS
# touch /mnt/hda1/ok
# ls /mnt/hda1
AUTOEXEC.BAT boot.ini CONFIG.SYS Documents and Settings grub4 Inetpub MSDOS.SYS ntldr pagefile.sys RECYCLER WINDOWS
bootfont.bin Config.Msi d grldr grubaf IO.SYS NTDETECT.COM ok Program Files System Volume Information wmpub
#
~~~~~~~~~~~~~~~~~~~
如果需要开机自启动挂载,可以在/etc/fstab文件结尾添加需要挂载的NTFS盘,
添加命令如下:
/dev/sda1 /mnt/C ntfs-3g defaults 0 0
如果有多个盘挂载,就多加几行喽~
本人的如下。
LABEL=/ / ext3 defaults 1 1
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
/dev/sda8 /swap swap defaults 0 0
/dev/sda1 /mnt/C ntfs-3g defaults 0 0
/dev/sda5 /mnt/D ntfs-3g defaults 0 0
/dev/sda6 /mnt/E ntfs-3g defaults 0 0
/dev/sda7 /mnt/F ntfs-3g defaults 0 0