# /etc/fstab error, now don't start freebsd.



## rokpa92 (Feb 15, 2010)

hi again.
i search in the forums the mode for "auto-mount" an ntfs disk and i found some method for do by /etc/fstab
i put the line:

```
/dev/ad11s1		/media/data	ntfs	rw,mountprog=/usr/local/bin/ntfs-3g,late	0	0
```
like i found in many post, in the /etc/fstab
I remain this


```
# Device		Mountpoint	FStype	Options		Dump	Pass#

/dev/ad10s3b		none		swap	sw		0	0

/dev/ad10s3a		/		ufs	rw		1	1

/dev/ad10s3e		/tmp		ufs	rw		2	2

/dev/ad10s3f		/usr		ufs	rw		2	2

/dev/ad10s3d		/var		ufs	rw		2	2

/dev/ad11s1		/media/data	ntfs	rw,mountprog=/usr/local/bin/ntfs-3g,late	0	0
```

the problem is that now it does not start the system.
it arrives at a part that says:


```
/dev/ad10s3f: UN ALLOCATED I=5 OWNER=root MODE=0
/dev/ad10s3f: SIZE=0 MTIME=Feb 14 00:34 2010
/dev/ad10s3f: NAME=/lost+found
/dev/ad10s3f: UNEXETED SOFT UPDATE INCOSISTENCY; RUN fsck MANUALLY.
the followin file system had an unexpede incosistency
UFS: /dev/ad10s3f (/usr)
Automatic file system check failed, help!
error aborting boo (sending sigtem to parent)!
init: /bin/sh on /etc/rc terminated abnormally, going to single user mode.
enter full pathname of shell or RETURN for /bin/sh:
```

if i put return: say me all again.
if i put "enter": i have a same mode like an "Standar user" but with a lot of less option. i want to enter in root mode for edit the /etc/fstab/ and remobe the last line i put, but i can't.


----------



## SirDice (Feb 15, 2010)

When there's an error in /etc/fstab nothing will get mounted and the root (/) filesystem will be mounted read-only. To fix this:


```
fsck -y
mount -u /
mount -a -t ufs
swapon -a
```

Now you can edit /etc/fstab and fix the error. To continue booting just exit the shell.


----------



## rokpa92 (Feb 15, 2010)

*Thanks*

*Sr. SirDice:*






Thanks! it's work. i can login again.

can ask you other think?
if i put

```
/dev/ad11s1		/media/data	ntfs	rw,mountprog=/usr/local/bin/ntfs-3g,late	0	0
```
and don't work... do you know what i must put for "auto-mount" my second harddrive (ntfs) for read&write?


----------



## SirDice (Feb 15, 2010)

Stop using Linux' fstab format 

Check if /usr/sbin/mount_ntfs-3g is a symlink to /usr/local/bin/ntfs-3g and use ntfs-3g as the filesystem.

http://forums.freebsd.org/showthread.php?t=10431


----------



## Beastie (Feb 15, 2010)

As SirDice already pointed out you should use *ntfs-3g* instead of *ntfs*. *ntfs* is FreeBSD's default driver which should be used with the *ro* (read-only) flag instead of *rw* (read/write).

Also, next time you need to modify /etc/fstab, don't reboot. It's not necessary and will lead to the problem you got if you have an error. Instead test the new entry by mounting it manually: `# mount /media/data`.


----------



## rokpa92 (Feb 15, 2010)

Like this i must put?


```
/dev/ad11s1	/media/data ntfs-3g	rw,mountprog=/usr/local/bin/ntfs-3g,late	0	0
```

Sorry, i am very new, a few mouth i start use freebsd, i never use any linux and i always use windows, i read the handbook of FreeBSD, but somethings escapes me.


----------



## SirDice (Feb 15, 2010)

Remove the mountprog option, it doesn't exist in FreeBSD's fstab.


----------



## rokpa92 (Feb 15, 2010)

mmm.. like this i must put in /etc/fstab?

```
/dev/ad11s1 /media/data ntfs-3g rw,,late 0 0
```


----------



## phoenix (Feb 15, 2010)

Without the extra , so that it's just *rw,late*


----------



## rokpa92 (Feb 15, 2010)

i put in /etc/fstab:

```
/dev/ad11s1            /media/data           ntfs-3g           rw,late
```
but nothing. Don't auto-mount to read&write


----------



## sixtydoses (Feb 15, 2010)

```
/dev/ad11s1  /media/data  ntfs-3g  rw,late  0 0
```

And make sure you have fuse.ko module loaded (`kldstat -v | grep fuse`)


----------



## rokpa92 (Feb 15, 2010)

it does not serve as much, still â€œdoes not auto-mountâ€. that rare


(screenshot of disk i want to "auto-mount")


----------



## Beastie (Feb 15, 2010)

It's not going to magically mount itself. Mount it manually: `# mount /media/data`.


----------



## SirDice (Feb 15, 2010)

Auto mounting is going to be tricky. The 'default' filesystems shouldn't be a problem but I never tried it with ntfs-3g. I think this largely depends on the DE you're using. 

The HAL FAQ is more or less written from a Gnome point of view but most of it (everything except the gconf bits) also works for KDE and XFCE.
http://www.freebsd.org/gnome/docs/halfaq.html


----------



## rokpa92 (Feb 15, 2010)

Beastie said:
			
		

> It's not going to magically mount itself. Mount it manually: `# mount /media/data`.


i do that but don't work :S

```
mount: /media/data: No such file or directory
```



			
				SirDice said:
			
		

> Auto mounting is going to be tricky. The 'default' filesystems shouldn't be a problem but I never tried it with ntfs-3g. I think this largely depends on the DE you're using.
> 
> The HAL FAQ is more or less written from a Gnome point of view but most of it (everything except the gconf bits) also works for KDE and XFCE.
> http://www.freebsd.org/gnome/docs/halfaq.html



mmmm.. i see...


----------



## phoenix (Feb 15, 2010)

Did you create the /media/data directory?  "No such file or directory" usually means that the mountpoint doesn't exist.


----------



## Beastie (Feb 15, 2010)

`# mkdir /media/data`
`# mount /media/data`


----------



## rokpa92 (Feb 16, 2010)

> ```
> # mkdir /media/data
> # mount /media/data
> ```


Yes sr... i do that.
mmmmmmmmmm.....
wait.. i do something for the automount.. i do this:

i Enable vfs.usermount

```
FBSD# 	sysctl -w vfs.usermount=1
```
Configure vfs.usermount to be enabled on boot.

```
FBSD# 	echo vfs.usermount=1 >> /etc/sysctl.conf
```
Open the following file with an editor: /etc/devfs.conf

```
FBSD# 	ee /etc/devfs.conf
```
add this lines:

```
perm /dev/acd0 0666
perm /dev/acd1 0666
perm /dev/cd0 0666
perm /dev/cd1 0666
# Allow all USB Devices to be mounted
perm /dev/da0 0666
perm /dev/da1 0666
perm /dev/da2 0666
perm /dev/da3 0666
perm /dev/da4 0666
# Misc other devices
perm /dev/pass0 0666
perm /dev/xpt0 0666
perm /dev/agpart 0666
perm /dev/uscanner0 0666
```

Edit the following file: /usr/local/etc/PolicyKit/PolicyKit.conf
I change this:

```
<config version="0.1">
	    <match user="root">
	        <return result="yes"/>
	    </match>
	    <define_admin_auth group="wheel"/>
	</config>
```
For this:

```
<config version="0.1">
	        <define_admin_auth group="operator"/>
	        <match action="org.freedesktop.hal.storage.mount-removable">
	                <return result="yes"/>
	        </match>
	        <match action="org.freedesktop.hal.storage.mount-fixed">
	                <return result="yes"/>
	        </match>
	        <match action="org.freedesktop.hal.storage.eject">
	                <return result="yes"/>
	        </match>
	</config>
```
Edit the following file: /etc/fstab
And delete the line:

```
#/dev/acd0 /cdrom cd9660 ro,noauto 0 0
```
i do something bad?


----------



## Beastie (Feb 16, 2010)

Did you do
`# mkdir /media/data`
`# mount /media/data`
yet?
This will mount /dev/ad11s1 right away, and since you already have a line in /etc/fstab (*/dev/ad11s1 /media/data ntfs-3g rw,late 0 0*), it will "auto-mount" every time you boot the machine.



Now for the rest. In /etc/devfs.conf, remove all the */dev/*. Device nodes are enough. Also add an ownership entry for every *perm* line you have, e.g. *own acd0 rootperator* for the first one.

Add your user to the operator group, e.g. `# pw group mod operator -m rokpa`



Post the output of these commands:
`% ls /dev/acd*`
`% ls /dev/cd*`
`% ls /dev/da*`



Add these lines to /etc/rc.conf:

```
dbus_enable="YES"
hald_enable="YES"
```
Don't forget to start both:
`# /usr/local/etc/rc.d/hald start`
`# /usr/local/etc/rc.d/dbus start`


----------



## rokpa92 (Feb 16, 2010)

*i have this*



			
				Beastie said:
			
		

> Did you do
> `# mkdir /media/data`
> `# mount /media/data`
> yet?
> This will mount /dev/ad11s1 right away, and since you already have a line in /etc/fstab (*/dev/ad11s1 /media/data ntfs-3g rw,late 0 0*), it will "auto-mount" every time you boot the machine.



In /etc/fstab
i have this:

```
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad10s3b            none            swap    sw              0       0
/dev/ad10s3a            /               ufs     rw              1       1
/dev/ad10s3e            /tmp            ufs     rw              2       2
/dev/ad10s3f            /usr            ufs     rw              2       2
/dev/ad10s3d            /var            ufs     rw              2       2
/dev/ad11s1             /media/Data     ntfs-3g rw,late         0       0
```

*------------------------------------------------------------------------------------------------------​*


			
				Beastie said:
			
		

> and when do this:


`# mkdir /media/Data`

```
mkdir: /media/Data: File exists
```
`# mount /media/Data`

```
mount: /media/Data: unknown special file or file system
```
Note: The name it's *D*ata, no *d*ata. but i try with the two options.

*------------------------------------------------------------------------------------------------------​*


			
				Beastie said:
			
		

> Now for the rest. In /etc/devfs.conf, remove all the */dev/*. Device nodes are enough. Also add an ownership entry for every *perm* line you have, e.g. *own acd0 rootperator* for the first one.



i have this in /etc/devfs.conf

```
perm /dev/acd0 0666
perm /dev/acd1 0666
perm /dev/cd0 0666
perm /dev/cd1 0666


# Allow all USB Devices to be mounted
perm /dev/da0 0666
perm /dev/da1 0666
perm /dev/da2 0666
perm /dev/da3 0666
perm /dev/da4 0666
perm /dev/da5 0666
perm /dev/da6 0666
perm /dev/da7 0666
perm /dev/da8 0666
perm /dev/da9 0666

# Misc other devices
perm /dev/pass0 0666
perm /dev/xpt0 0666
perm /dev/agpart 0666
perm /dev/uscanner0 0666
```
Note: With this, i plug an USB-Drive/USB-Key and mount automatically with NTFS or FAT32 partition, but only for Read.

*------------------------------------------------------------------------------------------------------​*


			
				Beastie said:
			
		

> Add your user to the operator group, e.g. `# pw group mod operator -m rokpa`



Yes, my user are [wheel,operator] group

*------------------------------------------------------------------------------------------------------​*


			
				Beastie said:
			
		

> Post the output of these commands:


`% ls /dev/acd*`

```
/dev/acd0
```
`% ls /dev/cd*`

```
ls: No match.
```
Note: when i put a cd/dvd my DVDburner don't recognize any CD/DVD in KDE4, but if i put the DVD installation of FreeBSD and enter in `# sysinstall` for install some packet, the DVD work, but only for `# sysinstall`
`% ls /dev/da*`

```
ls: No match.
```


*------------------------------------------------------------------------------------------------------​*


> Add these lines to /etc/rc.conf:
> 
> ```
> dbus_enable="YES"
> ...



yes, i do that befor install Xorg and Kde4. it's the first i do (after [CMD=""]freebsd-update[/CMD])


----------



## Beastie (Feb 16, 2010)

Okay, try this instead: `# ntfs-3g /dev/ad11s1 /media/Data`.
I think you should have *fusefs_enable="YES"* in /etc/rc.conf. Start it with `# /usr/local/etc/rc.d/fusefs start`.


Since you only have 1 ATAPI CDROM drive, no SCSI drive, and potentially 1 or 2 USB pen/drives, your /etc/devfs.conf should only contain:

```
own acd0 root:operator
perm acd0 0666
```
In /etc/rc.conf add *devfs_system_ruleset="localrules"*, and create a file named /etc/devfs.rules containing the following data:

```
[localrules=5]
add path 'da*' mode 0660 group operator
```
Start it with `# /etc/rc.d/devfs start`.


----------



## rokpa92 (Feb 16, 2010)

*doing*



			
				Beastie said:
			
		

> Okay, try this instead: `# ntfs-3g /dev/ad11s1 /media/Data`.
> I think you should have *fusefs_enable="YES"* in /etc/rc.conf. Start it with `# /usr/local/etc/rc.d/fusefs start`.


Yes sr. I have *fusefs_enable)"YES"* in /etc/rc.conf (and it's started too)

*------------------------------------------------------------------------------------------------------​*


			
				Beastie said:
			
		

> Since you only have 1 ATAPI CDROM drive, no SCSI drive, and potentially 1 or 2 USB pen/drives, your /etc/devfs.conf should only contain:
> 
> ```
> own acd0 root:operator
> ...


OK! I only have now in the /etc/devfs.conf
that 2 lines line. now reboot and say what happens



			
				Beastie said:
			
		

> In /etc/rc.conf add *devfs_system_ruleset="localrules"*, and create a file named /etc/devfs.rules containing the following data:
> 
> ```
> [localrules=5]
> ...



created too.
Rebooting.


----------



## rokpa92 (Feb 16, 2010)

ok, that give me an error.
reportedly, missing partitions.
i do:
`# fsck -y
mount -u /
mount -a -t ufs
swapon -a`
and nothing.
i think and think and i decided to remove "Data" dir you say me to create, ( /etc/Data )
ok, the loading it's resumed and finish the load of the system, and can logme again.
now, only with `# ntfs-3g /dev/ad11s1 /media/Data` give me and error, (but mount only for read). it's say:

```
mount_fusefs: /media/Data: No such file or directory
fuse: failed to mount file system: Unknown error: 0
```
The "auto-mount"?
No, no "auto-mount" yet.
i try to think but I have no idea either.
what can i do?


----------



## Beastie (Feb 16, 2010)

rokpa92 said:
			
		

> ok, that give me an error.


What error exactly?



			
				rokpa92 said:
			
		

> ( /etc/Data )


Unless this is a typo, the directory should be /media/Data since that's what you have in /etc/fstab. So again, if you don't have that directory, create it and keep it. The system needs a mountpoint.



			
				rokpa92 said:
			
		

> now, only with `# ntfs-3g /dev/ad11s1 /media/Data` give me and error, (but mount only for read). it's say:
> 
> ```
> mount_fusefs: /media/Data: No such file or directory
> ...


1. Does `% kldstat` return *fuse.ko* among other things?
2. Post the output of `% ls /dev/ad*`.
3. Post the output of `% fdisk ad11`.


----------



## rokpa92 (Feb 17, 2010)

Beastie said:
			
		

> What error exactly?
> 
> Unless this is a typo, the directory should be /media/Data since that's what you have in /etc/fstab. So again, if you don't have that directory, create it and keep it. The system needs a mountpoint.



this:

```
mounting late file systems: mount: /dev/ad11s1 :operation not suported by device.
mounting /etc/fstab filesystems failed, startup aborted, error aborting boot (sending SIGTERM to parent)!
init: /bin/sh on /etc/rc terminated abnormally, going to single use mode.
Enter full pathname of shell or return for /bin/sh
```

so.. i remove /media/Data to continues. i can't continue in the loading process of the system. so, i remove that and load good as usualy.



			
				Beastie said:
			
		

> 1. Does `% kldstat` return *fuse.ko* among other things?
> 2. Post the output of `% ls /dev/ad*`.
> 3. Post the output of `% fdisk ad11`.


wait me, doing now...


----------



## rokpa92 (Feb 17, 2010)

I created again /media/Data as you say.

for `# kldstat`:


```
Id Refs Address            Size     Name
 1   15 0xffffffff80100000 d188c0   kernel
 2    1 0xffffffff80e19000 23ed0    snd_hda.ko
 3    2 0xffffffff80e3d000 75708    sound.ko
 4    1 0xffffffff81022000 a8ca     fuse.ko
 5    1 0xffffffff8102d000 5ad4a    radeon.ko
 6    1 0xffffffff81088000 11454    drm.ko
```

for `# ls /dev/ad*`:

```
/dev/ad10       /dev/ad10s3     /dev/ad10s3d    /dev/ad11
/dev/ad10s1     /dev/ad10s3a    /dev/ad10s3e    /dev/ad11s1
/dev/ad10s2     /dev/ad10s3b    /dev/ad10s3f
```


for `# fdisk ad11`:

```
******* Working on device /dev/ad11 *******
parameters extracted from in-core disklabel are:
cylinders=1938018 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=1938018 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 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
    start 2048, size 1953517568 (953866 Meg), flag 80 (active)
        beg: cyl 0/ head 32/ sector 33;
        end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
```
i reboot and have the same error of previus thread, so i must remove again /media/Data


----------



## Beastie (Feb 17, 2010)

Does `# mount -r -t ntfs /dev/ad11s1 /mnt` even work?


----------



## rokpa92 (Feb 17, 2010)

Beastie said:
			
		

> Does `# mount -r -t ntfs /dev/ad11s1 /mnt` even work?



yes! mount in /mnt/content of ad11s1

i reboot for try again, and do again and work again.

so.. 
i create Data directory m`# kdir /media/Data` (in terminal of kde4)
them `# mount -r -t ntfs /dev/ad11s1 /media/Data`
and mount great again (read & write) in /media/Data

but... if i reboot, when start again i have the error of 2 threar past, again. so i must `# rmdir /media/Data` and the system continues loading.

i don't know why then /media/Data it's created don't load freebsd.
and i don't know why "auto-mount" that disk follow the steps of any one say me.


----------



## Beastie (Feb 17, 2010)

Do the following commands work?
`# mkdir /mnt/Data`
`# ntfs-3g /dev/ad11s1 /mnt/Data`
(make sure /dev/ad11s1 is not already mounted when you try these)

If they do, modify /etc/fstab

```
/dev/ad11s1 /mnt/Data ntfs-3g rw,late 0 0
```


----------



## rokpa92 (Feb 18, 2010)

Beastie said:
			
		

> Do the following commands work?
> `# mkdir /mnt/Data`
> `# ntfs-3g /dev/ad11s1 /mnt/Data`
> (make sure /dev/ad11s1 is not already mounted when you try these)
> ...



Yes, sure, alway i reboot the system, the mounted devices go out.

ok.. i created /mnt/Data
and make `# ntfs-3g /dev/ad11s1 /mnt/Data`
now, i have to Read and Write.
and now editing for put:

```
/dev/ad11s1 /mnt/Data ntfs-3g rw,late 0 0
```
Now rebooting... wait me...

---------

Ok... i have the same same problem.

```
mounting late file systems: mount: /dev/ad11s1 :operation not supported by device.
mounting /etc/fstab filesystems failed, startup aborted, error aborting boot (sending SIGTERM to parent)!
init: /bin/sh on /etc/rc terminated abnormally, going to single use mode.
Enter full pathname of shell or return for /bin/sh
```
i `# rmdir /mnt/Data` and can finish the load of the system and can use again.


----------



## mamalos (Feb 18, 2010)

Guys,

I don't know if somebody has already told this, cause I only skimmed through most posts; To automount my ntfs partition with rw option, what I have done is the following (somebody wrote the first part of it in a post already):

symlinked ntfs-3g to /sbin/mount_ntfs

and in my /etc/fstab I have my line stating:


```
/dev/ad4s1      /mnt/win7write       ntfs rw,late,noauto         0       0
```

where the partition type is ntfs and not ntfs-3g. If I have ntfs-3g in fstab, and try to mount my /mnt/win7write partition, I get the error:


```
mount: /dev/ad4s1 : Operation not supported by device
```

So, I think that if you put ntfs instead of ntfs-3g in your fstab, and if you have symlinked ntfs-3g to /sbin/mount_ntfs, you will achieve automounting the ntfs partition with rw permissions when booting (provided that the mount directory exists).

Sorry if I misunderstood something on the subject, just trying to help .

Good luck.


----------



## rokpa92 (Feb 19, 2010)

*Please!*

Could you explain step by step to have a "symlinked"? is that I am so new that do not understand how this is done.
you have given me great hope


----------



## mamalos (Feb 19, 2010)

What you do is the follwoing, type:


```
# mv /sbin/mount_ntfs /sbin/mount_ntfs.orig
# ln -s /usr/local/bin/ntfs-3g /sbin/mount_ntfs
```

as root. With the first command you rename the original mount_ntfs executable in the /sbin directory with the name mount_ntfs.orig, and with the second command you create a symbolic link (something like, but not at all, shortcut in windows parlance) of ntfs-3g in the /sbin directory, but with the name mount_ntfs, which is what fstab recognizes.

Now, in your /etc/fstab file, replace ntfs-3g with ntfs and it should work.

Try it first, as has already been stated in a previous post, by typing:


```
# mount /mnt/windows
```

or whatever is the path to the directory to which you wish to mount your ntfs partition.

Good luck


----------



## rokpa92 (Feb 19, 2010)

doing (but with the directory /media/Data)
and work. i can read and write.
now put in /etc/fstab the next line

```
/dev/ad11s1  /media/Data  ntfs  rw,late  0 0
```
now wait me, i reboot....
(cross the finger and good luck)


----------



## rokpa92 (Feb 19, 2010)

YES MAN! It's work now!
Thanks so so much!
Work perfect!
now i can plug more drive and make my projectt.
Thanks thanks a lot.


----------



## DutchDaemon (Feb 19, 2010)

You do realise that SirDice already suggested the exact same thing in post #4?

Anyhow, glad it's over


----------



## mamalos (Feb 19, 2010)

DutchDaemon you're half right . The only thing that SirDice omitted to state in #4 was to remove ntfs-3g from fstab and replace it with ntfs.

This is what I realized after skimming through the replies of this topic, and I thought it would be worth mentioning, since otherwise it wouldn't work. 

Glad too it's over; enjoy your project dude!


----------



## rokpa92 (Feb 19, 2010)

i am making a "how to" for this problem, wait me a second


----------



## DutchDaemon (Feb 19, 2010)

You know this is just a matter of doing the exact same thing in two different ways, right? 

SirDice:


> Symlink /usr/sbin/mount_ntfs-3g to /usr/local/bin/ntfs-3g  and use ntfs-3g as the filesystem.



mamalos:


> Symlink /sbin/mount_ntfs to /usr/local/bin/ntfs-3g and use ntfs as the filesystem


----------



## mamalos (Feb 19, 2010)

Yes DutchDaemon, now I saw what you meant. I hadn't seen the mount_ntfs-3g in SirDice's symlink. It's the same thing.


----------



## rokpa92 (Feb 19, 2010)

here are the "how to" if you want to enter an take a look.
http://forums.freebsd.org/showthread.php?t=11473
thanks again people.


----------



## DutchDaemon (Feb 19, 2010)

I'd like to add (as I did in the HowTo that rokpa92 wrote in the meantime) that the symlink named /sbin/mount_ntfs is likely to be overwritten by an OS upgrade (`make installworld` or [cmd=]freebsd-update[/cmd]). 

Using the /usr/sbin/mount_ntfs-3g symlink and the ntfs-3g target in /etc/fstab will not suffer that fate.


----------



## rokpa92 (Feb 19, 2010)

DutchDaemon said:
			
		

> I'd like to add (as I did in the HowTo that rokpa92 wrote in the meantime) that the symlink named /sbin/mount_ntfs is likely to be overwritten by an OS upgrade (`make installworld` or [cmd=]freebsd-update[/cmd]).
> 
> Using the /usr/sbin/mount_ntfs-3g symlink and the ntfs-3g target in /etc/fstab will not suffer that fate.



thanks! add in the "how to" to.


----------



## mamalos (Feb 22, 2010)

DutchDeamon,

I tried symlinking /usr/local/bin/ntfs-3g to /sbin/mount_ntfs-3g, then edited my fstab to read ntfs-3g, and lastly I tried to mount it via:


```
# mount /mnt/win7write
mount: /dev/ad4s1 : Operation not supported by device
```

/dev/ad4s1 is my ntfs partition and /mnt/win7write is my mountpoint. My /etc/fstab file reads:


```
/dev/ad4s1  /mnt/win7write  ntfs-3g  rw,late,noauto  0       0
```

Is there something wrong with my configuration? 

Until now I was using ntfs as my filesystem type I and was symlinking /sbin/mount_ntfs to ntfs-3g; after reading your comment about upgrading, I decided to change it, since at every upgrade I had to recreate the symlink. Now, I see that it won't work, but I assume I'm making something wrong.


----------



## DutchDaemon (Feb 22, 2010)

I don't use ntfs or nts-3g myself, so I canot test. Do these work?


```
# ntfs-3g /dev/ad4s1  /mnt/win7write
# mount -t ntfs-3g /dev/ad4s1  /mnt/win7write
```


----------



## mamalos (Feb 22, 2010)

The first one works (otherwise ntfs-3g wouldn't work either way  ), the second one gives the message of my previous post.

After SirDice's post regarding the symlink to /sbin/mount_ntfs-3g, I made an assumption that fbsd's mount -t lala command "checks" if /sbin/mount_lala exists, and if so it uses it to mount the specified partition. Now, I re-assume that the filesystem types supported by mount must be hardcoded somewhere.


----------



## DutchDaemon (Feb 22, 2010)

Unfortunately, you may be right in that. I think that it may not be possible to use ntfs-3g in fstab, because mount has a fixed list:


```
However, for the following file system types: cd9660, mfs,
             msdosfs, nfs, nfs4, ntfs, nwfs, nullfs, portalfs, smbfs, udf, and
             unionfs, mount will not call nmount(2) directly and will instead
             attempt to execute a program in /sbin/mount_XXX where XXX is
             replaced by the file system type name.  For example, nfs file
             systems are mounted by the program /sbin/mount_nfs.
```

So it looks like the /sbin/mount_ntfs -> /usr/local/bin/ntfs-3g symlink, plus the ntfs target in fstab is the only way to do this. 

The downside is, as noted, that the symlink needs to be restored after a `make installworld` (and preferably *before* a reboot after that ..).


----------



## mamalos (Feb 22, 2010)

Thanx DutchDaemon,

rokpa92, you may want to return your howto to its initial version (symlinking /usr/local/bin/ntfs-3g to /sbin/mount_ntfs, and using ntfs as the partition type in /etc/fstab), and at the point of the symlink, explain what DutchDaemon says about restoring the symlink after installworld.


----------



## Belabalu (Jan 2, 2018)

_*Hello Everybody,*_

I had the same problem that *rocpa92,* but I don't know, how I can continue booting just exit the shell (the mentioned answer #2) after, that I type there:

"fsck -y
mount -u /
mount -a -t ufs
swapon -a"

That I would can edit /etc/fstab and fix the error. 

Please somebody type it.
_Thanks a lot!_


----------

