Debian Squeeze

From Joggler
Jump to navigation Jump to search

I assume that you have a working Debian Squeeze on your PC or inside a Virtual Machine (e.g. VirtualBox).

If you have an AMD64 Debian system, you need to either create a i386 chroot (google for schroot and linux32) or install an i386 Debian Squeeze in a Virtual Machine (that's probably easier).

Install scripts for lazy people

If you are fearless and lazy, you can try my new install scripts that will automatically do all of the step below. ;-)

These scripts are in alpha state!
Do not complain if they crash your system!
You have been warned!

* Download the two scripts
* Make them executable "chmod a+x"
* run "./ --usage" to see all options
* run "sudo ./" with all options that you like
* wait while we are debootstrapping, downloading all packages, downloading/patching/compiling/installing the kernel
* Continue at #Prepare_the_USB_stick
* Have fun!

Create a work directory

sudo mkdir -p /opt/joggler

Bootstrap Debian Squeeze

Create an empty bootstrap directory:

sudo mkdir -p /opt/joggler/root
sudo debootstrap --arch=i386 squeeze /opt/joggler/root

If debootstrap is not recognised

apt-get install debootstrap


To chroot into the debootstrap dir (your jogger root), do this:

sudo mount proc -t proc /opt/joggler/root/proc
sudo chroot /opt/joggler/root

Install necessary packages

chroot to the directory (see #Chroot above)

Change to /tmp

cd /tmp

Install the apt sources:

wget -O /etc/apt/sources.list

Install the repo keys:

dpkg -i debian-multimedia-keyring_2008.10.16_all.deb
apt-key add siliconerepositorykey.asc 

Update the apt database

aptitude update

Install the packages for the kernel compilation

aptitude -y install kernel-package

Install xserver 1.6 from unstable (ignore dependency errors for "xserver-xorg-*")

aptitude -y install -t unstable xorg xserver-xorg-input-evtouch xserver-xorg-input-mouse xserver-xorg-input-kbd xserver-xephyr

Keep the xserver at version 1.6:

aptitude hold xserver-common xserver-xephyr

Install lxde (ignore dependency error for "libfam0")

aptitude -y install lxde

Install helper packages

aptitude -y install less wicd initramfs-tools alsa-base ntp openssh-server

Set the timezone

dpkg-reconfigure tzdata

Install the vanilla kernel sources and the patches

chroot to the directory (see above)

cd /usr/src
tar xvjf linux-
ln -s linux- linux
mkdir patches
cd patches
cd ..
cd linux
patch -p1 < ../patches/joggler-backlight-2.6.32-v1.patch 
patch -p1 < ../patches/joggler-i2c-fix-2.6.32-v1.patch   
patch -p1 < ../patches/joggler-sound-fix-v2.6.33-v3.patch 
patch -p1 < ../patches/linux- 
cp ../patches/joggler- .config

You should be ready to compile the kernel now

Compile and install the kernel

chroot to the directory (see above)

cd /usr/src/linux
make-kpkg --initrd kernel_image

This should create a kernel .deb in /usr/src:

ls -al /usr/src
-rw-r--r--  1 root root 7045852 29. Mai 19:53 linux-image-

Install the kernel: (That will automatically create the /boot/initrd.img*)

dpkg -i /usr/src/linux-image-

Keep the kernel at the current version:

aptitude hold linux-image-

Install the additional files for IEGD/Xorg

chroot to the directory (see above)

cd /tmp
wget -O /etc/X11/xorg.conf
wget -O /etc/udev/rules.d/42-persistent-input.rules
tar xvjf Iegd-deploy.tar.bz2
cd iegd-deploy

Setup user account

chroot to the directory (see above)

adduser --add_extra_groups --gecos joggler joggler
adduser joggler haldaemon
adduser joggler powerdev
adduser joggler sudo

Setup a root password as well (or skip this step and use "sudo" later to execute programs as root)


Activate auto logon

chroot to the directory (see above)

wget -O /etc/gdm/gdm.conf

Configure Network

Follow the instructions mentioned in Fixing network issues to setup the MAC address and ensure that the wired network interface appears on the joggler.

Install r8168 ethernet driver

Some jogglers (AO2JOGON) contain the Realtek r8169 Ethernet chip, while others (AO2JOGXN) contain r8168. By default we use the r8169 driver, the following instructions describe how to install the r8168 driver:

First, patch the kernel to add the r8168 driver:

cd /usr/src/patches
cd /usr/src/linux
patch -p1 < ../patches/linux-

Second, add the r8168 driver to the kernel config:

echo "CONFIG_R8168=m" >> /usr/src/linux/.config

Third, blacklist the r8169 module:

echo "blacklist r8169" >> /etc/modprobe.d/local.conf

In the end, recompile the kernel and install it:

cd /usr/src/linux
make-kpkg --initrd kernel_image
aptitude -y purge linux-
dpkg -i /usr/src/linux-image-
aptitude hold linux-image-

Note that it is no longer neccesary to downgrade the ethernet driver if using kernel 2.6.34

Prepare the USB stick

Create 2 partitions on the USB stick:

  • partition 1: ~50MB FAT32
  • partition 2: ext3

Unpack to partition 1.

Install / Update the Debian System

Now, you are ready to copy the contents of your /opt/joggler/root to partition 2.

I prefer the "rsync" method: (The trailing slashes are important!)

sudo rsync -av --del --exclude=/usr/src/* --exclude=/tmp/* --exclude=/proc/* /opt/joggler/root/ /media/<usbpart2>/

Call this command (from outside of your chroot) whenever you've changed something in your /opt/joggler/root directory.

Kernel upgrade

chroot to the directory (see above)

If you want to compile a new kernel, you should remove the old package first

aptitude purge linux-image-

After that, follow the instructions from #Compile_and_install_the_kernel.

Additional Software

chroot to the directory (see above)

MythTV frontend

Install MythTV frontend, if you like:

aptitude install mythtv-frontend

I can recommend EasyStroke to control MythTV by gestures:

cd /tmp
# Install .debs (you will have missing dependencies)
dpkg -i libboost-serialization1.38.0_1.38.0-6ubuntu6.1_i386.deb easystroke_0.4.11-karmic_i386.deb 
# Fix dependencies
aptitude upgrade


Install dependencies: (There are still some deps missing, please add them if you know what is missing...)

aptitude install libsdl1.2debian-alsa

Get the newest .deb from and install it

dpkg -i squeezeplay_7.6.*.deb

Get the SqueezePlay skin from here: