It seems to me that there is much overlap with FreeBSD documentation versus vendor documentation.

It seems such is the case with GVFS ntfs support.

For example, Nautilus in Gnome 3 already sees the partitions on my external USB2, but by default there is no access. Only manually was I able to access my Win partitions by following the FreeBSD handbook instructions. If I am to use Gnome, it seems I have duplicate mount-points now.

I am talking about 11.0 release p9 + Gnome 3 latest. If GIO is a Gnome technology, why is FreeBSD documentation not mentioning the stuff that happens in Nautilus, and instead writes about manually configuring the ntfs mountpoints?

What's the correct way for dealing with this?
 
It seems to me that there is much overlap with FreeBSD documentation versus vendor documentation.

It seems such is the case with GVFS ntfs support.

For example, Nautilus in Gnome 3 already sees the partitions on my external USB2, but by default there is no access. Only manually was I able to access my Win partitions by following the FreeBSD handbook instructions. If I am to use Gnome, it seems I have duplicate mount-points now.

I am talking about 11.0 release p9 + Gnome 3 latest. If GIO is a Gnome technology, why is FreeBSD documentation not mentioning the stuff that happens in Nautilus, and instead writes about manually configuring the ntfs mountpoints?

What's the correct way for dealing with this?


GNOME Automount needs :

HAL
Polkit
FUSE

1) First, running Polikit-gnome in root mode, you must grant authorization to users to mount removable devices. If not, so you can see drives but may not mount them. Somewhere in the menu of Gnome 3 you should access to a shortcut to set this policy.

2) Second : HAL needs suitable policies in

/usr/local/etc/hal/fdi/policy

Duplicated mount points are created by HAL daemon which detects two nodes linked to the same hardware.

Here is an example of policy file "22-ignore-mobile-drives.fdi", where I want to block auto-mounting of the first active DOS partition of some USB keys, holding each a second partition with a specific version of FreeBSD filesystem used as a "rescue key" to repair some suffering systems.

I must discard two times the DOS-AGTx partition because HAL detects the same device through two nodes :
info.product (generally the named assigned to the partition)
block.device (where we know more precisely the filesystem type with the path to /dev)

For the FreeBSD partitions named RSCxROOT, I just discard one time just to void the double mount point.
So the entry "block.device" is still visible and if I am not wrong available for automount

To list the current devices detected by HAL use the command

lshal


Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
################################################################################
#                                                                                                                                                                                            #          #                                                             FreeBSD 11.0 : HAL Policy File                                                                                    #
#                                                                                   -=== x ===-                                                                                   #
#                                                                                                                                                                                           #
#                                                                      In<= /usr/local/etc/hal/fdi/policy                                                                    #
#                                                                      Owner=   0:0                                                                                                #
#                                                                      Rights=   444                                                                                                #
#                                                                      Repo=       Parameters/FreeBSD/HAL                                                             #
#                                                                                                                                                                                           #
################################################################################
-->


<deviceinfo version="0.2">

<device>
    <match key="info.product" string="DOS-AGT">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="info.product" string="DOS-AGT0">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="info.product" string="DOS-AGT1">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="info.product" string="DOS-AGT2">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="info.product" string="BACKUP">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>



<device>
    <match key="info.product" string="FBSDSRC">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="info.product" string="RSC0ROOT">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="info.product" string="RSC1ROOT">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="info.product" string="RSC2ROOT">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>



<device>
    <match key="block.device" string="/dev/msdosfs/DOS-AGT">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="block.device" string="/dev/msdosfs/DOS-AGT0">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="block.device" string="/dev/msdosfs/DOS-AGT1">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="block.device" string="/dev/msdosfs/DOS-AGT2">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="block.device" string="/dev/label/FreeBSD-Backup">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


</deviceinfo>

Another "more easy" example in "21-ignore-internal-drive.fdi" where I want to make invisible any internal drive from automount section, to void as much as possible users' mistakes on critical drives.

(Each fdi file begins with a number, this number defines the priority rank of process for the given rules)

According to this code, all things not designated by HAL as removable or hot pluggable are presumably "internal" and forbidden.
We don't need to specify the filesystem type.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
################################################################################
#                                                                                                                                                                                           #
#                                                                       FreeBSD 11.0 : HAL Policy File                                                                      #
#                                                                                    -=== x ===-                                                                                 #
#                                                                                                                                                                                          #
#                         In<= /usr/local/etc/hal/fdi/policy                                                                                                                #
#                         Owner=   0:0                                                                                                                                            #
#                         Rights=   444                                                                                                                                            #
#                         Repo=       Parameters/FreeBSD/HAL                                                                                                         #
#                                                                                                                                                                                          #
################################################################################
-->

<deviceinfo version="0.2">
  <device>
     <match key="@block.storage_device:storage.hotpluggable" bool="false">
        <match key="@block.storage_device:storage.removable" bool="false">
           <merge key="volume.ignore" type="bool">true</merge>
        </match>
     </match>
  </device>
</deviceinfo>

HAL is able to automount natively UFS, FAT, FAT32 filesystem

For NTFS, I can't exactly remember, one need probably to create a fdi rules.
Thing is a little harder because if we want a read/write automount, we need to tell HAL to use fuse ntfs-3G, rather than built-in FreeBSD command :

mount -t ntfs

I have not enough "skills" for that and I have personally not spent a lot of time, because automouting NTFS is a mistake.
NTFS is a journalised filesystem, and journal is only handled by the native OS, writing through fuse could break the journal with a possible loss of data.
So we can mount a NTFS partition in Read/write mode with few risks only if the journal is empty
This will be the case if NTFS partition have been only used by *nix machines

So regarding NTFS it's better to let the user decide what to do.

The sole interesting question should be to implement a fuse exFAT automount

GVFS hardware mount point are located in
/media

3) For network shares automount, except mistakes, HAL is not used, this is handled directly by GVFS through a mountpoint located in the user's directory, something like

~/.gvfs

CONCLUSION :
In a marvelous world HAL should disappear from FreeBSD as it is a "Linuxism", to let DEVD do the job alone.
Also "dbus" should disappear, causing from time to time some stability issue.

In BSD world you will encounter a lot of issues of this type as it is a result of some adaptation of Linux mechanism, not fitting perfectly with some BSD principles.

All the FreeBSD community prays for the fast development of the young desktop, Lumina, a native BSD desktop, not a Linux adaptation, but there is still a lot to do and I am not always sure they take the good decisions.
 
Last edited:
CONCLUSION :
In a marvelous world HAL should disappear from FreeBSD as it is a "Linuxism", to let DEVD do the job alone.
Also "dbus" should disappear, causing from time to time some stability issue, but as today "dbus"

In BSD world you will encounter a lot of issues of this type as it is a result of some adaptation of Linux mechanism, not fitting perfectly with some BSD principles.

All the FreeBSD community prays for the fast development of the young desktop, Lumina, a native BSD desktop, not a Linux adaptation, but there is still a lot to do and I am not always sure they take the good decisions.

I cannot agree more, specially for polshit and hald (hal is obsolete even on Linux anyway). But for the dbus bit, I'm a bit skeptical, why it should disappear from FreeBSD in your opinion?
 
GNOME Automount needs :

HAL
Polkit
FUSE

1) First, running Polikit-gnome in root mode, you must grant authorization to users to mount removable devices. If not, so you can see drives but may not mount them. Somewhere in the menu of Gnome 3 you should access to a shortcut to set this policy.

2) Second : HAL needs suitable policies in

/usr/local/etc/hal/fdi/policy

Duplicated mount points are created by HAL daemon which detects two nodes linked to the same hardware.

Here is an example of policy file "22-ignore-mobile-drives.fdi", where I want to block auto-mounting of the first active DOS partition of some USB keys, holding each a second partition with a specific version of FreeBSD filesystem used as a "rescue key" to repair some suffering systems.

I must discard two times the DOS-AGTx partition because HAL detects the same device through two nodes :
info.product (generally the named assigned to the partition)
block.device (where we know more precisely the filesystem type with the path to /dev)

For the FreeBSD partitions named RSCxROOT, I just discard one time just to void the double mount point.
So the entry "block.device" is still visible and if I am not wrong available for automount

To list the current devices detected by HAL use the command

lshal


Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
################################################################################
#                                                                                                                                                                                            #          #                                                             FreeBSD 11.0 : HAL Policy File                                                                                    #
#                                                                                   -=== x ===-                                                                                   #
#                                                                                                                                                                                           #
#                                                                      In<= /usr/local/etc/hal/fdi/policy                                                                    #
#                                                                      Owner=   0:0                                                                                                #
#                                                                      Rights=   444                                                                                                #
#                                                                      Repo=       Parameters/FreeBSD/HAL                                                             #
#                                                                                                                                                                                           #
################################################################################
-->


<deviceinfo version="0.2">

<device>
    <match key="info.product" string="DOS-AGT">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="info.product" string="DOS-AGT0">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="info.product" string="DOS-AGT1">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="info.product" string="DOS-AGT2">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="info.product" string="BACKUP">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>



<device>
    <match key="info.product" string="FBSDSRC">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="info.product" string="RSC0ROOT">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="info.product" string="RSC1ROOT">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="info.product" string="RSC2ROOT">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>



<device>
    <match key="block.device" string="/dev/msdosfs/DOS-AGT">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="block.device" string="/dev/msdosfs/DOS-AGT0">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="block.device" string="/dev/msdosfs/DOS-AGT1">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


<device>
    <match key="block.device" string="/dev/msdosfs/DOS-AGT2">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>

<device>
    <match key="block.device" string="/dev/label/FreeBSD-Backup">
   <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>


</deviceinfo>

Another "more easy" example in "21-ignore-internal-drive.fdi" where I want to make invisible any internal drive from automount section, to void as much as possible users' mistakes on critical drives.

(Each fdi file begins with a number, this number defines the priority rank of process for the given rules)

According to this code, all things not designated by HAL as removable or hot pluggable are presumably "internal" and forbidden.
We don't need to specify the filesystem type.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
################################################################################
#                                                                                                                                                                                           #
#                                                                       FreeBSD 11.0 : HAL Policy File                                                                      #
#                                                                                    -=== x ===-                                                                                 #
#                                                                                                                                                                                          #
#                         In<= /usr/local/etc/hal/fdi/policy                                                                                                                #
#                         Owner=   0:0                                                                                                                                            #
#                         Rights=   444                                                                                                                                            #
#                         Repo=       Parameters/FreeBSD/HAL                                                                                                         #
#                                                                                                                                                                                          #
################################################################################
-->

<deviceinfo version="0.2">
  <device>
     <match key="@block.storage_device:storage.hotpluggable" bool="false">
        <match key="@block.storage_device:storage.removable" bool="false">
           <merge key="volume.ignore" type="bool">true</merge>
        </match>
     </match>
  </device>
</deviceinfo>

HAL is able to automount natively UFS, FAT, FAT32 filesystem

For NTFS, I can't exactly remember, one need probably to create a fdi rules.
Thing is a little harder because if we want a read/write automount, we need to tell HAL to use fuse ntfs-3G, rather than built-in FreeBSD command :

mount -t ntfs

I have not enough "skills" for that and I have personally not spent a lot of time, because automouting NTFS is a mistake.
NTFS is a journalised filesystem, and journal is only handled by the native OS, writing through fuse could break the journal with a possible loss of data.
So we can mount a NTFS partition in Read/write mode with few risks only if the journal is empty
This will be the case if NTFS partition have been only used by *nix machines

So regarding NTFS it's better to let the user decide what to do.

The sole interesting question should be to implement a fuse exFAT automount

GVFS hardware mount point are located in
/media

3) For network shares automount, except mistakes, HAL is not used, this is handled directly by GVFS through a mountpoint located in the user's directory, something like

~/.gvfs

CONCLUSION :
In a marvelous world HAL should disappear from FreeBSD as it is a "Linuxism", to let DEVD do the job alone.
Also "dbus" should disappear, causing from time to time some stability issue.

In BSD world you will encounter a lot of issues of this type as it is a result of some adaptation of Linux mechanism, not fitting perfectly with some BSD principles.

All the FreeBSD community prays for the fast development of the young desktop, Lumina, a native BSD desktop, not a Linux adaptation, but there is still a lot to do and I am not always sure they take the good decisions.

I would never mount NTFS partitions writeable through some obscure extension to a *NIX tool. So far, they are hardcoded into fstab:

Code:
/dev/ada0s1     /mnt/winroot    ntfs-3g ro,late,mountprog=/sbin/mount_ntfs-3g   0       0
/dev/ada0s2a    /               ufs     rw      1       1
/dev/ada0s3a    /mnt/bsddata    ufs     rw      2       2
/dev/ada0s3b.eli        none            swap    sw,ealgo=blowfish,keylen=128,sectorsize=4096    0       0
/dev/da0s1      /mnt/repo       ntfs-3g ro,late,mountprog=/sbin/mount_ntfs-3g   0       0
/dev/da0s5      /mnt/stream1    ntfs-3g ro,late,mountprog=/sbin/mount_ntfs-3g   0       0
/dev/da0s6      /mnt/data       ntfs-3g ro,late,mountprog=/sbin/mount_ntfs-3g   0       0
proc            /proc           procfs  rw      0       0


but I would like to mount them using automount, since anything hardcoded can get you into single user mode, which is crap.
 
since anything hardcoded can get you into single user mode, which is crap.
You can use noauto. Then it will only be mounted if you specifically run the mount(8) command. This is usually done for CD-drives for example, where a mount command will fail if there's no disk in the drive, but can be used for any filesystem you don't want to automatically mount during boot.
 
You can use noauto. Then it will only be mounted if you specifically run the mount(8) command. This is usually done for CD-drives for example, where a mount command will fail if there's no disk in the drive, but can be used for any filesystem you don't want to automatically mount during boot.

I stay clear of the mount command. gpart I love, but prefer automount over fstab. Will look into it. I like the system, really, because it is by default inclusively restrictive.
 
Back
Top