Raspi-LTSP is now PiNet: easily manage a Raspberry Pi classroom

Helen: Over the past year and a half, Raspi-LTSP has become very popular as a simple and easy-to-set-up way of managing Raspberry Pi users and files in a classroom setting. Today its 18-year-old developer Andrew Mulholland launches PiNet, the new incarnation of this very valuable, free, open source project. He’s written us a guest post to tell you more about it.

PiNet

For nearly two years now, I have been working on RaspberryPi-LTSP. The goal setting out was clear: a simple, free and easy-to-use system for schools that allowed them to manage their Raspberry Pis more easily.

So today I am proud to announce PiNet, the replacement for RaspberryPi-LTSP. The idea for PiNet/Raspi-LTSP was spawned out of a workshop I was teaching two years ago in a local primary school. The workshop ran over two days and I had forgotten to install a piece of software on all the SD cards before cloning them. I also had somehow to remember which student’s work was on which SD card so I could hand it out to them the next day. Logistically, managing it was a bit of a nightmare! And I only had one class of kids to worry about.

How can you manage students’ work when you have perhaps hundreds of different students using a set of Raspberry Pis in a week? Does each student get assigned her or his own SD card? And what happens when those SD cards need to be updated with the most recent software update?

After many (many) hours of work researching possible solutions, I came up with a proof-of-concept script. The script used LTSP (Linux Terminal Server Project) to build a virtual Raspbian operating system on a server, then let Raspberry Pis network boot off it. I released this on GitHub back in September 2013 not expecting much to come of it. Rather surprisingly, people slowly started playing around with it, I started getting emails with new ideas and I discovered there was an interest in the project.

PiNet classroom with lapdocks

A PiNet classroom, using Motorola lapdocks to provide display, keyboard and trackpad

200+ commits and 3000+ lines of code later, the feature list has grown after a huge amount of feedback from educators right across the world.

PiNet’s features include:

  • Network-based user accounts, so any student can sit down at any Raspberry Pi in the classroom and log in
  • Network-based operating system, so if you want to change the operating system (for example, by adding a new piece of software), you just edit the master copy on the server and reboot all the Raspberry Pis
  • Shared folders to allow teachers to share files with students
  • Automated backups of students’ work
  • Automated work collection/hand-in system
  • Super-easy to set up and maintain
  • Completely free and open source.

PiNet is a replacement for Raspi-LTSP, not an upgrade, so if you’re already running Raspi-LTSP, you’ll need a new installation to get PiNet running on your server (PiNet will automatically update your SD cards the first time you boot up your Raspberry Pis after installing it, so you don’t need to make any changes to those yourself). To make everything as easy as possible, a migration utility has been included in every Raspi-LTSP release since November to allow you to migrate user data and files to PiNet; read the migration guide for help doing this.

PiNet desktop

The Raspberry Pi desktop with PiNet is like the one you’re used to

Here are some of the things that other people have said about PiNet/Raspi-LTSP:
https://twitter.com/SCSnl/status/573595415175630848
https://twitter.com/compinschools/status/569929183054467073


PiNet is already used across the world in over 30 different countries. To give it a go in your school, all you need is an old computer, a router and some networked Raspberry Pis! To get started, head over to the PiNet website at http://pinet.org.uk/ and hit Get Started!

30 comments

Avatar

Great job Andrew (…& little helpers)!

More power to your elbow. Looking forward to trying to get it into my son’s school shortly.

Avatar

This is a great project, long may it continue. Lost count of the number of man hours Andrew has sunk into this. Well done old chap! o7

Avatar

Way too many hundreds of hours….

Avatar

Very well done! I might try this for a code club I’m trying to set up…

Avatar

Just like to say thanks to Andrew for all his hard work on this – PiNet really is excellent. (Liking the name change too, always had to work through ‘LTSP’ to remember it :))

Avatar

Good work Andrew,

Test bed of 10 Raspberry Pi 2’s running PiNet extremely well

Any Schools in Australia need any help in the setup see website for contact info

Avatar

Do you know when you when you will announce the Christmas competion 2014. Or have you already. If you have already were can I find the results?

Avatar

I am from India, work for United Nations. I visit rural and tribal schools in India. One of the need of tribal schools is to set up computer library, so that unprivileged children would learn about computing at early stage and would be able to build confidence at par with urban children when they go for higher education. I will be grateful if Rassberry Pi laboratories can be set up in such shools and someone guides me about the fund raising for the same. Please write me on shirishravan@gmail.com if you think you can help me.

Liz Upton

Hi Shirish

Please check out our Education Fund and think about applying!

Avatar

And if you have any specific PiNet related questions, feel free to contact the support address.
http://pinet.org.uk/articles/support.html

Avatar

Also check out Rachel Pi from World Possibilities – http://pi.worldpossible.org/

Avatar

We have a computer lab that was nearly useless for teaching programming because the hard-disks were configured with Windows minus any programming tools and “locked down” so no additional software could be installed. My solution was similar to the project here: a server was set up so the lab computers could boot a Debian squashfs image as root over the network and then run diskless. We created boot disks that contained a Linux image and initramfs that mounted the root over the network. Amazingly an old Pentium III server could manage 15 mounts without any lag.

While the network root filesystem could be updated with new applications as the course progressed, new boot disks had to be made in order to upgrade the kernel. It appears PiNet has this same issue: If the kernel needs to be updated, every sdcard needs to be manually reflashed.

For the Raspberry Pi, I wonder whether it might be better convenient to install u-boot on the flash card and then load the actual Linux kernel over the network as well.

http://elinux.org/RPi_U-Boot

This would allow an administrator to also upgrade the kernel remotely without having to manually reflash all the sdcards.

Avatar

Eric – at http://pinet.org.uk/articles/advanced/kernels.html it says
“You may notice after software updates to PiNet, sometimes your PiNet clients will randomly reboot just after hitting the login screen a single time. This is because they have detected they are running an out of date version of the kernel files (mismatch with the version on the server) and the server has automatically copied the new kernel and initramfs over to the SD card. It must restart the Pi to apply the update. It should only happen a single time for each SD card on a new kernel update.”

Avatar

Thanks Steve.

– Eric, I have looked at uboot and built a working prototype setup a while back. Uboot though doesn’t well support the Raspberry Pi, especially the B+ and Pi2B.
It ended up being extremely complicated to get working and we can’t be waiting as long as it takes to get uboot working for new hardware etc.
This was why I ended up implementing the auto update system which basically gets around the issue. It also have the advantage of being considerably quicker. Uboot has to grab the kernel and initramfs every time, which adds an extra 20-30 seconds and an uncompressed 40mb extra of data per client.

Maybe if uboot on the Raspberry Pi becomes more stable in the near future, maybe I will reconsider it.

Avatar

The booting speed advantage of having the kernel on the sdcard is a good point. I had missed how PiNet would automatically reflash the sdcard with a new kernel and initramfs as needed for upgrades. That is a nice trick. Unfortunately, I can’t do that for my setup in the Windows lab because we are using CDs to boot the Linux kernel.

It’s good to know your experience with uboot. Thanks for replying with your experiences.

In the Windows lab we used Samba to mount persistent user directors since this allowed students to continue accessing their files when the computers were running Windows. It would be interesting to hear what approaches you tried and why you settled on the method PiNet currently uses for persistent user directories.

Avatar

PiNet uses sshfs to mount the users home folders on login.
It all just uses Linux user accounts on the server and their home folder. I had looked at Samba integration, but hit a number of issues with password syncing etc.

Liz Upton

Andrew’s work on Raspi-LTSP (which I’m going to have to get used to calling PiNet) has been amazing to watch; he’s an absolute superstar. Massive thanks, Andrew, from all of us; you’re doing a simply incredible job!

Avatar

I normally run Ubuntu 14.04 LTS on my most powerful laptop (from 2007) and is thinking about installing PiNet. Is it easy to uninstall it? How do you uninstall it?

Avatar

If I were you, I wouldn’t :)
Put it in a virtual machine. It is designed to be run on its own and does not include an uninstall script given how simple (and free) reinstalling Ubuntu is.
Although I know that is not the best answer, it is something that I have maybe only been asked for once or twice before so hasn’t been top priority.

http://pinet.org.uk/articles/installation/virtualbox.html

Avatar

I suspect a chroot environment would suffice to separate it from the host system.

Avatar

I will look into virtualization, but I haven’t used it before because I think it might be to heavy on this machine. I think it would be better if PiNet came in a deb-package that would be easy to remove or purge and add. Some programs in Ubuntu take a long time to configure, e.g. Thunderbird. I don’t know if there is an easy way to back up Thunderbird between installations.

Avatar

Cool. Really, really cool. Time to go play with it.

Andrew, thanks for this!

Avatar

Had a good play with this a while ago, excellent idea, will try find time to get this running for our next CoderDojo.

Thanks Andrew

Avatar

Outstanding work, Andrew!

Avatar

I’m wondering if this would be a good setup for a Pi cluster. I looked at cluster options and the one thing that bugs me is whether a cluster node would get “out of sync” with the rest of the nodes if updates aren’t all done exactly the same way (and reflashing SD cards is still hell). This seems to solve that problem, while still allowing for local compute power which cluster nodes provide.

I tried building it on a new install of Ubuntu Server and certain components fail, such as the compression options. I wish you could use this from just a simple non-GUI Ubuntu. Will it work on a “minimal” install of Ubuntu Desktop? I don’t plan on using the GUI tools on the server system.

Avatar

It is more designed for Raspberry Pis hooked up to screens, given the way users log in and have their home folders mounted etc. There is a way though by editing the lts.conf file if I remember right to have them auto login.
Officially I only support the standard Ubuntu 14.04 desktop release, but I don’t see any reason it wouldn’t work on a more minimal install. I believe someone set it up fine on Ubuntu server a while back. No guarantees though.
If you are getting errors or issues with PiNet, feel free to open a Github issue
https://github.com/PiNet/PiNet/issues
Or drop support an email.
http://pinet.org.uk/articles/support.html

Avatar

Bravo. Simply… BRAVO!

Avatar

Bravo! PiNet works just lovely (in my test lab at home). I run a classroom in Tanzania from Finland (reverse ssh tunneling). We have 14 RasPi B+. Maybe next place with 14 RasPi 2 and PiNet. Thank you, Andrew!

Avatar

Sounds awesome! If you do get it set up out in Tanzania, make sure to drop us an email with pictures! :)
http://pinet.org.uk/articles/support.html

Always nice to see pictures of it in use.

Avatar

Huge congratulations Andrew! Looks like I’ll be getting a new classroom anda. Class set of pis so first thing on my list will be the new PiNet!

Leave a Comment

Comments are closed