mount_afp via command line?


#1

Hello,

I’m using several Apple devices. So I want to mount afp share between them including Raspberry Pi.

Read Raspberry Pi share from iMac:
I installed netatalk. I can see the osmc in Finder devices section.

Read TimeCapsule volume from Raspberry Pi:
osmc@osmc:~$ mount_afp afp://192.168.0.1/Data nas/
Mounting 192.168.0.1 from Data on nas/
Could not pick a matching UAM.

I can not mount afp share on Raspberry Pi. IIRC, I can mount afp share when I use Raspbian,
How can I mount afp share via command line?

Thank you!


FSTAB CIFS mount not working after kodi update
#2

Hello!

After a few tries and some googling. I figured out a way to mount AFP share on my Raspberry Pi 2 running OSMC.

From what I understood here, the reason it says: “Could not pick a matching UAM” is that some dependency (libgcrypt?) are missing and therefore, some encrypted authentication methods do not seem to work.

Here is what I did to make it work. I’m not an expert so there might be unnecessary things getting installed. Since I couldn’t find an arm package of afpfs-ng, I had to install build-essential and compile it myself. If anyone has a link to a package, I would be quite happy :smile:

First, make sure apt is up to date:

sudo apt-get update

Then install all the dependency:

sudo apt-get install libgcrypt-dev libgmp3-dev libfuse-dev libfuse-dev libreadline-dev ncurses-dev build-essential 

Download the afpfs-ng latest source from here and put the tar file in your home folder. Then uncompress file and compile.

tar xvjf afpfs-ng-0.8.1.tar.bz2
cd ./afpfs-ng-0.8.1
./configure && make && sudo make install && sudo ldconfig

After this is done, you should be able to mount your Time Capsule with a command like this:

mount_afp afp://username:password@TCname.local/sharename /mountpoint

I hope this will help you!

I am now trying to auto-mount the afp share on boot but with no luck.
I added this line to /etc/fstab/

afpfs#afp://username:password@TCname.local/sharename /mountpoint fuse user=osmc,group=fuse 0 0

I also created the fuse group

sudo groupadd fuse

and “allowed other” in /etc/fuse.conf by uncommenting the line

user_allow_other

After that, the command

sudo mount -a

will mount the AFP share with the following output/error:

Unknown option exec, skipping
Unknown option suid, skipping
Unknown option dev, skipping
Unknown option dev, skipping
Unknown option suid, skipping
Mounting TC.local from TC on /home/osmc/TC
Mounting of volume TC of server TC succeeded.

Unfortunately, when I try to reboot, I get a “local file system dependencies failed” error and OSMC doesn’t boot.

Any help will be greatly appreciated!

Renton

EDIT: I figured it out.

As I expected, the auto mount was trying to mount while the network wasn’t available. Putting x-systemd.automount and noauto as options in the /etc/fstab line solved the issue.

afpfs#afp://username:password@TCname.local/sharename /mountpoint fuse user=osmc,group=fuse,x-systemd.automount,noauto 0 0

#3

Thanks very much for this, this works for me and I am hoping it will stop 1080p files stuttering a little (which they did when connecting using SMB)