Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

This tutorial assumes you know how vim works. Please google for it. If it turns out too hard for too many i'll write the commands to use it here. To get this to work, the easiest way was to install a debian chroot. This means you're basicly running a debian environment on your qnap.

The chroot setup tutorial is based on nemozny wonderful tutorial on http://forum.qnap.com/viewtopic.php?f=91&t=20174&p=223728 I had to modify some steps of this tutorial as this will be harmful to your qnap if you do it as listed there. This is due to /opt/ that is mounted on a 32 mb ramfs, and not your harddisk. You'll just run out of space, and ipkg's will mess up. So i copied the full tutorial here with the needed modifications:

I made a share called "Storage" on my harddrive. You could name it anything you want. Just modify the paths accordingly.

Make sure you have the ipkg package manager installed from the config website under qpkg packages. Then login with ssh.

ipkg install coreutils
ipkg install binutils
ipkg install perl
ipkg install xz-utils

mkdir /share/Storage/debootstrap
cd /share/Storage/debootstrap

wget -c http://ftp.nl.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.26%2Bsqueeze1_all.deb
tar -xf debootstrap_1.0.26+squeeze1_all.deb
tar xvzf data.tar.gz

Now edit the following file:

vim ./usr/sbin/debootstrap

On line 16, edit the DEBOOTSTRAP_DIR to look like this (make sure it matches your path)

if [ -x /debootstrap/debootstrap ]; then
        DEBOOTSTRAP_DIR=/debootstrap
else
        DEBOOTSTRAP_DIR=/share/Storage/debootstrap/usr/share/debootstrap
fi

Now edit the following file:

vim ./usr/share/debootstrap/functions

replace every /usr/bin/perl with /opt/bin/perl

Save the file.

mkdir /share/Storage/debian
./usr/sbin/debootstrap -arch armel squeeze /share/Storage/debian http://ftp.nl.debian.org/debian

Now go make some coffee or grab a beer or something. This will take a long while.

When it's done:

mount -o bind /dev/ /share/Storage/debian/dev
mount -o /proc/ /share/Storage/debian/proc
chroot /share/Storage/debian /bin/bash

If everything went right, your command prompt should now look like:

[\w] #

You're now running debian!

apt-get install lsb-core

This will ask you if it can install 200 something MB of stuff. Press Y. Then press Y again to accept unsigned packages.

Now you can download hamachi from https://secure.logmein.com/US/labs/ (pick the armel version). You may need to check the version on this webpage and copy the link from there to use with the commands below:

wget https://secure.logmein.com/labs/logmein-hamachi-2.1.0.68-armel.tgz
tar xvzf logmein-hamachi-2.1.0.68-armel.tgz
cd logmein-hamachi-2.1.0.68-armel
./install.sh
insmod /mnt/ext/usr/local/modules/tun.ko
/etc/init.d/logmein-hamachi start
hamachi login

Now hamachi should be logged in. Use hamachi help to see what your options are. I am an account user so i used:

hamachi attach myaccountname

And then i accepted the new client on the hamachi site. Everything works as expected now. Have fun! Questions? Ask away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment