Ubuntu on Alix (aufs)

I did some further work on getting Ubuntu on the Alix. I have tested the basic kernel on my second Alix board (2c3). It works so far without problems.
In addition I did some research how to improve the installation. First I thought I would like to have the root file system read only. This manly to reduce the write access to the flash disc. For this I would have to create a ram disc and map several directories to this ram disc since some directories need to be writable. After some research and looking at the Voyage Linux distribution I found an other solution. On the next version of Voyage Linux they will use aufs. I did some tests with aufs and I think this could be the solution I use. I took the script from Voyage Linux and did some small changes to the script for mapping some directories for writing to a memfs. The script used by Voyage Linux is quite nice it will sync back the changes at shutdown and this way no log information get lost on normal shutdown.
I will post the change script later, since I need to do some changes until I think it fits all my needs.

Ubunut on Alix 3c3

Today I got Ubuntu 8.10 Server Edition working on my Alix 3c3. It was actually quite easy to get done. There are only a few things you need to now and it will not work with the default kernel.

To get Ubuntu installed on the flash card I used qemu on my Linux machine. I used the Qemu Launcher application to configure the virtual machine for installation. For the install disk I directly used the flash disc. In my case this was /dev/sdb. It is necessary to launch the Qemu Launcher with super user privileges to get access to this device.
It is possible to start the qemu from the console as well. Here is the command to start the qemu as it was generated from the Qemu Launcher:

/usr/bin/qemu -boot c -m 256 -hda '/dev/sdb' -cdrom '/home/mweb/Desktop/ubuntu-8.10-rc-server-i386.iso' -net nic,vlan=0 -net user,vlan=0 -localtime

Generic Config file: http://user.enterpriselab.ch/~zdweber/config_basic

Within this it is easily possible to install the complete Ubuntu system as you would like to have it. After the installation we need to at least boot once into this system and install our custom kernel, since the default ubuntu kernel will not work on the Alix board. Do all other customization steps here to save you work on the Alix board it self. We should also change the grub config that it uses the device for the root directory instead of the UUID of the device. For some reason I dont know yet it does not work with the UUID.

I used the current stable kernel but it might work with a newer kernels as well. I added two different config files to this post. The config_basic is the basic file I used it should work on other Alix boards as well but this is not tested yet, I will do this later. The config_alix3c3 has additional support for the sound card that is built into the Alix 3c3 board.

To create the kernel just extract the downloaded kernel and copy the config file into the kernel directory. Rename the config file to .config and now you are ready to build the debian package of the kernel. Just call it with make-kpkg. If you need more information about how to build a kernel on Ubuntu use google since there are enough resource out there that just explain this.

$ fakeroot make-kpkg kernel_image kernel-headers

This will build the kernel and headers package for this kernel. Copy it to the Alix and install it with dpkg.

Known Problems/Missing Features

  • Grub can’t find the flash disc (Instead of the UUID of the hard dsic enter the device name and it will work)
  • AppArmor does not work. This is because the kernel module is not build for our custom kernel. I just removed apparmor-utils since i don’t need it for my use case.
  • Read-Only file system. The current installation needs to have a writable root file system. Since we use a flash disc this is not the best solution. I would like to mount it ro and have a ram disk for the tmp files similar to Voyage linux.

Basic Kernel config
Alix 3c3 Kernel config