RACHEL-Pi Image for Raspbian Stretch

Just thought I would update about en-kolibri-index to anyone having issues. I’m not sure if this affects non-updated versions. There are a few things that seem to be broken in the rachel-index.php in the one on oer2go.

  • The API seems to have changed so available channels is now at api/content/channel instead of api/channel. This was causing an error and content available in Kolibri not being reflected in RACHEL. The updated line is $channeldata = file_get_contents(‘http://127.0.0.1:9090/api/content/channel/?available=true&format=json’);

  • <?php echo $host ?> was being used inside of a php echo so the links were wrong for account creation and login.

I can upload the fixed index if anyone is interested.

James

1 Like

Jamesk & World Possible Staff,

We have returned from Haiti. So far the install went fairly well, just the usual things that happen when your not at home and not near a store. We were able to hold several training sessions with some students, teachers, church committee members and our team members. At first, they seemed to think I was joking that this little toy computer was going to work like I was explaining. When the people actually started to use it, they were amazed and excited to see all of the information that is available for them to use. The principal of the school is very excited to see something new and positive at his school. He knows there is nothing else like the our setup in Haiti that anyone is aware of and that SHOMI decided to use his school. The Raspberry server will have its limits, but starting with this first and getting acclimated will make the transition to the full server easy when the time comes.

Again,
we thank all of those that have worked hard to make this material available.

Don

Jamesk,

I read your post above about using PIShrink and that there is a bug in the script. I have not tried it yet, but would like to. You mentioned there is a bug in the script. Would you have instructions that you could provide ?

Thanks
Don

Hi Don,

Thank you for the update. It sounds like you had a successful trip! I’m happy to hear that they were able to get up and running with RACHEL.

The bug in the pishrink script has to do with enabling automatic filesystem resizing on first boot. Their implementation breaks the image and it won’t boot. The solution is to manually implement automatic filesystem resizing afterwards and to disable the script from doing it. I think there is a command line switch to disable it but you can change line 11 in this script to
"should_skip_autoexpand=true" and it should work.

I have some other materials on resizing the filesystem manually if you need it.

James

Jamesk,

I am interested in the other resizing materials you have. I've left several master copies with the group in Haiti and a process to duplicate if needed. I would like to work on the resizing the images to make it more portable and accessible via my cloud drive. I just have not had much time to get back into this since I've returned from Haiti. 

Thanks

@SHOMI,

These are the steps that I used to enable automatic filesystem resizing. To make this work you’ll want to implement these changes on the last time you boot before making an image of the device

  • Add “quiet init=/usr/lib/raspi-config/init_resize.sh” to the end of /boot/cmdline.txt
  • Place the resize2fs_once file into /etc/init.d/
  • sudo chmod +x /etc/init.d/resize2fs_once
  • sudo update-rc.d resize2fs_once defaults
  • sudo systemctl enable resize2fs_once
  • Shut down
  • Make an image with win32diskimager and put it on a USB drive
  • Boot into Raspbian and mount the USB drive to /media/USB
  • run pishrink on the image with the resizing option disabled.

When you flash that shrunken image to another device it should resize to take up the entire filesystem on the first boot. I hope this helps.

James

1 Like

@jamesk Thank you for the good work. I deployed a RACHEL-Pi image on a Raspberry pi 3B a couple of months ago and it worked as expected. Recently, I got a raspberry pi 3b+ and would love to install one on it. I understand that the version i previously installed was the KA-lite version and due to very poor internet services, would prefer to have the same platform on the new Raspberry pi. This is because it would be easy for me to move the modules from one device to another.

Going through multiple threads on the platform, I found out that there is a installer script for such installation. Unfortunately, I have been unable to download it both on my Laptop and phone. Could you help supply a valid link to the ka-lite install script?

Also, is my plan of action a good one? I hope to leverage on the multiple modules that came with the previous image and deploy this with minimal internet data services .

Thank you very much.
Taiwo

Hello @Taiwo

You’re welcome and I’m always happy to hear about successful deployments. Great work!

Most of the content available in RACHEL has not changed recently so it should be okay to transfer modules to a new RACHEL-Pi image and then check in the “version” page of the admin interface if any module updates are available. This will show you if you have an outdated version of a module and give you the option to download the latest if you want. I usually suggest that to avoid downloading multiple copies for every pi so I think you have a good plan for most content.

KA-Lite is being replaced by the Kolibri service with support and updates for KA-Lite ending, so in the future I would highly suggest getting a Kolibri image and downloading Khan Academy as a Kolibri channel when you have access to a good internet connection. This way you’re deploying with the latest software.

After your request and another request for legacy support of KA-Lite in the latest RACHEL-Pi, I’m going to make a new image with KA-Lite that also includes an updated KA-Lite module installation script. New images are always available at this pinned post but I had to take the latest images down due to some bugs. Those have been resolved so I will let you know when new images are up and provide tutorials/instructions on how to get things going. It should be within the next few days. I’ll let you know when those are up. Hope that makese sense.

James

Hello @jamesk,
Thanks for your response. I will be on the lookout for the installation script for the RPI 3B+ .
Thanks.
Regards,
Taiwo

Hello @jamesk,
I wanted to ask how the script is going. I also want to ask about the addition of a WiFi Dongle to an RPI.

I have successfully setup the RPI with a lesser known dongle (RTL8188FU) and it works quite well. Is this enough to make it "work out of the box " with RACHEL? I have not tested it in AP mode but have read about successful tests online.

Please, elaborate on its possibility and steps to be taken to achieve this.
Thank you for your awesome work.

Best Regards,
Taiwo

Hi @Taiwo,

Very sorry for the delay. I had some things happen that kept me from working on RACHEL. I will be working on the image that includes the script today and should have it up tonight or tomorrow for you.

James

Hello @jamesk,
Thank you very much. I will be expecting it.

Taiwo

Just an update. I have been working on this but there’s an issue with getting KA-Lite to start in the latest Raspbian ( now called raspios ), so I’m just trying to figure out why it won’t start at boot and then I’ll upload an image for you with the script.

James

Hi @Taiwo,

Can you please try the following image and instructions.

  1. Download rachel-pi_kalite_06_10_2020.7z and flash it to your device
  2. Download or transfer your KA-Lite module to /var/www/modules
  3. Run command “sudo chown www-data:www-data /var/www/modules”
  4. Determine the language code and path of your KA-Lite module. For instance “en-kalite-ess” would be “en” for the language code and “/var/www/modules/en-kalite-ess” for the path
  5. Run command “sudo bash /etc/ka-lite/install-content.sh en /var/www/modules/en-kalite-ess” for example, where en is the language code of the KA-Lite module and /var/www/modules/en-kalite-ess is the full path to the module’s folder

The content should now be installed. Please let me know how this goes. I will make this official and include an MD5 and other things when I hear back. Hope it works and let me know if you have any issues!

James

Hello @jamesk,
Thank you for your incredible work. I will try this as early as possible tomorrow then give feedback.

Thanks and Best Regards,
Taiwo.

1 Like

You’re welcome @Taiwo. I tested with a 3b+ as you mentioned you were using that model but I think it should work with others too if you switch. Hope it goes well!

James

Hello @jamesk,
It work quite awesomely. I got the KA-lite running in a few hours with minimal effort. Thank you very much for your help.
I did get some error though that might give a little feedback and possibly aid further development.

KA-Lite Content Install: setting up variables.
KA-Lite Content Install: Checking module directory.
KA-Lite Content Install: Module directory exists.
KA-Lite Content Install: stopping kalite.
kalite stopped
KA-Lite Content Install: installing contentpack.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/kalite/packages/bundled/django/core/management/base.py", line 224, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/kalite/packages/bundled/fle_utils/django_utils/command.py", line 141, in execute
    super(LocaleAwareCommand, self).execute(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/kalite/packages/bundled/django/core/management/base.py", line 263, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/kalite/distributed/management/commands/retrievecontentpack.py", line 110, in handle
    self.local(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/kalite/distributed/management/commands/retrievecontentpack.py", line 190, in local
    assert os.path.isfile(zippath), "%s doesn't seem to be a file." % zippath
AssertionError: /var/www/modules/en-kalite-ess/en-contentpack.zip doesn't seem to be a file.
KA-Lite Content Install: backing up old database.
KA-Lite Content Install: Symlinking new database.
KA-Lite Content Install: Symlinking content.
ln: /root/.kalite/content/assessment: cannot overwrite directory
KA-Lite Content Install: restarting kalite on port 8008
Already stopped. Status was: Stopped
kalite stopped
Running 'kalite start' as daemon (system service)
Going to daemon mode, logging to /root/.kalite/server.log

To access KA Lite from another connected computer, try the following address(es):
	http://192.168.42.89:8008/

	http://10.10.10.10:8008/

To access KA Lite from this machine, try the following address:
	http://127.0.0.1:8008/

I hope this helps. Thank you once again.
Best Regards,
Taiwo

NB: seems like the color is a little bit off. Pardon me.

Glad to hear it works @Taiwo. Were their any issues with Khan Academy after seeing these errors? I’m going to try another installation with the en-kalite-ess module to make sure this doesn’t affect anything.

James

@jamesk None that I know of .

1 Like

@Taiwo Great. Thank you for the feedback.