Archive for the ‘linux’ Category

The surprising truth about what motivates us

Every now and then I come back to this video, and it really makes me appreciate my time.

[embedplusvideo height="281" width="450" standard="" vars="ytid=u6XAPnuFjJc&width=450&height=281&start=&stop=&rs=w&hd=0&autoplay=0&react=1&chapters=&notes=" id="ep9930" /]


Raspberry Pi battery pack

My rasberry is working great, but it lacks some thing that I apperently need – mobility.

It’s mostly connected to network over WiFi so portable battery pack is next step for achiving raspbery greatness :)

I bought Duracell Travel Charger  with 1800mAh capacity and with minimal load, battery could charge Raspberry a little over 3 hours:

21:21:01 up  3:01,  1 user,  load average: 0.05, 0.03, 0.05

All in all, it’s pretty bad :(

Next on my todo list is to check battery on high load usage…



Fast partition layout copy

For some time now I have disks failing of RAID on  daily basic on my server provider. The worst thing is that after reboot disk is gone. Gone as in “we need to replace this disk with new one”. For syncing parition layout on new disk I am using sfdisk - Partition table manipulator for Linux.  It’s just a really quick way (among other things)  to recreate partition layout of other disk.

Dump partition layout to file:  sfdisk -d /dev/sdX > partlayout

Restore partition layout on new disk:  sfdisk /dev/sdY  < partlayout





Raspberry files

Last week my Raspberry PI finally arrived after 6 long and impatient weeks…

First thing first (after ripping open package) – Rasp  needs  SD card to boot, so I managed to found one that is reasonably cheep and fast with 16 GB of storage.  Of course my main distribution on Rasp is Raspbian, so after a short time (image download, copy to card) I had working Raspberry PI (connected via HDMI cable to my monitor) that was booting up…

 So what to do with it ? I tried several things:

1. Play HD movie – works like a charm

2. Use is as torrent box  with external disk :)

3. Sniffing WiFi  in my neighbourhood  via usb network dongle (kismet, airodump).

4. Use it as network bridge with serveral network attached.

5. Run n2n, and forward some port to it to get web out. – this connection will drop when I move my raspberry pi from network. (connection is forwarded over n2n to my slow dsl line @home )

6. Run mpd and use it as media centar (will try xbmc later).

7. Use it as network sniffer *evil grin*

All in all it’s surprisingly good and effective peace of hardware, and yes, I am planing to buy at least few more!

recommended links:



Port forwarding from one address to another with socat

Few days ago, working on some project, I needed  to  forward external port  to amazon MySQL server accessible only over vpn host.

Fast and easy solution ? – socat

It was easy as: “socat TCP4-LISTEN:3306,fork TCP4:ip_of_amazon_server:3306″

Or for debugging purposes you can use it with: socat  -d -d -d -lf socat.log  TCP4-LISTEN:3306,fork TCP4:ip_of_server:3306″


socat readme:

socat man:

socat examples:


















28c3 lecture mirror

We are mirroring all the past lectures from 28th Chaos Communication Congress.

You can find them on:



Faulty disk in RAID5

If you find yourself in this kind of situation:






Don’t worry, in most situations this few easy steps might help you (they helped me in most cases).

First, you need to remove faulty drive from RAID:



Check if drive is really removed from RAID with mdadm -D /dev/[raid_device]





Then add drive again to RAID:




Check if rebuilding of RAID really started with mdadm -D /dev/[raid_device]





You can check how long rebuild will last:




That’s it!

Late DebConf11 Report

DebConf 11 was one great experience for nestabilni team. We had really great time, meet a lot of new and interesting people and especially had fun and learned a lot from great Debian people.

We would like to thank all the people that made that huge happening, and especially our dear friend Adnan Hodžić.


Few pics:


OpenVZ ntpdate – Operation not permitted


Some of OpenVZ containers, on servers that I manage, had problems with wrong date being displayed. Well, no big deal, I can just issue good old ntpdate command. Or not.

ntpdate[22082]: Can't adjust the time of day: Operation not permitted


On HW host:

/usr/sbin/vzctl stop  <ctid>

 /usr/sbin/vzctl set <ctid>  —-capability sys_time:on  —-save

/usr/sbin/vzctl start  <ctid>

Check if everything is working now:

ntpdate[3238]: adjust time server offset -0.142383 sec

Tunnels trough DreamBoxes

Some time ago I had small lecture on FSEC about tunnelling trough Dreambox .  Slides from this lecture can be found here.

Return top


Nestabilni corp. accepts no liability for the content of this web page, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Any views or opinions presented in this web page are solely those of the author and do not necessarily represent those of the Nestabilni corp.