I had a friend’s mac stop booting so he told me to backup his mac. These are the steps I took to copy the files from the hard drive, reinstall OS X and restore the files
What you’ll need:
- External HDD
- Flash Drive 2GB
- Mac that wont boot up
Copy Files from Internal HDD to External
- Get a copy of ubuntu, put on flash drive and boot it on the MAC
- Format the hard drive to EXT4 for maximum compatibility (meaning all files can be copied)
- Note: NTFS/FAT doesn’t allow some characters like : or “ or / in the filename and those files wont be copied, so use EXT4 instead to backup the files to.
- In the terminal, copy files from the internal hard drive to the mac
- sudo cp -r /path/to/macdrives /home/user/newdirectory
- e.g. sudo cp -r /media/ubuntu/fromDrive /media/ubuntu/toDrive
- Note: you could do path/to/drive/* so files inside drive are copied
Source: https://superuser.com/questions/600054/how-to-backup-mac-data-using-ubuntu
Change ownership of files on the MAC
- Execute the following commands, replace /media with the location of your media
# chown -R user:user /media/toDrive
# chmod -R 775 /media/toDrive
Note: Because we are on a live CD, change the owner to ubuntu:ubuntu
Source: https://askubuntu.com/questions/858793/this-location-could-not-be-displayed-on-ubuntu-16-10
Reinstall OS X – Steps not in guide, do some googling
Restore Files from Linux to Mac – SCP –This proved to be the best method despite it being slow, make sure both computers are connected through ethernet
- Enable Remote Login in macOS Preferences
- SCP the files
- $ sudo scp -r /path/to/local/directory user@<local-ip-of-computer>:/Users/<username>/Desktop
Source: https://www.howtogeek.com/191116/how-to-share-files-between-windows-mac-and-linux-pcs-on-a-network/
–-Methods to restore files that did NOT work
Restore Files by zipping and unzipping- This produced a corrupted zip file and got an “Error 20 – No a Directory” on the mac side
Compress files into a zip file (this will alleviate problem of invalid characters when transferring files to FAT/NTFS)Copy zip file to exFAT formattedThis is mountable on the macOS, Linux AND Windows partition
Copy zip file to macOS and extract
Restore Files from Linux to Mac – File Share — This caused too many question/prompts when transferring files and would pause transfer every time
I could not find a way to mount the external HDD in ext4 filesystem to the MAC, even using FUSE or ext4fuse, installed through homebrew So I decided to:Share the files on the mac using the guide below “Share a Folder on Mac OSX” sectionAccess it to through the linuxConnect to server “afp://192.168.1.xxx” IP of mac
Copy and paste the files on from the linux computer to the Mac