General NAS-Central Forums

Welcome to the NAS community
It is currently Thu Apr 27, 2017 1:24 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Wed Aug 03, 2011 1:21 pm 
Offline

Joined: Wed Aug 03, 2011 1:00 pm
Posts: 4
Hello!
I've been using Edmini V2 NAS as Time Machine backup, but lost compatibility with OSX 10.7 Lion upgrade.
I googled for solutions and it seems that netatalk needs to be upgraded on the NAS to have all AFP services required for the new Time Machine in OS X Lion.

Did someone tried to upgrade netatalk on EDMini V2? Would it be simple enough for a newbie?
I believe it would involve accessing the box via shell, installing a compiler (if not present), downloading netatalk sources, compile and install. But I don't know how to do it.

I would appreciate if someone could post a guide how to achieve this.

Thanks, Carlos


Top
 Profile  
 
PostPosted: Thu Aug 25, 2011 10:16 pm 
Offline

Joined: Wed Aug 03, 2011 1:00 pm
Posts: 4
I am replying to my own post as I found a workaround to this issue that may be helpful for others. I couldn’t update the netatalk afp server on the EDmini but was able to run debian from a usb pen-drive and install netatalk 2.2 on it.

Started by following the following two guides on NAS Central wiki:
SSH daemon on the EdMini v2 http://lacie.nas-central.org/wiki/SSH_daemon_on_the_EdMini_v2 and Painless Debian http://lacie.nas-central.org/wiki/Painless_Debian

I used a Mac running virtualized Linux for the above installations. Then used the ssh shell for the remaining.

Next thing I did was to install Petr Malát's clock and btnd as described in http://malat.biz/cgi-bin/twiki/bin/view/Projects/LacieSystemSetup

None of the above is my work and I deeply thank the authors for their excellent work!

I had to configure btnd with no decimal values for the button to work properly on my installation. Did the following:
Code:
nano /etc/btnd.conf

Replace the “0 0.5 halt” line by:
# Shut down Edmini after short press (0 to 1 sec)
0 1 /sbin/poweroff.sh


Now follows the netatalk 2.2 installation.

1) add sources repository for apt
Code:
nano /etc/apt/sources.list

Add a new line:
deb-src http://ftp.us.debian.org/debian/ lenny main
Code:
apt-get update

2) install the required packages for source compilation
Code:
apt-get install gcc make

3) Install netatalk required libraries and build dependencies
Code:
apt-get install cracklib2-dev libssl-dev libdb-dev
apt-get build-dep netatalk

4) dowload netatalk 2.2 sources and cd into source dir
Code:
mkdir -p /usr/src
wget --output-document=/usr/src/netatalk-2.2.0.tgz http://sourceforge.net/projects/netatalk/files/netatalk/2.2/netatalk-2.2.0.tar.gz/download
cd /usr/src
tar -xzf ./netatalk-2.2.0.tgz
cd netatalk-2.2.0

5) configure netatalk. I got best results with faster cdb backend than suggested (more secure) dbd. Refer to netatalk manuals at sourceforge for cnid backend options.
Code:
./configure --enable-debian --with-cnid-cdb-backend --enable-zeroconf --with-ssl-dir=/usr/include

6) build and install
Code:
make
make install

The above commands will take a lot of time to complete. Be patient.

7) Setup user account and password for afp access. Change the user name as you like.
Code:
useradd afp_user
passwd afp_user
usermod -a -g users afp_user

8) Configure Apple volumes. I used nano for editing but you may use vi or something else.
Your original shares are mounted in /home. Take a note of their name.
Code:
nano /usr/local/etc/netatalk/AppleVolumes.default

Add one line like the following for each share at the end of the file:
/home/your_share_name allow: afp_user cnidscheme:cdb options:usedots,upriv,tm

9) Configure afpd
Code:
nano /usr/local/etc/netatalk/afpd.conf

Add the following line at the end, after # default:
- -transall -noddp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword

10) Configure netatalk.
Code:
nano /etc/default/netatalk

Make sure that the following lines are identical in your config file, without leading # char:
ATALK_NAME=EDMini
CNID_METAD_RUN=yes
AFPD_RUN=yes
AFPD_MAX_CLIENTS=20
opt: AFPD_UAMLIST="-U uams_randnum.so,uams_dhx.so,uams_dhx2.so"
AFPD_GUEST=nobody
ATALKD_RUN=no
PAPD_RUN=no
TIMELORD_RUN=no
A2BOOT_RUN=no
ATALK_BGROUND=no


11) start netatalk and setup automatic startup.
Code:
/etc/init.d/netatalk start
update-rc.d netatalk defaults


Next install and setup Avahi for your server to be advertised on the network.
For this follow another great guide (jump to step 5). http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/

That’s it!
Sorry for the long post and hope you too can enjoy this old box still serving for Time machine.


Top
 Profile  
 
PostPosted: Wed Sep 26, 2012 7:52 pm 
Offline

Joined: Wed Sep 26, 2012 7:30 pm
Posts: 5
Hello!

After replacing my harddrive in my EDMini, thanks to the great wiki page for the partitions, I've been trying to follow this guide to get the EDMini to work again with OSX Time Machine. Since the last post i guess some of the websites listed have gone down and some things have changed and i cant get everything to work. Maybe someone can give me a push in the right direction?

Thanks.


Top
 Profile  
 
PostPosted: Wed Sep 26, 2012 9:31 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5981
You forgot to tell where you got stuck.
All sites are there, except "http://malat.biz/cgi-bin/twiki/bin/view/Projects/", but fortunately you can find it in the google cache.

Further the Lenny repositories are deprecated, and you'll have to edit your sources.list to be able to install anything:
Code:
deb http://archive.debian.org/debian/ lenny main contrib non-free
deb-src http://archive.debian.org/debian/ lenny main contrib non-free


Top
 Profile  
 
PostPosted: Thu Sep 27, 2012 6:02 pm 
Offline

Joined: Wed Sep 26, 2012 7:30 pm
Posts: 5
Let me start by saying i dont really know a lot about unix and im learning allong the way

First thing i got stuck on was the clock and the power button, since the website was down. Figuring i wouldnt need them to get it to work, i skipped on to the installs. I found in google that i had to edit the repository list so that went pretty well. I'm now stuck on the avahi part. I followed the guide and at the end when im doing the restart i get:

avahi-daemonTimeout reached while wating for return value
Could not receive return value from daemon process.

I looked over the guide again to see if i missed something but couldnt find anything that i missed. Also i was wondering what you would recommend for the size of the USB pendrive. I started out with a 1Gb, but thats filling up pretty fast.

Thanks for the help.


Top
 Profile  
 
PostPosted: Thu Sep 27, 2012 6:49 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5981
martijnh wrote:
Let me start by saying i dont really know a lot about unix and im learning allong the way
That's good.
Quote:
avahi-daemonTimeout reached while wating for return valueCould not receive return value from daemon process.
I *think* it is a dbus issue, but I'm not sure. In the directions I don't see anything about dbus, maybe you have to install it.
Quote:
Also i was wondering what you would recommend for the size of the USB pendrive. I started out with a 1Gb, but thats filling up pretty fast.
I'd say 1 GB should be enough to be able to boot. And of course there is no maximum size, when you install just anything you want.
Fortunately this is Linux, so you can easily put parts of your rootfs on harddisk. For instance /usr is not needed before the contents of fstab is mounted, so you can copy it to a directory on harddisk, and create a symlink to it. You only must make sure that the data partition is mounted by fstab.

BTW, it is possible that avahi and friends just work when you upgrade to Squeeze. The kernel is new enough for that. And if it screws things up, well, I suppose you can just rebuild your Lenny stick.


Top
 Profile  
 
PostPosted: Mon Oct 01, 2012 6:44 pm 
Offline

Joined: Wed Sep 26, 2012 7:30 pm
Posts: 5
I checked if there was a problem with the dbus, but it said everything should be ok. I went trough the whole process again to see if i might have missed something and i did notice some errors on the installs of the avahi.

I'm trying to upgrade to squeeze following your link, but i was wondering wich image to choose. These are the images found:

linux-image-2.6.32-5-iop32x - Linux 2.6.32 for IOP32x
linux-image-2.6.32-5-ixp4xx - Linux 2.6.32 for IXP4xx
linux-image-2.6.32-5-kirkwood - Linux 2.6.32 for Marvell Kirkwood
linux-image-2.6.32-5-orion5x - Linux 2.6.32 for Marvell Orion
linux-image-2.6.32-5-versatile - Linux 2.6.32 for Versatile

Also the guide mentions grub, but this command doesnt work, since the update-grub command is not found?


Top
 Profile  
 
PostPosted: Mon Oct 01, 2012 7:41 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5981
Oh sorry. It's obvious to me that you cannot/need not to upgrade the kernel, and the edmini doesn't use grub. But I shouldn't expect that to be obvious to everyone. You can skip everthing kernel and grub related.

BTW, the Edmini has an O 8-) rion SoC, so *if* you would like to upgrade it you should use that kernel. But to be honest I have no idea if the Debian stock kernel supports an Edmini V2, and you certainly can't install it using apt, due to the unorthodox way to boot it.


Top
 Profile  
 
PostPosted: Thu Oct 04, 2012 5:55 pm 
Offline

Joined: Wed Sep 26, 2012 7:30 pm
Posts: 5
I was just following the guide :)

I did all the installs again after changing the repository to squeeze and doing the update, but the still getting the same error on the avahi daemon.


Top
 Profile  
 
PostPosted: Fri Oct 05, 2012 3:52 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5981
When you know the exact startline of avahi (it should be possible to find that in the startscript), you could use strace to find out what's going on. Maybe.

Install strace, and run
Code:
strace -o /tmp/avahi.log commandline-of-avahi
This will give a huge file /tmp/avahi.log, containing all system calls, with their arguments.


Top
 Profile  
 
PostPosted: Sun Oct 07, 2012 4:18 pm 
Offline

Joined: Wed Sep 26, 2012 7:30 pm
Posts: 5
I've tried it, but its all gibberish to me.

I think i'm throwing in the towel. I'll first put some more time into debian in general then getting this to work. Thanks for the help though!


Top
 Profile  
 
PostPosted: Wed Jan 02, 2013 12:57 am 
Offline

Joined: Wed Aug 03, 2011 1:00 pm
Posts: 4
Hello!

Avahi is really not required for afp (netatalk) to work. It only advertises the services available on the server (EDmini).
If you installed and configured netatalk, you should be able to connect to your shares using [Cmd]-K on the Mac. input afp://your.EDmini.IP.address on the server address box.

I had no issues with Avahi once netatalk was running. Here are the steps I used to install and configure it:

1) apt-get install avahi-daemon
2) apt-get install libnss-mdns
3) nano /etc/nsswitch.conf
Add mdns to the end of the following line:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns

4) nano /etc/avahi/services/afpd.service
file content should be the following text following text:
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
</service-group>


5) nano /etc/avahi/services/device-info.service
file content should be the following text:
<?xml version="1.0" standalone="no"?><!--*-nxml-*-->
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=RackMac</txt-record>
</service>
</service-group>


6) /etc/init.d/avahi-daemon restart
Done.

BTW, I am still on Lenny and it's working fine.
With regards to netatalk, I later ran into issues with Lion complaining about corrupt cnid database. Googled for advice and changed from cdb to dbd. Apparently it's fixed.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group