Archive for the “Linux” Category

When you need to configure multiple servers it’s always good to look at some configuration management software like Puppet of Chef. But there is a new kid in town and it looks promissing. I’ve played around with Ansible a bit to setup a complex network configration on 5 blade servers running a CentOS minimal. I mentioned this last weekend to Fabian Arrotin last weekend at FOSDEM and he told me to put that info online. So here it is!

Read the rest of this entry »

Post to Twitter

Comments 11 Comments »

A few months back I already discussed on a forum the possibility to use a linux based router to be able to use your Amino STB and htpc at the same time. This weekend I finally had some time to play around with dd-wrt, and within a hour or two, I already got it working.

The main problem was the DHCP request to the IPTV Network. When using a windows htpc, you must let the STB to the DHCP request, and then spoof the MAC address, and copy the ip of the STB to your windows network configuration. But when your STB receives a new ip-address, your windows htpc does not work anymore.

When using linux, it would be possible to spoof the MAC address, and change the DHCP request on linux, so your linux htpc will retrieve a correct ip address, and iptv can be used on the linux htpc. This works without any issues on my linux htpc for months now. But with this setup, you can’t use the STB anymore.

So with my new setup, it should all be possible. Setting up a dd-wrt router, which retrieves a ip-address through a DHCP request with a Amino vendor class option. Then the STB and linux htpc can request a ip-address throught DHCP from the dd-wrt router. The dd-wrt router is using an igmp proxy to let multicast flow between the IPTV network and the network of the STB and htpc. And it all works together very nicely.

I still see a maximum of 5 IPTV streams in the XMS network. I started with one HD stream on the STB. dd-wrt was showing around 14mbps on the WAN and LAN side. Then I started recording a few HD streams on the linux htpc. When I had a total of 5 HD streams (1 on the STB, and 4 on the linux STB), I saw a total of 66.5 mbps on the WAN and LAN side of the dd-wrt router. When starting a fifth recording on the htpc, I saw no change in the used bandwidth of the WAN or LAN side of the dd-wrt router. On the linux htpc, I only saw a black screen. When I put the STB in standby mode with the remote control, I saw the bandwidth drop to around 52 mbps for a few seconds and then come back to 66 mbps, and suddenly the stream on the linux htpc started playing. This proofs to me that the IPTV network has some kind of limit of 5 IPTV streams. I don’t know if this is a maximum per MAC / IP address or a maximum per fiber connection.

In my new setup if appears that the STB and my linux htpc can easily be used at the same time without conflicting each other or giving any other problems. It should also be possible to use a windows htpc, but I don’t have a windows htpc, so I could not test it. To see more information how to set this up see my IPTV Router page.

Post to Twitter

Comments No Comments »

Since a few weeks, I can record tv programs in HD quality (1080i), but unfortunately my htpc isn’t powerfull enough to play these HD recordings. I currently have a nVidia GeForce 7300LE video card. Which is good enough for SD quality video’s but not for HD. So I ordered online the XFX nVidia GeForce GT 220. This card supports VDPAU, which should let me play video’s in HD quality with only 5-10% CPU load. MythTV also has support for VDPAU. The card also has a HDMI output, so I can really watch the recordings in HD quality with 5.1 sound in a few days.

Post to Twitter

Comments 2 Comments »

Yes… Mesa Happy (think Jar-Jar from star wars…)

I just managed to setup my mythtv media pc with the new iprecorder functionality to record up to *5* streams of iptv receiving from our local fiber optic tv supplier (XMS). Time for a little party 🙂

Since a few months I have a fiber optic connection to my home, the so called Zeewolde op Glasvezel project. The fiber optic is brought all the way into the house and connected to a Genexis modem. This modem seems to have one fiber optic entering the case from the bottom. But this actually consist of two very tiny fibers. One fiber is for all digital data in _and_ out. This is your internet, digital tv, telephone. The second fiber is a one-way fiber with the 40 analogue tv channels and a few radio stations (don’t know how much). This brings me to the other ports of the modem. It has one coaxial output with the 40 analogue tv channels and radio stations. This can be used for any ordinary tv, video recorder or analogue tv-card in a pc. Because all data of the tv channels and radio stations are broadcasted over this coax cable, the coax cable can be splitted with special tv/radio splitters, so you can watch different channels on multiple devices at the same time. Back to the modem. The modem also has two rj11 connectors (t1 and t2) for analogue telephones. And there are four rj45 connectors (m1 til m4). The m1 connector provides an internet connection when connected to one pc or a router when you have multple pc’s behind the router. The m2 connector provides digital tv and must be connected to a settopbox. In this case a Amino Aminet 130m (with hdmi output). This settopbox is running Linux inside with a opera browser. The tv signal is requested through an ip-connection and broadcasted with multicast. More info over the how this works will be om my site. With the setup mentioned above, you can watch analogue tv on several tv’s. But with only one settopbox, you can only watch digital tv on one tv. It is possible to attach another settopbox, but the local supplier will only send you a non-hdtv settopbox as your second settopbox.

I use mythtv for about 6 years now. About 3 and a half years back (I think), I upgraded my mythbox with a Hauppaugt WinTV PVR-500 (dual tuner). This gave me the opportunity to record 2 shows at any time, while still using the tv to watch a third show. Although it’s long ago that I really watched something live (directly from tv or in mythtv), because we just record anything we want to see, and watch it, when it fits our time schedule 🙂 With the new fiber optic services, I can still record 2 shows at the same time through the analogue coax cable (and have a much better quality (less visual noise) compared to the tv signal from the local cable company UPC). But the settopbox has much more channels, around 160 channels (tv channels and radio stations). The aminet130m settopbox has a usb port. And some rumours on the internet say that it will be possible to attach an external usb drive to the aminet130m and have recording capabilities. But, this first has to be programmed into the firmware. This (I think) will not be available in the next months. besides that… I want my mythtv to do all the recording!

By doing a little traphic capturing between the settopbox and the modem, I managed to configure my linux pc with mythtv correctly, to watch the iptv streams on the media pc. Together with the iptvrecorder, which was added to mythtv somewhere in the last year, I am able to watch live TV. Then ramp it up a little, and finally had mythtv record 5 iptv streams (not hdtv) simultaneously. But I think there’s also a limit on the iptv supplier side, because my 6th stream was not working in mythtv. But 5 streams recorded at the same time should be sufficient enough 😎

More information about how I configured my linux pc and mythtv will be published on my site soon…

Post to Twitter

Comments 18 Comments »

Gigabyte M528 MID

Gigabyte M528 MID

Giga-byte is showing a new device on their website with the status ‘Coming Soon’. This is Linux-based MID (Mobile Internet Device) with a qwerty keyboard, Including an Esc key!!

So finally, it’s possible to ssh to a linux box and vim from almost anywhere on the planet (as long as there is  Wifi, GPRS or UMTS/HSDPA).

This is really a very neat device. It’s a bit bigger than the average smartphone, but still small enough to be very portable. (15,2 x 8 x 2,25 cm, 340g). It has a intel atom chip running at 800Mhz, 512MByte of memory and a 4GByte SSD for storage. The screen is a 4.8 inch touchscreen LCD display with 800×480 pixels. The device supports bluetooth (2.0), wifi (802.11b/g) and HSDPA UMTS and has an integrated GPS receiver. Besides a mini-usb port to connect it to for example you linux workstation, it also has a usb host port, to connect an external harddisk, usb webcam, scanner, printer, anything (as long as the software supports it). And ofcourse, If you slide the MID open, you will get a blacklight keyboard, with an ESC button.

The MID does not support voice calls, but maybe voip calls over umts will work also… Some sites mention that the linux OS is Ubuntu Mobile and that looks very good and usable. Ubuntu mobile comes with a browser based on Firefox 3, and open office. So what else do you need?

So now you know what’s on my wishlist for my next birthday 😉

Post to Twitter

Comments No Comments »

I’ve been using Mythtv for about 4 years now. And the motherboard is showing some failures now and then (rebooting in stead of shutdown), the disks are a bit full and playback of hdtv is not smooth.

So time for a new one!

Comments No Comments »

In the datacentre I have a Fedora 7 machine with IPMI capabilities. But I have to replace it with CentOS 5.

Hmm. I don’t really want to burn CentOS to a DVD, drive (aprox. 1 hour) to the data centre to reboot the server, place the CentOS installation DVD, run the installation, and drive back to the office. Because all other administration can be done remote through ssh.

So after some searching on the internet, I found a way to do a remote installation.
Thnx for the guys which placed their info online!
Hampus and Karanbir Singh

So how to start?

The server has two network cards. One attached directly to a switch connected to internet (eth1) and one attached to a seperate switch, which connects all servers in the rack on a private ip-range (eth0)

On the private ip-range I already have dhcp running (not for the servers, they have static ip-addressen, but to make life a bit easier. When I’m with my notebook in the datacentre, I can just plug in, and access all my server through the private lan and also use internet through one gateway with NAT).
I just added a few extra commands to make booting through the network possible.
My current /etc/dhcpd.conf:

default-lease-time 43200;
max-lease-time 86400;
option domain-name “”;
option domain-name-servers;

ddns-update-style none;

use-host-decl-names on;

allow booting;
allow bootp;

subnet netmask {

option routers;

filename “/pxelinux.0”;

Most important here is the next-server and the filename tag.
It points to the tftp server, and the file to download and boot.

TFTP server

A tftp server wasn’t installed on this server yet, so I installed it through (it’s fedora core)

yum install tftp-server

This will give you an /tftpboot directory, if not, create it.

Don’t forget to also enable the tftp server in the /etc/xinet.d/tftp file through changing the ‘disable = yes’ to ‘disable = no’
And restart the xinet.d daemon through ‘service xinetd restart’


So now the file, which will be downloaded to boot by the server which must install CentOS. pxelinux is maintained by H. Peter Anvin. You have to download syslinux to a temporary directory, unpack it, and copy the pxelinux file to the /tftpboot directory

tar xvjf syslinux-3.51.tar.bz2
cp syslinux-3.51/pxelinux.0 /tftpboot/

And now linux kernel to start the CentOS installation

From the CentOS mirror file server you can download special vmlinuz and initrd.img files, which can be used for starting the CentOS installation.

cd /tftpboot
mkdir CentOS
cd CentOS
mkdir 5.0
cd 5.0

And configuring the pxelinux to start the CentOS installation kernel

After pxelinux is loaded on the booting server, it will try to retrieve a config file from the tftpserver which holds the next steps to take. It will try different files, based on (for instance) the mac-address, IP addres, or a part of the IP address. This way you could setup different kernels to load for different computers or ip ranges. I don’t use that here, so I just place one default config file as /tftpboot/pxelinux.cfg/default with the following content:

default centos50
timeout 5
prompt 1
serial 0 9600

label centos50
kernel CentOS/5.0/vmlinuz
append initrd=CentOS/5.0/initrd.img headless lang=en_US keymap=us \
vnc vncpassword=MyPass ip=dhcp ksdevice=eth0 \

The extra parameters behind the append are needed by anaconda, to pass phase 1 of the installation without any questions. Then the installation starts an X-server to start phase 2 (the graphical part). This X-server also support vnc 🙂 So with the configuration above, the X-server will be started with VNC, waiting for you to connect to it’s ip-address with the mentioned password. From that stage, you will see the graphical installation on your local computer (where the VNC viewer is running).

Do the magic

So we’ve got everything in place now. Time to do the magic!
with IPMI, I can reboot the server and force it into the BIOS.
I ran these commands on the dhcp server, and used the ip address of the server, which must be reinstalled.

ipmitool -I lanplus -H -A Admin -P IMPIPasswd chassis bootdev bios
ipmitool -I lanplus -H -A Admin -P IMPIPasswd chassis power reset

With IPMI I also have the possibility of Serial-Over-Lan. This gives me the opportunity to change settings inside the BIOS through the IPMI card located in the server and listening on the first networkcard.

ipmitool -I lanplus -H -A Admin -P IMPIPasswd sol activate

So after I changes the bootorder in the BIOS, saved the settings and rebooted the machine, I could see in logfile of the dhcp server, that the machine gets a dynamic ip-addres. After that the configfile and kernel files are downloaded from the tftp server. Then it takes a moment to start the phase 1 of the installation, places a second dhcp request (this time by the OS, not by the BIOS/LAN card). Then it checks if it can reach the installation files from the method given in the pxelinux.cfg/default config file. The X-server with vns is started. Then you can connect with a vnc viewer to the dynamic ip-address.
This way I could successfully install CentOS, just like I was in the datacentre with a monitor hooked up on the server itself.
Don’t forget to change the BIOS settings after the installation back so it will not try to reboot through the networkcard every time 🙂

Post to Twitter

Comments No Comments »