kitting out a classroom

Drop in for a chat and a cup of tea

101 posts   Page 4 of 5   1, 2, 3, 4, 5
by rurwin » Wed Jul 10, 2013 6:36 am
Nice work. I bet the kids had fun doing that.

morphy_richards wrote:Then they modified the default web page into a page about West Ham Utd or … chickens(?) … etc … Anyway …


When I was at university, the assembler course was taught on a pair of PDP-11's. A 11/20 handled timesharing 16 users with file editing and so forth, and then it talked through some shared memory to the 11/40 to run programs. That meant that when your program was running, you had a whole PDP-11 to yourself with no operating system to get in the way. It also meant that only one person could run a program at a time.

I once wrote a program to accept ASCII characters from the front panel binary switches and print them on the line-printer. My mate asked to have a go, and knelt down in front of the switches and started to laboriously look up characters and key them in. Before long he had a large audience as other student's programs were queued up to run and they came to see what we were doing. Finally he keyed in the last character and the line printer burst into life. Everyone gathered round to see what words of wisdom had taken so much effort.... SHEFFIELD WEDNESDAY RULE OK
User avatar
Forum Moderator
Forum Moderator
Posts: 2890
Joined: Mon Jan 09, 2012 3:16 pm
by morphy_richards » Wed Jul 10, 2013 2:45 pm
Got it (ldap) working!!!

Lots of user errors setting up didn't help much. Hat off to the community at zentyal.org who have been (a) very patient with me and (b) very helpful.

Okay...
My network looks like this.
Image

  • I've made a gateway using clearos to act as a fairly simple router / iptables firewall between my computer science network and the wider school network. Essentially this is just to provide internet to my own network.
  • I set up a dns server on a raspberry pi using dnsmasq just for internal (computing.lan) server names.
  • "athena" is the zentyal server (for logins and file access). I realise that zentyal could do all of the above jobs too but I only found out about it relatively recently, well into the development of this network.
  • lovelace is an edubuntu ltsp server. 31 clients (students) normally log on via two subnets using Raspberry Pi's running berryterminal. It also acts as a basic router between the two raspberry pi subnets in the classroom to allow thin client or 'normal' use.

You could do the same as me with a simpler set-up and combine "collossus", "lexicon" and "athena" in one zentyal box. If you do that you need to be aware that the firewall might block port 390 by default (which is needed by ldap)

If you wanted to make this set up using a single server instead of several as I have you would install Zentyal. Using the simplified set up you could install "gateway" , "infrastructure" and "office". The first two are self explanatory, the third option "office" provides very simplifed setup for kerberos and ldap. It was this simplified ldap/kerberos that sold me on this particular solution.

If like me you have several servers doing different jobs, turn off the firewall on zentyal (took me a while to figure out that was stopping things working due to the port 390 thing, it's not needed if you already have a firewall on your gateway (as I have in my setup))

Then follow this "how-to" guide. http://forum.zentyal.org/index.php/topic,12925.0.html (carefully. More carefully than I was. You can also follow my journey of embarrassment there as well, should you so wish)

It's good to have a seperate NIC for each LTSP sub-net. 15 clients per sub net otherwise things get too slow.

You need to configure your /etc/network/interfaces
Code: Select all
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address 192.168.1.254
  netmask 255.255.255.0
  up iptables-restore < /etc/ltsp/nat

auto eth1
iface eth1 inet static
  address 192.168.2.254
  netmask 255.255.255.0
  up iptables-restore < /etc/ltsp/nat

auto eth2
iface eth2 inet static
  address 192.168.0.10
  netmask 255.255.255.0
  gateway 192.168.0.2
  dns-nameservers 192.168.0.3 10.192.160.10


The "up iptables-restore < /etc/ltsp/nat" bit will make sense later on.... it's to do with making it so you can also use the ltsp sub-nets work as "general purpose" networks too.
So in this case eth0 and eth1 provide the ltsp sub-nets and eth2 connects up to the rest of the network.

Then you have to configure /etc/ltsp/dhcpd.conf so that the ltsp server is able to allocate ip addresses to clients in the ltsp sub-nets
Code: Select all
#
# Default LTSP dhcpd.conf config file.
#

authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.20 192.168.1.250;
    option domain-name "lovelace1.lan";
    option domain-name-servers 10.192.160.10;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.254;
#    next-server 192.168.1.1;
#    get-lease-hostnames true;
    option subnet-mask 255.255.255.0;
    option root-path "/opt/ltsp/i386";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386/pxelinux.0";
    } else {
        filename "/ltsp/i386/nbi.img";
    }
}



subnet 192.168.2.0 netmask 255.255.255.0 {
    range 192.168.2.20 192.168.2.250;
    option domain-name "lovelace2.lan";
    option domain-name-servers 10.192.160.10;
    option broadcast-address 192.168.2.255;
    option routers 192.168.2.254;
#    next-server 192.168.2.1;
#    get-lease-hostnames true;
    option subnet-mask 255.255.255.0;
    option root-path "/opt/ltsp/i386";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386/pxelinux.0";
    } else {
        filename "/ltsp/i386/nbi.img";
    }
}


Next, add the two ltsp sub-net NICs to /etc/default/isc-dhcp-server. (It's worth pointing out that you shouldn't include here the NIC which connects up to the rest of the network otherwise you will have conflicts)
Code: Select all
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/isc-dhcp-server by the maintainer scripts

#
# This is a POSIX shell fragment
#

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth0 eth1"


Install nscd (sudo apt-get install nscd) - very important if you are using ldap otherwise the cart moves faster than the horse, so to speak and your berryterminal will only show a black screen and an X shaped mouse pointer.

Reboot.

That should allow you to get ltsp "clients" (x-servers, in this case "berryterminals") to work.

Then follow through this guide https://help.ubuntu.com/community/Ubunt ... tHowtoNAT/ to configure the ltsp sub nets to work as normal networks too

WIl come back to this post as the fire alarm has just going off.

Back now. Fun and games.
Actually, that just about covers it I think.
Coming up next ...

There is a need for some 'more robust' r-pi enclosures. I am already down one Pi with a broken sd card connector. Watch this space.
Last edited by morphy_richards on Wed Aug 14, 2013 7:52 am, edited 1 time in total.
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Wed Jul 10, 2013 4:42 pm
Its also worth mentioning, if yu use Ubuntu for the LTSP server, I think it's a good idea to remove network-tools (or is it network-manager :? ) whihc is a GUI Gnome network config tool. This seems to have a bit of a bun fight with your settings in /etc/network/interfaces otherwise.

Also - it would appear that rebuilding the ltsp server then neccesitates berryterminal be removed then reinstalled via berryboot. Not sure why that's the case but if you dont do this then no user can get logged in / get's dumped back at the ltsp login screen after entering credentials.
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Fri Jul 12, 2013 8:24 am
Monitors and power are a bit of an issue. In my classroom each monitor has a PC connected to VGA and a Raspberry Pi connected to DVI.

If students have been using PCs, after a set time of no use the PC shuts down the VGA output. In theory the monitor should go into standby however the DVI seems to remain active, the monitor automatically switches to this input and so the monitor remains on. (Although the screen is dark I can see the back light is still illuminated)
Low tech solution to this is to just turn off the switches at the wall every evening but it's a bit of a concern when say I have had a lesson first thing and then the room is unused for a couple of hours.

... I wonder ... (hang on) ... no, I cant find anyway to turn off the auto source select on the monitors.
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Mon Jul 15, 2013 3:30 pm
Can you tell what it is yet?
Image
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by ame » Fri Jul 19, 2013 6:52 am
morphy_richards wrote:Can you tell what it is yet?
Image



It's an extremely long Raspberry Pi case?
Posts: 545
Joined: Sat Aug 18, 2012 1:21 am
Location: Japan
by morphy_richards » Fri Jul 19, 2013 7:31 am
ame wrote:It's an extremely long Raspberry Pi case?

10/10 very good!
I wanted to use trunking initially but its prohibitively expensive so this is MDF boxing. There will be a plate cut out to go over the holes and expose USB ports and allow the HDMI cable out.
Power supplies, network cabling etc will be inside and the lid can be removed when we do gpio stuff.
I need 16 of these beasties.
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by davidevb6 » Wed Jul 24, 2013 3:32 pm
Great Work! ;)
In Malawi i want to do the same ^_^
Posts: 2
Joined: Wed Jul 24, 2013 3:22 pm
by morphy_richards » Wed Jul 31, 2013 8:25 am
As the rpis and power supplies are going to be enclosed in long cases , turning them off and on again (on those occasions where this needs to happen) is tricky.
Am off to Maplin to get some suitable connectors and push to make switches to make 32 reset buttons that will use the rev2 board's reset holes. (Labelled p6 on the board)
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by rurwin » Wed Jul 31, 2013 9:16 am
New classroom sport -- you go over to chat with your mate, and see if you can press his reset button without him noticing. Bonus points if he hasn't saved his editor session since the beginning of the lesson.
User avatar
Forum Moderator
Forum Moderator
Posts: 2890
Joined: Mon Jan 09, 2012 3:16 pm
by morphy_richards » Wed Jul 31, 2013 9:37 am
Hehe that will happen ;) with the PC's the sport is 'turn it off at the plug'.
Edit Maplin is blimmin expensive when buying 32 push to make buttons. Going to get those elsewhere.
Edit edit... Wonder if a student is using pi as a berryterminal thin client & gets "resetted" , if they would be able to recover their session somehow :?
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by rurwin » Wed Jul 31, 2013 10:08 am
Switches are never cheap, especially when you need 32 of them. They'll be a pound or two each.

You may be tempted by this sort, which you can pick up for under a pound:
Image
I find they tend to fail. And they're rather small too.
User avatar
Forum Moderator
Forum Moderator
Posts: 2890
Joined: Mon Jan 09, 2012 3:16 pm
by morphy_richards » Fri Oct 18, 2013 2:49 pm
Things are going well ... mostly ...
It's helpful to use the raspberry pi's as x terminals as it makes managing installed software, monitoring students and modelling solutions (using epoptes) straightforward.
It can be a bit laggy from time to time but quite useable.
However...
The main LTSP server randomly (well not randomly exactly) reboots from time to time. Seeing as the whole class is using that server, that's not ideal.
There is nothing in syslog, just routine stuff and then standard stuff to show the server is rebooting at the time right after the crash.

I've been trying to use "lm-sensors" to do some monitoring. Currently sensors reports:
Code: Select all
lovelace_admin@lovelace:~$ sensors
fam15h_power-pci-00c4
Adapter: PCI adapter
power1:       23.31 W  (crit = 124.77 W)

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +12.1°C  (high = +70.0°C)
                       (crit = +80.0°C, hyst = +77.0°C)

radeon-pci-0600
Adapter: PCI adapter
temp1:        +75.5°C 


I'm ineterested in the reading from "power1" - what is this? It reports critical level at 124.77W. At the moment I am only using 23.31 but with 20 or 30 students running the JVM this often exceeds 135 W. I think this would cause a brownout, which could explain random system reboots.

But what I am unsure about is - my power supply (although cheap and unbranded) is rated at 500W. Why is this value of 124.7W seen as being critical?

Answers on a postcard please ... no that's silly. But seriously, before investing in another PSU does anyone think I am / am not barking up the wrong tree?
:)
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Sun Oct 20, 2013 7:48 pm
I will get a new PSU anyway... Seems like a damn likely suspect.
We are fitting out another classroom with Pis, this includes another LTSP server (called Emeagwali!). Using an older incarnation of my own room's server (Lovelace).
So ... as I now have a couple of servers on the same network, I will have a play with load balancing ... I have noticed a commented out line in the default ltsp.conf file (next_server ...) I wonder if it's as simple as specifying the IP address of the 'next server' when the current one get's too busy:?
Anyway, I may as well use everything I've got so will give it a shot.
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Mon Oct 21, 2013 2:06 pm
Dont think that's (ltsp load balancing) an option for now, it looks like I would need to do a major reconfiguration to my simplified network and add or reconfigure at least a further 2 servers to make it work.

I'll have to try upgrading the power supply and will also whack in some extra cooling too for good measure. My server seems to be stable normally, it's just when it's very "stressed" that it seems to reset iteself.
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Tue Nov 12, 2013 4:13 pm
After lots of further use, LTSP just seems problematic. The load placed on a PC, even a "powerful" one that's acting as an LTSP application server by 30 users running modern, resource intensive applications is too great. I suppose unless I am going to spend a fortune on a proper server this is not going to be suitable.
Too often mid task the "server" will simply reboot. Today this happened, clearly in the middle of doing something critical to the hard disk and it appears to be corrupted. I've tried various methods for salvaging data but no good.
Luckily it's mainly just applications on this server with student work saved elsewhere.

Will scrap the thin client method from now on and in future we will just work directly onto Raspbian. KISS. Keep It Simple Stupid. :shock: :)
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by jamesh » Tue Nov 12, 2013 4:33 pm
morphy_richards wrote:After lots of further use, LTSP just seems problematic. The load placed on a PC, even a "powerful" one that's acting as an LTSP application server by 30 users running modern, resource intensive applications is too great. I suppose unless I am going to spend a fortune on a proper server this is not going to be suitable.
Too often mid task the "server" will simply reboot. Today this happened, clearly in the middle of doing something critical to the hard disk and it appears to be corrupted. I've tried various methods for salvaging data but no good.
Luckily it's mainly just applications on this server with student work saved elsewhere.

Will scrap the thin client method from now on and in future we will just work directly onto Raspbian. KISS. Keep It Simple Stupid. :shock: :)


I'd be inclined to report this as an issue to the LTSP people - it should never crash so badly it corrupts the disk, and 30 people is not a huge workload. So something doesn't sound right.
Raspberry Pi Engineer
Raspberry Pi Engineer
Posts: 10601
Joined: Sat Jul 30, 2011 7:41 pm
by morphy_richards » Wed Nov 20, 2013 8:09 am
At some point I will do that. I've often noticed the ssh daemon has a fit on the server when someone uses ltsp so will investigate that.

I've got it mainly being an overpowered router now. The option still exists to open an X session on it via a Pi which should be good for using Gimp etc.
Logging the pis in and mounting home directories via LDAP which worked well yesterday. A much simpler approach and less to go wrong.
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Wed Dec 04, 2013 11:50 am
For a couple of weeks now I have been taking <sarcasm directed at self> the novel approach of using the raspberry pi's as ... raspberry pi's! </sarcasm directed at self>
(As opposed to using them as thin clients)

I've set up the Raspbian to use LDAP authentication to a Zentyal server - see http://forum.zentyal.org/index.php/topic,12925.msg66997.html#msg66997

My year 10 GCSE students are doing Java and Greenfoot. The new Raspbian image with proper java makes this particularly good when running on the Pi as opposed to using it as a simple X server / berryterminal / dumb client terminal.

The option is still there to use the Pi as a berryterminal to an Edubuntu server - this is particularly effective where my classes have students with multiple learning difficulties as the [Education] suite that is built into Edubuntu has some quite effective software that helps them approach literacy, numeracy, hand / eye coordination etc.

Where students are completing programming assignments (java, python, ..., even HTML (as you get to make the web pages but then get to host them from your own computer too)) the Pi as a Pi is great. If you need access to graphics editors / Office stuff etc. then it's really useful to just have that installed on the server, then students can SSH into the server from their Pi and access it from there. ie. by doing
Code: Select all
ssh -X username@servername
openoffice


This seems a much simpler, definitely more reliable method of providing access to assorted resources for a largish collection of simultaneous users.
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Mon Dec 16, 2013 11:49 am
dns -
this thread has the instructions for how I set up DNS/DHCP using dnsmasq, courtesy of rpdom's config file
Code: Select all
        # Local Configuration file for dnsmasq.
        #
        # See /etc/dnsmasq.conf for details on what these options do

        no-resolv
        server=10.192.160.10       
        #server=ip_of_external_DNS_2

        local=/internal_domain_name/

        expand-hosts

        domain=internal_domain_name

        dhcp-range=192.168.0.50,192.168.0.219,1h

        dhcp-host=lexicon
        #(and so on)

        dhcp-option=option:router,192.168.0.2
        # The next line means that this server is the DNS server
        dhcp-option=option:ntp-server,0.0.0.0

        dhcp-authoritative
        dhcp-option=3,192.168.0.2


But I added:
dhcp-option=3,192.168.0.2
#point to router



viewtopic.php?f=36&t=40767&hilit=dnsmasq#p338843


http://www.techrepublic.com/blog/linux- ... vices/293/
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Fri Feb 07, 2014 7:08 am
I think its worth mentioning in here that using root and sshfs is a good way of getting in and marking student's work. See viewtopic.php?f=62&t=68542
Getting them to email work in to teacher on the network would be great too but adds a layer of complication as all internal emails between students would need to be monitored.

There's a thermal printer available from Hobbytronics which prints out little till receipt things which are a great way of giving feedback to student's as little "tickets".
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Fri Feb 14, 2014 3:05 pm
Edubuntu 'classroom server' is useful to have on a Pi network but the "greeter" screen gets in the way from allowing students from using their network logins on the actual computer itself.

This page explains how to stop this http://www.untacomei.com/wp/ubuntu-12-0 ... me-screen/
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Wed Mar 12, 2014 4:02 pm
Have created a backup system... during a brief "lull"...

I had a raspberry pi with a knackered SD card slot, I've fixed this by screwing it to a plank of wood and securing an SD card in the right place by using lots of insulation tape on the back of it.
Image
Ive attacehd it to a powered hub and an external HDD. (formatted in NTFS). I had to install ntfs-3g on the pi to get this read-able.
Will be using rdiff-backup


At the moment I'm just backing up the login and file server "Athena"
I used this very handy guide http://www.howtoforge.com/linux_rdiff_backup
***note to self: it does work but watch out for hard to spot "example.com" type names in examples***

This just backs up onto the attached HDD though, fine for now but soon will need to automate sending a tarred remote, offsite copy over 'tinterweb to another pi and HDD in , say, my garage.
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Thu Mar 13, 2014 8:07 am
Following on, this thread by nsmith6 looks like a great idea for making a remote copy of a local backup file. http://www.raspberrypi.org/forum/viewto ... 36&t=50378

I think I would do this:
Daily local backups with rdiff to a local HDD on 'kerberos-pi'

(In Greek mythology, Kerberos was one of the guardians of the underworld. Where dead people went. Occasionally he would let someone back out again, well not really, he did everything possible to stop that sort of thing byt Heracles managed it... anyway... That's kind of like resurrecting dead / destroyed files. (Sort of)). Um... :?


Back on planet Earth, back to reality.

So, daily backups, on Friday evening schedule cron to tar all backup files and then sync torrent the backup tarball to Cerberus Pi over 't internet back to my garage (where Mrs Morphy Richards won't get cross about wires and stuff)
(Cerberus; the Roman name for the same Greek guardian and set up hardware wise in much the same way as Kerberos)
User avatar
Posts: 852
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by plugwash » Mon Mar 17, 2014 4:52 am
morphy_richards wrote:Off hand does anyone know if you can have VGA and DVI connected to a monitor at the same time to let pc and rpi share that too. (cant imagine why not)

Every monitor i've seen with more than one input had a way to select between them but some where much easier to switch than others.
Forum Moderator
Forum Moderator
Posts: 1982
Joined: Wed Dec 28, 2011 11:45 pm