FreeBSD 启动时自动挂载 NTFS 分区
我正在寻找在 FreeBSD 6.2 上以读/写模式挂载 NTFS 硬盘的方法。
搜索谷歌,我发现 NTFS-3G 可以提供帮助。
使用NTFS-3G,当我尝试手动挂载/卸载NTFS时没有问题:
挂载:ntfs-3g /dev/ad1s1 /home/admin/data -o uid=1002,
或
umount:umount /home/admin/data
但是当我尝试在启动时自动挂载ntfs硬盘时遇到问题。
我尝试过:
- 添加 fstab: /dev/ad1s1 /home/admin/data ntfs-3g uid=1002 0 0
- 制作一个脚本,在启动时自动挂载 ntfs 分区,在 /usr/local/etc/rc.d/ 上目录。
但仍然失败了。 该脚本在手动执行时效果良好。
有谁知道在 FreeBSD 6.2 上读/写访问 NTFS 的替代方法/解决方案?
谢谢。
I am looking for the way to mount NTFS hard disk on FreeBSD 6.2 in read/write mode.
searching google, I found that NTFS-3G can be a help.
Using NTFS-3G, there is no problem when I try to mount/unmount NTFS manually:
mount: ntfs-3g /dev/ad1s1 /home/admin/data -o uid=1002,
or
umount: umount /home/admin/data
But I have a problem when try to mount ntfs hard disk automatically at boot time.
I have tried:
- adding fstab: /dev/ad1s1 /home/admin/data ntfs-3g uid=1002 0 0
- make a script, that automatically mount ntfs partition at start up, on /usr/local/etc/rc.d/ directory.
But it is still failed.
The script works well when it is executed manually.
Does anyone know an alternative method/ solution to have read/write access NTFS on FreeBSD 6.2?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的脚本运行在什么级别? 它是 S99 或更低版本吗?
听起来要么是安装时未加载依赖项,要么尝试使用脚本安装的用户无法成功。
在您的脚本中,我建议添加 sudo 以确保挂载由 root 执行:
将 sbin 交换到二进制文件所在的位置。
What level was your script running at? Was it a S99, or lower?
It sounds like either there is a dependency that isn't loaded at the time you mount, or that the user who is trying to mount using the script isn't able to succeed.
In your script I suggest adding a sudo to make sure that the mount is being performed by root:
Swap the sbin for wherever the binaries are.
经过我之前尝试过的一些方法。
最后,我尝试通过更改 mount.c 上的挂载脚本来添加 ntfs-3g 支持
像这样:
use_mountprog(const char *vfstype)
{
}
重新编译挂载程序,它就可以工作了!
谢谢...
After some ways I tried before.
The last, I tried to add ntfs-3g support by change the mount script on mount.c
Like this:
use_mountprog(const char *vfstype)
{
}
Recompile the mount program, and it works!
Thanks...