Skip to content

Instantly share code, notes, and snippets.

Created June 9, 2018 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxgalbu/840a3ddec21e386c1947490498804805 to your computer and use it in GitHub Desktop.
Save maxgalbu/840a3ddec21e386c1947490498804805 to your computer and use it in GitHub Desktop.

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 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
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

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

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 (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:

tar xvzf logmein-hamachi-
cd logmein-hamachi-
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