Rachel on a raspbery pie zero w

Thanks for the information! I’ll give it a try and see how it goes, no problem. I’ve been working with a French build, but using Wordpress for the interface, and adding my own content (books, videos, etc.) through the WP interface and it’s been working great (once I figured out all the issues with performance). We using it in primary schools in Senegal …

You’re welcome. These images are a work in progress and will be updated soon. The first goal was to get RACHEL running on the new pi Hardware and OS but they haven’t been optimized so the performance on the pi0w might not be the best. I will probably switch to lighttpd after everything else is working properly. These are unofficial but I hope the RACHEL team will put host some full images with content in the future to make it easier for the pi0w.

Are you looking to make your own server? I can give you some advice on getting better speeds out of the pi0w.

James

I was reading a little about LightTPD ( https://pimylifeup.com/raspberry-pi-lighttpd/) and it looks pretty straightforward. I like the idea of having php 7 as well, actually. I tried running some other code recently that required it, and had problems. What’s the advantage over Apache? My “use case” is for a webserver with 30-100 students in a classroom. They aren’t all accessing it at one time, fortunately, but they are doing a mixed workload of videos (primarily KALite French), wikipedia and downloading pdf books to tablets.

Manning

The hope with Lighttpd is that it will take less memory which is limited on pi devices. The current images use Apache2 and mod_php because this is how it was previously set up. I did upgrade it to php7.0 and it seems to run well. Server configurations isn’t something I’ve had time to get to so I haven’t tested them all but I have tested with apache2 using FCGI php-fpm and it seemed pretty much the same. The issue with switching to lighttpd is making sure all of the modules and search functions work. I think the RACHEL-Plus uses it though.

30-100 students will be hard to support with a pi. I think the max you might be able to get when serving video to a class is going to be between 10-15 per pi with the 3B or 3B+. I have no idea how many students a pi0w can support but I think you would need one for every 5 or 6 tablets. You might want to test that out. @SHOMI is doing a French deployment in Haiti with Pis so it might be worth asking him how he set up their deployment. Installing Ka-lite on these images requires a bit of extra work right now because the finaliization scripts on the RACHEL rsync servers are out of date for the pi and there is a script I fixed for french ka-lite that is in the main image thread.

James

@jamesk – thanks so much for continuing to plug away at this. At least folks can appreciate how much work goes into this with all your work! What’s wrong with the finish install scripts? Did the rpi directory structure change?

Thanks,
Jeremy

Thanks Jeremy! I’m happy to be contributing.

I found that the finish_install.sh scripts fail when installing through the admin interface for a few reasons.

An invalid pidir. For instance

piDir=/var/www/rachel;

where it should be

piDir=/var/www/;

Use of the double brackets like this

if [[ -d $plusDir ]]; then

which is an extension that doesn’t seem to be supported. The solution was to use single brackets

if [ -d $plusDir ]; then 

Restarting ka-lite on the wrong port.

kalite restart --port=7007

while for the RACHEL-Plus it would use the default port with a simple

kalite restart

This is an updated finish_install.sh for fr-ka-lite that seemed to work for @SHOMI here. It was run as sudo over ssh though.

The newly implemented script for the en-file_share module also fails. I think that may be a permissions error as it changes the permissions on the uploads directory afterwards but I haven’t looked yet. How are the permissions set up for these scripts to run? is there a rule added to sudoers for a specific path?

James

I downloaded the smaller french KALite package, and then the install script (sudo ./ finish_install.sh) and then the language pack (english) from the KA lite admin page. That all worked. The KA Lite practice files worked, but was missing the instructional videos, so I also downloaded those from the Admin/Videos page.

On top of that, I’m using Wordpress and a lightweight WP Theme (“Education Mind”) that doesn’t make calls to the internet. I’m also using a caching Plugin. Installing mysql was no problem and seems to work well with php 7.

However, I also edited the “wp-config.php” file. This is supposed to block external requests (trying to get to the internet via calls can cause terrible performance issues, as your Pi will have no access to the internet). However, you may need this block commented out while configuring Wordpress during theme updates and plug-in downloads, etc. However, it’s best to find Themes and Plug-ins that “DO NOT” make external calls (you often see external calls for google fonts, for instance).

/** Block external requests */
define(‘WP_HTTP_BLOCK_EXTERNAL’, true);
define(‘FS_METHOD’,‘direct’);

Anyway, for now I have a nicely performing Pi Zero W build running.

2 Likes

Hello again. I downloaded all the KALite French videos, and the navigation shows up correctly (at 10.10.10.10) and when I go into KALite Admin, I downloaded all the video via their interface. It now shows that I have everything. However, the Rachel homepage and associated links (mapping) to the “Math by program” isn’t working. The links like this: http://10.10.10.10:8008/learn/khan/math/fr-first-grade-math/ seem correct from my other KAlite installs, but the page isn’t found (error message below). I believe the content is there, because I can see all the Math lessons from the “Math” section, such as --> Bases en calcul. Any suggestions on how I recover/find these links/content?

“Ce contenu n’a pas été trouvé ! Vous pouvez le télécharger en allant sur la page Gérer > Vidéos.
Unavailable Content
This content is unavailable. Either it must be downloaded, or the url is incorrect.
Sorry, this item has not been downloaded.”

Math Par Programme
CP
CE1
CE2
CM1
CM2
Sixième
Cinquième
Quatrième
Seconde
Première

Hi manno,

Glad to hear your server is working. I’m not really an expert with Ka-lite. I think the proper method for downloading KA-Lite content for RACHEL is to use the admin interface and not the KA-Lite interface. You can try running the finish_install.sh script again and see if that updates the database but I don’t know if it will. KA-lite is also replaced by Kolibri which is included in the other image. Everything that is available in KA-Lite is available in Kolibri but content should be installed through Kolibri. I included instructions for that in the readme file. If the finish_install.sh doesn’t fix it I suggest trying out kolibri.

James

Jamesk, I was trying to get the Spanish image going on the Pi Zero W. However, get a 404 not found when look for your custom images.

I had downloaded the current version, but was fumbling around with novice issues.

Thanks,
Pat

Hi @Patrick_Coyle1,

Sorry about that. I am uploading a new KA-Lite image today and a new Kolibri one will follow soon after. There were some shutdown bugs in a version of Kolibri included in those other images as well as some issues with Wikipedia modules that are now fixed.

James

Hi again,

I have upload an image in a comment at the end of this post RACHEL-Pi Image for Raspbian Stretch . This is a KA-Lite version that you can try with the Pi Zero W.

James

Thanks James,

I was able to flash the image you provided. See attached photos. However, I am such a novice I don’t know how to move past the required login and then be able to add RACHEL Spanish modules as described on the how to page: …l og into the RACHEL-Pi (user/pass: pi/rachel) and rsync content from our module repository. Modules must be downloaded to /var/www/modules I realize this is remedial stuff, so if there is a place you suggest I do some homework, I’d appreciate it. Thanks, Pat

IMG_9915

Hi @Patrick_Coyle1,

Glad it worked. Don’t feel bad at all! The default login/pass for the RACHEL admin user interface is “admin/Rachel+1”. I usually include tutorials with instruction pdfs with the images that contain walkthroughs but since this one is an unofficial image it’s not included. I will upload the new tutorials when I put up official images in the next few days.

It’s actually not remedial because the Pi Zero W can make things very complicated. RACHEL is using the wifi to create a hotspot and there is no ethernet connection. That means there’s no way to download anything to it without turning off the hotspot and setting it up to connect to a wifi router. Since the downloads require an internet connection, you’ll either need to download the modules and put them on a USB stick and connect the USB stick to your Pi Zero W to copy them, or turn the wifi hotspot off and connect to wifi with it for downloading then turn it back on, or you can get a USB Ethernet adapter for the pi zero which is the easiest option long term.

Let me know and I’ll give you step by step instructions to help whichever way you want to try. It’s also very helpful to have a USB Hub when working with the Pi Zero W so you can get your keyboard and other things plugged into it at the same time.

Hope this helps.

James

Thanks James,

I appreciate the help. I was able to download the Wikipedia ES module as zip file and have expanded it so shows as a directory “var”., w structure as shown in screenshot: Screen Shot 2020-06-25 at 8.21.34 AM

I have a USB hub, so instruction steps to transfer via USB stick would be appreciated.

Pat

Hi @Patrick_Coyle1,

You’re welcome. Glad to help. First, by default NTFS and exFat support are not included with the Raspberry Pi OS so you will need to use a FAT32 formatted drive and you will need to use a tool like one mentioned here to do it. With that ready, these are the instructions

  1. Copy the “es-wikipedia” folder to the USB drive.
  2. Boot your pi first then plug it in
  3. Run command “lsblk”
  4. Check the output for your USB device’s name. It should be something like /dev/sda1 or /dev/sda2
  5. Run command “sudo mkdir /media/usb”
  6. Run command “sudo chown pi:pi /media/usb”
  7. Run command “sudo mount /dev/sda1 /media/usb -o uid=pi,gid=pi”, where /dev/sda1 is the device name from the output.
  8. Run command “cd /media/usb”
  9. Run command “ls” and check if you see the es-wikipedia folder so we know the device is mounted properly
  10. Run command “sudo cp -R /media/usb/es-wikipedia /var/www/modules”
  11. Run command “sudo chown -R www-data:www-data /var/www/modules”

That shoulld be it. You may need to reboot for the module to work properly.

I should mention some things before you download a bunch of modules that

  1. This is a KA-Lite image and doesn’t include Kolibri so don’t download Kolibri modules for this one.
  2. The Pi Zero W has extremely limited resources so you may want to disable KA-Lite entirely and use en-kaos instead

Hope that works.

James

Thanks James, I appreciate the tips. One clarification: For the Wikipedia ES module, as shown in my prior post screenshot, for the first step, Copy the “es-wikipedia” folder to the USB drive; is it the 3rd level folder “es-wikipedia” that is in “modules” which is in "“var”?

You’re welcome Patrick. Yes you’ll want the third level folder. The folders you want in the /var/www/modules folder on your RACHEL-Pi device should always be the ones that start with the language code and then the module name. So “es-wikipedia” should be placed on the USB drive without the /var/modules folders it’s in. The final directory on your RACHEL-Pi should be /var/www/modules/es-wikipedia.

I believe the “/var/modules” namingi in the downloadable zips was for Windows support a long time ago. Hope that helps.

James, I’ve been slow getting to point where ready to try to copy the module folders.

However, I am at display line “Rasbian GNU/Linux 10 rachel tty1” and when enter return am prompted with "rachel login:

I’ve tried but admin
then Rachel+1 for password

generates “login incorrect”

Suggestions?

Thanks, Pat

Hi Pat,

The login/password at that screen should be “pi/rachel”. That should work. Let me know if you have any issues.

James