Blog

Getting Netatalk to work, with Time Machine support, with Mac OS X 10.7 (Lion)

NetAFP, the single largest contributor to the netatalk project, announced that they have made netatalk 2.2.0-p6 available to it’s paying customers.
These are the guys such as QNAP, Netgear, Belkin, Buffalo etc. who use netatalk as part of their embedded linux distributions for their NAS appliances.

This version of netatalk will work perfectly with Mac OS X 10.7’s new DHX2 authentication methods.
It will also work perfectly with time machine.

I found that the project had appeared on github before it had on freshmeat so here’s how to get it working in a few easy steps.
The systems I have tried this on were both Debian systems (Debian 5 and Debian 6).

  1. Remove previous installation of netatalk
    If you’ve installed netatalk previously (most probably by recompiling the source obtained from apt to include SSL support), then you’ll need to remove it.
    Hopefully you’ve kept your compiled .deb file just incase.

    dpkg -r netatalk
  2. Install git if you haven’t already
    apt-get install git-core
  3. Make a build directory and git clone the netatalk 2.2.0-p6 project from github
    mkdir ~/build
    cd ~/build
    git clone git://github.com/jrmithdobbs/netatalk-2-2-0-p6.git
    cd netatalk-2-2-0-p6
  4. Configure and compile the project (assuming you already have build tools installed)
    I found that on certain systems, it wouldn’t compile without the OpenLDAP headers. You can simply disable LDAP support by appending –without-ldap to your configure command:

    ./configure --without-ldap
    make
    sudo make install

    This will place the new version of netatalk under the /usr/local $PREFIX. I left this as the default because I didn’t want to interfere with my previous netatalk installation which placed files where you’d expect them to be from a .deb, IE in /usr/bin:/usr/sbin and /etc

  5. Copy your previous configuration
    sudo cp /etc/netatalk/* /usr/local/etc/netatalk/

    You’ll notice I omitted -R, I don’t want to overwrite the

    uams

    directory

  6. Edit your /usr/local/etc/netatalk/AppleVolumes.default
    For each one of your defined shares, make sure you add

    cnidscheme:dbd

    as your preferred cnidscheme. cdb was the previous default and appears to play havock with Lion.
    For example:

    ~/			"$u" cnidscheme:dbd
    /var/data/files	"Files" allow:@staff cnidscheme:dbd options:upriv,usedots dperm:0775 fperm:0664
  7. Also, for the share you’ve defined for your Time Machine backups, you’ll need to add “tm” to your options list. This will enable Time Machine support that Lion now relies on.
    For example:

    /var/data/backup	"Backup" allow:@staff cnidscheme:dbd options:tm,upriv,usedots dperm:0770 fperm:0660
  8. Edit your /usr/local/etc/netatalk/afpd.conf
    Make sure you have uams_dhx2.so listed in your uamlist:

    - -transall --uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh
  9. Edit your /etc/default/netatalk
  10. This file should have been left by your previous netatalk installation. Make sure it contains the following:

    # Set which daemons to run (papd is dependent upon atalkd):
    ATALKD_RUN=no
    PAPD_RUN=no
    CNID_METAD_RUN=yes
    AFPD_RUN=yes
    TIMELORD_RUN=no
    A2BOOT_RUN=no
    
    # Control whether the daemons are started in the background
    ATALK_BGROUND=no
  11. Edit your init.d/netatalk file
    This bit’s annoying. The included init.d/netatalk file has hardcoded paths and does not use the $PATH variable, despite it being set.
    Personally I just went through it and deleted all hardcoded /usr/bin and /usr/sbin’s and then set the $PATH variable at the top to include /usr/local/bin and /usr/local/sbin.
    This seems to work.
  12. Delete your old CNID metadata databases
    For each share you have defined, cd to the root of it and either

    mv

    (safer) or

    rm -Rf

    the

    .AppleDB

    folder.
    This will cause the CNID database to be rebuilt using the dbd format and not the cdb format.

  13. Start netatalk again
    sudo /etc/init.d/netatalk start
  14. OK so this should now have you working in Lion.
    This was a rushed post so please comment if you know something I don’t. I hope it’s been of help to some at least as a helpful point in the right direction

Blog

Got bored. Made an iPhone ringtone.

I got bored,
Been listening to alot of Trolley Snatcher’s stuff recently. Really enjoying The Future.

So I made a ringtone out of a loop and optimised it for the iPhone’s audio output.

Right click, Save as, add to iTunes, Throw it at your iPhone.. Done.

  TheFutureRingtone.m4r (224.0 KiB, 272 hits)

Blog

MOTU 828 Mk1 and OS X 10.6.2

I recently had the displeasure of re-installing my OS (10.6).
However I stumbled across a problem when using the latest universal drivers from MOTU’s website which are currently at version 1.5.0 (At the time of writing).

During boot, the machine would kernel panic.
If the 828 was turned off and I booted up, the machine would boot up fine until the 828 was turned on.. then I’d get a kernel panic again.

The important parts of the kernel panic are:

0xffffff805d71bfa0 : 0xffffff80002c4597
Kernel Extensions in backtrace (with dependencies):
com.motu.driver.FireWireAudio(1.5 37320)@0xffffff7f81119000->0xffffff7f8118cfff
dependency: com.apple.iokit.IOUSBFamily(3.8.5)@0xffffff7f8071f000
dependency: com.apple.iokit.IOHIDFamily(1.6.1)@0xffffff7f806cd000
dependency: com.apple.iokit.IOAudioFamily(1.7.2fc1)@0xffffff7f80a78000
dependency: com.apple.iokit.IOFireWireFamily(4.1.7)@0xffffff7f807dd000
com.apple.iokit.IOAudioFamily(1.7.2fc1)@0xffffff7f80a78000->0xffffff7f80a92fff
dependency: com.apple.kext.OSvKernDSPLib(1.3)@0xffffff7f80a73000

BSD process name corresponding to current thread: kernel_task

Mac OS version:
10C540

Kernel version:
Darwin Kernel Version 10.2.0: Tue Nov 3 10:35:19 PST 2009; root:xnu-1486.2.11~1/RELEASE_X86_64

So anyway, it transpires that the current 1.5 drivers throw up some sort of dependancy conflict.

The solution? Downgrade to the 1.4.9 drivers which no longer appear to be on MOTU’s website.

For convenience sake, I’ve included the driver in a zip file below.

  motu_osx_1.4.9.zip (13.8 MiB, 946 hits)

Blog

New Experimental / Unfinished page

I have an abundance of ‘bits’ of music that I’ve lost interest in, festering on tapes, CD’s and in my HD’s.. so time to bring them to the surface.
You’ll be able to listen and download the results of my rummaging from the new “Exp” section of this website.

Enjoy, squeeblings!

Blog

Discography

New discography section is up.
Feel free to buy my stuff.

:)

- Squeeb

Blog

Website Up

Hello squeeblings!

Well, the website is looking dandy if I do say so myself.

Obviously a lot of work to do. Lots of music and artwork coming your way sirs and sirettes.
Regards,

Squeeb