您的位置:首页 > 运维架构 > Linux

如何在LINUX增加对NTFS的操作

2014-04-15 20:25 253 查看

1.
如果需要支持USB HDD,则需要在内核配置中选上
Device Drivers --->

SCSI device support
--->
<*> SCSI disk support

[*] SCSI low-level drivers
--->

2.
如果是NTFS格式,则需要在内核配置中选上
File systems --->

DOS/FAT/NT Filesystems
--->

<*> NTFS file system support

[*]
NTFS write support

命令:mount –t ntfs /dev/sda1 /mtd/

如果出现如下错误:

NTFS-fs error (device sda3): load_system_files(): Volume is dirty.
Mounting read-only. Run chkdsk and mount in Windows.

则需要挂在windows下对硬盘进行磁盘检查。

3.
如果需要支持中文字符,则需要在内核配置中选上
File systems --->

-*- Native language support
--->

<*>
NLS UTF-8

4.
以上步骤执行完毕后,可以挂载NTFS格式的USB HDD,但只能读不能写,写NTFS需要用到ntfs-3g,下载链接:
http://www.tuxera.com/open-source/release-ntfs-3g-ntfsprogs-2012-1-15/
在安装ntfs-3g之前,还需要用到fuse(或者在内核编译时选上<*> Filesystem in
Userspace support),下载链接:
http://sourceforge.net/projects/fuse/files/fuse-2.X/2.8.6/
下载完成后按如下步骤操作:
  tar -xvzf fuse-***.tar.gz
  cd fuse-***
  ./configure --host=arm-hisi-linux --target=arm-hisi-linux

--with-kernel=/mnt/HI3520/Hi3520_SDK_V1.0.6.0.c2/source/os/linux-2.6.24
  make
  make install
  modprobe fuse

  tar -xvzf ntfs-3g-***.tar.gz
  cd ntfs-3g-***
  ./configure --host=arm-hisi-linux --target=arm-hisi-linux

--with-kernel=/mnt/HI3520/Hi3520_SDK_V1.0.6.0.c2/source/os/linux-2.6.24
  make
  make install
5.
如果modprobe fuse
显示:FATAL: Module fuse not found.有可能是系统还不支持fuse,可按如下方式操作:
问题:

在CentOS 5.3上无法挂载NTFS格式的分区,出现如下信息:

# mount -t ntfs-3g /dev/sdb1 /mnt/usb/

FATAL: Module fuse not found.

ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root

这是由于系统默认的内核并不支持FUSE模块,所以要更新内核。

解决办法:

# modprobe fuse

FATA: Module fuse not found.

先查看系统的内核版本:

# uname –r

2.6.18-128.el5

因为系统默认的内核并不支持FUSE模块,所以需要更新内核。

可以用 yum install kernel*
方式来更新。

如果你要节约点时间的话可以只更新一下的几个包:

kernel-devel

kernel

kernel-headers

更新后,重新启动操作系统,其内核版本是:

# uname –r

2.6.18-194.11.3.el5

之后一切正常,即可挂载NTFS格式的分区。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: