Unable to mount Mac SSD | F40 |

Split from this thread


Excellent thread, remembered it as I am now trying to do the same thing. I managed to get the drive mounted but now faced with the permissions issue referred to in the post above this one.

I tried this command:

apfs-fuse -o uid=1000, gid=1000, allow_other /dev/

I used ‘id’ to get my uid and gid which are both 1000.

Grateful if someone could clean up my command as it’s not working, I assume there are errors with the spaces/commas.
thanks

2 Likes

@joeyjonnson It is encouraged to open a new thread and linking similar issues, as your issue could present new problems not associated to this one.

A mod will move this thread over, to carry the conversation there.

@computersavvy /@jakfrost

1 Like

Sorry, learning the etiquette (plus don’t really understand what ‘split’ and ‘merge’ means in forums!).

Would appreciate someone ‘debugging’ my command!

1 Like

Reference Thread link:

It’s not a problem at all. :+1:t5: There are several MacOS users here so someone will chime in.

1 Like

I can’t help you, but I’m sure someone will, and very soon.

Paul

1 Like

Added macos-transition

The full command as given in /usr/share/doc/apfs-fuse/README.md (text document), is:

If you mount a volume as root and want some user to be able to access it, use:

apfs-fuse -o uid=<uid>,gid=<gid>,allow_other /dev/<device> <mount-path>

You added [space]'s before gid and allow_other, and are missing the <device> and <mount_path.

Here (using doas and zsh where many people have sudo and bash):

% doas fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: APPLE HDD ST1000
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C2D8A416-B8BE-4245-90F3-B5087543502D

Device         Start        End   Sectors   Size Type
/dev/sda1         40     409639    409600   200M EFI System
/dev/sda2     411648  781661207 781249560 372.5G Apple APFS
/dev/sda3  781661208  975706335 194045128  92.5G Apple Core storage
/dev/sda4  975706336  976975871   1269536 619.9M Apple boot
/dev/sda5  976975872  978204671   1228800   600M Apple HFS/HFS+
/dev/sda6  978204672  980301823   2097152     1G Linux filesystem
/dev/sda7  980301824 1953523711 973221888 464.1G Linux filesystem

To access the macOS files, I want to mount /dev/sda2.

% doas mkdir /mnt/apfs                                               
% doas apfs-fuse -o uid=1000,gid=1000,allow_other /dev/sda2 /mnt/apfs
% ls -l /mnt/apfs
total 0
drw-r--r--. 1 gnw3 gnw3 48 Apr  7 11:54 private-dir/
drwxr-xr-x. 1 gnw3 gnw3 19 Jul 21  2022 root/
2 Likes

Didn’t understand the latter half of your post (doas/zsh).

I have got apfs fuse, got drive visible and mounted, just can’t access it.

I corrected my errors (thanks for pointing those out), I used the command:

sudo apfs-fuse -o uid=1000,gid=1000,allow_other /dev/sdc2 /run/media/user/mac_disk

The output was that ‘Volume [volname] is encrypted’

I already was prompted to type in the key (and did) when first connecting it. Strange.

I typed it again anyway and now it appears to be mounted, but twice.

1 Like

Two questions if I may:

  1. Why is it mounted twice?
  2. Why, when I click to unmount, does it not allow me to?

I assume the encryption was handled the first time you ran the command. but back when I was running macOS at work, apfs-fuse didn’t handle encryption. Repeated mount commands with different options will show a drive mounted multiple times. You appear to be running Gnome Files from a user login. That does not (and should not) let you mess with things that require root privileges.

Recent versions of macOS use zsh in a terminal because the lawyers won’t let them provide current versions of bash. Having used zsh at work, I prefer it over bash.

As you see, the Linux GUI environment is limited to things that are widely used. As soon as you want something not commonly used, you have to use the command-line. You can compare the Apple command-line manual with Linux Command to learn about the differences, but macOS and Linux both provide a basic POSIX command-line environment combined with very different administrative tools.

No idea what zsh or bash are, and not sure I need to.

Am I right in thinking that you’re basically saying I can’t do unmount via Files app due to lower priveleges of logged in user rather than root in Terminal?

I’d just like to be able to unmount the drive rather than hot-unuplug, for fear of damaging drive/data as its an important backup of my mac data before moving to Fedora. Do i just need to mount and unmount using Terminal commands rather than Files?

(I haven’t actualy run a mount command, just a command beginning with ‘sudo apfs-fuse’, which did mount it and make it accessible).

I am pretty confused but now that I have access to the drive (I think), I just need to know how to mount and unmount this apfs drive, if anyone can advise the best way to do that please

I’ve encountered undergrad work-study students who resisted learning linux fundamentals – that usually ended up with some disaster.

A fundamental concept Linux “stole” from Unix is the shell program. If you don’t make the effort to understand the concept you risk doing some thing that breaks your system (I often encounter “easy way to fix your linux problem” clickbait sites that suggest commands that would do serious damage).

Yes. You can use the big, complicated “sudo” or the lightweight “doas” in a terminal to run a command with root privileges, but please consult one of the trusted references for the full details of linux permission/privileges and their management.

Hot-unplug won’t alter a read-only filesystem, but it is a good habit to avoid (so you are less likely to unmount a filesystem where it matters), and is the sort of “edge” case that might trigger a bug in programs that have opened files on the filesystem – some may keep a file (in linux, directories are files) “open” in case you want to make further use of it, and only close the file when exiting).

“Resisted” - Being unable to do something is not ‘resistance’. I’d rather you just took my word for that being the case, than have me explain my life situation to see that not everyone is a ‘student’ who can’t be bothered to learn something useful to their future. Some people have no future unless they just achieve certain tasks RIGHT NOW, without the time available to learn the foundations of it. Is it a good situation? No. Is it mine? Yes. So kindly stop insinuating that I am ‘resisting’ anything, you are not in a position to know if that is the case. And it isn’t.

Thanks.

1 Like

Is this a continuation of the linked thread?

That is an issue in Discourse, it should show that.

And I also dont like splitting up threads not older than 1 year

Joey Jonnson was advised to start a
new thread. He has some special circumstances and has minimal command-line experience, so needs a different level of help than most forum users.

1 Like

I think many people requesting help have no CLI experience :slight_smile: also @joeyjonnson seems to do well

Also when posting instructions it helps to use the default tools :slight_smile:

1 Like

Added apfs, fuse, gvfs

Added polkit, workstation

So you seem to have

  1. Issues with decrypting the drive
  2. Issues that the command is not ran with polkit and is not allowed in the GUI

1.

How did you try decrypting the drive? If this fuse command is ran with root, you also need to unlock the disk with root.

But best would be to have this work without root.


2.

If you run a command with sudo (or with doas or in the future with run0) you run that command as root.

This means if you can only mount something with root, you can also only unmount it with root.

There are polkit rules to solve this. Polkit is a system that manages permissions, what user in what group (you already used id to get that info) can do what action.

Normally for disk mounting, unlocking and unmounting actions, udisks2 is used. This is the one used in GNOME’s and KDE’s file managers.

I dont know if this apfs-fuse is supported by udisks2, likely not.

Added udisks2