Skip to content

Instantly share code, notes, and snippets.

@iacutone
Last active January 5, 2020 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iacutone/2f2e88a24b3680ea8d7ba556407a26cf to your computer and use it in GitHub Desktop.
Save iacutone/2f2e88a24b3680ea8d7ba556407a26cf to your computer and use it in GitHub Desktop.
Raspberry Pi

BTSync

  1. Install instructions
  2. service resilio-sync start

AFP File Sharing

  1. sudo apt-get install netatalk
  2. sudo /etc/init.d/netatalk stop
  3. sudo vi /etc/netatalk/AppleVolumes.default
  4. ~/ "<some dir name>"
  5. sudo /etc/init.d/netatalk start

Mounting HFS+ Drive

  1. sudo mkdir ~/external
  2. sudo apt-get install hfsprogs
  3. sudo mount -t hfsplus -o force,rw /dev/sdb2 ~/external

Remounting (permission 'Read-only file system)

  1. sudo mount -o remount,rw ~/external

Mounting Pi to OSX

  1. open afp://iacutone@192.168.0.254
  2. This command created a Volumes/Home\ Directory dir

Issues

  • When drive corrupted
  1. sudo fsck.hfsplus -f /dev/sdb2
  2. remount drive
  3. If issues persist and you receive 'Read only drive' errors, remove the mounted directory rm -r ~/external

Mounting Exfat Drive

  1. sudo apt-get install exfat-fuse exfat-utils

VNC

  1. sudo apt-get install tightvncserver
  2. tightvncserver

Pi Hole

curl -sSL https://install.pi-hole.net | bash pihole enable

Mounting SD to the Filesystem

  1. Use this guide
  2. udevadmin monitor --env
  3. sudo udevadm control --reload-rules
  4. udevadm trigger --action=add
  5. udevadm info -q all -n <mount point>
ACTION=="add", ENV{ID_FS_UUID}="0123-4567", RUN+="/usr/bin/sudo -u iacutone /home/iacutone/sdcard/sdcard_added.sh /home/iacutone/sdcard/jpg/ .JPG .ARW"
ACTION=="remove", ENV{ID_FS_UUID}="0123-4567", RUN+="/usr/bin/sudo -u iacutone /home/iacutone/sdcard/sdcard_removed.sh"

Debugging

  1. tail -f /var/log/syslog

Configure NFS

  1. Follow these instructions

Configure Samba

  1. Faster than AFP and NFS, see this
  2. Instructions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment