Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jul 2007 13:54:35 -0500
From:      Novembre <novembre@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: NTFS-3G: mount at boot
Message-ID:  <3b47caa90707081154x44959d79gcdf61575e0a9aaa3@mail.gmail.com>
In-Reply-To: <3b47caa90707071630k30681b33kedbb9b844b57f81d@mail.gmail.com>
References:  <3b47caa90707071630k30681b33kedbb9b844b57f81d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Okay, here's an update:

Creating a symlink from /usr/local/bin/ntfs-3g to /sbin/mount_ntfs-3g
does not work (as posted before on the ntfs-3g forum message below).
I, then, added the following ntfsmount startup script to
/usr/local/etc/rc.d/:

----------
#!/bin/sh
#
# PROVIDE: ntfsmount
# REQUIRE: fusefs

. /etc/rc.subr

name="ntfsmount"
rcvar=`set_rcvar`
command="ntfs-3g /dev/ad0s1 /mnt/windows && ntfs-3g /dev/ad0s1
/mnt/windows -o locale=en_US.UTF-8"

load_rc_config $name
run_rc_command "$1"
----------

Then, chmod +x /usr/local/etc/rc.d/ntfsmount (to make it executable),
then added ntfsmount_enable="YES" to my /etc/rc.conf, then rebooted. I
did not see any error messages during boot, but the partition was not
mounted ('mount' returns nothing after logging in).
However, if I run 'ntfs-3g' again from the command prompt to mount the
windows partition, 'mount' now shows /mnt/windows THREE times, like
/dev/fuse1 on /mnt/windows (fusefs, local, noatime, synchronous)
/dev/fuse3 on /mnt/windows (fusefs, local, noatime, synchronous)
/dev/fuse5 on /mnt/windows (fusefs, local, noatime, synchronous)

and 'ls /dev/f*' returns
/dev/fuse0     /dev/fuse1     /dev/fuse2     /dev/fuse3     /dev/fuse4
    /dev/fuse5

It seems that since the 'ntfs-3g' command ran twice in the ntfsmount
script, running 'ntfs-3g' again from the command prompt makes the
third mount point. But if its two runs in the startup script were
successful, why would 'mount' not show the mount points until I run it
again from the command prompt?

I even tried removing one of the 'ntfs-3g' commands in the ntfsmount
script, i.e.
----------
command="ntfs-3g /dev/ad0s1 /mnt/windows -o locale=en_US.UTF-8"
----------
Rebooting with this, still 'mount' shows nothing after logging in.
However, if I run 'ntfs-3g' from the command prompt now, I get TWO
/mnt/windows mount points (instead of three). So it seems the all the
runs in the script are successful and the partition is mounted, but
the mount point is not available until I run 'ntfs-3g' again from the
command prompt.

I am using
fusefs-kmod-0.3.0_5
fusefs-libs-2.6.4
fusefs-ntfs-1.417_2

Any ideas what's going on here?

Thanks :)




On 7/7/07, Novembre <novembre@gmail.com> wrote:
>
> I have the same problem. A little search got me to http://forum.ntfs-3g.org/viewtopic.php?t=292 where a solution is posted. It seems that using /etc/fstab to mount the NTFS partition at boot time is not working since the mount command is being executed before the 'fuse' kernel module is loaded. However, on my  6.2-RELEASE machine, I see the following message when booting:
>
> ----------
> Starting file system checks:
> /dev/ad0s2a: FILE SYSTEM CLEAN; SKIPPING CHECKS
> /dev/ad0s2d: FILE SYSTEM CLEAN; SKIPPING CHECKS
> Mounting local file systems:mount: exec mount_ntfs-3g not found in /sbin:/usr/sbin: No such file or directory
> .
> .
> .
> Starting fusefs.
> fude4bsd: version 0.3.0, FUSE ABI 7.8
> .
> .
> .
> Mounting late file systems:mount: exec mount_ntfs-3g not found in /sbin:/usr/sbin: No such file or directory
> ----------
>
> I'm assuming that this "late" mount (the last line above) is being done after loading the 'fuse' kernel module, so the OS should be able to mount the file system now, but it can't! It's looking for mount_ntfs-3g and that file does not exist.
> My /etc/fstab looks like this: /dev/ad0s1       /mnt/windows       ntfs-3g       rw       0       0
> I also used the /etc/fstab entry suggested in NTFS-3G's own website ( http://www.ntfs-3g.org/  - scroll down to the end of the page), where "defaults" is being used instead of "rw", but that gave me this error:
>
> ----------
> swapon: adding /dev/ad0s2b as swap device
> fstab: /etc/fstab:6: Inappropriate file type or format
> Starting file system checks:
>  /dev/ad0s2a: FILE SYSTEM CLEAN; SKIPPING CHECKS
> fstab: /etc/fstab:6: Inappropriate file type or format
> fstab: /etc/fstab:6: Inappropriate file type or format
>  /dev/ad0s2d: FILE SYSTEM CLEAN; SKIPPING CHECKS
>  Mounting local file systems:fstab: /etc/fstab:6: Inappropriate file type or format
> Mounting NFS file systems:fstab: /etc/fstab:6: Inappropriate file type or format
> fstab: /etc/fstab:6: Inappropriate file type or format
> fstab: /etc/fstab:6: Inappropriate file type or format
> fstab: /etc/fstab:6: Inappropriate file type or format
> fstab: /etc/fstab:6: Inappropriate file type or format
>  .
>  .
>  .
>  Starting fusefs.
>  fude4bsd: version 0.3.0, FUSE ABI 7.8
>  .
>  .
>  .
>  Mounting late file systems:fstab: /etc/fstab:6: Inappropriate file type or format
> ----------
>
> Any ideas as to what's going on here?
>
> Thanks a lot
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3b47caa90707081154x44959d79gcdf61575e0a9aaa3>