We are all living in a technological wasteland.


Slitaz project – Expansion – Part 2 – FTP Server

This FTP machine will get the ip Still remember the ip script? Let’s make a call and reboot the server.

/home/base/ip.sh ftp 192.168.1 241 1

Now install the server and clean the cache.

tazpkg get-install pure-ftpd
tazpkg clean-cache

Once pureftpd is installed you will need to create the correct user for this. In this case I will use ftpgroup and ftpuser.

addgroup -S ftpgroup
adduser -SH ftpuser -G ftpgroup

Tip: to verify if the accounts exist cat the group and passwd file. If they mention ‘ftpgroup’ and ‘ftpuser’, everything is fine.

cat /etc/passwd 
cat /etc/group

So once the unix user is made, create the sub user(contributor in this case) in ‘/home/ftpusers’ and change the owner of the contributor map to ftpuser.

mkdir /home/ftpusers
mkdir /home/ftpusers/contributor
chown ftpuser -R /home/ftpusers/contributor

Now add ad new contributor user to ftpd and assign the unix user of this ftp user to ftpuser

pure-pw useradd contributor -u ftpuser -d /home/ftpusers/contributor
pure-pw mkdb

To verify if the user exists you can write:

pure-pw show contributor

You can see that this user operates under the ftpuser/ftpgroup.

root@base:/# pure-pw show contributor
Login              : contributor
Password           : $1$yljZ5iF0$RSfbAJ4ZDtyAQtjOYSKwg.
UID                : 100 (ftpuser)
GID                : 101 (ftpgroup)
Directory          : /home/ftpusers/contributor/./
Full name          :
Download bandwidth : 0 Kb (unlimited)
Upload   bandwidth : 0 Kb (unlimited)
Max files          : 0 (unlimited)
Max size           : 0 Mb (unlimited)
Ratio              : 0:0 (unlimited:unlimited)
Allowed local  IPs :
Denied  local  IPs :
Allowed client IPs :
Denied  client IPs :
Time restrictions  : 0000-0000 (unlimited)
Max sim sessions   : 0 (unlimited)

Now the user is done, create the startup script. First assign the service to load during startup. This can be done in the rcS.conf file.

nano /etc/rcS.conf
RUN_DAEMONS="dbus hald slim firewall dropbear lighttpd pure-ftpd"

Once this is done edit the daemons file to add the options that will be added to the service.

nano /etc/daemons.conf
# Pure FTPd
PUREFTPD_OPTIONS="-4 -H -A -B -j -l puredb:/etc/pureftpd.pdb"

Once this is done, edit the /etc/init.d/pure-ftp file. This is the service start file. Apparently there is a fuckup in this file as the pure-ftpd service isn’t like the others. It didn’t contain daemon options and everything is just in the startup script. And I don’t like that >:(. So let’s change it.

nano /etc/init.d/pure-ftpd

Find this line:

OPTIONS="-4 -H -A -B"

and replace it with:


Voila FTP server is done, now reboot the machine and see if the service is running once you reboot:

ps | grep -i pure-ftpd
root@base:~# ps | grep -i pure-ftpd
 1392 root       0:00 pure-ftpd (SERVER)
 1436 root       0:00 grep -i pure-ftpd

If everything is running you should be able to connect to ftp://contributor@ with windows (or FileZilla, whatever client you are using.)

That’s it, below is the download link for this small tutorial:
ftp.7z (12,4 MB)

No Comments |

Shrinking VMWare Images

Sometimes it’s possible that VMWare images become quite large, this is completely normal as files are added and deleted. Usually this isn’t such a problem on machines which are running constantly. But when you need to transfer disk images trough the net, or store disk files every byte sometimes counts.

As an experiment I’ve shrunk the disk images from the Slitaz project.


First enter the os you wish to shrink and zerofill the disk images.

dd if=/dev/zero of=/home/base/wipe.file
rm /home/base/wipe.file

If there are additional storage locations mounted by added disks, then create a zero image there too. The Gluster nodes uses ‘/mnt/data/’ and the mysql uses ‘/var/lib/mysql/’.

Then shutdown the machine and run a command line from your host system.

cd "c:\Program Files (x86)\VMware\VMware Workstation"

Once you are in the folder use the vmware-vdiskmanager to decrease the vmdk files:

vmware-vdiskmanager.exe -k "drag vmdk file here"


mysql.7z             old: 45.6 MB         new: 20.7 MB        saved: 55%
glusternodes.7z      old: 254 MB          new: 165 MB         saved: 35%
glusterclient.7z     old: 78.7 MB         new: 50.9 MB        saved: 35%
webnodes.7z          old: 253 MB          new: 159 MB         saved: 37%
loadbalancers.7z     old: 124 MB          new: 67.1 MB        saved: 46%

The results are clearly astonishing. The lowest space decrease is 35% while the biggest one is 55% of space saved. In total I’ve decreased the file size on my webhost by 292.6 MB! That’s enough.


No Comments |

Bitcoin mining – Xubuntu 32-bit, cgminer and icarus support.


So recently I’ve started ASIC bitcoin mining and I’ve ordered some block eruptors (icarus protocl) and I have a spare ASUS EEE device lying around with 3 USB ports.  Ideal for mining, low power, small and silent. However it’s a 32-bit device and cgminer isn’t built for this :(.

Time to take matters in our own hands.

Installing Xubuntu on the ASUS EEE-PC

Xubuntu, it’s a clear choice for this EEE-PC. Light, versatile, a lot of packages! You can get it here: http://xubuntu.org/

Install is pretty straightforward, I won’t cover this here.

Installing openssh

I like my installations to come with a openssh server. Just to see what’s going on. (For a web based stats page with phpSysInfo, see my tutorials on Slitaz)

sudo apt-get update
sudo apt-get install openssh-server

Compiling and installing cgminer

The problem with cgminer is that I can’t find it pre compiled for 32 bit, and the usblib it uses is pretty non standard. So grabbing the usblib found in ubuntu won’t work.

First make sure you have all the latest packages installed, and grab the dependencies to compile cgminer.

sudo apt-get upgrade
sudo apt-get install libcurl4-openssl-dev ncurses-dev libudev-dev

Now, let’s download a version of cgminer and an old usblib which will work and unzip the files.

cd /home/enira/
wget https://github.com/kanoi/cgminer-binaries/blob/master/libusb-1.0.16-rc10.tar.bz2?raw=true -O libusb-1.0.16-rc10.tar.bz2
wget http://ck.kolivas.org/apps/cgminer/3.4/cgminer-3.4.0.tar.bz2
tar -xvjf libusb-1.0.16-rc10.tar.bz2
tar -xvjf cgminer-3.4.0.tar.bz2

Now copy libusb to the cgminer folder and compile it.

mkdir ./cgminer-3.4.0/libusb
cp -R libusb-1.0.16-rc10 ./cgminer-3.4.0/libusb
cd /home/enira/cgminer-3.4.0/libusb/libusb-1.0.16-rc10/

Then compile cgminer.

cd /home/enira/cgminer-3.4.0/
LIBUSB_CFLAGS="-I./libusb/libusb-1.0.16-rc10/libusb" LIBUSB_LIBS="./libusb/libusb-1.0.16-rc10/libusb/.libs/libusb-1.0.a -ludev -lrt" CFLAGS="-g -W -Wall" ./configure --enable-bflsc --enable-icarus --enable-bitforce --enable-modminer --enable-ztex --enable-avalon

The output should look like this:

cgminer 3.4.0
Configuration Options Summary:
curses.TUI...........: FOUND: -lncurses
OpenCL...............: NOT FOUND. GPU mining support DISABLED
scrypt...............: Disabled (needs OpenCL)
ADL..................: SDK NOT found, GPU monitoring support DISABLED
Avalon.ASICs.........: Enabled
BFL.ASICs............: Enabled
BitForce.FPGAs.......: Enabled
Icarus.FPGAs.........: Enabled
ModMiner.FPGAs.......: Enabled
Ztex.FPGAs...........: Enabled
Compilation............: make (or gmake)
CFLAGS...............: -g -W -Wall -I./libusb/libusb-1.0.16-rc10/libusb
LDFLAGS..............: -lpthread
LDADD................: -lcurl compat/jansson/libjansson.a -lpthread -lm ./libusb/libusb-1.0.16-rc10/libusb/.libs/libusb-1.0.a -ludev -lrt
Installation...........: make install (as root if needed, with 'su' or 'sudo')
prefix...............: /usr/local


And make the file:


Once this is done create your miner script, I created mine in my user dir.

nano /home/enira/mine_bitcoins.sh
cd /home/enira/cgminer-3.4.0/
./cgminer -o stratum+tcp://mint.bitminter.com:3333 -u uuu -p ppp

And assign rights:

chmod +x /home/enira/mine_bitcoins.sh

Now install an xrdp so you can get a remote desktop and go nuts!

sudo apt-get install xrdp
echo xfce4-session > ~/.xsession

That’s all there is to it.

No Comments |