I had a Mac Air since 2014 that died a few months ago. The repair shop was able to fully back up its contents in an external drive. So, there is a lot of desirable information in that drive. However, I cannot access its contents, being relegated to my two linux laptops – one, Linux Mint and the other, Debian Mint.
I did mention my issue in the Jeff.pro telegram app and was advised to open a thread here.
I would love to be able to do two things. One, restore all files on my linux box(es). Two, reformat the drive to a filesystem type best for use with my linux computers.
Here is the output when I plug the external drive into my Linux Mint computer:
Error mounting dev/sdb2 at media/tony/c27384ae-c8b2-4de5-90e6-4bf8567315c4: unknown filesystem type apfs
And here is information gotten via the Disks utility:
1.0 TB Hard Disk Toshiba MQ04UBF100
Size 210 MB
Contents FAT (32-bit version) – Not Mounted
Partition Type EFI System
Size 1000 GB
APFS – Not Mounted
Partition Type Apple APFS
This link looks promising.
From the discussion linked above this looks like the key:
There is a dedicated
linux-apfs driver, which even has experimental write support: APFS for Linux · GitHub
libfsapfs-utils (tested in Ubuntu 20.04)
- Mount APFS partition 3 of
/dev/sdd in a directory
/mnt``fsapfsmount -f 1 /dev/sdd3 /mnt
-f file_system_index mounts a specific file system
- Unmount APFS partition mounted in the directory
/mnt``fusermount -u /mnt
Once you get the data moved over to Linux you can reclaim the drive formatting as EXT4.
Thank you @NorseMan. Being an ex-Apple user myself this is good information to have in the event that I may have missed transferring over certain data/files from my APFS drive.
Perusing the links that NorseMan provided I came upon this commercial implementation for mounting APFS on Linux. It costs $40 USD and seems to be much simpler to use (and discard). They also have a similarly priced product for NTFS and HFS+ file formats.
I am afraid this is may be too over my head.
I’ll share just a couple uncertainties.
In order to build a module out-of-tree, you will first need the Linux kernel headers. Depending on your distro, you can get them by running (as root):
apt-get install linux-headers-$(uname -r)
OK, that’s cool - linux-headers-5.15.0-92-generic is already the newest version (5.15.0-92.102). Although I do not know what “out of tree” means, but suppose I can find out.
Now you can just cd to the linux-apfs-rw directory and run:
WHAT linux-apfs-rw directory?
So, I am thinking I download the files. How? No idea.
So, I go here:
And it lists where to download from by architecture. It lists these architectures:
And so I figure out how to get the architecture of my computer (and by the way, why have arm64 since only Asahi linux runs arm64?).
uname -m : x86_64
Doesn’t look like it has my architecture (???) or if so, I have no idea which one it is. Just for the heck of it, I go to the link for amd64 - and maybe I can do it (unsure). I feel quite tenuous about doing this but anyway, what architecture from the Ubuntu list corresponds to x86_64?
Then it lists a way to download using apt and doing up some editing so as to be able to use the mirror.
What do you think - too over my head, huh?
Yeah, this looks like the way to go!
I would also contact the repair shop that copied your data and ask them if they will be willing to transfer you APFS data files (presume they are mostly in your Documents folder) onto a Fat32 formatted USB that you supply to them. Being that you are their customer, they will likely do that at no charge to you. It will only take a few minutes. Can’t hurt to ask.
Given Jeff (.pro) is explicitly Christian, I’ll be so as well!
The Good Lord convicted me to “get out of the cities.” I am in a very rural spot of South Dakota and there is no shop within a 5 hour drive. I actually shipped the Mac to my daughter who is near Chicago. Point being, to have them do what you advise requires shipping it to my daughter, etc.
I did purchase the APFS driver. Failed to install but the fix was easy. No C-compiler (???). I would think that would be standard but no biggie.
sudo apt update
sudo apt install build-essential
And the install succeeded. I’ll use the driver later today.
That worked great. Well worth the $40 - for me and my situation, anyway!
Thanks, man! This issue had been an albatross for months.