Skip to content

Automatic mount of a APFS USB stick #105

@samiel60

Description

@samiel60

I'm trying to mount an APFS-formatted USB stick on Debian Linux Testing (Forky) using two methods. The first failed, and the second resulted in a strange outcome.

  1. Since Debian mounts drives on the fly with Udisk2, I created a rule in:
    /etc/udisks2/mount_options.conf
    with this content:
[apfs]
defaults=readwrite,allow_other
allowed=readwrite,ro,allow_other,uid,gid,umask,dmask,fmask

but the drive doesn't mount at all.
2) Alternatively, I created the rule for udev:
/etc/udev/rules.d/99-apfs.rules
with this content:

ACTION=="add", KERNEL=="sd*[0-9]", ENV{ID_FS_TYPE}=="apfs", \
RUN+="/usr/bin/systemd-mount -o readwrite --no-block /dev/%k /media/apfs"

In this case, the USB stick is mounted twice, the first in:
/media/apfs
and the second in:
/run/media/<user>/<UUID>
In the first one, I can actually write, but then I have to unmount the device only as root. I assume udisk2 mounts it automatically the first time, and udev mounts it a second time with the parameters I passed.
Do you know of a more functional way to achieve my goal?
Thanks
m

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions