Archive for the ‘Linux’ Category

SSH unlock encrypted Ubuntu 14.04 server

Friday, June 27th, 2014

With 14.04 this procedure has become really easy. Nevertheless some of the steps mentioned at are still necessary. Given you have set up your fully encrypted Ubuntu 14.04 server and your OpenSSH infrastructure with public keys and all running, there’s just a little more:

Install dropbear, a tiny ssh server that runs before the root partition on the server is decrypted

sudo apt-get install dropbear

Installation scripts will create/copy keys. Just edit


and change




to make sure, dropbear starts on boot.

I then activated the root user

sudo passwd root

and copied the keys

sudo cp /etc/dropbear/dropbear_* /etc/initramfs-tools/etc/dropbear/

sudo cp ~/.ssh/authorized_keys /etc/initramfs-tools/root/.ssh/authorized_keys

You should now be able to login via ssh into a busybox shell. In order to decrypt the root partition just one script is needed. Edit


and enter



prereqs() {
echo "$PREREQ"

case "$1" in
exit 0

. "${CONFDIR}/initramfs.conf"
. /usr/share/initramfs-tools/hook-functions

if [ "${DROPBEAR}" != "n" ] && [ -r "/etc/crypttab" ] ; then
cat > "${DESTDIR}/bin/unlock" << EOF #!/bin/sh if PATH=/lib/unlock:/bin:/sbin /scripts/local-top/cryptroot; then kill \`ps | grep cryptroot | grep -v "grep" | awk '{print \$1}'\` exit 0 fi exit 1 EOF chmod 755 "${DESTDIR}/bin/unlock" mkdir -p "${DESTDIR}/lib/unlock" cat > "${DESTDIR}/lib/unlock/plymouth" << EOF #!/bin/sh [ "\$1" == "--ping" ] && exit 1 /bin/plymouth "\$@" EOF chmod 755 "${DESTDIR}/lib/unlock/plymouth" echo To unlock root-partition run "unlock" >> ${DESTDIR}/etc/motd


save the file and then make the script executable

sudo chmod +x /etc/initramfs-tools/hooks/

and update the initramfs

sudo update-initramfs -u


After a reboot you should be able to

ssh root@serverip

and with


to boot your server.

mpv Video Player

Wednesday, February 5th, 2014

Yesterday I accidentally stumbled over the successor of MPlayer and mplayer2. mpv Video Player that is. One has to be aware of the differences between the projects but all in all I was very impressed with how it handled some of the video files I threw at it. It includes most of the improvements that mplayer2 introduced over the old and somewhat bloated Mplayer code and even brings VDPAU and VAAPI directly compiled in. However I did not compile for myself but users this repository instead. It even includes the correct icon für Ubuntu’s Unity and brings a .desktop file as well.

Nice job so far!

XBMC 12.0 Beta 1 is out – and great!

Saturday, November 17th, 2012

Read more about what’s new here. The new audio engine finally solves problems I was having with S/PDIF passthrough audio and enhances my overall user experience quite a bit.

The following information is taken from

Here’s in a nutshell how to compile it for Ubuntu 12.10!

First remove a possible conflicting version of xbmc from Ubuntu repositories:

sudo apt-get autoremove xbmc

Install git and fetch the source code:

sudo apt-get install git
cd $HOME
git clone git://

then install necessary dependencies

sudo apt-get install git-core build-essential gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound2-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmpeg3-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs python-dev libyajl-dev libboost-thread-dev libplist-dev libusb-dev libudev-dev libtinyxml-dev libcap-dev curl swig default-jre autopoint libltdl-dev libtag1-dev

install more dependencies

sudo apt-get build-dep xbmc

finally bootstrap, configure, compile and install

cd $HOME/xbmc
sudo make install

For further information on how to update, speedup things with ccache and more refer to the linked documents above.


Ubuntu 12.04 LTS Beta on Acer 1810t

Sunday, April 15th, 2012

Although being in beta state Ubuntu 12.04 LTS runs great on my Acer 1810t already. There are just three annoyances I had to tinker with.

Fan always on and too loud (AC)

With an AC cable plugged in the fan is always on which is very audible in a quiet environment. This can be controlled using kernel module acerhdf which is loaded by default but lacks finetuning. So all you have to do is create a configuration file

sudo nano /etc/modprobe.d/acerhdf.conf

and paste in the appropriate settings

options acerhdf interval=5 fanon=65000 fanoff=60000 kernelmode=1

and here comes silence! Use temperature settings at your own risk. The example above turns the fan on at 65° C and off at 60° C.

Noisy harddisk spindowns

Second thing is hdparm settings when running on battery. Former apm (Advanced Power Management) default for the harddrive in Oneiric was 128. It is now 127 which allows the drive to spin down resulting in frequent spin downs and wakeups which are audible and annoying. This can be avoided by setting apm back to 128 when running on battery

sudo hdparm /etc/sda -B 128

In order to make apm settings permanent add this to /etc/hdparm.conf

/dev/sda {
apm = 254
apm_battery = 128

Constantly blinking wifi LED

Well, for the LED to stop blinking when active but rather be just on it needs just an option to Intel’s wifi module. This however is not iwlagn as in Oneiric but iwlwifi in Precise. So create a config file

sudo nano /etc/modprobe.d/iwlwifi.conf

and paste

options iwlwifi led_mode=1

and reboot or unload module with

sudo modprobe -r iwlwifi

and reload with

sudo modprobe iwlwifi