𝔩𝔢𝔩𝕠𝔭𝔢𝔷
Theme

Recovery

Linux Drive on Mac

How to Read an Ubuntu Drive on Your Mac

Overview

Plugging a Linux-formatted NVMe drive into a Mac via USB-C adapter can look like a hardware failure. The drive light blinks and nothing appears in Finder. The drive is fine. macOS can't read ext4, so it ignores the drive entirely. anylinuxfs fixes this by spinning up a tiny Linux VM that handles the filesystem for you.

Before You Begin

Prerequisites

  • macOS on Apple Silicon (anylinuxfs uses libkrun, which requires Apple Silicon)
  • An ext4-formatted drive (Ubuntu, Debian, or most Linux distributions use ext4 by default)
  • Homebrew installed
  • anylinuxfs installed:
brew tap nohajc/anylinuxfs
brew install anylinuxfs

What This Doesn't Cover

  • Recovering data from physically damaged or corrupted drives. This covers healthy drives that macOS can't read due to filesystem incompatibility
  • Write operations to the Linux filesystem (anylinuxfs supports read/write, but if you're doing data recovery, pass -o ro to mount read-only)

Why anylinuxfs

Every other ext4 tool for macOS is dead or broken. ext4fuse is Linux-only in Homebrew, fuse-ext2 isn't packaged, ext4-fuse-t2 doesn't exist. anylinuxfs1 runs a tiny Linux VM to handle the filesystem. No kernel extensions needed, and it supports writes.

Warning:Never mount under $HOME (e.g., ~/mnt). Spotlight indexes it, Time Machine backs it up, and a stale NFS mount under your home directory can freeze your entire shell session. Use /tmp or /mnt instead.

Confirm Drive Detection

diskutil list

Look for an (external, physical) entry with Linux Filesystem partitions:

/dev/disk10 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk10
   1:                        EFI NO NAME                 1.1 GB     disk10s1
   2:           Linux Filesystem                         2.1 GB     disk10s2
   3:           Linux Filesystem                         1.0 TB     disk10s3

This is a standard Ubuntu layout:

  • disk10s1: EFI boot partition
  • disk10s2: /boot (kernel and GRUB)
  • disk10s3: Main data partition

If the drive shows up here, your hardware is fine. macOS just can't mount ext4.

Note:Some USB-C NVMe adapters don't appear in system_profiler SPUSBDataType, SPThunderboltDataType, or SPNVMeDataType, even when working. diskutil list is the authoritative check for drive detection.

Identify Mount Target

diskutil labels all Linux partitions as Linux Filesystem, which doesn't tell you whether it's plain ext4 or LVM. Use anylinuxfs to inspect the actual volume layout and find the identifier you'll need to mount:

sudo anylinuxfs list -d all
/dev/disk10 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk10
   2:                       ext4                         2.1 GB     disk10s2
   3:                LVM2_member                         1.0 TB     disk10s3

lvm:ubuntu-vg (volume group):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                LVM2_scheme                        +1.0 TB     ubuntu-vg
                                 Physical Store disk10s3
   1:                       ext4                         1020.9 GB  ubuntu-vg:disk10s3:ubuntu-lv

The IDENTIFIER on the ext4 line is your mount target. In this case: ubuntu-vg:disk10s3:ubuntu-lv.

Important:Double-check your disk identifier (e.g., disk10). Using the wrong disk number in mount commands can cause data loss.

Mount the Drive

Prefix the identifier with lvm: and mount:

mkdir /tmp/linux_drive
sudo anylinuxfs mount lvm:ubuntu-vg:disk10s3:ubuntu-lv /tmp/linux_drive

Finder opens the mounted volume automatically with the full Linux directory structure.

File Permissions

Finder may show "you don't have permission to see its contents" when opening folders, and media players may fail with "Cannot open file or stream." This happens because Linux files are owned by a UID (e.g., 1000) that doesn't exist on macOS.

Check the current permissions to confirm:

ls -la /tmp/linux_drive/<path/to/files>

Files with rw------- (owner-only) permissions are inaccessible to macOS applications. The owner column shows a numeric UID like 1000 instead of a username. That's the Linux user who created them:

.rw-------  143M 1000 25 Sep  2023  'example-file.mp4'

Grant read access to the specific directories you need:

sudo chmod -R a+rX /tmp/linux_drive/<path/to/files>

This adds read permission for all users and execute (traverse) permission on directories, without granting write access.

Warning:Avoid running this on the entire drive. System directories (/etc, /var) have strict permission requirements. Loosening them can break the Linux install if you ever boot from it again. Scope it to the directories you need to access.

After this, Finder allows normal browsing, drag-and-drop, and direct file playback from those directories.

Unmount

anylinuxfs unmount /tmp/linux_drive

Resources

Footnotes

  1. nohajc, "anylinuxfs," github.com. Accessed: May 2, 2026. [Online]. Available: https://github.com/nohajc/anylinuxfs