Building an LTSP environment for Raspberry PI on an x86 Debian wheezy server.

Installing LTSP for the Raspberry PI requires a little more work than i386 or amd64 thin clients, but overall, the process is similar.

This assumes the server has been configured as a working LTSP server for i386 or amd64 clients, which may require NFS and/or NBD, TFTP and DHCP configured on your network.

On a Debian wheezy system:

Install ltsp-server for ltsp-build-client, ldm-server to support LDM, qemu-user-static and binfmt-support for cross-architecture support.

 apt-get install ltsp-server qemu-user-static binfmt-support ldm-server

Download the raspbian keyring, see: http://www.raspbian.org/RaspbianRepository

 wget http://archive.raspbian.org/raspbian.public.key -O - | gpg --import

Make sure to replace KEYID with the current gpg keyid! as of this writing, the current KEYID is: 90FDDD2E, though you'll want to verify this somehow, otherwise someone could man-in-the-middle your install.

 gpg --export 90FDDD2E >> /etc/ltsp/raspbian.public.key.gpg

Create an alternate configuration file, /etc/ltsp/ltsp-raspbian.conf:

 DEBOOTSTRAP_KEYRING=/etc/ltsp/raspbian.public.key.gpg
 DIST=wheezy
 # For alternate raspbian mirrors,
 # see: <http://www.raspbian.org/RaspbianMirrors>
 MIRROR=http://archive.raspbian.org/raspbian
 SECURITY_MIRROR=none
 KERNEL_PACKAGES=linux-image-3.2.0-4-rpi

Build the client image:

 ltsp-build-client --arch armhf --config /etc/ltsp/ltsp-raspbian.conf

Fix a bug if the plymouth package is installed, by not failing if plymouth is not in use:

 sed -i -e 's,/bin/plymouth quit --retain-splash.*,/bin/plymouth quit --retain-splash || true,g' /opt/ltsp/armhf/etc/init.d/ltsp-client-core

Optionally, edit /var/lib/tftpboot/ltsp/armhf/lts.conf to include more debugging options:

 [default]
 # for debugging only, comment out when done
 #SCREEN_02=shell
 SCREEN_07=ldm
 #LTSP_FATCLIENT=true

Download raspberry pi foundation's raspbian image: http://www.raspberrypi.org/downloads. This howto used 2013-02-09-wheezy-raspbian

Copy firmware files to an SD card (/dev/sdc1, replace with the device name for your SD card):

 mount /dev/sdc1 /mnt
 mkdir -p /media/rpi
 mount -o loop,offset=$((512*8192)) /srv/src/2013-02-09-wheezy-raspbian.img /media/rpi
 cp -r /media/rpi/* /mnt/
 umount /media/rpi

Copy kernel and initrd to your SD card:

 cp -vb /opt/ltsp/armhf/boot/vmlinuz-3.2.0-4-rpi /mnt
 cp -vb /opt/ltsp/armhf/boot/initrd.img-3.2.0-4-rpi /mnt

edit cmdline.txt:

add init=/sbin/init-ltsp boot=nfs nfsroot=192.168.67.1:/opt/ltsp/armhf delete the root= and rootfstype= entries:

edit it with sed:

 sed -i -e 's,root=.*rootfstype=ext4,boot=nfs init=/sbin/init-ltsp nfsroot=192.168.67.1:/opt/ltsp/armhf,g' /mnt/cmdline.txt

edit config.txt to use the kernel and initramfs:

 echo 'kernel vmlinuz-3.2.0-4-rpi' >> /mnt/config.txt
 echo 'ramfsfile initrd.img-3.2.0-4-rpi' >> /mnt/config.txt
 echo 'ramfsaddr 0x00800000' >> /mnt/config.txt

 Copyright 2013 Vagrant Cascadian <vagrant@debian.org>
 This work is licensed under a:
 Creative Commons Attribution-ShareAlike 3.0 Unported License
 <http://creativecommons.org/licenses/by-sa/3.0/deed.en_US>

If you liked this article, please consider a donation: bitcoin:1AFhXwqT6PyFWRjGhURMTq1MiCgHL9egdQ