How to Read Mac Hard Drive on Ubuntu

APle FileSystem is the new filesystem for mac computers advertising iOS devices since 2017.

In 2017, Apple changed the default filesystem on their macOS (High Sierra and above) to APFS, he Apple File System. It replaced HFS+.

Information technology works on a principle of using containers, rather than partitions. Information technology has good cloning efficiencies, amend encrytion, snapshot support as well as a few other benefits.

Proprietary prattle

Every bit all things recent in the Apple globe, they do not like to share things. Even when this could negatively impact their business. Take FaceTime, for example. If they had made that platform agnostic, meaning that people on Windows, Android and maybe even Linux/Web platforms could use it, so it is arguable that FaceTime would have taken much of the market share from the likes of Skype. APFS is no unlike. Apple tree haven't shared the API, then it relies on people to exercise an extent of guesswork, detailed research and some reverse engineering. All of which is never a good thing when yous are working on the systems that expect after the integrity of your files!

apfs documentation isn't coming any time soon.
Apple tree aren't going to exist documenting or open sourcing APFS any time presently by the looks of information technology.

For those of you lot that use Linux on a mac and yet have a need to access your files on the Mac partition of your hard drive on occasion then you may find it a challenge. If you take whatever version of macOS prior ot ten.three (High Sierra), so your mac will be using HFS+. Cheque out our comprehensive guide on using Linux on a mac on how to mount your HFS+ partition as read/write.

How practice I get it working?

For the newer APFS users, fortunately, you can now employ a driver chosen apfs-fuse to access your mac'south APFS disk. Note that this driver is not office of your Linux distribution and you will take to build it from source code. This short guide volition show you how.

Bummer, Read only….

Unfortunately, at to the lowest degree for now, yous are limited to read-merely admission. The upshot of this is that no data can be damaged by whatsoever bugs that may be in this experimental software. The driver's associated mount tool will also non perform transparent LZFSE decompression. I have been using this tool for a number of weeks on my 'Mojave' macOS computer and it works well.

Get tooled up

Firstly, I'd like to say that this is an entirely newbie friendly tutorial, however on this occasion, it's all work at the Terminal. Don't worry too much if you're non used to working at the command line, you are safe to copy and paste the instructions.

Firstly, nosotros need to accept the appropriate tools in society to build the APFS-Fuse driver. Open your Terminal app and enter these commands:

          sudo apt update sudo apt install libicu-dev bzip2 cmake libz-dev libbz2-dev fuse3 libfuse3-three libfuse3-dev clang git libattr1-dev  On older versions of Ubuntu, you may demand to use the post-obit: sudo apt install fuse libfuse-dev libicu-dev bzip2 cmake libz-dev libbz2-dev clang git libattr1-dev        

Now nosotros tin can download (clone) the commuter source code with git:

          git clone https://github.com/sgan81/apfs-fuse.git cd apfs-fuse git submodule init git submodule update        

After that'due south done, information technology's fourth dimension to compile the downloaded source code:

          mkdir build cd build cmake .. make        

After compilation, the binaries are located in the build directory. I recommend copying the apfs* tools into a directory that can be accessed in the path, for example /usr/local/bin. To copy them simply practice this:

          sudo cp apfs-* /usr/local/bin        

Now nosotros need to find out which disk division macOS is on. By using the fdisk -l command y'all'll be able to see the layout of the disk.

          $sudo fdisk -l --- eight>--snipped the loop volumes--<8 --- Disk /dev/sda: 465.nine GiB, 500277790720 bytes, 977105060 sectors 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 blazon: gpt Disk identifier: 6153AD88-FE14-4E88-8D9A-60E8AA465516  Device         Kickoff       End   Sectors   Size Type /dev/sda1         40    409639    409600   200M EFI System /dev/sda2     409640 764593231 764183592 364.4G unknown /dev/sda3  764594176 781570047  16975872   viii.1G Microsoft basic information /dev/sda4  781832192 976842751 195010560    93G Microsoft basic data --- 8>--snipped the loop volumes--<8 ---        

You tin see in my example to a higher place that at that place is a 364.4GB unknown partition. I know that this is my macOS partition because I know that the size of my macOS partition is 365GB. This means that the device identifier is /dev/sda2, so that'south what we volition mount.

Let'south bank check it out and see if it works….

          sudo mkdir -p /media/$USERNAME/macos sudo ./apfs-fuse -o allow_other /dev/sda2 /media/<your userame>/macos        

Hopefully, all going well, you won't accept received any fault messages at this point. If you have, and then maybe the README file can provide some enlightenment.

You lot can run into that the macos partition is at present mounted in the File browser.

Making it stick

If you want to have your macos partition automatically mount every time you start upwardly you computer, and then you'll need to edit into your filesystem table (fstab). To practise this, we volition demand to make a symlink to the apfs mountain tool, so edit the fstab (if you don't have nano, apply vim):

          sudo ln -s /usr/local/bin/apfs-fuse /usr/sbin/mount.apfs sudo nano /etc/fstab        

Add a line at the lesser of the file (all on one line) that says this:

          mount.apfs#/dev/sda2    /media/<your username>/macos/    fuse    user,allow_other        0       0        

If you desire to see if that works immediately just unmount the disk (see the cleaning up section below). Then blazon sudo mountain -a to mount the disk from the fstab.

Getting to know your partition

When the partition is mounted, you will see 2 directories, private-dir and root. The directory root is the one you want. Inside at that place is the root filesystem of your mac. You'll find your stuff in the 'Users' folder.

Cleaning upwardly (Unmounting)

To unmount the macos directory properly, yous should employ the fusermount control:

          fusermount -u /media/<your username>/macos        

I hope this has helped you become access to your mac's files. Please share this commodity and let me know how you get on in the comments section below.

jacksonwattelf.blogspot.com

Source: https://linuxnewbieguide.org/how-to-mount-macos-apfs-disk-volumes-in-linux/

0 Response to "How to Read Mac Hard Drive on Ubuntu"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel