Other I am confused...mounting an NTFS disk at boot...

I am in the process of building an installation of FreeBSD on a machine (home-built) which has been running with Windows 10 Pro. The machine has two internal HDs, one of which has Win10 installed, and an external USB-connected one. I want to have all the files on both "other" HDs available in my FreeBSD install which is on the "other" internal drive.

I have installed fuse, and can mount the one of the two drives with this command: ntfs-3g /dev/ada0s2 /mnt/Win10 which works just fine. Checking the file system, I can find the drive, and all the files are accessible. The same method works for the USB-attached drive.

I check Chapter 18 Storage in the Handbook and see that I must edit /etc/fstab, adding the following command: /dev/ada0s2 /mnt/Win10 ntfs mountprog=/usr/local/bin/ntfs-3g,late,rw 0 0 but I get an error message at boot that this command is formatted incorrectly, or some other thing is wrong with it, and the command fails.

So....what the heck am I doing wrong?

Anyone?

Ken Gordon
 
I would have to reboot back into my FreeBSD computer in order to quote the exact message, but it shows up during the boot process and reads awfully close to this: "fstab: command-format incorrect: fails" and of course when the boot is completed, and I check my file system, there is nothing in /mnt/Win10, for instance. I.e., the drive has not been mounted. But when I manually input the command: ntfs-3g /dev/ada0s2 /mnt/Win10 from a terminal, it works just fine.

What I want to do is find both of my other HDs available after the boot process is completed without having to drop to the terminal and input the command manually.

Ken Gordon
 
It seems that the command as shown in the Handbook's Chapter 18 is no longer valid. I am using FreeBSD 12.2-STABLE and will very shortly upgrade to FreeBSD 12.2-RELEASE-p4

Ken Gordon
 
Oh. One more thing: I had a similar issue with another computer. I fixed that one, and whatever I did worked fine. However, due to "circumstances beyond my control", that computer is now toast and I can't recover what I had there.

Ken Gordon
 
It's years since I mucked around with this, but doesn't the mount option mountprog= have to be the last thing on the line before the 0 0 which represents fsck and backup options?

So, something like:
/dev/ada0s2 /mnt/Win10 ntfs late,rw,mountprog=/usr/local/bin/ntfs-3g 0 0
 
If that's the case, then the handbook is wrong. I just recall it only ever working with the mountprog= at the end. Perhaps it was pure coincidence?

And yet a quick search (should have done this first) shows the way it's presented in the handbook and what the OP has done are correct:

(Mind you that's v9 but I don't think the mount command has changed).

It looks like the a copy of the logs and errors is required to help resolve the issue.
 
Try adding 'late' as a mount option, this will ensure that the file system only gets mounted once everything else has finished. That might help.

You said you got an error message during boot, but you didn't share what happened when you tried to mount it manually. If that also triggered an error then using 'late' wouldn't help either of course.
 
When I mount the two drives manually, it works just fine. Both drives and their contents appear in my file manager.

I'll modify my fstab and try it again.

Thanks,

Ken Gordon
 
OK. Now my old Win10 drive loads at boot with the following command added to my fstab:
Code:
/dev/ada0s2 /mnt/Win10 ntfs-3g failok,rw,late,mountprog=/usr/local/bin/ntfs-3g 0 0
.

My error when trying this at first was leaving out a comma between "late" and "mountprog=".

Great! Thanks, Folks.

But when I try to use the same command within fstab for a USB-connected HD, the command fails with an "incorrect file type" error message.

Yet when I use the command ntfs-3g /dev/da0s1 /mnt/2TB from the command line as root, although the system seems to hesitate for a few seconds, it works just fine and my files are all available in any file-manager.

So....now what?

Ken Gordon
 
The line in fstab looks like this: /dev/da0s1 /mnt/2TB ntfs-3g failok,rw,late,mountprog=/usr/local/bin/ntfs-3g 0 0

I'll go dig out the error messsages (there are four) asap.

I think the problem is that I can't use this sort of command within fstab for a USB-connected drive.

The same sort of command works fine with a standard HD.

Ken Gordon
 
OK. Here is the error message that I see 6 times during the boot:

fstab: /etc/fstab:4: Inappropriate file type or format.

The system then ignores that error and boots correctly.

As I mentioned, the regular ntfs HD is mounted correctly, but the USB-connected HD is the one that causes the error message. It is never mounted by this method. If I use the command from a terminal as root ntfs-3g /dev/da0s1 /mnt/2TB, although there is some delay, it eventually mounts correctly.

Ken Gordon
 
So, line 4 is this mount command? Just checking in case there's something else that's causing it.
Perhaps the delay has something to do with it? Can you post the actual fstab file? Also, check the last entry has a linefeed after it (I recall such nuances with fstab, vaguely and probably incorrectly.)
Before the error message is it showing the device has been recognised in the log? If not, you've got a timing issue.
What version of FreeBSD is this machine?

(I just ran a test on a machine with USB device and it booted fine, mind you it's a UFSdrive not NTFS so it proves only that USB works (That was 12.2R FreeBSD).
 
Yes. Line 4 is the line in question. Line 4 does NOT have a llne-feed after it, as far as I can tell. I just added one. I'll see if it makes any difference.

My file system is ZFS.

I think that the delay when I do it manually is ntfs-3g sorting it out for me.

The machine's version is FreeBSD 12.2-RELEASE-p4.

The USB-connected HD is being seen as da0 and is recognized correctly.

gpart show lists it correctly too.

Ken Gordon
 
You can tell immediately by issuing mount -a

NTFS, being non-native, is being 'emulated', so speed is never something you can expect out of it.
The USB-connected HD is being seen as da0 and is recognized correctly.
Yes, but is this before the error messages or not?
 
I haven't made myself clear: the error message only shows up if I try to use the addition to fstab I show above to mount the drive during the boot process.

There has never been any sort of error message if I manually mount the drive with the above mentioned command from a terminal after the system is fully up. The drive simply mounts correctly and is immediately accessible, with all its files.

Ken Gordon
 
Yes, but when it's in fstab is the error before or after USB recognition?
"Before the error message is it showing the device has been recognised in the log?"

I think we accept it works from the command line, so the topic at hand is whether it mounts in fstab via init.
 
Back
Top