#### Building an LTSP environment for Raspberry PI on an x86 #### Debian wheezy server. ## Copyright 2013 Vagrant Cascadian ## 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 ## Installing LTSP for the Raspberry PI requires a little more work than i386 ## or amd64 thin clients, but overall, the process is similar. # 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: # old line: # dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait # new line: # dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 boot=nfs init=/sbin/init-ltsp nfsroot=192.168.67.1:/opt/ltsp/armhf elevator=deadline rootwait # or 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 #### Running rpi as an LTSP client off the raspbian image: ## ## This is an approach to emulating LTSP, by running the OS off the SD card ## instead of mounting over the network. # Download raspberry pi foundation's raspbian image: # http://www.raspberrypi.org/downloads # this howto used 2013-02-09-wheezy-raspbian boot the image on your rpi... apt-get update apt-get dist-upgrade apt-get install ltsp-client apt-get install linux-image-3.2.0-4-rpi # edit /boot/config.txt: kernel vmlinuz-3.2.0-4-rpi ramfsfile initrd.img-3.2.0-4-rpi ramfsaddr 0x00800000 # edit /boot/cmdline.txt: add init=/sbin/init-ltsp # edit/create /etc/lts.conf [default] # be sure to change to the ip address or hostname of your LTSP server SERVER=192.168.67.1 #LTSP_FATCLIENT=true # FIXME: copy server's public ssh keys from the server to /etc/ssh/ssh_known_hosts # edit /etc/init.d/ltsp-client-core: add || true to plymouth line.