RACHEL-Pi Image for Raspbian Stretch

As part of the process over at this thread I have made some minimal RACHEL-Pi images for Raspbian Stretch. Please let me know how it goes!

Downloads

Installation

  1. Download the image You want to use from the links above.
  2. Unzip it using 7zip. You can download 7zip at this link.
  3. Flash the image to a MicroSD or USB storage device using a program like Etcher,
  4. Place the device into your Raspberry Pi and turn it on.
  5. Please read the ReadMe file included with the image or at the links above for further instructions. There are some important new steps added for the Kolibri image as well as a fix for the issues around loading some Wikipedia modules.

Notes

  • Kolibri channels should be installed through the Kolibri import process. Installing Kolibri channels through the RACHEL admin interface is not currently working.The Kolibri-Index module is working however.
  • A fix for Wikipedia modules that were not previously loading has been added. Instructions are in the ReadMe files.
  • The en-file_share module is not included now as it installs without error now through the Install tab. Thank you to the person that fixed that.
  • KA-Lite is not included in the Kolibri image but KAOS modules will work.

Updated 10/30/18

5 Likes

Thanks for all your hard work James.
Kind Regards
Howard

Thank you James, great effort and big help

Thank you. I’m glad to help. I hope it works well.

You’re welcome. I hope everything works.

Finally an image! Thank you so much James for this. It’s easier downloading the image (and content) using a download manager than having to connect directly (As I get formidable speeds at the office and can’t run RachelPi while there). I will test on my RPis(2,3,3B+) and revert.

I’d also be interested in a step by step guide on how you built this for the Pi. I’m interested in deploying on an Odroid HC1 which also runs on an arm processor. With support for up to 12TB HDD I’m keen to evaluate what the possibilities could be. Plan to test with a 4TB HDD

1 Like

No problem! This is the first image so I’m sure there will be a lot of changes and things to fix. There are still a lot of things to work on and improve, but I think all of the basic functions work for now. Hopefully you can connect this at your office and be able to install modules from there.

The best way to start for the HC1 would be to run the installation script for the Raspberry Pi on the HC1 and see what fails and fix as you go The process in creating this image and updating the existing install script for the Raspberry Pi was trial and error which took months of work as it’s a very slow process. I went through and tested every line and when they failed tried to fix them. It was also a lot of research and googling to get other things working as well as digging through the content shell code to see how things worked and fix bugs. To make this image I just ran my install script on the latest release of Raspbian lite, fixed a few bugs that showed up in testing, added automatic filesystem resizing for the next time it booted, made an image of the SD card, then used a script to remove the free space from the image to reduce the size.

All of the work was in creating the script and fixing bugs. I can look at the HC1 in the future but first I’d like to get the Raspberry Pi stuff up to date and finished first.

Thanks again James. I have managed to install RACHEL on the Pi3B+ and I am currently downloading the modules I would like. Well done!
Kind Regards
Howard

You’re welcome Howard. Great news! Please let me know if you have any issues with installing modules. I’ll be happy to help.

jamesk,

Thank you for the hard work you have put into the new Rachel Pi update. I have installed it on a RPI 3B+ and it boots straight to the 120gb SSD with no microsd. I have downloaded most of the French modules and most seem to be working great. The system seems to work fine with several devices connected at one time. I am still testing with several Raspberry PI desktops to simulate the setup I plan to do in Haiti.

I downloaded fr-kalite and it gets to 99% and fails.
latest output:
FI: setting up variables
Unknown system – exiting.

fr-kolibri-channel-khan-academy
Files and Data done show 100 % but that’s where the system shows it stalled. I tried it twice
-The KAOS does appear to run fine though.

FR-KALITE _ Failure screenshot|690x215Kiwix _ No zim modulesStalled _ fr-kolibri-channel-khan-academy

@SHOMI you’re welcome. I think the RACHEL project is great and wanted to help so it’s my pleasure. Thank you for the feedback on the setup. I’m happy it’s mostly working for you, especially with an SSD.

I suspected most of the Khan Academy modules would be an issue because they run a script after the files are downloaded and that looks to be what happened here. I believe that script is intended for the RACHEL-Plus systems and that is why it exited but I don’t have a copy of it to see. The download of that module will take 10 hours for me. Would it be possible to screenshot or upload that script somewhere so I can try to fix it? it’s in /var/www/modules/fr-kolibri-channel-khan-academy/finish_install.sh. If you connect your pi to a monitor and log in with username “pi” and password “rachel” and run this command “sudo cp /var/www/modules/fr-kolibri-channel-khan-academy/finish_install.sh /boot/finish_install.sh” it will move it to the boot drive so you can access it on windows if you plug the SSD into a windows PC to make it easier. If you’re not sure how to do that I can download the full module but it will take some time.

The screenshot above the rachel one is of Kiwix which is for Wikipedia. The KA-Lite management interface should hopefully be at http://10.10.10.10:8008. Have you tried Wikipedia yet? I’m curious if that runs too.

1 Like

The Kolibri packages are run by that team and right now ONLY work on the RACHEL-Plus devices (though you could definitely configure the Pi to handle them also). Here’s the finish_install.sh for the kolibri packages:

>   GNU nano 2.5.3                                                                           File: finish_install.sh
> 
> #!/bin/bash
> 
> # change to the module directory
> cd "$(dirname "$0")"
> 
> # since content will be temporarily unavilable, and we'll be using the database, safest to stop Kolibri during this process
> service kolibri stop
> 
> # create the symlinks to connect the content in this module into the main content directory
> python establish_content_symlinks.py
> 
> # if versions have changed on existing channels in the database, delete as needed to trigger a re-import
> for database in content/databases/*.sqlite3; do
>     channelid=$(echo "SELECT id FROM content_channelmetadata;" | sqlite3 $database)
>     echo "Checking whether channel $channelid has changed..."
>     newchannelversion=$(echo "SELECT version FROM content_channelmetadata;" | sqlite3 $database)
>     oldchannelversion=$(echo "SELECT version FROM content_channelmetadata WHERE id = '$channelid';" | sqlite3 /root/.kolibri/db.sqlite3)
>     if [ "$newchannelversion" != "$oldchannelversion" ]; then
>         echo "\tAttempting upgrade to channel version $newchannelversion..."
> 
>         echo "
> try:
>     from kolibri.core.content.utils.channel_import import *
>     from kolibri.core.content.utils.annotation import *
> except ImportError:
>     from kolibri.content.utils.channel_import import *
>     from kolibri.content.utils.annotation import *
> 
> channel_id = '$channelid'
> 
> import_manager = initialize_import_manager(channel_id)
> import_manager.import_channel_data()
> import_manager.end()
> 
> set_availability(channel_id)
>         " | kolibri shell
> 
>     fi
> done
> 
> # start things back up again
> service kolibri start
1 Like

Thanks for the info Jeremy. Is it okay to try and get them working? I don’t want to step on any team’s toes with this. I think I’ll have to download the whole package to do it as well as it seems more involved than I thought.

jamesk

I ran the command finish_install.sh, the site will not allow the file to upload.
I have downloaded 5 of the wiki modules. The 34gb Wikipedia seems to be working fine. The others: wikilivres, wikisource, wikiversity and wiktionary all loaded but most of the content links just show up as text.

I also tried the ka-lite management interface, but I am not sure what the login credentials are.

I have a spare 120gb ssd that is already duplicated with most of the French modules that I can send to you at no cost if you want to take a look at and use for testing. No return necessary.

Thanks,
Don

jamesk,

This is a list of what is installed at the moment. I downloaded quite a few to test them out and see what would work best for the first round. The Rachel PI for my team is a starting point and to gauge if it is successful or not. If this turns out to be successful, we plan to upgrade from 12 desktops to 30 for a full class and go with the Rachel Plus. The Rachel PI will then be moved to the next school, etc, etc.

Thanks again to the World Possible team and to you jamesk for the work you have put in behind the scenes for folks like us to be able to go out and provide much needed resources.

Rachel_Pi sys swInstalled modules

Thanks for the feedback and offering to send the 120GB SSD Don. I think I should be able to manage fixing everything without it but I appreciate the offer. It sounds like you’re doing a lot of good work in Haiti and I’m happy to help in any way I can. I think your plan of upgrading to a Rachel-Plus system will be the best route for 30 users and the raspberry pi servers are a great starting point to get people introduced to rachel.

I was able to download the hi-kolibri-channel-khan-academy yesterday to start testing what was wrong. It looks like Kolibri completely replaces the ka-lite server so the rachel image should be updated to include it instead. I managed to install Kolibri and get it running but the rachel-index.php of the Hindi module is empty so I can’t tell if the module’s links work inside of the rachel interface. I think the others should be okay if they’re not empty. The Kolibri server works but it seems some files to make it start automatically are not installed during the installation process so I am making sure everything is correct and then I’ll write a quick script to fix your image and upload a new image when it’s working.

If you would like to test installing Kolibri in the meantime this is the process I used.

  1. “sudo apt-get install sqlite3”
  2. “sudo pip install kolibri --pre --no-cache-dir”
  3. “sudo kolibri start” ( this may take a minute. It acts like a setup command )
  4. “sudo kolibri stop” ( make sure to do this after the start command is finished )
  5. “cd /var/www/modules/fr-kolibri-channel-khan-academy”
  6. “sudo sh finish_install.sh” ( this will error trying to start the service at the end but it should be okay )
  7. “sudo kolibri start”

It should work after this but it may need a reboot. The installation doesn’t set up to start the kolibri service automatically so you will have to type “sudo kolibri start” when your pi starts up for kolibri to run until I can make sure my fixes for that are correct. Kolibri should then be at http://10.10.10.10:8080 and will have a setup process when you first log in.

I am not sure if ka-lite being on the pi will conflict with kolibri, but to be sure you can use the command “sudo pip uninstall ka-lite-static” and if it remains after that “sudo kalite stop” to stop the service.

I have downloaded fr-wikivoyage and fr-wikiversity and will begin looking at those when I have Kolibri fixed. Thank you again for the feedback. It’s very helpful.

James

jamesk,

I followed the above commands and they did run. I logged into Kolibri @ http://10.10.10.10:8080 and setup an account. I was able to download the 9Gb for the course. I then did an export and it allowed me to make a class and assign people, but I was not able to actually see the material. I also ran sudo pip uninstall ka-lite-static and no change in showing the content.

I will say all in all, kolibri is a minor issue seeing that a majority of the content is working great and KAOS runs fine.

Thanks again for your work.

Don

Hi @SHOMI,

Thank you. I was directed to a better way to install Kolibri for the Raspberry Pi by asking the Learning Equality developers. It is more proper than the method I posted above. Sorry for that. After some changes to their method I have Kolibri running and starting up properly at system start which might fix these issues. I was planning to upload it today but I am just looking into the issues with the French Wikiversity and Wikivoyage modules to see what is going wrong. It looks like a file that is supposed to run at startup that finds wikipedia zim files in the modules directory is either not running or not working. Once that’s done I’ll put a new Kolibri image up as soon as possible.

James

1 Like

Hi James, I would like to make your image available to all the schools we work with in Southern Province, Zambia. Would it be ok with you if we hosted the image rachel_pi_10_18_18.7z on our server at giakonda.org.uk
Thanks
Howard

Hi Howard, That sounds great! Anything I work on here is open for anyone to use so feel free to share it. All of the code belongs to the RACHEL team and I don’t represent them, but I believe the RACHEL project is also open for anyone to use. If anyone has questions or problems feel free to direct them to me and I’ll try my best to help them. This is all still in the testing phase but I believe it is stable.

I am uploading a new image today that includes Kolibri instead of KA-Lite. You might be interested in that as I think Kolibri replaces KA-Lite. I will also be uploading an image that supports both soon too. I would love to hear if Kolibri works for you.

James