Linux下写NTFS文件系统

最近因为工作需要,安装了Debian Linux,保留了机器上原有的Windows2000操作系统。不幸的是我的磁盘分区格式都是NTFS的,在Linux下读是不成问题的:mount -tntfs /dev/hda1 /mnt/c -o iocharset=utf8, 并且我把他添加到了/etc/fstab文件中,这样就能开机自动mount了。但是碰到的问题是这样不能够写,即使指定rw选项依然不能够写入。据说2.6的内核支持NTFS的写操作,只好试试看了。下了一个2.6.17的内核,修改配置,增加对NTFS文件系统的写支持,重新编译,修改grub,重新起动,等待奇迹的出现。很失望,和原来一模一样。没办法,只有google了,一个叫做captive的软件出现在视线中,据说能够写NTFS分区,赶紧down下来试试看。http://www.jankratochvil.net/project/captive/dist/captive-static-1.1.7.tar.gz,下来之后
tar xzvf captive-static-1.1.7.tar.gz
cd captive-static-1.1.7
./install
然后执行
captive-install-acquire
这里需要拷贝xp系统的ntfs.sys文件和ntoskrnl.exe到/var/lib/captive目录下,fastfat.sys与cdfs.sys是可选的,如果愿意也可以拷贝进来,接着往下走
mount -t captive-ntfs /dev/hda1 /mnt/c
出现错误,如下
/usr/libexec/captive-fusermount: Notice: Created FUSE device: /dev/fuse
FATAL: Module fuse not found.
/usr/libexec/captive-fusermount: Warning: "/dev/fuse" cannot be opened and even failed: /sbin/modprobe fuse
/usr/libexec/captive-fusermount: fuse device not found, try 'modprobe fuse' first
fuse: Failed to find functional 'fusermount'. Tried locations below:
/usr/local/bin/fusermount: No such file or directory
/usr/bin/fusermount: No such file or directory
/bin/fusermount: No such file or directory
/usr/local/sbin/fusermount: No such file or directory
/usr/sbin/fusermount: No such file or directory
/sbin/fusermount: No such file or directory
/usr/libexec/captive-fusermount: Success
看来captive确实已经安装成功了,错误是缺少fuse模块,继续google,看看fuse是何方神圣。
http://fuse.sourceforge.net/ 找到了,原来是Filesystem in Userspace,简单的说就是用户空间的文件系统,不多说了,有兴趣看看他的文档。我下的是fuse-2.5.3.tar.gz,然后
tar xzvf fuse-2.5.3.tar.gz
cd fuse-2.5.3
./configure
make
make install
modprobe fuse
一切OK,好了,可以试试了
mount -t captive-ntfs /dev/hda1 /mnt/c
不好,又出现错误了
/usr/local/bin/fusermount: mountpoint is not empty
/usr/local/bin/fusermount: if you are sure this is safe, use the 'nonempty' mount option
/usr/libexec/captive-fusermount: mountpoint is not empty
/usr/libexec/captive-fusermount: if you are sure this is safe, use the 'nonempty' mount option
fuse: Failed to find functional 'fusermount'. Tried locations below:
/usr/local/bin/fusermount: Success
/usr/bin/fusermount: No such file or directory
/bin/fusermount: No such file or directory
/usr/local/sbin/fusermount: No such file or directory
/usr/sbin/fusermount: No such file or directory
/sbin/fusermount: No such file or directory
/usr/libexec/captive-fusermount: Success
redleaf:~#
Captive-WARNING **: CORBA Exception occured: id="IDL:omg.org/CORBA/COMM_FAILURE:1.0", value=0x846ce7c
aborting...

什么,mountpoint is not empty,居然说我挂载点是空的,搞没搞错,我的东西可是实实在在存在的,仔细想想,原来我系统是自动mount的,没有umount就重新mount了,会不会是这个错误,umount先,
#umount /dev/c
#mount -t captive-ntfs /dev/hda1 /mnt/c
#
哈哈,终于没有错误了,写NTFS分区试试
#mkdir test
#rmdir test
#
没有错误,大功告成!!!!
感谢GNU,感谢那些伟大的程序员!!!!
centos 挂载ntfs所需要的步骤 我就是在挂载2TB的时候发现的 linux挂载NTFS分区移动硬盘2010-09-23 16:35CentOS 挂载NTFS分区移动硬盘 1.uname -r 查看当前的linux内核版本. [root@localhost Desktop]# uname -r 2.6.18-128.el5 2.去http://www.linux-ntfs.org/下载与内核版本相同的ntfs补丁.具体的地址 3.安装补丁:kernel-module-ntfs-2.6.18-128.el5-2.1.27-0.rr.10.11.i686.rpm [root@localhost Desktop]# rpm -ivh kernel-module-ntfs-2.6.18-128.el5-2.1.27-0.rr.10.11.i686.rpm Preparing... ########################################### [100%] 1:kernel-module-ntfs-2.6.########################################### [100%] 4.使用fdisk -l查看硬盘的分区信息. 5.mkdir /mnt/xxx 在mnt文件夹里新建文件夹,分别对应于移动硬盘下的分区(xxx为文文件夹名) 如:mkdir /mnt/name1 对应于叫做name1的盘 6.mount -t ntfs /dev/sdyz /mnt/xxx 将移动硬盘下的各分区挂载在新建的文件夹里(sdyz为硬盘的分区号码) 如: [root@localhost Desktop]# mount -t ntfs /dev/sdc1 /mnt/TheLORD,OurGod 今天将USB移动硬盘挂在CentOS上准备将压缩包拷贝下来的。 结果挂载移动硬盘的时候却提示: mount: unknown filesystem type ‘ntfs’ 原因:Linux无法识别NTFS格式的分区。 解决: 因为刚刚将CentOS升级到了2.6.18-164.el5内核,无法使用Kernel NTFS Module挂载Windows下的NTFS分区(没有在开源站点上找到相应内核包),所以只有使用ntfs-3g来解决了。 打开ntfs-3g的下载站点,将最新稳定版(当前最新版本为ntfs-3g-2010.3.6)下载到CentOS,执行以下命令安装: 1、编译安装ntfs-3g: #./configure #make #make install [/code] 2、查看USB设备点: #fdisk -l Disk /dev/sdb: 60.0 GB, 60011642880 bytes 255 heads, 63 sectors/track, 7296 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 653 5245191 b W95 FAT32 /dev/sdb2 654 7295 53351865 f W95 Ext'd (LBA) /dev/sdb5 654 1958 10482381 b W95 FAT32 /dev/sdb6 1959 7295 42869421 7 HPFS/NTFS 3、挂载NTFS分区: #mount -t ntfs-3g /dev/sdb6 /mnt/win
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值