Mac

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 08:37, 8 February 2011 by Luckysky (Talk | contribs)

Jump to: navigation, search

This article Based on work by andre. Originally by andre.

200px-Macbook_white_redjar_20060603.jpg

Contents

Macintosh related configuration

netatalk

A recent version of netatalk primarily enables long file names on Linkstation Mac shares. There's more to it of course, check out http://www.afp548.com/ and http://netatalk.sourceforge.net/.

Debian stable binaries, configuration samples

Debian Sarge ships with the outdated netatalk 2.0.2, which wouldn't be too problematic if it wasn't missing a feature, uams_dhx, a secure authentification mechanism (which is still missing in Testing, by the way). Here's how to get and set up an improved Debian package.

apt-get install cracklib-runtime libpam-cracklib netatalk
/etc/init.d/netatalk stop

EDIT: Download the netatalk powerpc package from http://packages.debian.org/etch/netatalk and install it:

dpkg -i netatalk_*powerpc.deb

You might see unresolved depencies and recommendations, apt-get install each of them, until dpkg -i is satisfied.

EDIT: Debian has finally cought up, Etch users won't benefit from my package, but maybe from my setup. -andre

Here's a sample /etc/default/netatalk, for AFP-only connections (which is what most people want), and moderate load on the system:

AFPD_MAX_CLIENTS=10
ATALK_NAME=`/bin/hostname`
ATALK_MAC_CHARSET='MAC_ROMAN'
ATALK_UNIX_CHARSET='LOCALE'
AFPD_UAMLIST="-U uams_dhx.so"
AFPD_GUEST=nobody
ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no
ATALK_BGROUND=yes
export ATALK_MAC_CHARSET
export ATALK_UNIX_CHARSET

The only uncommented line in /etc/netatalk/afpd.conf reads:

- -transall -uamlist uams_dhx.so -nosavepassword -noddp

A typical share in /etc/netatalk/AppleVolumes.default looks like this (there's an explanation in this file):

/mnt/shared "shared" allow:user1,user2,user3 rwlist:user1,user2,user3

user1, user2, and user3 must exist on your system, use "adduser user1" etc. if they don't exist yet. Don't forget to adjust the permissions on the shared directory and files, so they can be accessed by the users you defined.

When all this is done, run

/etc/init.d/netatalk start

It will take a minute or two until everything is started up.

To connect to /mnt/shared/ on server LS from your Mac, go to "Finder | Go | Connect To Server | afp://LS". Note everything is case sensitive! user1 is not User1!

Compilation

Please refer to http://forum.nas-central.org/index.php?action=vthread&forum=7&topic=1152, also check out the given configuration samples.

mDNSresponder (Bonjour, ZeroConf, Rendezvous, ...)

Browse your LinkStation services from the Mac.

Although http://www.porchdogsoft.com/products/howl/ is no longer available, Linkstation PPC binaries still are (source available on request; or from http://www.porchdogsoft.com/download/howl-1.0.0.tar.gz).

wget http://hvkls.dyndns.org/downloads/howl_1.0.0-binaries-ppc.tar.gz
tar -C / -xvzf howl_1.0.0-binaries-ppc.tar.gz

Then edit /etc/howl/mDNSresponder to your needs. Note: If you also run mt-daapd (see below), keep the hash (#) character preceding the daap line.

When done,

/etc/init.d/howl start

Serving iTunes contents with mt-daapd (also for Windows)

For information on Apple iTunes, visit http://www.apple.com/itunes/.

You could share your iTunes contents by moving your iTunes library to an AFP network share (cf. netatalk). Or you could set up a streaming server like Firefly Media Server (formerly mt-daapd), as described below. Your Linkstation share will show up in iTunes (Mac or Windows) as another library.

Binaries

PPC (LS1, HG, HS, Kuro, KuroHG) download

wget http://hvkls.dyndns.org/downloads/libid3tag_0.15.1b-binaries-ppc.tar.gz
wget http://hvkls.dyndns.org/downloads/mtdaapd_0.2.4.2-binaries-ppc.tar.gz
wget http://hvkls.dyndns.org/downloads/libgdbm3_1.8.3-2-binaries-ppc.tar.gz

MIPSEL (LS2) download

wget http://hvkls.dyndns.org/downloads/libid3tag_0.15.1b-binaries-mipsel.tar.gz
wget http://hvkls.dyndns.org/downloads/mtdaapd_0.2.4.1-binaries-mipsel.tar.gz
wget http://hvkls.dyndns.org/downloads/libgdbm3_1.8.3-2-binaries-mipsel.tar.gz

Installation

tar -C / -xvzf libid3tag*binaries-*.tar.gz
tar -C / -xvzf mtdaapd*binaries-*.tar.gz
tar -C / -xvzf libgdbm3*binaries-*.tar.gz
mv /etc/mt-daapd.SAMPLE /etc/mt-daapd
if  test -n $(which ldconfig) ; then 
 grep -E "^(/usr/local/lib|/usr/local/lib/)$" /etc/ld.so.conf || echo "/usr/local/lib" >> /etc/ld.so.conf
 ldconfig
else
 cd /usr/lib
 for i in /usr/local/lib/libid3tag.* ; do ln -s $i ; done
 for i in /usr/local/lib/libgdbm*3* ; do ln -s $i ; done
fi

Then edit /etc/mt-daapd/*. When done,

/etc/init.d/mt-daapd start

and point your browser to http://linkstation:3689

Compilation

  • libid3tag
wget http://umn.dl.sourceforge.net/sourceforge/mad/libid3tag-0.15.1b.tar.gz
tar -xvzf libid3tag-0.15.1b.tar.gz
cd libid3tag-0.15.1b
./configure --prefix=/usr/local --sysconfdir=/etc
make install
if test -n $(which ldconfig) ; then 
 grep -E "^(/usr/local/lib|/usr/local/lib/)$" /etc/ld.so.conf || echo "/usr/local/lib" >> /etc/ld.so.conf
 ldconfig
else
 cd /usr/lib
 for i in /usr/local/lib/libid3tag.* ; do ln -s $i ; done
fi
  • libgdbm3
wget http://ftp.debian.org/debian/pool/main/g/gdbm/gdbm_1.8.3.orig.tar.gz
tar -xvzf gdbm_1.8.3.orig.tar.gz
cd gdbm-1.8.3
./configure --prefix=/usr/local --sysconfdir=/etc
make install
if  test -n $(which ldconfig) ; then 
 grep -E "^(/usr/local/lib|/usr/local/lib/)$" /etc/ld.so.conf || echo "/usr/local/lib" >> /etc/ld.so.conf
 ldconfig
else
 cd /usr/lib
 for i in /usr/local/lib/libgdbm*3* ; do ln -s $i ; done
fi
  • mt-daapd
wget http://umn.dl.sourceforge.net/sourceforge/mt-daapd/mt-daapd-0.2.4.2.tar.gz
tar -xvzf mt-daapd-0.2.4.2.tar.gz
cd mt-daapd-0.2.4.2
./configure --prefix=/usr/local --enable-browse --enable-query --enable-mdns --with-id3tag=/usr/local --sysconfdir=/etc 
make install
mkdir /etc/mt-daapd
cp contrib/mt-daapd.* /etc/mt-daapd/

There is also good information in the Mt-daapd wiki: Quickstart LinkStation: Installing mt-daapd on a Buffalo LinkStation

rsync on Tiger

An improved version of rsync can be found at http://www.onthenet.com.au/~q/rsync/.
Mac data recovery software helps to recover data on Mac Tiger.

NFS

Be sure to either add "insecure" to your share definitions in /etc/exports, or include "-P" (Tiger) resp. "resvport" (Leopard) in the mount options on the Mac OS X client.

Tiger

Refer to MacTechNotes: Mac OS X as an NFS Client for instructions on mounting an NFS share on your Mac OS X Tiger client.

"Hard" Mounts

Put

sysctl -w net.inet.tcp.delayed_ack=0

into /etc/rc.local and also run the command once

Group write permissions

To set the permissions globally, run

sudo defaults write /Library/Preferences/com.apple.finder umask -int 2
sudo chmod +r /Library/Preferences/com.apple.finder.plist

For the current user only, use

defaults write ~/Library/Preferences/com.apple.finder umask -int 2

Useful with NFS.

Leopard

Refer to W. G. Scott's NFS on OS X 10.5.

In order to use Leopard's automounter with the LS (192.168.11.150, directory /mnt/shared, hard mount), add the following to /etc/fstab:

192.168.11.150:/mnt/shared /mnt/shared nfs
   locallocks,tcp,sync,resvport,bg,intr,rsize=32768,wsize=32768 0 0

The "locallocks" directive is a workaround for the buggy NFS locking in Mac OS X 10.5.2; you need it (at least) with iTunes. Avoid it when you can.

Create the mount directory

mkdir /mnt

put a link to it on your Desktop for easy access

ln -s /mnt ~/Desktop/

restart the automounter

automount -vc

make your life easier right from the start by running

find /mnt/shared -type f -name '._DS_Store' -name '.DS_Store' -print -exec rm {} ;\

and disable the creation of .DS_Store files on network volumes, for example with the Mac freeware TinkerTool, before you access it in the Finder.

To learn more, please refer to

man 8 mount_nfs
man 5 fstab