# mounting NTFS file



## BJwojnowski (Aug 11, 2013)

How do I find and mount a_n_ _NTFS_ partition on my dual boot _W_indows 7 an_d_ FreeBSD 9.0 system while in the FreeBSD partition?
?.


----------



## fonz (Aug 11, 2013)

sysutils/fusefs-ntfs


----------



## BJwojnowski (Aug 11, 2013)

*instruction*

How do I use this file?


----------



## fonz (Aug 11, 2013)

Perhaps you will find this post useful.


----------



## andersbo87 (Aug 25, 2013)

Hey!

I'm attempting to follow the tip about sysutils/fusefs-ntfs. The command I'm executing, is `mount_ntfs-3g /dev/ada1s3 /mnt`. The system does not print any errors, however, when I attempt to do `ls /mnt`, the system returns

```
ls: /mnt: Input/output error
```

If I attempt to mount the NTFS volume using the command `mount -t ntfs-3g /dev/ada1s3 /mnt`, the system returns 
	
	



```
mount: /dev/ada1s3: Operation not supported by device
```
Can someone please help me?


----------



## J65nko (Aug 25, 2013)

What is the output of `fdisk ada1` and `gpart show ada1`?


----------



## andersbo87 (Aug 26, 2013)

The output of `fdisk ada1` is:

```
******* Working on device /dev/ada1 *******
parameters extracted from in-core disklabel are:
cylinders=1938021 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1938021 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 175 (0xaf),(HFS+)
    start 126, size 1048575906 (511999 Meg), flag 0
	beg: cyl 1023/ head 254/ sector 63;
	end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 1048576032, size 461373381 (225279 Meg), flag 80 (active)
	beg: cyl 1023/ head 254/ sector 63;
	end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
    start 1509949476, size 442498959 (216063 Meg), flag 0
	beg: cyl 1023/ head 254/ sector 63;
	end: cyl 1023/ head 254/ sector 63
The data for partition 4 is:
<UNUSED>
```
The output of `gpart show ada1` is

```
=>        63  1953525105  ada1  MBR  (931G)
          63          63        - free -  (31k)
         126  1048575906     1  !175  (500G)
  1048576032   461373381     2  freebsd  [active]  (220G)
  1509949413          63        - free -  (31k)
  1509949476   442498959     3  ntfs  (211G)
  1952448435     1076733        - free -  (525M)
```

ada1 only has three partitions: One HFS+ partition where I store my Mac OS X user files ((ada1s1, shown here as "!175") the Mac OS itself is located on ada0p2), one FreeBSD partition (ada1s2) as well as the Windows NTFS partition (ada1s3). Why ada1s1 shows as "!175" I don't know. When I do `gpart show ada0`, the correct value of apple-hfs appears for the partitions where the HFS+ file system are used:

```
[CMD]gpart show ada0[/CMD]
=>       34  500118125  ada0  GPT  (238G)
         34          6        - free -  (3.0k)
         40     409600     1  efi  (200M)
     409640  361307280     2  apple-hfs  (172G)
  361716920    1269536     3  apple-boot  (619M)
  362986456  135862160     4  apple-hfs  (64G)
  498848616    1269536     5  apple-boot  (619M)
  500118152          7        - free -  (3.5k)
```


----------



## J65nko (Aug 26, 2013)

Does `# /usr/local/etc/rc.d/fusefs status` show that the fuse daemon is running? Did you mount as root user?


----------



## andersbo87 (Aug 26, 2013)

Well, I'm running FreeBSD 10 (because of the radeon-kms driver which makes running X and GNOME a whole lot better experience than using VESA on FreeBSD 9), where FUSE seem to be integrated into the base system, at least I cannot install fusefs-kmod which I guess is vital in order to get access to the fuse daemon (correct me if I'm wrong), and as of right now, since there is no such thing as /usr/local/etc/rc.d/fusefs, I have no idea how to check if the fuse daemon is running or not. However, I've set fusefs_enable="YES" in /etc/rc.conf.

As to answer your second question, I'm always mounting file systems as root.


----------



## SirDice (Aug 26, 2013)

Is sysutils/fusefs-kmod installed?


----------



## andersbo87 (Aug 26, 2013)

SirDice said:
			
		

> Is sysutils/fusefs-kmod installed?



Well, since I run FreeBSD 10, because of the radeon-kms driver mentioned above, I'm unable to install sysutils/fusefs-kmod because FUSE is already included in the base system:

```
[CMD]cd /usr/ports/sysutils/fusefs-kmod && sudo make all install clean[/CMD]
===>  fusefs-kmod-0.3.9.p1.20080208_11 Integrated into base.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/fusefs-kmod
```


----------



## andersbo87 (Aug 28, 2013)

It seems that after I upgraded FreeBSD 10 from the radeon-kms branch to CURRENT that mounting NTFS file systems using `sudo mount_ntfs-3g /dev/ada1s3 /mnt` works for now. However, one thing that still does not work, which I forgot to mention in my earlier posts, is to mount NTFS systems via the regular `mount -t ntfs /dev/device mountpoint` command. The command `sudo mount -t ntfs /dev/ada1s3 /mnt` gives the following result:

```
mount: /dev/ada1s3: Operation not supported by device
```
The command `sudo mount_ntfs /dev/ada1s3 /mnt` gives the following result:

```
mount_ntfs: /dev/ada1s3: No such file or directory
```
 Despite the message returned when running mount_ntfs(8), /dev/ada1s3 does exist.


----------



## SirDice (Aug 28, 2013)

Keep in mind that mount_ntfs(8) only supports read-only access. This should work: `sudo mount -t ntfs -o ro /dev/ada1s3 /mnt`


----------



## andersbo87 (Aug 28, 2013)

SirDice said:
			
		

> Keep in mind that mount_ntfs(8) only supports read-only access. This should work: `sudo mount -t ntfs -o ro /dev/ada1s3 /mnt`



I tried to run the command you mentioned with the -o ro option, but mounting still fails. :\

When I run `sudo mount -t ntfs -o ro /dev/ada1s3 /mnt`, I'm still getting the 
	
	



```
mount: /dev/ada1s3: Operation not supported by device
```
 error message, even if ada1s3 is the partition with the NTFS file system.

Thanks for the tip, though.


----------



## tyson (Aug 28, 2013)

After looking into /usr/src/UPDATING you can find these entries:

```
20121018:
        All the non-MPSAFE filesystems have been disconnected from
        the build. The full list includes: codafs, hpfs, [B]ntfs[/B], nwfs,
        portalfs, smbfs, xfs.
...
20090119:
        NTFS has been removed from GENERIC kernel on amd64 to match
        GENERIC on i386. Should not cause any issues since mount_ntfs(8)
        will load ntfs.ko module automatically when NTFS support is
        actually needed, unless ntfs.ko is not installed or security
        level prohibits loading kernel modules. If either is the case,
        "options NTFS" has to be added into kernel config.
```
So, basically there is no support for NTFS in CURRENT's kernel, because you cant find ntfs.ko to load.


----------



## andersbo87 (Aug 28, 2013)

tyson said:
			
		

> After looking into /usr/src/UPDATING you can find these entries:
> 
> ```
> 20121018:
> ...



Ah, that explains it. I guess that's the "price" I have to pay for not reading /usr/src/UPDATING carefully enough. 

Thank you so much for the help. Have a good day or night.


----------

