Tuesday, December 25, 2012

Raspberry Pi, Raspbmc, HFS+, AFP and Time Machine

So last week I got myself a Raspberry PI. The idea was - and still is - to turn it into a little media server for the family (ahem, me). One thing that I want it to do as well is a backup server for all the gadgets in the house. First up, my wife's Mac with OS 10.7.4.

First, I formatted a USB drive on her Mac following Apple's support pages.

Like I said, I installed Raspbmc on the PI. This is a pretty naked Debian system. I roughly followed the instructions on Simon's blog to install HFS+ Apple file system support:

sudo apt-get install hfsplus hfsutils hfsprogs
sudo mkdir /media/timemachine
sudo mount -o force /dev/sdb2 /media/timemachine
sudo adduser timemachine
sudo chown timemachine /media/timemachine
      
However, compiling netatalk 3.0.1 for which there is no Debian compiled package yet was a little harder since I first needed to install the build tools, compiler etc.

sudo apt-get install make gcc binutils 

Then following Simon again with 


sudo apt-get install avahi-daemon libavahi-client-dev libdb5.3-dev db-util db5.3-util libgcrypt11 libgcrypt11-dev

I retrieved the netatalk sources directly from the SourceForge web site and copied them over to the Pi with scp. Then I unpacked them and installed them the standard way:


./configure --with-init-style=debian --with-zeroconfmake install
make
sudo make install
I configured the afp service like so
sudo nano /usr/local/etc/afp.conf
;; Netatalk 3.x configuration file;
[Global]

; Global server settings
uam list = uams_guest.so, uams_dhx.so, uams_dhx2.so
; [Homes]basedir regex = /home
; [My AFP Volume]; path = /path/to/volume
[Time Machine Raspberry]
path = /media/timemachine 
time machine = yes
Then I needed to restart the netatalk and avahi services:

sudo /etc/init.d/netatalk restart
sudo service avahi-daemon reload
Then I needed to prepare the Mac, for which I followed this page (the stuff at the top of the page I didn't do). 



What's needed now is the auto-mount of the USB drive!  Change 05/13: Raspbmc now automounts the drives, I believe with improved udev rules.

I did have to go through the above rigmarole again, after the raspbmc OS update, and found that the timemachine drive would now auto-mount, but only read-only. After some hours of research :-), I found the solution: Take the drive off the pi, plug it into the Mac and repair it with the disk utility. Also, I think somehow Journaling was switched back on, so I turned it back off (For the option to appear in the "Edit" ("Ablage" in German) menu, you have to first press the "Alt" key, then select the menu.) This didn't work, so I used the cmd-line diskutil tool to do it:

sudo diskutil unmount /Volumes/timemachine

sudo diskutil disableJournal force /dev/disk2s2


(I knew the disk2s2 bit from running diskutil list)


'via Blog this'

Monday, November 05, 2012

Installing ipython on python 2.7

In order to get PyDev in Eclipse going with ipython, a much nicer cmd line interface to python, install ipython as a package. Here's how: Overview — IPython 0.13.1 documentation

'via Blog this'

Monday, June 11, 2012

App Showdown: Password Keepers | Mac|Life

Re the review App Showdown: Password Keepers | Mac|Life:
Favorite for me: mSecure, because of its DropBox sync. My wife has an iPhone and I am on Android, we tried the sync between our devices via DropBox and it works. Luckily the mSecure devs kept the code similar enough.

'via Blog this'

Tuesday, May 15, 2012

CVS from behind a corporate firewall

I am posting this as it wasn't easy to find: CVS from behind a corporate firewall. 

In the end it was quite easy. Example - Instead of 

:pserver:anonymous@public.kitware.com:/cvsroot/CableSwig

write 

:pserver;proxy=your.corporate.proxy.com;proxyport=8080:anonymous@public.kitware.com:/cvsroot/CableSwig

Also, the file .cvsroot in your $HOME directory must exist.

 

Sunday, May 06, 2012

Installing Sun/Oracle JDK on my Ubuntu system

Ubuntu provides OpenJDK, but Aptana Studio doesn't support it, so I need to install the Sun/Oracle version of the JDK, but as a package they only provide RPM's, which Ubuntu  doesn't support. So I followed these instructions on askubuntu.

'via Blog this'