文档章节

How-to-access NTFS from CentOS 5, 这个是转发的

偏执狂xj1
 偏执狂xj1
发布于 2011/12/16 18:37
字数 960
阅读 188
收藏 0
How-to-access NTFS from CentOS 5
Keonwook Kang
October 17, 2007
According to the website, http://www.linux-ntfs.org, there are three
possible options to gain an access to NTFS by the linux kernel: to install (1)
linux integrated kernel driver, (2) ntfsmount, an improved driver by ntfsprorg
team, and (3) ntfs-3g driver, recently developed by one of project members
Szabolcs Szakacsits. In this short how-to report, the 1st and 3rd solutions will
be tested to access NTFS from CentOS 5.
1
Integrated kernel driver
The driver can be installed and tested by following the procedure described
below.
1. Check current kernel version of the OS.
# uname -r
2.6.18-8.1.8.el5
2. Download the corresponding kernel driver. I downloaded NTFS RPM for
RedHat Enterprise Linux 5 from the website, http://www.linux-ntfs.
org/content/view/257/92/. Currently, the latest kernel version to sup-
port NTFS RPM package is 2.6.18-8.1.8.el5. If your kernel version is more
updated, read another how-to report about downgrading kernel.
3. Install RPM pacakage using install command.
# rpm -ivh kernel-module-ntfs-2.6.18-8.1.8.el5-2.1.27-0.rr.10.11.i686.rpm
4. To verify installation, type
# /sbin/modprobe ntfs
If it gives no error message, run
# cat /proc/filesystem
If you see ntfs from the output, now you can mount NTFS drive. If the
NTFS drive is not automatically mounted, you may refer Ref.[1]
1
2
ntfs-3g driver
Even if the installation of integrated kernel driver is quick and easy, it can allow
only reading files. For the full access to NTFS, we need to install ntfs-3g driver,
which can be downloaded from http://www.ntfs-3g.org/
1. Check to see if you have the required pacakge, FUSE 2.6.0 or later. We
assume your system already has one. If not, read the next section first
and come back.
# yum list installed | grep fuse
2. Download the source code, ntfs-3g-1.913.tgz.
3. Extract the source codes.
# tar xvzf ntfs-3g-1.913.tgz
4. Install ntfs-3g driver by typing
#
#
#
#
cd ntfs-3g-1.913
./configure
make
make install
5. Try to mount NTFS hard disk. In the command below, /dev/sdb1 and
/mnt/windows can be changed appropriately, if needed.
# mkdir /mnt/windows
# mount -t ntfs-3g /dev/sdb1 /mnt/windows
If it had already been mounted somehow, unmount it first.
# umount /meia/My\ Book/
# mount -t ntfs-3g /dev/sdb1 /mnt/windows
Sometimes, you may need to enforce mounting like
# mount -t ntfs-3g /dev/sdb1 /mnt/windows -o force
6. To unmount the volume, type
# umount /mnt/windows
7. To mount and unmount the volume with non-root account, type
$ ntfs-3g /dev/sdb1 /mnt/windows/
2
$ fusermount -u /mnt/windows/
8. To see the mounting information, type
# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdb1 on /mnt/windows type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=409
# more /etc/fstab
/dev/VolGroup00/LogVol00 /
ext3
defaults
1 1
LABEL=/boot
/boot
ext3
defaults
1 2
devpts
/dev/pts devpts gid=5,mode=620 0 0
tmpfs
/dev/shm tmpfs defaults
0 0
proc
/proc
proc
defaults
0 0
sysfs
/sys
sysfs defaults
0 0
/dev/VolGroup00/LogVol01 swap
swap
defaults
0 0
3
Installing FUSE (Filesystem in Userspace)
1. Download the latest stable release from http://fuse.sourceforge.net
and extract it.
# tar xvzf fuse-2.7.0.tar.gz
2. Install FUSE by typing
#
#
#
#
cd fuse-2.7.0
./configure
make
make install
3. You may encounter several error messages while running ./configure. If
you see the following message,
configure: error: no acceptable C compiler found in $PATH
You may need to install whole packages related with Development to have
a C compiler.
If you see another message like
checking kernel source directory... Not found
configure: error:
*** Please specify the location of the kernel source with
*** the ’--with-kernel=SRCDIR’ option
configure: error: ./configure failed for kernel
You must install kernel-devel with appropriate version
# yum install kernel-devel-2.6.18-8.1.8.el5
Loading "priorities" plugin
Loading "fastestmirror" plugin
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
0 packages excluded due to repository priority protections
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please
--> wait. Package kernel-devel.i686 0:2.6.18-8.1.8.el5 set to
--> be installed.
--> Running transaction check
Dependencies Resolved
=============================================================
Package
Arch
Version
Repository
Size
4
=============================================================
Installing:
kernel-devel i686
2.6.18-8.1.8.el5
updates
4.5 M
Transaction Summary
=============================================================
Install
1 Package(s)
Update
0 Package(s)
Remove
0 Package(s)
Total download size: 4.5 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: kernel-devel
######################### [1/1]
Installed: kernel-devel.i686 0:2.6.18-8.1.8.el5
Complete!
Then running ./configure should do work. You may see the following
warning message, but you can ignore it.
***********************************************************
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING *
* The FUSE user space binaries were NOT installed with
*
* root directory executable prefix. This means that
*
* automounting NTFS volumes during boot could fail. This *
* can be fixed the below way by reinstalling FUSE using
*
* the right ’configure’ option during FUSE compilation:
*
*
./configure --exec-prefix=/
*
*
make && sudo make install
*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING *
***********************************************************
4. Note that you need to reinstall FUSE if you upgrade the kernel.
References
[1] http://www.interwebworld.co.uk/29/hacking-centos-for-ntfs-support/
[2] http://www.ntfs-3g.org/
5
[3] http://fuse.sourceforge.net/
[4] http://devhen.wordpress.com/2006/06/08/
howto-install-sshfs-on-centos-linux/
6

本文转载自:http://www.google.com.hk/url?sa=t&rct=j&q=centos+ntfs&source=web&cd=9&ved=0CHMQFjAI&url=http%3A%2...

偏执狂xj1

偏执狂xj1

粉丝 7
博文 6
码字总数 924
作品 0
南京
程序员
私信 提问
实用技巧:Centos 5.1安装NTFS读写支持

CentOS 5默认是不支持挂载NTFS,因此我们需要安装ntfs-3g 1. 安装fuse 建议不要用二进制包安装而应该用源代码安装,我刚开始用二进制包安装总是提示 郁闷了一阵子干脆源码安装 首先下载fuse2...

JavaGG
2009/05/24
322
0
CentOS 6.3 下用ntfs-3g挂载Widows NTFS分区

默认情况下,CentOS 6.3不支持Widows NTFS硬盘分区读写,要想把NTFS格式的磁盘挂载到CentOS 6.3下面 需要安装第三方的插件ntfs-3g,这里我们采用编译安装插件。 1、安装编译器,否则不能成功...

罗荣熙
2012/09/08
2.2K
0
NTFS-3G 的问题

刚换了一个 centos 之前用的ubuntu 结果发现centos没有安装对NTFS支持 于是就装上了 但是只有命令行能查看 图形界面提示说 不认识NTFS 求解释 所需要重启 还是要相对修改配置文件 但又蛋疼的...

随风运转
2012/10/21
690
5
centoa7.1 minimal 新机配置步骤及其脚本

一、手动部分 (目的是链接CRT) root 登陆后 1图形配置IP方法: 命令 nmtui 进入图像界面配置ip 1 编辑链接 2选择网卡并进入编辑页 中文对比 3 默认是激活的(*为已激活) 4 设置主机名 重启r...

街角守望妳
2017/06/29
0
0
Win7 Centos6.3 双系统,硬盘安装

一、环境介绍: 1、 笔记本、Win7 2、 C盘NTFS、D盘NTFS、E盘NTFS、F盘FAT32 3、 注:用Win7磁盘管理工具,磁盘状态,C盘前面有100M的未用空间,貌似默认安装Win7都有,C盘、D盘为主分区,其...

GasLS
2012/08/03
8.3K
12

没有更多内容

加载失败,请刷新页面

加载更多

Centos6.6 安装ffmpeg视频工具

1.安装前置工具 yum -y install gcc cc cl libmpc*//后续失败的话,自己补充自己的缺少的包 2.安装yasm 1)下载wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz...

小海bug
18分钟前
4
0
电商的支付风控怎么玩?

qwfys
23分钟前
6
0
用什么来做用户行为分析?七个实用工具推荐给你

当企业进入数据化管理阶段之后,就不得不对用户进行行为数据分析,当然其他的包括用户画像、趋势分析等等,都是现在企业经常要进行的营销分析,因此选一个好的数据分析工具是很重要的。 而现...

朕想上头条
24分钟前
5
0
Java mysql连接

import java.sql.DriverManager; import java.sql.SQLException; import com.mysql.jdbc.Connection; public class T { public static void main(String[] args) throws SQLException, Insta......

林词
24分钟前
4
0
Select 选择器 的一些官网没有的用法

一、拼接字符串 <el-option v-for="(item, index) in reagentOptions" :key="index" :label="item.sjlxmc+' '+item.sjbm" :va......

沉迷代码我爱学习
25分钟前
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部