sysutils/automount - major rewrite and 1.7.0 version

Try now with this version:



Code:
# fetch -o /usr/local/sbin/automount https://raw.githubusercontent.com/vermaden/automount/master/automount

# chmod +x /usr/local/sbin/automount
Code:
umass0: <JMicron External Disk 3.0, class 0/0, rev 3.00/4.07, addr 10> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x8100
umass0:2:0: Attached to scbus2
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: <JMicron Tech 0407> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number 0000000045A9
da0: 400.000MB/s transfers
da0: 1907729MB (3907029168 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
userx@FreeBSD.efi.net:~
$ tail /var/log/automount.log
2019-12-15 14:31:16 /dev/da0s2: detach
2019-12-15 14:31:26 /dev/ugen0.9: attach
2019-12-15 14:31:26 command 'simple-mtpfs' not found
2019-12-15 14:31:27 /dev/da0: attach
2019-12-15 14:31:27 /dev/da0: not a block device
2019-12-15 14:31:27 /dev/da0s2: attach
2019-12-15 14:31:27 /dev/da0s2: create '/media/da0s2' dir
2019-12-15 14:31:27 /dev/da0s2: fsck.ext4 You must have r/w access to the filesystem or be root
2019-12-15 14:31:27 command 'lklfuse' not found
2019-12-15 14:31:27 please install 'sysutils/fusefs-lkl' port or package
Compare to post #23 read out of log.
it is not finding mtpfs lklfuse (anymore )/(either)...
So I Installed them two missing pkg and
Code:
$ tail /var/log/automount.log
2019-12-15 16:05:55 /dev/ugen0.9: no MTP devices found
2019-12-15 16:05:55 /dev/da0: attach
2019-12-15 16:05:56 /dev/da0: not a block device
2019-12-15 16:05:56 /dev/da0s2: attach
2019-12-15 16:05:56 /dev/da0s2: create '/media/da0s2' dir
2019-12-15 16:05:56 /dev/da0s2: fsck.ext4 You must have r/w access to the filesystem or be root
2019-12-15 16:05:57 /dev/da0s2: filesystem mount retry: 1/3
2019-12-15 16:05:57 /dev/da0s2: mount OK: 'lklfuse -o type=ext4 -o allow_other -o intr -o uid=1000 -o gid=0 -o umask=002 /dev/da0s2 /media/da0s2'
2019-12-15 16:05:59 /dev/da0s2: chown '/media/da0s2' dir with 'userx:wheel' rights
2019-12-15 16:05:59 /dev/da0s2: starting 'pcmanfm' file manager
it did pop open the file manager but as it says I am missing root privs or whatever I need to access the USB Port drive.

#####
Okay I thought I had does this to this OS too. made users and 100 gid to match the ownsership of the use on the drive, when I cahecked and seen it was not in this system as such I added users 100
Code:
$ id
uid=1000(userx) gid=1000(userx) groups=1000(userx),0(wheel),5(operator),44(video),100(users)
unplugged and logged out logged in and plugged it back in and voila!!!

Code:
$ tail /var/log/automount.log
2019-12-15 16:15:57 /dev/ugen0.9: no MTP devices found
2019-12-15 16:15:58 /dev/da0: attach
2019-12-15 16:15:58 /dev/da0: not a block device
2019-12-15 16:15:58 /dev/da0s2: attach
2019-12-15 16:15:58 /dev/da0s2: create '/media/da0s2' dir
2019-12-15 16:15:58 /dev/da0s2: fsck.ext4 You must have r/w access to the filesystem or be root
2019-12-15 16:15:59 /dev/da0s2: filesystem mount retry: 1/3
2019-12-15 16:15:59 /dev/da0s2: mount OK: 'lklfuse -o type=ext4 -o allow_other -o intr -o uid=1000 -o gid=0 -o umask=002 /dev/da0s2 /media/da0s2'
2019-12-15 16:16:01 /dev/da0s2: chown '/media/da0s2' dir with 'userx:wheel' rights
2019-12-15 16:16:01 /dev/da0s2: starting 'pcmanfm' file manager

I'm seeing everything now, and it appears to be reading and writing to it without issues.
thanks
 
Maybe these settings will help:

Code:
% grep desktop /etc/rc.conf
devfs_system_ruleset=desktop

% cat /etc/devfs.rules     
[desktop=10]
add path 'acd*'      mode 0660 group operator
add path 'cd*'       mode 0660 group operator
add path 'da*'       mode 0660 group operator
add path 'pass*'     mode 0660 group operator
add path 'xpt*'      mode 0660 group operator
add path 'fd*'       mode 0660 group operator
add path 'md*'       mode 0660 group operator
add path 'uscanner*' mode 0660 group operator
add path 'lpt*'      mode 0660 group cups
add path 'ulpt*'     mode 0660 group cups
add path 'unlpt*'    mode 0660 group cups
add path 'ugen*'     mode 0660 group operator
add path 'usb/*'     mode 0660 group operator
add path 'video*'    mode 0660 group operator
add path 'cuse*'     mode 0660 group operator

% id vermaden
uid=1000(vermaden) gid=1000(vermaden) groups=1000(vermaden),0(wheel),5(operator),44(video),69(network),920(vboxusers)
 
Maybe these settings will help:

Code:
% grep desktop /etc/rc.conf
devfs_system_ruleset=desktop

% cat /etc/devfs.rules 
[desktop=10]
add path 'acd*'      mode 0660 group operator
add path 'cd*'       mode 0660 group operator
add path 'da*'       mode 0660 group operator
add path 'pass*'     mode 0660 group operator
add path 'xpt*'      mode 0660 group operator
add path 'fd*'       mode 0660 group operator
add path 'md*'       mode 0660 group operator
add path 'uscanner*' mode 0660 group operator
add path 'lpt*'      mode 0660 group cups
add path 'ulpt*'     mode 0660 group cups
add path 'unlpt*'    mode 0660 group cups
add path 'ugen*'     mode 0660 group operator
add path 'usb/*'     mode 0660 group operator
add path 'video*'    mode 0660 group operator
add path 'cuse*'     mode 0660 group operator

% id vermaden
uid=1000(vermaden) gid=1000(vermaden) groups=1000(vermaden),0(wheel),5(operator),44(video),69(network),920(vboxusers)
I'll check and toss them, I don't think it will hurt to have a bunch of them telling the system to mount everything under the sun. Not inmy option anyways.

I still have never had any luck (auto)mounting the mmc (SD Card)


vermaden

is that an arbitrary word?
devfs_system_ruleset=desktop
 
I'll check and toss them, I don't think it will hurt to have a bunch of them telling the system to mount everything under the sun. Not inmy option anyways.

I still have never had any luck (auto)mounting the mmc (SD Card)


vermaden

is that an arbitrary word?
devfs_system_ruleset=desktop

Because the section on /etc/devfs.rules file is named like that [desktop=10].
 
vermaden
free install of freeBSD and well ....
Code:
$ tail /var/log/automount.log
2019-12-16 14:11:56 /dev/ugen1.2: no MTP devices found
2019-12-16 14:11:56 /dev/ugen0.9: no MTP devices found
2019-12-16 14:11:56 /dev/da0: not a block device
2019-12-16 14:11:56 /dev/da0s2: attach
2019-12-16 14:11:56 /dev/da0s2: create '/media/da0s2' dir
2019-12-16 14:11:56 /dev/da0s2: fsck.ext4 You must have r/w access to the filesystem or be root
2019-12-16 14:11:58 /dev/da0s2: filesystem mount retry: 1/3
2019-12-16 14:11:59 /dev/da0s2: filesystem mount retry: 2/3
2019-12-16 14:12:00 /dev/da0s2: filesystem mount retry: 3/3
2019-12-16 14:12:00 /dev/da0s2: mount FAIL: 'lklfuse -o type=ext4 -o allow_other -o intr -o uid=1000 -o gid=0 -o umask=002 /dev/da0s2 /media/da0s2'
I did a freebsd install giving it the entire SDD and that is what i am dealing with now, I created the files, users giu=100 added the pkg to mount rc.conf added then entries , updated the system to p1, reboot(ed) a few time between and I am still getting this.
 
This is interesting:
fsck.ext4 You must have r/w access to the filesystem or be root

I have never seen such error message.

Seems that your pendrive is read only? Or damaged maybe?
 
I do not know either, I did the other automount and that works. I have no idea about the why it worked on the other install and not this one. don't lose any sleep over it.
 
JUst couldn't sleep could you?

I know the feeling, when something isn't working that I worked on and it just bugs me to no ends.

well that I did was, the hdd in question, had mixed ownership on the group end of it, and a few files with root owndership, I changed it all to current user:group booted into this install of FreeBSD commented out
Code:
#autofs_enable="YES"
left the rest i added , rebooted, plugged that one in, and yes it worked, unplugged it, then I took a different one plugged it in and it worked, check its ownsership and that one is userx:wheel so I must have made sure that hdd was like that in ownership of just used it with freebsd.

-- to be clear with your automount the only things that are needed to be done are on your page here

the only things that are needed to be done is install automount, automount.conf , automount_devd.conf --

then you showed me you etc/devfs.rules and rc.conf to match it, that is what I did, it did not work, I added
from this page https://www.freebsd.org/doc/handbook/usb-disks.html
Code:
 /etc/sysctl.conf
vfs.usermount=1
# sysctl vfs.usermount=1
vfs.usermount: 0 -> 1

 /etc/auto_master
/media        -media        -nosuid

/etc/devd.conf
notify 100 {
    match "system" "GEOM";
    match "subsystem" "DEV";
    action "/usr/sbin/automount -c";
};


/etc/rc.conf
autofs_enable="YES"
commented out that autofs_enabled=yes fixed permissions on that hdd rebooted into freeBSD back in business it mounts and is read and write, but it now has to be a mixed automount. As I was trying to see the only thing I needed to do to get your automount to work. so ... that is where I am at on this at the time of this posting.
 
When , I have mounted usbkey under xfce, there isn't USB icon on the desktop.. On mate desktop there is USB icon

I have problems to mount ext4 system too
FreeBSD 12.1 / sysutils/automount 1.7 from ports / xfce 4.14 / clear system, without hald and another mount programs.
 
Back
Top