Month: August 2013

Traxxas Telluride 4×4

I got an email 2 days ago from Traxxas that was advertising the new Telluride 4×4 1/10 scale remote control coming out.

I must say it really got me interested, as I am interested in getting some more R/C gear, and this looks like a good robust truck.

Stay tuned, I might end up buying one much later in the year.

I bought two other R/C car’s earlier this year and will be unwrapping those when I get them as a gift, more details will follow when I open them.

Ubuntu 12.04.2 LTS and lxc continued

This is a continuation of my previous post here, but with more detail. In case you want to jump straight in and have a play with lxc (Linux Containers) on Ubuntu 12.04.2 LTS.

I moved to Ubuntu 12.04.2 LTS purely cause lxc seemed to be workable out of the box, thus I left behind Debian 7 for now.

Getting Started.

Installation of lxc on Ubuntu 12.04.2 LTS is a simple as running the command below;

apt-get install lxc

It will install what is needed and even configure the cgroup mount that is required (a manual step of Debian). This will install and configure a NAT 10.x.x.x network device called lxcbr0 on your host, which ALL templates use when you attempt to setup other linux containers on your host.

If you want bridged network for your linux containers, i.e. share the same network used by your hosts ethernet device, you can do the following. Requires installation of bridge-utils and configuration change to your network file.

apt-get install bridge-utils

Next you need to configure /etc/network/interfaces to ensure that your network device is now configured for bridged networking. In my case, I wanted my eth0 to be the bridged device, so you hash out all eth0 networking references. Create the additional lines below in the file;

auto br0
iface br0 inet static
 bridge_ports eth0
 bridge_fd 0
 bridge_maxwait 0

As you can see above, I have configured a static IP assignment. If my eth0 was using, I’ve now taken it to use on br0 and would of hashed out all eth0 related configuration. Restart networking (and/or simply reboot). Be sure to have access to the machine should you break it and need to fix it via a console.

Creating Container

The command to create a container is easy, and below is a sample.

lxc-create -n lxc1 -t ubuntu

This says to create a linux container named (-n) lxc1 and use template (-t) ubuntu. This will end up being a Ubuntu 12.04.2 LTS container. Default location is /var/lib/lxc by the way, you could change this by creating a symlink to where you want them or changing the lxc configuration accordingly.

When it’s completed creating you will get told that the account to logon is “ubuntu” and password is “ubuntu”, be sure to change it.

If you want your container to make use of the bridged network and not the NAT based one which the templates default too.

Find the config file associated with your new container, if your using the default location still it will be;


Edit the file and find the line that says “” and change it to be “” and save the change.

Starting Container

To start the container you just created issue the command below;

lxc-start -d -n lxc1

Once again name (-n) is passed, the -d tells it to go in background. If you don’t do this it will boot and show you the output. Good for troubleshooting, so drop the -d if you have problems. Note I haven’t worked out a way to exit from the container when I don’t pass -d, so you might have to kill your ssh session and/or halt the container to get your terminal session back.

Container Console

If you start the container using -d, you can access it’s console via the command below;

lxc-console -n lxc1

At which point you will get the logon banner for the console of the container. Logon now using the details you got during creation. Change the password.

At this point you can make changes to the linux install as needed, just like it was a normal physical install on its own dedicated hardware.

To exit the lxc-console, as it will have stated is control a + q.

Stopping Container

To shutdown down a container, you issue the command below;

lxc-halt -n lxc1

Where -n is the name of the container as always. See the trend with the commands.

Container Autostart

If you want to have the container autostart when the host is rebooted, you should go into /etc/lxc/auto and create a symlink to your containers config file. By default on Ubuntu 12.04.2 LTS this directory is looked at during system startup and any container configs found will have them autostart. Below is an example from my own environment;

root@alpha:~# cd /etc/lxc/auto
ln -s /data0/lxc/bravo/config bravo
root@alpha:/etc/lxc/auto# ls -la
total 8
drwxr-xr-x 2 root root 4096 Aug 1 13:59 .
drwxr-xr-x 3 root root 4096 Jul 31 20:59 ..
lrwxrwxrwx 1 root root 23 Aug 1 13:59 bravo -> /data0/lxc/bravo/config

If this has worked, when you run the command below, you will see the word (auto) next to the name of the container that will be start automatically when host reboots.

root@alpha:~# lxc-list
 bravo (auto)



Host/Container sharing mounts/file systems

If you’d like a filesystem from your host to be available on the container, you need to have the container use a bind mount and have it come up during container start and removed during container shutdown. DO NOT MAKE THE BIND MOUNT STATIC ON HOST via /etc/fstab, as I found when I lxc-destroy my container, that it will remove data from any bind mounts.

Best way to describe the bind mount is to provide an example and what to populate in the containers config file. See below;

root@alpha:/var/lib/lxc/bravo# cat config | grep lxc.mount
lxc.mount.entry                         = /data1/cifs/backup data1/backup none defaults,bind 0 0

Which means /data1/cifs/backup from my host will be mounted at /data1/backup on the container.

root@alpha:/data0/lxc/bravo# df /data1/cifs/backup
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/alpha1-data1 3845456920 1166862816 2639526500 31% /data1

on container shown as;

root@bravo:~# df /data1/backup
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/alpha1-data1 3845456920 1166862816 2639526500 31% /data1/backup

Hope this helps get someone started, as this information was found by research, reading and putting into practice.


SDR and paging messages

Following from my other post here, I’ve managed to finally secure a cable I needed to hook up my USB DVB-T tuner to an outside antenna. I’ve subsequently configured my Raspberry Pi as per the forum post here with the required software.

Basically I have enabled SDR (Software Defined Radio) and using it to decode paging messages on the paging network.

I setup the tuner on Windows at first and used SDR# to find the frequency range. A friend told me roughly where to look and what to listen out for. He said you’d hear bursts every so often. Sure enough I did. I found based on my location in South West Sydney that 148.630 was the band that enabled me to get what I needed.

If you get it working, you will see output like so from the command line below;

rtl_fm -f 148.630M -s 22050 | multimon-ng -t raw -a POCSAG512 -a POCSAG1200 -a POCSAG2400 -f alpha /dev/stdin

POCSAG1200-: Alpha: 1957499:XMPROD PET_SYD_WATER_2 Regular heartbeat 1 to VHA

It appears that the paging network is still very much used by many. From looking at what comes over it, you can see that the medical industry uses it, in addition to other corporations for notifications etc.

I should add I found the following page helpful too. Click here.

Ubuntu 12.04.2 LTS and lxc

Have completed my Ubuntu 12.04.2 LTS install and configured lxc (Linux Containers). I am so far very impressed just how easy it was to get this working out of the box. I think the Ubuntu team who produce Ubuntu 12.04.2 LTS has to be given a big clap. Very fine job.

I’ve install some Debian squeeze lxc’s and Ubuntu ones. All seem to work great and I will post more details soon on what I have done and how it was performed, as it might help anyone thinking of doing the same.

I wanted to do this so I could run some other software on the containers and not clutter the host install. Although the host will see the processors for the container etc. But that’s fine and expected on how lxc works.

My aim was to install Mythtv as a master backend into a container and have it use my HDHomerun network based tuner. This has actually worked, and I am currently running it now, however I noticed during reboot/auto start of the container that the mythtv-backend wouldn’t start. Turns out the upstart configuration is not going to work on a linux container. Wiki page here is the link to the config that ships in Ubuntu 12.04.2, and below is my change I made so that I could get it to start automatically, it’s a hack and needs some further investigation, but I was in a rush to get it working in my environment.

root@delta:~# cd /etc/init
root@delta:/etc/init# cat mythtv-backend.conf | grep start
#start on (local-filesystems and net-device-up IFACE!=lo and started udev-finish)
start on net-device-up IFACE!=lo

As per above, I hash out the original start on line and create the amended one below it. This is perform in the file /etc/init/mythtv-backend.conf

Now it will start correctly in my container at boot.