Tag: Ubuntu

HTS Tvheadend 3.9.2332 screen capture

I reinstalled Ubuntu 14.04 Server on to my Intel NUC I have and hooked up my Realtek USB tuner.

I was surprised to see that HTS Tvheadend has changed a bit since I last had it installed. Was happy to see some really nice GUI enhancements. Great work done by the developers.

Screen capture below from my Finished Recordings tab.


Another Intel DN2820FYKH NUC

Yesterday I received another Intel DN2820FYKH NUC computer.

I had ordered another one with the intent of running a Mythtv Backend and Frontend using a Realtek USB tuner.

I’ve installed Mythbuntu and got everything working, however I really like using Debian itself, and will look at doing a more custom install with Debian. So the plan is work on a Debian 7.7.0 x64 install.

I’ve configured this new Intel NUC with the usual 8GB ram (max it can take) and Dual Band 802.11ac wireless (as it’s only a $24 upgrade to buy the card), and I had a spare 500GB laptop drive, which I installed too.

Will be sure to post more about my progress regarding the Debian installation and tweaking it all.

lxc on Ubuntu 14.04 LTS

I’ve done a quick install of lxc on Ubuntu 14.04 and the only difference I have found so far since I did this back on Ubuntu 12.04 per the post here, is that lxc-list is no longer applicable and been replaced by lxc-ls instead.

I find lxc-ls doesn’t give much information at all, if ran without any switches, as per the example below;

root@papa:/var/lib# lxc-ls

However, if you run it with the -f switch it outputs more information which clearly shows important details about the lxc containers.

root@papa:/var/lib# lxc-ls -f
web1 STOPPED - - NO

Will continue to test this out further, but so far so good. Pretty impressed with Ubuntu 14.04 LTS so far.

Ubuntu 14.04 Server and LXC

I am going to revive some older posts and attempt to perform similar work against Ubuntu 14.04 Server and LXC. Previously I had tinkered around with LXC on older Ubuntu release, now I want to do the same thing but on something newer.

So if things to go well, I should post some more content associated to Ubuntu 14.04 Server and LXC.

Ubuntu 14.04 Server with TvHeadend and Realtek RTL2832U USB tuner

If you seen my previous posts here and here. I can confirm that the instructions I provided on the post here are still applicable to the installation of TvHeadend on Ubuntu 14.04 Server.

I just installed Ubuntu 14.04 Server tonight and tested the installation process of TvHeadend per my other notes and it works fine.

Ironically enough so far I really like Ubuntu 14.04 Server, so I will leave it running for a bit and see how much I do like it after a few days and/or weeks.

Ubuntu 12.04.4, TvHeadend and Realtek RTL2832U USB tuner

This week I setup an old Dell Optiplex 755 tower with Ubuntu 12.04.4, TvHeadEnd and Realtek RTL2832U USB tuner to perform some DVB-T recordings. The installation I performed of TvHeadEnd is the exact same one I documented some months back when I used the same USB tuner on a Raspberry Pi. You can read about it here.

The installation was flawless and simple as you’d expect. The system has been running a few days now and capturing what I want. It also allows me to point VLC client on other machines at the system to network stream any of the DVB-T channels the tuner can tune against (also shown in the previous post linked above).

Thinking of buying another tuner to be honest, so I can record from 2 different channels that don’t share the same stream/multiplex id.

New PC laptop purchase

I was going to build up another mini-ITX desktop, however the more I look at it I am better off buying one of those Dell Outlet Inspirion laptops. As  I end up getting a PC that can be used as a desktop replacement and doesn’t need any more hardware purchased. i.e. keyboard/mouse/monitor. So I am monitoring the outlet site the past week watching what Intel i3 Third generation systems come up and the prices.

The PC laptop will probably run Windows 7 x64 Home (or Windows 8.1 if my work VPN finally ends up supporting it). While my existing mini-ITX desktop (i3/16gb ram) will probably be converted to a Ubuntu desktop, so I can implement lxc containers again and some other workload on it. Really want to get tvheadend setup on it and plug in the USB tuner I was using with my Raspberry Pi. Remember the post here, about that?

If I get some time this weekend one evening going to install a temporary hard disk into my desktop and do a Ubuntu 12.04.4 install and do some messing about to ensure the hardware all detects fine and resolution of monitors works fine. The system uses an Intel HD 4000 onboard, so I hope accelerated video works or that could be a problem.

Looking to purchase the laptop the end of this month or early next month.

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
 dns-search lan.heimic.net

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 “lxc.network.link=lxcbr0” and change it to be “lxc.network.link=br0” 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.


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.