This blog is migrating

January 7, 2009

I’m going to migrate this blog on my own server. All future comments should be made there.

The new URL is:


Bashload – Rapidshare download script

November 3, 2008

I wrote a little script that is able to download files from Rapidshare, you can provide the urls via the command line or through the path to files the contain a list of urls(one url per line).

There are already scripts that do this, though most of them require certain perl modules or like tuxload they need a perl version that has threads enabled, this is not always the case, e.g. for embedded devices. This script only uses standard unix tools, like bash, wget grep etc.

I haven’t had time to test it thoroughly, I would like you to report any problems. Furthermore if you know how to write bash scripts you could implement other 1-click hoster, and provide the source.(you can add other hosters to bashload easly)

It can be downloaded here.

Buffalo Linkstation Pro Duo

November 1, 2008

My Linkstation Pro Duo arrived yesterday. So what is this thing? Basically it is a NAS, that meens storage provided via a computer network. It has two harddrives that can be configured as software RAID, either 0 or 1. The operating system is Linux(is there a device linux is not capable of running on?^^), what makes it flexible like hell, at least after you gained shell access. In the following lines I will describe the things I struggled with and how I configured the device. I’m planning to use it for:

  • Backups via the network
  • share storage in a heterogeneous network (WinXP, Vista and Ubuntu machines in it)
  • store data
  • downloading things without being forced to turn a “real” machine on, e.g. the DVD of the distribution of my choice during the night
  • I probably can’t resist running a web server on it accessible via dyndns

On other NAS from buffalo you can use a debian-like linux called freelink, though this is not yet ready for the Duo version of the Linkstation pro. Therefore I used the stock version and customized it.

The Web Interface is quite good, there are many things you can do via it, though having shell access invaluable. Therefore the first thing to do is gaining access via the shell. A good guide to do so can be found here. installing the addons.tar is not a bad idea, it will give you the executable of wget, which will be needed a lot. I prefer logging in via public key authentication over the old password method. To enabled it you have to uncomment the following lines in /etc/sshd_config:

PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys

Now copy the key of the client to the server, if you have not yet created one you can do this with:

ssh-keygen -t dsa

now copy it to the machine

ssh-copy-id -i ~/.ssh/ root@

The permissions of the dir /root where odd, which caused failures with the pub key auth. therefore I changed them with

chown root:root /root

From your favorite linux distribution you know that thing called “package manager” which eases the management of software on your computer. There is a package manager designed especially for embedded devices called ipkg. You can install it with some bootstrapping script. How to do so is described here.

There is a default samba share called info, this can be disabled by adding those lines:

cp /etc/samba/smb.conf /etc/samba/smb.orig
sed '/^\[info\]/,/guest ok = yes/d ; /^###info###/d' /etc/samba/smb.orig > /etc/samba/smb.conf

at the end of the configure() method in /etc/init.d/

ok enough for now,


Ubuntu Intrepid Ibex near

October 13, 2008

At the end of the month the new version of Ubuntu, 8.10, called Intrepid Ibex, will be released. We have reached the last phases in the Release Schedule. The Feature Freeze is active, this means that there will be no new packages added, instead everyone is concentrating on fixing existing bugs. The beta is out already, anyone interested can test it right now. The more will test it, the more bugs are reported and the better the release will be. Therefore get it while it’s hot. The system boots directly from the CD, you don’t have to install it. The available versions can be found here.
The new release has quite some new features:

  • Kernel 2.6.27, which was released just recently
  • Xorg 7.4
  • encrypted ~/Private directory, mounted automatically on login
  • Gimp 2.6
  • Nautilus has a new way of displaying files: Compact View, which arranges the items in columns
  • Guest User, which restricted rights
  • Kubuntu uses KDE 4.1 as default
  • KWin is enabled by default, it enables desktop effects, similar to compiz, though for KDE
  • Adept has been ported to KDE4
  • … and some more
  • I’m awaiting the Private folder the most, it’s a good compromise between encrypting the whole harddisk and leaving sensitive data unencrypted, especially for notebook users. You can just symlink certain files from the Private folder to their old location.
    The switch to KDE4 is in my eyes a little to early. KDE4 is pretty stable in the current state, though it doesn’t seem to be completely ready for a complete switch. Not everything is working perfectly together. And there are quite some programs that aren’t ported to the new version of KDE yet. Tough if KDE4 improves a little it will be quite tempting. I am thinking of moving to KDE in the near future.
    Currently I’m a little annoyed of GNOME and the support of two screens, when using 2 differen xscreens and no Xinerama. Windows are often opened on the wrong screen. Even things that worked back than in 2.22.
    Nevertheless I’m looking forward to the release of Intrepid, as many bugs have been fixed and some interesting features will be added. Now go and test it and report bugs and wishes to the Launchpad.
    Ubuntu 8.10 - Coming October 30!

    gnome panel applet: Network Mon

    July 14, 2008

    I have written a little panel applet for the GNOME Panel that shows your current network traffic in plain text. You can choose one or more of your network interfaces and a adequate speed unit, as you desire.

    Here a screenshot:

    A tarball can be downloaded here: download
    The CVS source code can be browsed here.

    It’s being released under the GPL, so feel free to change and redistribute.

    Please test, comment,enhance, redistribute … 😀

    Acer 5920g Wireless LED Ubuntu 8.04

    June 10, 2008

    The Wireless LED wasn’t working with Ubuntu 8.04 until I did this:

    sudo apt-get install linux-backports-modules-hardy
    sudo rmmod iwl4965; sudo modprobe iwl4965

    Now it lights solid if wireless is turned on. Under Windows its kind of blinking on network traffic, this is not the case here, though I personally prefer it to light solid.

    installing X-Wrt

    June 8, 2008

    The approach of OpenWrt(especially compared to DD-Wrt) is more like offering a basic system which can be highly customized, which is the approach I prefer. The standard web interface has limited functionality. X-Wrt is a seperate project that tries to provide a nice user interface, which nearly makes it unnecessary to use the shell, you can configure many things, install/remove packages,  traverse the file system, and you are able to e.g. analyze traffic trough same fancy graphs. And it is pretty easy to install, too. Making the shell obsolete is not my intention tough, as there are many things that can be done with the shell way easier than with some nice looking GUI.

    There are different ways to install X-Wrt, I choose the one over ssh.

    Connect to your router (note: routerIP being the IP of your router, e.g. ):

    ssh root@routerIP

    After that add a new source to your /etc/ipkg.conf:

    echo “src X-Wrt” >> /etc/ipkg.conf

    Now use ipkg to install the X-Wrt package:

    ipkg install

    This pretty much was it. After a reboot of your router, the Webif² should be display in your browser.(type in your router’s IP in the address bar of course)

    the http daemon of OpenWrt doesn’t support a https connection. The root passwort will therefore be transmitted in plain text, which isn’t a clever idea when accessing your router over wlan.

    A straightforward solution is:

    ssh -L 5000:localhost:80 root@ being the router’s IP.

    Now type in the browsers bar: localhost:5000

    All information is now tunneled through ssh. Windows users can use Putty for this behavior.

    Now go and enjoy your new graphs!


    SD Card on OpenWrt

    June 8, 2008

    I recently switched to OpenWrt, as I had some problems with DD-Wrt and more important I just wanted to try it out. The change was pretty seamless, as most nvram variables are shared and therefore I didn’t even have to change much for the router to work correctly. If you don’t plan to go back to DD-WRT this script cleans up your nvram variables.(deleting those that aren’t used by OpenWrt)

    Now you need to download the MMC Card module:

    cd /lib/modules/2.4.30


    See comments for an alternative link, if the one above doesn’t work.

    Your card should be formated with ext2. The drivers for the ext2 filesystem are needed, too. They can be installed via a ipkg package:

    ipkg update
    ipkg install kmod-ext2

    insmod ext2

    Now you can test if the card works:

    echo “0x9c” > /proc/diag/gpiomask
    insmod mmc

    mount /dev/mmc/disc0/part1 /mmc

    Note: The gpiomask fits to the modification I described in the post below, adapt it corrosponding to your modification.

    When I used DD-WRT my card was mounted under /mmc. Installing software in that mount-point caused same problems, hence I decided to mount the SD-Card to the root directory in OpenWRT. This enhances your available memory very seamlessly. Furthermore it would be possibly to have differend SD-cards containing different configurations of OpenWRT. If no card is attached the system will start in the normal behavior. First the needed files will be copied to the card:

    mkdir /tmp/root
    mount -o bind /rom /tmp/root
    mount -o bind / /tmp/root
    cp /tmp/root/* /mmc -a

    /sbin/init is a link to the busy box init. This will be replaced with our own init script which will do the work for mounting the card to / and after that execute the init of busy box.

    rm /sbin/init

    This is the new init script(copy paste it to /sbin/init), after that make i executable(chmod +x /sbin/init)

    echo “0x9c” > /proc/diag/gpiomask
    insmod mmc
    insmod ext2

    sleep 15s
    mount “$boot_dev” /mmc
    [ -x /mmc/sbin/init ] && {
    mount -o move /proc /mmc/proc && \
    pivot_root /mmc /mmc/mmc && {
    mount -o move /mmc/dev /dev
    mount -o move /mmc/tmp /tmp
    mount -o move /mmc/jffs2 /jffs2 2>&-
    mount -o move /mmc/sys /sys 2>&-
    exec /bin/busybox init

    Now reboot. run


    to test  if it works correctly. If the router doens’t boot or something doesn’t work as intended you can remove the card an everything should be just like before.

    xubuntu on usb stick

    May 30, 2008

    Only a few steps are needed to install a complete *ubuntu on an usb stick. I have coosen Xubuntu because I have never tested Xfce before and more important I thought a lightwight distribution would be a good idea for an usb stick. A detailed description can be found here:

    It’s pretty easy, no special linux skills are needed, just double check which device you are formatting 😉

    If you plan to use some part of the stick for other stuff, both on linux and on windows, keep in mind that windows got problems with partitions on removable media. Therefor the partition for random stuff has to be the first. (and fat formated of course )

    WRT54GL SD-Card Mod

    May 17, 2008

    Does your router lack some space, too? At least mine did, therefore I attached a SD-card, resulting in 1gig of new fancy space.  It’s a pretty easy mod if you have decent soldering skills. First what materials do you need?

    • up to 1 gig SD/MMC card
    • soldering rod, soldering tin, (soldering skills) and some isolated wire etc.
    • SD card socket
    • Router, for me it is a WRT54Gl v 1.1 from Linksys on which I run ddwrt.

    The SD card socket is optional, the SD card can be soldered directly, but then it’s not that easy to exchange the card. My socket is from my old mp3 player, a other possibility is a SD card reader.

    Opening the device is a hard task, all the advices on the internet didn’t work for me.

    Push where you can see the red dots and then pull down the blue front cover. Maybe you need help from someone. For my the pushing method did not work, therefor I used a screwdriver to remove the front cover.

    Now it comes to the soldering part. Where to solder which wires can be viewed on the next picture:

    You will need the colors when soldering the socket, what is what you will be doing probably now:

    Now solder the corresponding wires, the sixth and the third pin are both on ground and have to be connected. After that you might want to test if everything is working. I use ddwrt 2.4 where everything works just out of the box. First format the SD card, this can be done with the “mke2fs” command in Linux, you can do it with the router too, but thats way slower. The format will be ext2, don’t ask me how do achive this under Windows, you have to googlesearch that. Now just log into the Web GUI, click on “Administration”, and scroll down to “MMC/SD Card Support”.

    The picture shows the correct settings. After a reboot go to the status tab. Your card should be listed under “Space Usage”, otherwise something didn’t work. The last step is making a slot in the casing. I made it with a drill. Here the final pictures:

    Links: (German)