linux-apfs / linux-apfs-rw

APFS module for linux, with experimental write support
GNU General Public License v2.0
510 stars 34 forks source link

Please mention a list of alternative APFS mount tools, and the pros and cons of each, if you are aware of any #42

Closed ElectricRCAircraftGuy closed 1 year ago

ElectricRCAircraftGuy commented 1 year ago

I think it would be nice to have an "alternatives" section in the readme where you discuss the various APFS mount options (counting yours) and the pros and cons of each--or at least mention any alternatives you are aware of, to help us users make sense of each.

Here are the several I am aware of now:

  1. https://github.com/sgan81/apfs-fuse
  2. https://github.com/linux-apfs/linux-apfs-rw [this one]
  3. https://github.com/libyal/libfsapfs
  4. https://www.paragon-software.com/us/home/apfs-linux/ [paid, but I'd bet it's the best]

References:

  1. SuperUser: How to mount APFS on Linux or Windows?
eafer commented 1 year ago

I think it would be nice to have an "alternatives" section in the readme

I guess I can do that eventually. For now I'll tell you here quickly:

https://github.com/sgan81/apfs-fuse

This is a fuse driver, not a kernel driver. So it's probably more portable, but it's also much slower. Unlike mine it also supports encryption, but it's read-only and has no plans for write support. Writes take much more work to implement than reads, so that's a big selling point for both my driver and the Paragon one.

https://github.com/libyal/libfsapfs

I've never used this one (though I did get some layout information from the author's work). The first obvious difference is that it's a library. So again, more portable than mine, and it can be built into other tools if that's what you want. I think it includes a way to mount via fuse, so it's similar to the previous one in that regard.

Assuming the README is up to date, it seems to be missing support for snapshots and several compression algorithms, which are all supported in my driver (and also in apfs-fuse, I believe). I don't know where it stands in some stuff it doesn't mention, like sealed volumes. I'm guessing those are not implemented. It does support encryption though.

Like apfs-fuse, this one is also read-only, and there are no plans for write support as far as I can see.

https://www.paragon-software.com/us/home/apfs-linux/

The main disadvantage of this one is that it's paid and closed-source. I've never used it (I'm assuming it's expensive?), so I can't talk about its quality, sorry. It's probably much more complete than mine, and they don't use the 'experimental' disclaimer like I do, so they must be very confident that the writes work correctly. Nobody likes to lose data though, and we don't know much about its development process, so if you are interested in this option you should talk to other customers and see if it's reliable.

ElectricRCAircraftGuy commented 1 year ago

This is very helpful. Thank you.

By the way, I have used your tool to recover files on a 2015 MacBook via an Ubuntu 22.04 live USB, and it is really easy to mount, since it works with the built-in file manager GUIs to just click the drive and it auto-mounts!

Please keep developing it! I'm very impressed, and would love to see it work really well and support encrypted systems and reliable writing.

For anyone wondering, here is how I install it on an Ubuntu 22.04 live USB booted on a 2015 MacBook with an unencrypted APFS filesystem on the MacBook:

sudo add-apt-repository universe
sudo apt update  
sudo apt install git gcc g++ cmake make ncdu
sudo apt install linux-headers-$(uname -r)

cd ~
git clone https://github.com/linux-apfs/linux-apfs-rw.git
cd linux-apfs-rw
time make
# insert into kernel
sudo modprobe libcrc32c
sudo insmod apfs.ko

# Now mount your APFS drive by clicking it in your GUI file manager

You can analyze the disk space usage on the drive by cd-ing into the mounted APFS filesystem now and running this:

# see contents
sudo ncdu # sudo is **required** to see all contents!
ElectricRCAircraftGuy commented 1 year ago

I just wrote this, referencing the content above:

Super User: How to mount Apple APFS filesystems