This write-up was tested on FreeBSD 6.2 and 6.3. As of this writing the NTFS-3g release was 1.2531.
Please let me know if you run into typos or other technical issues when implementing this.
1.) Update the ports collection.
Setup the update:
# cd /usr/ports/ports-mgmt/portupgrade
# make install clean
# cd /usr/ports/net/cvsup
# make install clean
# cp /usr/share/examples/cvsup/ports-supfile /root/ports-supfile
# pico /root/ports-supfile
Make it look something like this:
#######################################################
*default host=cvsup1.us.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
#comment the below line if you don’t want to update the /src directory
#src-all
#update /usr/ports
ports-all tag=.
#######################################################
Run the update:
# cvsup -L 2 /root/ports-supfile
# portsdb -Uu
Update installed ports:
# portversion -l “<”
# portupgrade -arR
# pkgdb -F
2.) De-install any existing packages.
Older versions don’t work properly for auto mounting in /etc/fstab. In addition older versions of the kernel module and libraries won’t work with the latest version of fusefs-ntfs.
# cd /usr/ports/sysutils/fusefs-kmod
# make deinstall
# cd /usr/ports/sysutils/fusefs-libs
# make deinstall
# cd /usr/ports/sysutils/fusefs-ntfs
# make deinstall
3.) Install the necessary packages.
# cd /usr/ports/sysutils/fusefs-kmod
# make install clean
# cd /usr/ports/sysutils/fusefs-libs
# make install clean
# cd /usr/ports/sysutils/fusefs-ntfs
# make install clean
4.) Load the kernel module
Enable the kernel module
edit /etc/rc.conf and add:
fusefs_enable=”YES”
Start the module
# /usr/local/etc/rc.d/fusefs start
5.) Attach the USB drive.
Attach the USB drive and check your syslog for the detection of the drive:
# tail -n20 /var/log/messages
Example:
Sep 8 09:19:47 servername kernel: umass0: Seagate FreeAgentDesktop, rev 2.00/0.00, addr 2
Sep 8 09:19:47 servername kernel: da1 at umass-sim0 bus 0 target 0 lun 0
Sep 8 09:19:47 servername kernel: da1: <Seagate FreeAgentDesktop 100D> Fixed Direct Access SCSI-4 device
Sep 8 09:19:47 servername kernel: da1: 40.000MB/s transfers
Sep 8 09:19:47 servername kernel: da1: 476940MB (976773168 512 byte sectors: 255H 63S/T 60801C)
6.) Mount the USB drive.
# mkdir /mnt/usbstorage
# mount -t ntfs-3g /dev/da1s1 /mnt/usbstorage
If you get an error about the partition being hibernated:
Error opening partition device: Operation not permitted
Failed to mount ‘/dev/da1s1′: Operation not permitted
The NTFS partition is hibernated. Please resume and shutdown Windows properly, so mounting could be done safely.
Use:
# mount -t ntfs-3g /dev/da1s1 /mnt/usbstorage -o remove_hiberfile
That error message does sometimes point to a conflict in module and library versions though and cannot be fixed until the versions installed are correct.
Notes:
· If you want a persistent mount, be sure to add a mount entry to the /etc/fstab file or a post boot script such as rc.local.
· If you are done with the USB storage drive:
# umount /mnt/usbstorage