My ntfs / ext4 drive disks cannot be mount from the /etc/fstab file.

Hello.

I've created the script below to mount all the disk drives connected to my PC :

#Linux :

Code:
lklfuse -o type=ext4 /dev/ada0s1 /mnt/ada0s1 # CT500 (466 GB / Ubuntu 21.04)
lklfuse -o type=ext4 /dev/ada1p3 /mnt/ada1p3 # Samsung SSD 860 EVO 500GB / nixos
lklfuse -o type=ext4 /dev/da1p1 /mnt/da1p1   # Toshiba (932G)
lklfuse -o type=ext4 /dev/da2s1 /mnt/da2s1   # 1.8T Toshiba

#Windows :

Code:
ntfs-3g /dev/nvd0p2 /mnt/nvd0p2 # Windows da 900GB
ntfs-3g /dev/da0p1 /mnt/da0p1 # Elements
ntfs-3g /dev/da3p2 /mnt/da3p2 # 1.8T Seagate


#FreeBSD :

Code:
mount -t ufs /dev/ada1p2 /mnt/ada1p2 # Samsung SSD 860 EVO 500GB / FreeBSD da 100 GB


I would like to mount those disks automatically as soon as FreeBSD boot. So,I've added these entries in the file /etc/fstab


Code:
/dev/ada0s1    /mnt/ada0s1     ext4    rw      1       1
/dev/ada1p3    /mnt/ada1p3     ext4    rw      1       1
/dev/da1p1     /mnt/da1p1      ext4    rw      1       1
/dev/da2s1     /mnt/da2s1      ext4    rw      1       1
/dev/nvd0p2    /mnt/nvd0p2     ntfs-3g rw      1       1
/dev/da0p1     /mnt/da0p1      ntfs-3g rw      1       1
/dev/da3p2     /mnt/da3p2      ntfs-3g rw      1       1
/dev/ada1p2    /mnt/ada1p2     ufs     rw      1       1

it didn't work. But where is the mistake ?
 
Verify the output when you run "mount -a".
man ntfs-3g
Code:
/etc/fstab entry for the above (the sixth and last field has to be zero 
       to avoid a file system check at boot time) : 
               /dev/sda5 /home/user/mnt ntfs-3g ro,uid=1000 0 0
 
/dev/nvd0p2 /mnt/nvd0p2 ntfs-3g ro,uid=1000 0 0
/dev/da0p1 /mnt/da0p1 ntfs-3g ro,uid=1000 0 0
/dev/da3p2 /mnt/da3p2 ntfs-3g ro,uid=1000 0 0


index.jpg
 
I've also added these commands inside the file /root/.xinitrc,but even in this case,no disk has been mounted.

Code:
lklfuse -o type=ext4 /dev/ada0s1 /mnt/ada0s1                              
lklfuse -o type=ext4 /dev/ada1p3 /mnt/ada1p3                                  
lklfuse -o type=ext4 /dev/da1p1 /mnt/da1p1                  
lklfuse -o type=ext4 /dev/da2s1 /mnt/da2s1                
ntfs-3g /dev/nvd0p2 /mnt/nvd0p2                  
ntfs-3g /dev/da0p1 /mnt/da0p1          
ntfs-3g /dev/da3p2 /mnt/da3p2              
mount -t ufs /dev/ada1p2 /mnt/ada1p2
 
Remove the lines from /etc/fstab.
Boot in a normal way.

Add your new lines to /etc/fstab
Do a manual explicit mount e.g.
mount /mnt/ada0s1
mount /mnt/ada0s1
mount /mnt/da1p1
mount /mnt/da2s1
mount /mnt/nvd0p2
mount /mnt/da3p2
mount /mnt/ada1p2
And check for errors.
If no errors are given, leave the lines in /etc/fstab.
 
All three errors have to do with ntfs-3g. Is that properly installed and does it indeed support RW-access instead of RO?
 
I mount every disk using the desktop manager xfce4. I don't get errors. This is the script that I use :

lklfuse -o type=ext4 /dev/ada0s1 /mnt/ada0s1 # CT500 (466 GB / Ubuntu 21.04)
lklfuse -o type=ext4 /dev/ada1p3 /mnt/ada1p3 # Samsung SSD 860 EVO 500GB / nixos
lklfuse -o type=ext4 /dev/da1p1 /mnt/da1p1 # Toshiba (932G)
lklfuse -o type=ext4 /dev/da2s1 /mnt/da2s1 # 1.8T Toshiba

ntfs-3g /dev/nvd0p2 /mnt/nvd0p2 # Windows da 900GB
ntfs-3g /dev/da0p1 /mnt/da0p1 # Elements
ntfs-3g /dev/da3p2 /mnt/da3p2 # 1.8T Seagate

mount -t ufs /dev/ada1p2 /mnt/ada1p2 # Samsung SSD 860 EVO 500GB / FreeBSD da 100 GB

Today at 6:11 PM I've added these to /etc/fstab :

/dev/nvd0p2 /mnt/nvd0p2 ntfs-3g ro,uid=1000 0 0
/dev/da0p1 /mnt/da0p1 ntfs-3g ro,uid=1000 0 0
/dev/da3p2 /mnt/da3p2 ntfs-3g ro,uid=1000 0 0

Tieks : as u can see I've used the parameter ro,not the parameter rw,but I've got the error that u see on the screnshot.
 
Here's what I did to get NTFS working:
  • Added "fusefs" to kld_list in rc.conf(5), so the fusefs(5) module is loaded at boot time
  • Added the following line to fstab(5):
    Code:
    /dev/da0p1    /mnt/da0p1    ntfs    rw,failok,late,uid=1001,dmask=022,fmask=133,mountprog=/usr/local/bin/ntfs-3g    0    0

Explanation of the options that I used:
  • rw - mount the device with read-write access
  • failok - ignore any errors that prevent the device from being mounted
  • late - mount the device after networked file systems are mounted; driver modules listed in rc.conf(5) are already loaded by this point, including fusefs
  • uid=1001 - 1001 is my normal user's UID; id(1) is a great tool for getting this information, if you didn't already know about it
  • dmask=022 - directories will have 755/drwxr-xr-x permissions (dmask=022 is equivalent to chmod u=rwx,go=rx for all directories); every user can read and navigate directories, but the user with UID 1001 can also create, modify, and delete directory information
  • fmask=133 - files will have 644/rw-r--r-- permissions (fmask=133 is equivalent to chmod u=rw,go=r for all files); every user can read files, but the user with UID 1001 can also create, modify, and delete files
  • mountprog=/usr/local/bin/ntfs-3g - the program to use for mounting the device
Other useful options might be noauto and untrusted for removable USB devices. If your machine is used by multiple people and you want them to be able to do more than read files and directories on the mounted partition, you may also want to look at the gid=GID option; don't forget to change the restrictive file and directory masks (fmask, dmask) as well. You may want to change to something like fmask=022 anyway if fmask=133 is too restrictive. For more info about these and other possible mount options, see fstab(5) for special ones like rw and failok, mount(8) for general mount options, and ntfs-3g(8) for NTFS-specific mount options.
 
I'm trying to mount the ext4 partitions mounting them on the fstab file. I've read how to do it properly reading from this site :


according to the site,this is the right syntax :

/dev/ada0s1 /mnt/ada0s1 fuse rw,mountprog=/usr/local/bin/lklfuse,type=ext4,allow_other 0 0

and on the /etc/rc.conf I've added :

kld_list="fusefs"

it didn't work. below u can see the error that I get :

index.jpg
 
You can configure syslog to have console messages also send to /var/log/messages or /var/log/console.
"man syslog.conf"
In loader.conf i've set,
Code:
verbose_loading="YES"
In order to have "more" info.
 
For the future users who wants to learn how to mount the ntfs and the ext4 partitions on freebsd 13,these are the working parameters to use :

Code:
/dev/nvd0p2   /media/nvd0p2   ntfs    ro,failok,late,uid=1001,dmask=022,fmask=133,mountprog=/usr/local/bin/ntfs-3g    0    0
/dev/da0p1    /media/da0p1    ntfs    ro,failok,late,uid=1001,dmask=022,fmask=133,mountprog=/usr/local/bin/ntfs-3g    0    0
/dev/da3p2    /media/da3p2    ntfs    ro,failok,late,uid=1001,dmask=022,fmask=133,mountprog=/usr/local/bin/ntfs-3g    0    0

/dev/ada0s1     /media/ada0s1   fuse    ro,failok,late,mountprog=/usr/local/bin/lklfuse,type=ext4,allow_other   0       0
/dev/ada1p3     /media/ada1p3   fuse    ro,failok,late,mountprog=/usr/local/bin/lklfuse,type=ext4,allow_other   0       0
/dev/da2s1      /media/da2s1    fuse    ro,failok,late,mountprog=/usr/local/bin/lklfuse,type=ext4,allow_other   0       0

on /etc/fstab

kld_list="fusefs"

on /boot/loader.conf

fusefs_load="YES"
 
kld_list="fusefs" on /boot/loader.conf fusefs_load="YES"
Use kld_list or loader.conf to load kernel modules, not both. In this case you want to use loader.conf because kld_list is processed after FILESYSTEMS.

The dividing line is simple, if you require it to boot the system put it in loader.conf, everything else can be loaded from kld_list.
 
Back
Top