RACHEL on Raspbian Stretch Install Script

Hi JamesK

Could you share the installation script for me to test as well

mataiwq

Hi, I just take a look at it, I will try to make it on the Raspberry zero. We have done with kiwix without difficulties, the main problem is to have card with big capacities, which are stable.
I will post the result

hi, we have tried and the script stop with
ERROR: pip install ka-lite-static command failed

any idea what is wrong?
we have followed the instructions, only thing before te installation we have install ssh, but it should not disturb.
dmesg does not show mistake,

i am lostā€¦

interesting: after ERROR i donā€™t have cursor it just disappear
mistake in ka-lite-satic ??
when we start ./installer --no-ka-lite-static
the script continue installation finished.
but ā€¦
accesspoint does not appear
so we test, but tomorrow

python version 2.7
pip 9.0.1

sorry for the spam but the new login
admin
Rachel+1
is not functionning
so now???

Very sorry for the delay. I got notice that my apartment was being painted and had to move everything out at the last minute. I just got everything back in place and this is my top priority to get done. I will notify you when itā€™s done and I will include a link to the image on my Google Drive. I will post a link here but I will also reply to you with a direct link to download and will help you with setting everything up.

Hello. The installation script is included at the top of the post. This is the link https://drive.google.com/open?id=16YWhmo6otCfxBgs9JrM4OHn_ODO7w9ep to the zip file containing the installation script as well as the updated rachel content shell. Let me know if you have any issues.

Hi, Sorry for the delay. The best way to get RACHEL working on a pi0w is to run the installation script on a Pi3B or Pi3b+ and then transfer that device over to the pi0w. I can confirm this method works with both a MicroSD and a USB Flash Drive as well as a 314GB WD Pi Drive. For the installation script to work you need an internet connection to download the packages. RACHEL sets up the wifi interface as a hotspot, which can cause issues with running an installation directly. I can update this in the future to work for a pi0w, but when I get an image uploaded you shouldnā€™t need the Installation script anymore.

The KA-Lite installation is the first part of the process the installer runs, so it is likely failing very early on, but it could be because of how slow the pi0w is too. The admin/Rachel+1 not working tells me that something went wrong during the installation process. I am back available to work on this today and will have a test image you can try out that will hopefully work.

I thought I would let you know that I have uploaded a Raspbian Stretch test image and made a post about it with instructions at this link. I had to create a new post as I canā€™t seem to edit this one. If you have any questions or need help getting it going please feel free to ask.

Hi,
I followed this wonderful guide and made my own RACHEL PI server.
Strangely, when I install couple of individual modules from oer2go.org, upto certain number (< 20 GB), everything works fine.
However, by a script, installing about 70 GB worth of modules (either in English or in French), the wifi interface disappears.
I wonder if anyone had similar problem?
when I re-run installer.py, then it wipes out the whole /var/www/modules directory and the wifi comes back. However I need to re-install everything again, and still same problemā€¦

Hi Kevin,

Please provide a list of modules installed which makes up the 20-70GB.

Hi Steve,

Here below is the list that Iā€™ve installed;

sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-kalite ./
sudo ./kalite_fr_install.sh

sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-afrique-marie-wabbes ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-blockly-games ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-bouquineux ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-catdogbooks ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-ebooksgratuits ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-women-in-african-history ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-hesperian ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-gutenberg ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-phet-zim ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/en-scale-of-universe ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/en-worldmap-10 ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/en-scratch ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-wikipedia ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-wikivoyage ./
sudo rsync -Pavz rsync://dev.worldpossible.org/rachelmods/fr-wiktionary ./
sudo perl /var/kiwix/bin/rachel-kiwix-start.pl
sudo service kiwix restart

A special treatment has been done for KaLite and Wikipedia.
Ka Lite has been installed separately and the provided finish_install.sh has been adapted to include the correct directory. ==> renamed as ā€œkalite_fr_install.shā€.

And wikipedia has been installed and then kiwix has been restarted.

Thanks for your kind help in advance.

Kevin

@Kevin82 I would suggest using the image from this thread and the install content through the admin interface. I was unable to update this post for some reason, so I continued to work on it and posted an image instead. Those images contain bug fixes that are not reflected here. It is known to be stable and work with more content. There is also a fixed finish_install.sh of kalite in that thread. Re-running install.py after an initial installation will cause some errors as some settings will be written twice.

James

James,

Thank you very much for making this wonderful procedure.

A question / clarification please;
In this thread, there are 2 images;

  • RACHEL-Pi Image with Kolibri - rachel_pi_kolibri_10_30_18.7z
  • RACHEL-Pi Image - rachel_pi_10_18_18.7z

It somehow gives me impression that kolibri version is more up to date. However, when I installed it, I understood that the user interface has somehow changed and I was not able to install properly the kolibri version of KaLite or other stuff.

I did not try the other image, yet. Maybe I will give a go.

I wonder what is the main stream of Khan Academy and LearningEquality. Why there are now 2 separate versions of KA (kolibri & kalite) and which one will remain to support?

Iā€™m installing this RACHEL for schools in Africa, which does not have an easy update means. However, once Iā€™ve delivered it, my only wish is that the interface remain same as long as possible, so that even if I send an update with SD card later on, it wonā€™t disturb the local teachersā€¦

Moreover, I wonder how you have configured the hostapd. When I tried to debug myself (as a beginner on linux system), Iā€™m quite lost. As the ā€œinterfacesā€ file does not identify wlan0, but it is still shown as ā€œup and runningā€, whilst, ā€œRPIā€ wifi has gone and I canā€™t find it back after several reboot attemptsā€¦

Thanks
Kevin

Kevin,

Youā€™re welcome. Iā€™ll try to explain.

In my opinion Kolibri is meant to replace KA-Lite and KA-Lite is still around for backwards compatibility. This comment explains a bit of the difference between the two. Kolibri has the same content available that KA-Lite has, but it also has more updated content for multiple languages across multiple standards while KA-Lite seems to be just for the specific language you choose to install. When you go to install Kolibri content ( channels ) you can pick portions of the content instead of the whole content pack for the entire language. This make it easier to design courses and helps with picking content for each deployment as you can separate by language. It also keeps the size down. Some content in English, some content in French for instance.

To be effective I think Kolibri requires a bit of training for both teachers and students as itā€™s a classroom management program that requires setting up accounts for the administrator, adding content to courses, and learning how to navigate it. While I think this was available in KA-Lite, it seems much more prominent now. I do think that itā€™s the best way to future proof your deployment. If you are deploying to Africa soon thereā€™s a better chance that new Kolibri content and updates will be available in the future. I would go with Kolibri as that seems to be their main focus now.

Both KA-Lite and Kolibri run a server in the background. This takes up resources from the system and the Raspberry Pi has limited resources compared to a RACHEL-Plus device which run both, especially on the cheaper hardware like the Raspberry Pi 0w. There are two different images because it doesnā€™t seem necessary to run both at the same time for the Pi. If you run Kolibri, you donā€™t need KA-Lite as Kolibri has all of the KA-Lite content available. The Kolibri image was made after the KA-Lite image, and contains a few small fixes. Both images will have all of the same fixes soon when I release a new image ( hopefully this week ).

The issue with the Kolibri image is that you canā€™t install Kolibri channels from the RACHEL interface. You have to install them from within Kolibri. That is a problem with the finalization script I think. The Kolibri-index module which shows up on the RACHEL home page like other modules works though.

The issue with the KA-Lite image is that when you go to install KA-Lite content from the admin interface, the finalization script errors due to some differences in syntax. This method of installation through the admin interface is probably designed for the RACHEL-Plus and not the RACHEL-Pi and although it works, some of the scripts have things like double [] and old file paths for the rachel-pi that donā€™t work. This is the updated script that works. It is hardcoded to French, ( lang=fr; at the top) but unless another way can be found Iā€™m just going to add a fix in the admin interface to run it for any language.

Networking has changed in Raspbian Stretch and the interfaces file is no longer used. The hostapd settings are in /etc/hostapd/hostapd.conf" and you can see them there. If youā€™ve run the installation script twice this file might have duplicates in it causing issues. You can edit it with ā€œsudo nano /etc/hostapd/hostapd.confā€. Another thing you can do is ā€œsudo ifconfig wlan0 upā€ and see if that brings it up. ā€œifconfigā€ will show wlan0 if itā€™s available. Also ā€œiw dev wlan0 infoā€.

I hope that answers your questions.

James

Great James. Thank you for your kind information.
Iā€™m only working at night (my daytime job is something complete differentā€¦ ;o)).

Although you mentions kolibri may be the future, I would like to keep with ka-lite for the moment, as itā€™s almost same as my previous distribution, and straight forward for any updateā€¦

In fact, I also have a doubt about the link between power supply and the wifi server.
When I have trouble with the WIFI, ifconfig still shows that itā€™s working fine.
Although I canā€™t detect the WIFI signal on my all other devices.

Initially, I started with a 16 GB sd card. I installed the RACHEL with your script and managed to install also owncloud, blynk server, MQTT server, etc.
Then just before switching off, I re-enabled the sd card /root partition expansion with raspi-config at the next boot up.

Once switched off, I have created a new image of this SD card, and duplicated onto 128GB sd card. From which, I ran a script to install all modules.
Then, I found at the end that the WIFI disappears.

So, my suspect so far were;
(1) making smaller size sd card and then expanding to bigger card introduces some inconsistency
(2) one or more modules interact with WIFI system, which then switches off due to some internal conflict
(3) kolibri & ka-lite & zim ā€¦ servers conflict somehowā€¦
(4) power supply is not strong enough to power the RPI 3B+ consumption

So basically too many variables and I do not have a clear insight of what your script / install is relying onā€¦

Let me dig into it for some more time and come back to you.
Any suggestion that you may propose would be greatly appreciated.

Kevin

James,

By the way, your script for the KA finish_install.sh is great and thatā€™s how Iā€™ve modified earlier (just the directory positions were different in the original distribution).

If you can kindly accept I have some additional questions on the RACHEL server menu itself;
(1) In the /var/www/index.php, I see that there are ā€œadminā€ link is created in the main page under ā€œadminnavā€ ID. However, itā€™s not visible when you access it from WIFI link (10.10.10.10) but only visible from my local Eth0 link.
(2) When I add a new link next to it under the same ID, both disappears.
(3) the IP address display showip() php never worked on my case. Just a mysteryā€¦
(4) And I had to add my home menu in the showip() script section.

I donā€™t know if you have noticed this problem beforeā€¦

Kevin

@kevin82 I would start fresh with the KA-Lite image. This is known to be working and the script is very outdated. Thatā€™s the best way to get up and running. The image resizes itself on first boot so you can flash it directly to the 128gb SD card.

For your possible Wifi bugs.

  1. If youā€™re using ā€œpishrinkā€ to make a smaller size SD card image it doesnā€™t work for the automatic resizing. It will reduce the image size but break the image upon re-expansion. My suggestion is to use it only to shrink images but to implement filesystem resizing manually. You can edit the pishrink script to disable resizing or pass an argument to ignore resizing.
  2. No modules should have access to the wifi system that I know of. I believe this requires sudo access to ifconfig which was not added to /etc/sudoers through this script for the ā€œwww-dataā€ user. Most things will error if they access the wifi configuration files as well.
  3. The installer youā€™re using doesnā€™t include support for Kolibri so the only things installed are kiwix-serve on port 81 and Kalite on port 8008. If youā€™re using the Kolibri image it runs on 9090 but I canā€™t see this conflicting with wifi in any way.
  4. An insufficient power supply will show low voltage errors in your terminal window but not over ssh. If you 3B+ is hooked up to a monitor over hdmi you will see them. You may see problems with wifi if thatā€™s the case, but I have run my 3b+ with an insufficient power supply and the wifi works.

James

Hi James,
Thanks for your tip.
I tried couple of things for the WIFI, and somehow it got started without really letting me understand.
I noticed that if I donā€™t detect the WIFI af the boot up, I tried to type ā€œsudo service hostapd restartā€, and then checked ā€œiw dev wlan0 infoā€. Sometimes, it does not show the SSID name, and if itā€™s the case, I canā€™t detect WIFI.
Then once or twice to restart hostapd, it may bring up the WIFI againā€¦ strangeā€¦

I do suspect that if itā€™s linked with a power supply issue.
As I want to run the whole system over a solar panel charged battery, Iā€™m still struggling with the input current. 3B+ is quite power greedy and does display couple of times the lightning flash on the HDMI display. and the problem of not having WIFI is more frequent when Iā€™m running it on the battery.

On 3B, I hardly had similar problem before (as far as I recallā€¦)

Have you tried to install RACHEL on some other machines before? for example Orange Pi ?
Or something slightly more powerful in CPU powerā€¦?

Kevin

Hi Kevin,

If hostapd is running then the wifi type will be ā€œAPā€ when you run ā€œiw dev wlan0 infoā€ and the SSID will show. When hostapd is not running it will say ā€œmanagedā€ for type and there will be nothing under SSID. You can also check the status of hostapd with systemctl. I would still use the latest image to see if it fixes your issues.

I have run RACHEL on many devices including routers and mini routers with less power than the Raspberry Pi hardware. The goal for me is not to run it on more powerful hardware as thatā€™s what the RACHEL-Plus is for but to run it on cheaper hardware so there can be more deployments at a lower cost. There are very few use cases for other hardware.

James

Hi James,
I am going to Siavonga, Zambia in a couple of weeks and I would like to take the latest RPi3+ image. I am using
rachel_pi_kolibri_10_30_18 is this the one to use?
Also I have installed Kolibri on some donated laptops running Raspbian for PC and have got on well with this. My technical knowledge leaves something to be desired and I was wondering how dificult it would be to add RACHEL to these computers.