Contribute
Register

Quick Apple Raspberry Pi Machine

Joined
Jun 13, 2017
Messages
3,341
Motherboard
Gigabyte A520i AC
CPU
Ryzen 7 4700G
Graphics
Radeon Vega 8
Mac
  1. MacBook Air
  2. Mac Pro
Classic Mac
  1. eMac
  2. iMac
Mobile Phone
  1. iOS
Turn your raspberry pi into an Apple Time Machine/Capsule.
Screenshot 2023-05-02 at 10.11.22 PM.png

IMG_3940.jpg

This guide is aimed for the simplest setup, a low maintenance no fuss Time Machine. There are other options available, I'm currently trying OpenMediaVault and will update the thread. So, for the simplest setup you will reuire.
Micro SDXC Card. A 1TB card is around a $100, wouldn't require external storage!.
Micro SDXC USB adapter.
Raspberry Pi 2-4, I'm using a 3 B+.
Hackintosh, WiFi or Ethernet, I'm using Terminal via ssh in this guide.
Storage. Using an NVMe SSD plugged into the USB2 slot via an adapter.

I've been all about Apple Pi all week me, getting it working then breaking it again, and repeat!. But through the various resources linked below, I created my own Apple Raspberry Pi machine guide. You can download the Desktop version from the link provided below, or simply enter the following in Terminal.
Code:
sudo apt install rpi-imager
In the desktop Raspberry Pi Imager you can choose which version you want to install. Click 'Operating System' and select to install on your micro SDXC card. I chose the lite (64-bit)version, the (32-bit) version works just as well, we won't be needing the desktop environment for creating our Pi Machine. After you have chosen your OS you can select which storage device you're using, the gear icon in the bottom right corner can save time with creating an account and setting up ssh.

Screenshot 2023-05-02 at 9.55.11 PM.png
Screenshot 2023-05-02 at 9.54.49 PM.png

Code:
Hostname -I
To get your IP address, you'll need it in the next step.
Code:
ssh [username]@[ip]
You'll now be logged onto the Pi through terminal, execute commands from the comfort of your Hack.
Screenshot 2023-04-30 at 11.01.15 AM.png


Code:
sudo apt-get update && sudo apt-get upgrade -y
Update your installation of Raspbian.
Code:
sudo apt-get install hfsutils hfsprogs
We're going to be formatting our drive as hfsplus.
Code:
sudo mkfs.hfsplus /dev/sda2 -v TimeMachine
The response will be 'Initialized /dev/sda2 as a 238 GB HFS Plus volume'
Code:
sudo mkdir /media/tm && sudo chmod -R 777 /media/tm && sudo chown [username]:[username] /media/tm
Creates mount point.
Code:
ls -lha /dev/disk/by-uuid
To retrieve your drives UUID, you'll need this in the next step. Also, make a note of the name at the end of the line of the code, in my example it's...
Screenshot 2023-04-30 at 9.04.20 AM.png


Code:
 sudo nano /etc/fstab
Code:
UUID=[YOURUUID] /media/tm hfsplus force, rw,user,noauto 0 0

Screenshot 2023-04-30 at 9.36.44 AM.png

control X to save
Y to confirm
return
Code:
df -h
Check everything is working correctly.
Screenshot 2023-05-02 at 10.36.52 PM.png


Code:
 sudo apt-get install netatalk -y
For this guide we're going to be using netatalk for our network setup. Other guides use Samba, which Time Machine is more familiar with. Each has there own advantages and disadvantages, read the links below and decide which is better for you.
Code:
sudo nano /etc/nsswitch.conf
Screenshot 2023-04-30 at 10.01.37 AM.png

control x to save
Y to confirm
return
Code:
 sudo nano /etc/netatalk/afp.conf
You could also try [mimic model = TimeCapsule6,106] for a different icon.
Screenshot 2023-04-30 at 10.03.50 AM.png

control x to save
Y to confirm
return
Code:
 sudo crontab -e
Screenshot 2023-04-30 at 10.06.40 AM.png


Code:
@reboot sleep 30 && mount /media/tm && sleep 30 && umount /media/tm && sleep 30 && mount /media/tm && sleep 30 && service avahi-daemon start && service netatalk start
Screenshot 2023-04-30 at 10.12.37 AM.png

control x to save
Y to confirm
return
Code:
sudo reboot
Reboots the Pi. Launch Time Machine in settings and click 'Add Backup Disk...'. "raspberrypi.local" should show up and you can set up your Time Machine from here.



Screenshot 2023-04-30 at 10.21.38 AM.png
Screenshot 2023-04-30 at 10.21.53 AM.png
Screenshot 2023-04-30 at 10.23.07 AM.png
Screenshot 2023-04-30 at 10.23.55 AM.png



Screenshot 2023-04-30 at 10.55.34 AM.png
Screenshot 2023-04-30 at 10.55.34 AM.png


Code:
 sudo chown -R [username]: /media
Sometimes I've experienced 'Don't have the necessary privileges to write to this disk' in macOS, take ownership with the above piece of code. You also 'Get Info' on your Time Machine from the Desktop and check ownership. If you're familiar with the screen from terminal below, open Spotlight and type the following [~/.']. Navigate to the folder labelled [~/.ssh] and delete the contents. Enter Terminal and type [username]@[iP], answer 'yes' and type in your password.
Screenshot 2023-05-04 at 1.24.23 AM.png
Screenshot 2023-05-04 at 1.33.11 AM.png



Screenshot 2023-05-04 at 1.48.23 AM.png

 

Attachments

  • Screenshot 2023-04-30 at 8.41.32 AM.png
    Screenshot 2023-04-30 at 8.41.32 AM.png
    90.5 KB · Views: 196
  • Screenshot 2023-04-30 at 9.51.25 AM.png
    Screenshot 2023-04-30 at 9.51.25 AM.png
    53.3 KB · Views: 154
  • Screenshot 2023-04-30 at 10.01.37 AM.png
    Screenshot 2023-04-30 at 10.01.37 AM.png
    77.8 KB · Views: 82
  • capsule.png.zip
    251.4 KB · Views: 43
Last edited:
Back
Top