User avatar
piglet
Posts: 911
Joined: Sat Aug 27, 2011 1:16 pm

Re: kitting out a classroom

Tue Jun 11, 2013 3:58 pm

rpdom wrote:What will the naysayers say to that?
Nay?

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Tue Jun 11, 2013 4:47 pm

I was thinking more like "harrrumph, neigh"!
(Trying to type horse sounds isn't easy)
Edit ... Desperately clutching horse joke straws...
You could ask them 'hey why the long face'

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Wed Jun 19, 2013 9:31 am

Yesterday we used this network in anger.

Installed Greenfoot on the LTSP server. (Greenfoot is a kind of "skin" that runs on the Java Development Kit, it's kind of Scratch like in that you have visual characters / sprites, but introduces OOP as each character in an instance of an object. There is a code-behind for each character which is written in pure Java with some extra Greenfoot API's that do things like "move forward" etc. - this is written to work with the JDK but seems to work perfectly well using the ODK)

Anyway ...

Image
In the foreground you can see 4 workstations. Each has a r-pi connected to a DVI monitor, mouse, keyboard via the 2 USB ports. Each is connected to an 8 port gigabit network switch via a patch cable (you can just see that , little grey box at the end of each row)

"My" network is made up of the blue cable you can see running up along the walls and along the trunking and up into the ceiling. This is alongside but separate to the windows network that is provided by RM corporation.

Each row is currently connected to a 16 port 100 MBs switch which is on the shelf on the wall at the front of the room, connected to eth0 on the server. (I accidentally bought a 100MBS switch instead of 1000MBS so currently I have a bottle neck)
The LTSP server is then connected via a single RJ45 link to my firewall/router, DNS/DHCP and Kerberos/LDAP server which are in my office.

22 out of 30 students logged in fine, 2 of the rows of 4 seemed to have no connectivity (the port light on the switch that goes up to the big switch was blinking constantly)

The system, constarined as it was to 100 MBS was very laggy but useable.

To try to improve the situation I am installing an eight core processor to replace the single core processor and I am splitting the single 30 client subnet for the LTSP clients in the classroom into two 15 client sub-nets. (By installing a third NIC in the LTSP server, and configuring the LTSP DHCP) I will then use two gigabit 8 port switches at the server end, on the shelf at the front to provide links to each 15 client subnet on either side of the classroom)

edit - also wanted to mention berryboot can also boot the r-pi's into standard Raspbian but I am having trouble configuring this to mount the user home directory and take authentication from the Kerberos/LDAP server at present.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Thu Jun 20, 2013 7:49 pm

Have only just noticed in the FAQ:
Why no Gigabit Ethernet?

The Ethernet is driven via USB 2.0, so the upstream bandwidth would not support Gigabit.
Never realised that before. Seeing as I am primarily using the r-pi as an LTSP client and am using a gigabit sub-net what are the implications of this to us?
Not sure but I think ...

I could reduce cost by making my LTSP sub-nets 100 base-t however,
If the network cables and switches are all gigabit enabled then they will be better able to smoothly handle 15 clients / x-servers all communicating at 100 mbs.
Is that right or am I missing something?

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Tue Jun 25, 2013 9:47 am

I bought a new network interface card and processor for my LTSP server, opened it, tried to fit it in my server and realised I didn't have a suitable slot.

I opened my router / firewall, took the NIC out and replaced it with the one that didn't fit.
Took that NIC and put that in my LTSP server instead and installed my new 8 core superfast AMD processor thingy as well.
Updated my /etc/network/interfaces to give a static ip address to eth2 (the new NIC)
So I've got:
192.168.0.x = my main computing.lan network on eth1
192.168.1.x = lovelace1.lan (my room ltsp subnet, first half) on eth0
192.168.2.x = lovelace2.lan (the other half, 15 clients per subnet) on eth2

updated /etc/ltsp/dhcpd.conf and then tested.
No good. error obtaining lease from dhcpd server

Then I remembered /etc/default/isc-dhcp-server
Updated that so that the ltsp dhcpd server would listen to eth0 and eth2 and hey presto.

Did a quick test with greenfoot again and it works lovely!
(Mental note: At some point I will also need to configure network address transaltion (nat) and iptables so I can use the new subnet as a standard network as well, but not today)

But the main test will come this afternoon when I have 30 students all using it together.

Now in the meantime I have killed my firewall router by swapping out the NIC so now we have no internet.

Thaddy
Posts: 174
Joined: Wed Mar 06, 2013 11:28 am

Re: kitting out a classroom

Tue Jun 25, 2013 10:26 am

If you really want 30+ RPi's connected on the cheap, read something about grid computing. Speed should be satisfactory in the classroom and a single hub can connect to the outside world.
My solution would be ( and is ) to use connections (human) and try to convince them to give their old 100Mb switches and routers to you :mrgreen: . It works!

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Tue Jun 25, 2013 10:58 am

It's actually not that expensive. All I need is a few gigabit 8 port switches which cost about a tenner each and some cabling.
The main cost is the r-pi's themselves, even a "superfast" LTSP server can be built for about £250. (I dont care about graphics as the r-pi's themselves take care of that, so essentially just a motherboard, memory, cpu and a few NICs)
The other architecture such as my router/firewall, ldap etc is just using ancient "scavenged" old hp desktops

The grid you mention certainly looks interesting. It sounds similar to those disttributed computing programs using spare CPU time for things like SETI at home, molecular modelling to produce new drugs etc.

My issue at the moment is that most of what am putting together as a network also forms part of the GCSE syllabus so my time spent doing all of this is also honing my subject knowledge.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Wed Jun 26, 2013 2:02 pm

That was quite successful. The more powerful architecture and separate sub-nets makes a better experience when approx 30 people are using the system together.

I'm having some problems though.

Some of the berry terminals display the ltsp login screen normally, but then when a user types in login credentials it boots x but doesn't start the desktop manager. What you end up with is a black screen with an X which is the mouse pointer. You can move it around with the mouse but that's all that happens.

If I take out the sd card and plug into a PC, delete the contents of the FAT partition, copy the berryboot files in again and redo the whole process then it's okay again. (apparently)

It's not an ideal situation though, I wonder what's going on.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Wed Jun 26, 2013 2:20 pm

If I take out the sd card and plug into a PC, delete the contents of the FAT partition, copy the berryboot files in again and redo the whole process then it's okay again. (apparently)
Actually no. Having just re-written and re-installed an sd card it still failed to load lxde. :?

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Wed Jun 26, 2013 2:52 pm

Could it be caused when the raspberry pi is powered off? Basically, if it's just switched off at the wall...

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Wed Jun 26, 2013 3:17 pm

I'm beginning to get a sneaking suspicion that it's something to do with lxde as logging in a test user who has set their default manager to gnome classic and it seems to work okay on a machine that previously did not work.

Hmm...

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Wed Jun 26, 2013 3:46 pm

Nope that's not it either. It seems to be completely arbitrary as to when it's going to start. Regardless of gnome classic, lxde or whatever.
The only solution seems to be unplugging the power if you get stuck on a black screen of X, wait a few seconds, plug it back in and try again.
:(

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Thu Jun 27, 2013 8:31 am

Going to try ...
LDM_LIMIT_ONE_SESSION = True

In /var/lib/tftpboot/ltsp/i386/lts.conf

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: kitting out a classroom

Thu Jun 27, 2013 9:25 am

It sounds like the X session is not starting, ie the window manager and desktop manager don't get started. Where are those run? If you are logging in to a server and using the Pi as a thin client, I suspect they are running on the server. If all the Pi is running is the X server, then it seems to be doing it's job OK.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Thu Jun 27, 2013 3:19 pm

Hi Rurwin.
That was exactly it. I could run:

top -u test1 (assuming test1 had logged in corerctly) and see everything I expected to see
top -u test2 (assuming test2 has blank screen of X) and I will only see sshd and a few other bits and bobs.

The issue is nothing at all to do with the Pi but because it's a very intermittent fault it would seem as though all sorts of test scenario were causing it to happen.
I've had it down to different sd cards, different images, different user names, different desktop managers but it's none of these things it's a problem with Ubuntu.

My system is slightly unusual as users are not local to the ldap server, they are all kerberized/ldap(ed) on another machine.
There is a known bug in Ubuntu (the LTSP server) from about 11.x and up which means this just will not work properly.

The solution on my 12.04 system was to install nscd.

Limited testing I've done so far indicates that now my problem has simply just gone away.

(Crosses fingers behind back, touches wood, stands on one leg and hops three times in a circle widdershins while whistelling "my old man's a dustman" bacwards all to avoid jinxing anything)

edit - while I am here wanted to make a note of

This explains how to configure the ltsp subnet so that you can double it up as a normal network - ie. i can plug a laptop into the same subnet as the berryterminal's and access the internet.

Also: A good general reference for all Ubuntu ltsp stuff here.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Fri Jun 28, 2013 3:17 pm

Wow that was horrible!

30 students as thin clients each one running the openJDK. ("Greenfoot" using the openJDK)

I don't think the problem was processor capability I think it was memory - but I couldn't even get in to terminal myself to run top to see.

I've got 8Gb on the server but I don't think that's enough! But then I get the feeling that whatever I put in will never be quite enough.

What to do?

This thread mentions running greenfoot locally on a raspberry pi http://www.raspberrypi.org/phpBB3/viewt ... 34&t=29928
Dual boot pis, install raspbian.
Get students to login as pi
Install JDK
Install Greenfoot
Mount home directories manually

Worth a try I suppose.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Fri Jun 28, 2013 5:30 pm

Just thinking about this a bit more ...

If default JVM heap memory is 128 Mb on most 32 bit systems and is about 30% more on 64 bit systems
Then on my system running a JVM uses about 166 Mb.
30 people together means a total of almost 5 Gb. On an 8 Gb system that only leaves 3 Gb free for 30 users desktop managers and everything else.
(To me 3Gb still seems like a lot but in practice that means each user only has about 100Mb of memory left)

So, I suppose it's worth trying to double up memory to 16 Gb. Sadly this means getting a new motherboard.
Still, you live and learn.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Mon Jul 01, 2013 12:38 pm

No have dual purposed raspberry pi's.

Either use as berryterminal thin clients or ....

A proper networked Linux computer in it's own right with access to a remote home directory! (yay :D )

HOWTO:

Install and setup Raspbian alongside berryterminal (via berryboot)
Login normally using the standard out of the box pi user account.

Next:
install sshfs
sudo apt-get install sshfs
sudo adduser pi fuse
sudo usermod -G fuse pi

reboot
sudo shutdown -r now

login again
create a mountpoint
mkdir ~/myhome
sshfs username@athena.computing.lan:/home/username ~/myhome
(obviously replace athena.computing.lan with your own server or ip and username with an actual username)

there it is ... :D

and unmount again
fusermount -u ~/myhome

Some peculiarities though. :o

Files saved show up from one raspbian to another raspbian computer BUT
The files dont show up when the user logs into a berryterminal thin client which is damn peculiar :?

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Wed Jul 03, 2013 8:33 am

Edubuntu 12.04 seems to have bugs when it comes to auto-mounting remote home directories using pam_mount / cifs
I encountered a few of these and thought I had resolved them.
What was happening was that, edubuntu would contact the sso server and successfully negotiate a login. It would then try to mount the home directory but would fail as the mount point was not being created on the local computer.
I thought I had resolved this by adding an extra direction to pam_mount

Code: Select all

<volume user="*" fstype="cifs" server="x.x.x.x" path="temp" mountpoint="/home/%(DOMAIN_USER)/SRV/temp" options="sec=ntlm,nodev,nosuid" />
This allowed remote users to login and the mount point would be created on the local machine.
However, files were not being saved on the remote machine they were actually being saved on the local machine in the mount points / the mount points are :? not mounting?

I only noticed this was the case when I used sshfs with a test account from a rasbian raspberry pi.
After much trawling I cant see a satisfactory solution to this so I am considering:
Trying Edubuntu 13.04 instead of 12.04 (Ubuntu 13.04 seems to work nicely on my laptop at home)
Or downgrading to 11.04 and trying that instead (currently downloading this now, slowly, from an educational server in Indonesia somewhere)

Failing that I will ditch Ubuntu altogether and go with Debian. (Which would be a shame because Debian is more nuts and bolts and less suitable for use by teachers with none CS backgrounds - which is most of them)

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Wed Jul 03, 2013 2:48 pm

I just cant seem to get this to work! Remote home directories just don't get mounted!!!

As a temporary working (not)solution - could I make some sort of a chron shell script on my remote login/file server that:-

Checks the contents of local_server/home/$USER and copies the contents to remote_server/home/$USER every evening?

Sort of like a backup gone a bit wrong. :?

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: kitting out a classroom

Wed Jul 03, 2013 6:38 pm

rsync?

(Don't know; never used it.)

User avatar
rpdom
Posts: 15411
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: kitting out a classroom

Wed Jul 03, 2013 6:45 pm

rurwin wrote:rsync?

(Don't know; never used it.)
That would be my guess.
(Yes, have used it - a lot! Very useful and powerful)

Bakul Shah
Posts: 321
Joined: Sun Sep 25, 2011 1:25 am

Re: kitting out a classroom

Mon Jul 08, 2013 4:41 pm

morphy_richards wrote:Checks the contents of local_server/home/$USER and copies the contents to remote_server/home/$USER every evening?
csync2 can be used to keep files on multiple hosts in sync (I have played with it some but no real experience). There is also lsyncd (live sync daemon).

As for sharing home directories, may be you can use NFS?

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Mon Jul 08, 2013 8:17 pm

Thanks everyone. I may have made some errors in my initial setup a few months ago which I am now in the process of addressing. I'll let you know how it works out. The synch method sounds very good , even if I don't end up needing it I'm glad I know about it now.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: kitting out a classroom

Tue Jul 09, 2013 3:29 pm

Just had an interesting lesson...
I've now got 31 in my (pilot) GCSE ICT Class :shock: This is all kind of killing time type stuff until the course starts properly in Sept and hopefully by then I will have got everything working properly.

Anyway,
Used Berryboot and got the kids to install Debian/Raspbian
Then they installed joe (just because it's my favourite text editor)
Then they installed apache2
Located the www directory
Then they modified the default web page into a page about West Ham Utd or … chickens(?) … etc … Anyway …

They then discovered their ip addresses (ip addr show) and spent the last part of the lesson visiting each others web sites.
We had a discussion about dns (unfortunately I've run out of r-pi's otherwise I would have set one up with dnsmasq that they could log into and set their own aliases for their ip addresses)

Still not managed to get my ldap file server thingy working yet. :( I'm determined to make it work properly but at least I know I can resort to synching if needs be :)

Return to “Staffroom, classroom and projects”