DEV Community
•
2026-07-30 13:30
Editing an ext4 Partition Directly from macOS (No Linux VM Required)
I lost the private key for a Raspberry Pi and needed to add a new public key to /root/.ssh/authorized_keys. The Pi's SD card was plugged into a Mac via a USB reader, so diskutil list could see the partitions fine — but the root filesystem was ext4, which macOS cannot mount. No spare Linux box, no VM set up, just Docker Desktop (which, on Apple Silicon, only gives you a Linux kernel inside its VM —...