Gentoo 下挂载可读写 ntfs 分区

作者:Hily 原始链接:http://hily.me/blog/2008/10/gentoo_rw_ntfs/
版权声明:可以转载,转载时务必以超链接形式标明文章原始出处作者信息版权声明

我的旧硬盘,还有移动硬盘的分区全是 ntfs 格式的,因此在装 linux 时就要考虑怎么样挂载可读写的 ntfs 分区了。

在配置 Gentoo 内核(内核版本 2.6.25)时发现,在 ntfs 配置下有一项“NTFS write support”:

File systems  --->

DOS/FAT/NT Filesystems  --->

<*> NTFS file system support
[ ]   NTFS debugging support
[*]   NTFS write support

勾选“NTFS write support”,重新编译内核。

启动后发现挂载的 ntfs 分区仍然没有写入权限。

还以为是内核的 bug,查阅资料后才知道原来这里指的 write support 不假,只是目前对写入的支持还不完整。

替代的方法是使用 ntfs-3g 来 mount 分区。

gentoo linux # eix ntfs3g
[I] sys-fs/ntfs3g
Available versions:  1.2531 ~1.2531-r1 ~1.2712 ~1.2812 ~1.2918 {debug hal suid}
Installed versions:  1.2531(01:03:17 AM 10/23/2008)(-debug -suid)
Homepage:            http://www.ntfs-3g.org
Description:         Open source read-write NTFS driver that runs under FUSE

使用 ntfs-3g 需要内核支持 FUSE,可以在编译内核时把 FUSE 编译进内核。

File systems  --->

<*> Filesystem in Userspace support

或者将 FUSE 编译成模块,然后通过 modprobe fuse 来挂载。

ntfs-3g 使用示例:

ntfs-3g /dev/sda1 /hd/winc -o rw
mount -t ntfs-3g /dev/sda1 /hd/winc -o rw

如果要在系统启动时自动挂载,还需要修改 /etc/fstab 中的相关行,将原来的 ntfs 改为 ntfs-3g。

发表一下您的高见

If you have any question, or for the language problem, please fell free to leave a comment or just contact me with email: hilyjiang [At] Gmail.