pages tagged raspbiantrenzahttp://cascadia.debian.net/trenza/tags/raspbian/trenzaikiwiki2013-04-29T00:06:19Zraspberrypi-ltsp-howtohttp://cascadia.debian.net/trenza/Documentation/raspberrypi-ltsp-howto/2013-04-29T00:06:19Z2013-04-29T00:06:19Z
<h1>Building an LTSP environment for Raspberry PI on an x86 Debian wheezy server.</h1>
<p>Installing LTSP for the Raspberry PI requires a little more work than i386
or amd64 thin clients, but overall, the process is similar.</p>
<p>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.</p>
<p>On a Debian wheezy system:</p>
<p>Install ltsp-server for ltsp-build-client, ldm-server to support LDM,
qemu-user-static and binfmt-support for cross-architecture support.</p>
<pre><code> apt-get install ltsp-server qemu-user-static binfmt-support ldm-server
</code></pre>
<p>Download the raspbian keyring, see:
<a href="http://www.raspbian.org/RaspbianRepository">http://www.raspbian.org/RaspbianRepository</a></p>
<pre><code> wget http://archive.raspbian.org/raspbian.public.key -O - | gpg --import
</code></pre>
<p>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.</p>
<pre><code> gpg --export 90FDDD2E >> /etc/ltsp/raspbian.public.key.gpg
</code></pre>
<p>Create an alternate configuration file, /etc/ltsp/ltsp-raspbian.conf:</p>
<pre><code> 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
</code></pre>
<p>Build the client image:</p>
<pre><code> ltsp-build-client --arch armhf --config /etc/ltsp/ltsp-raspbian.conf
</code></pre>
<p>Fix a bug if the plymouth package is installed, by not failing if plymouth is
not in use:</p>
<pre><code> 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
</code></pre>
<p>Optionally, edit /var/lib/tftpboot/ltsp/armhf/lts.conf to include more
debugging options:</p>
<pre><code> [default]
# for debugging only, comment out when done
#SCREEN_02=shell
SCREEN_07=ldm
#LTSP_FATCLIENT=true
</code></pre>
<p>Download raspberry pi foundation's raspbian image:
<a href="http://www.raspberrypi.org/downloads">http://www.raspberrypi.org/downloads</a>.
This howto used 2013-02-09-wheezy-raspbian</p>
<p>Copy firmware files to an SD card (/dev/sdc1, replace with the device name
for your SD card):</p>
<pre><code> 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
</code></pre>
<p>Copy kernel and initrd to your SD card:</p>
<pre><code> 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
</code></pre>
<p>edit cmdline.txt:</p>
<p>add init=/sbin/init-ltsp boot=nfs nfsroot=192.168.67.1:/opt/ltsp/armhf
delete the root= and rootfstype= entries:</p>
<p>edit it with sed:</p>
<pre><code> 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
</code></pre>
<p>edit config.txt to use the kernel and initramfs:</p>
<pre><code> 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>
</code></pre>
<p>If you liked this article, please consider a donation: bitcoin:1AFhXwqT6PyFWRjGhURMTq1MiCgHL9egdQ</p>