I have been working on an installer script for Raspbian Stretch and this is the latest version. I decided to make this post and keep it up to date to avoid confusion. Notes on the specifics are below the installation instructions if you’re interested in the details. Please let me know if you have tried this. I’d love to hear feedback. This is unofficial and not supported by the RACHEL team.
- A raspberry pi. ( Pi2 with edimax adapter and Pi3B have been tested. Pi3B+ should work. )
- An Ethernet internet connection
- A MicroSD or USB Flash drive with enough space. ( ~4GB should be okay )
- The latest Raspbian Stretch Lite without Desktop image. Raspbian Stretch Lite
- An image flashing program. I use Etcher
- The installation package from this link. rachel installer zip
- Flash Raspbian lite to a MicroSD or Flash drive.
- Unpack the rachel_installer.zip and place it on the boot partition of the device you just flashed with Raspbian. This should be accessible with windows. There won’t be enough space for modules, so follow the USB Flash Drive instructions below to install them in this process.
- Insert the device into your Raspberry Pi that’s connected to the internet over Ethernet and boot up.
- Log in with the username “pi” and password “raspberry”.
- Type command “cd /boot/rachel_installer”
- Type command “./installer.py --update-pi” and wait for the pi to reboot after updating.
- Log in with the username “pi” and password “raspberry”
- Type command “cd /boot/rachel_installer”
- Type command “./installer.py” to run the installation.
- Type command “sudo reboot now” to reboot after the installation has completed
That should be it. The installer runs for 10 minutes or so. When it’s complete you should see a message that says “rachel has been successfully installed”. I suggested rebooting with “sudo reboot now” just to be sure as there can be issues with the hostname. You can also remove rachel_installer from the boot partition as it’s not used anymore. Rachel can be accessed at http://10.10.10.10 or http://rachel. http://rachel might not work on all platforms.
The default login/pass for the admin interface is admin/Rachel+1
Installation With USB Flash Drive
If you are booting from a USB flash drive for the operating system and also installing RACHEL from a USB flash drive you will need to do this to avoid boot conflicts. Turn on your pi with your Raspbian OS drive attached and when you see the rainbow square plug in your installer flash drive. There are tutorials for setting one device as your boot device available which will avoid this problem.
You can install support for exfat formatted drives with “sudo apt-get install exfat-fuse”
- Download and extract the installation.zip to a flash drive.
- Place unzipped modules you want to install from USB during installation into “modules” and they will be installed.
- Power up your pi with your flash drive attached and log in
- Type “sudo mkdir /media/usb”
- Type “sudo chown -R pi:pi /media/usb”
- Type “blkid” and look for your drive. You want the line that says “/dev/sda1” or “/dev/sdb1” next to it.
- Type “sudo mount /dev/sda1 /media/usb -o uid=pi,gid=pi” where /dev/sda1 is the path to your drive.
- Type “cd /media/usb/rachel_installer” to get to the installation directory.
- Type “./installer.py” to begin the installation
Manually Installing Modules and Ka-lite Essentials
- Modules that are transferred manually need to have the proper ownership or else you may recieve a “The following modules were ignored because they had no rachel-index.php” error or a red “internal error (4)” button when trying to update a module. Follow the instructions below to give permissions.
- Copy your module to /var/www/modules/.
- Type “sudo chown -R www-data:www-data /var/www/modules/YOURMODULENAME”
- To install ka-lite-ess do the following additional steps.
- Type “sudo chmod 755 /var/www/modules/en-kalite-ess”
- Type “cd /var/www/modules/ka-lite-ess”.
- Type “sudo sh install.sh”
- While connected to the pi’s network go to "http://10.10.10.10:8008 for the ka-lite interface to download and install the appropriate ka-lite language pack.
- If everything went properly, you should now be able to access ka-lite-ess content through Rachel. I was only able to test with ess, but I assume this is the same for full versions that aren’t static.
- Fixed reboot/shutdown not working due to a typo.
- Added internet connection sharing back with iptables commands.
- Fixed wifi-channel setting option.
- Added ability to set ka-lite user/pass at installation time.
- Cleaned up code for better readability
- Removed mysql-client/server and other modules that were seemingly unused, required a larger download, and were taking up resources. If anyone knows of a module that used them, please let met know.
- Added giving apache ownership to modules folder after module transfer.
- Updated apache2.conf to match the latest version with previous settings.
- Removed unused files.
Install Command Examples
- ./installer.py --wifi-ssid=RACHEL-01 --wifi-channel=6 --share-internet
- ./installer.py --update-pi --desktop --chromium --full-update
- –pi-pass lets you set a custom password for the pi.
- –auto-login sets auto-login for the pi.
- –update-pi updates the pi. This is meant to be run once and will reboot after the update.
- –desktop will install the Raspbian desktop when running update-pi.
- –full-update fully updates the pi including the kernel and dist during the --update-pi process.
- –chromium installs chromium when running update-pi.
- –no-ka-lite skips the ka-lite installation.
- –ka-lite-pass sets the password for ka-lite.
- –ka-lite-user sets the user for ka-lite
- –no-kiwix skips the kiwix installation.
- –no-hotspot skips installation of the hotspot.
- –wifi-ssid sets a custom ssid for the wifi hotspot. The max length is 32
- –wifi-channel sets a custom channel for the wifi hotspot. Max is 11. 0 is auto.
- –share-internet enables wired internet connection sharing to connected wifi clients.
- Tested with Pi2 and an Edimax wifi adapter. It works well but requires a reboot after installation. With Stretch the default driver included is used for the Edimax 8188CUS and 8192CU and others are blocked in /etc/modprobe.d. There is no need to build a custom hostapd/wpa_supplicant anymore, so --wifi-adapter has been removed.
- This is Wifi hotspot only right now. I will be updating with support for sharing the internet connection and Ethernet dhcp support soon. It’s top priority.
- This is using dnsmasq instead of udhcpcd. I find it to be easier to handle on stretch as well as fast.
- An ethernet internet connection will work and modules can be installed from the admin interface. Wifi internet while running RACHEL is untested.
- This installer does not use the git right now because some fixes to the contentshell were implemented and new files were added.
- This has been tested with a Pi2 and an edimax wifi adapter as well as a Pi3B with both USB and MicroSD.
- I took that installed flash drive and plugged it into a pi0w via USB OTG cable and it worked well ( the pi0 was set up for usb booting ).
- Stretch will check the disk sometimes after shutdown on some flash drives. This can be slow on the pi0w and make you think it isn’t working. If you wait a minute it will boot up normally and you’ll see the ssid.
- I haven’t had a chance to try installing with a pi0w alone. I suspect connecting over wifi as well as running the wifi portion of the setup might cause an issue. I can look into this later if anyone is interested.
- You may want to set your localization settings properly using “sudo raspi-config”. Changing wifi country will change the signal strength power according to the regulations for that country. This might set the time properly as well.
- –update-pi will only update the repository and upgrade packages. To include the dist upgrade and kernel, use --full-update. It wasn’t necessary for the installation to work, but it might be good to do.
- If the link to the package is against the rules let me know. I figured this is the easiest way to save the changes.
Admin Interface Fixes
- is_rachelpi() in common.php was using “/var/www/rachel/modules” to determine if the device is a rachel plus or a rachel pi. This resulted in some things in the interface not showing up. I changed it to /var/www/modules which resulted in the shutdown/reboot buttons showing up on hardware.php and other things working again.
- There was an fseek error in stats.php because it was using the path “/media/RACHEL” to write a temporary log. This doesn’t exist on a rachel-pi. I decided to use /var/logs/apache2/access.log instead because apache has permissions for that. This can probably be changed to a temp file, but I didn’t want to give apache write permissions.
- After fixing the fseek error there was another error calling mb_strlen(). The solution was to add php7.0-mbstring to the install script.
- “cat: /etc/kiwix/application.ini: No such file or directory” was happening in version.php because that file doesn’t exist and it was trying to get the version from it. I believe it’s part of the old xulrunner kiwix stuff that isn’t supported anymore. Fixed by only using /etc/kiwix-version when it’s a rachelpi.
- “You are not running kalite as the default user root” with a traceback when looking for the ka-lite version was the result of kalite --version command in version.php. I didn’t want to do the kalite suggestion of running sudo su in exec, so I fixed it by just using /etc/kalite-version to determine the kiwix version on pis instead.
- Reboot/poweroff were not working. I think this was a combination of apache not having permissions for /sbin/poweroff and /sbin/reboot or the sleep command was not working. This was fixed by adding www-data to /etc/sudoers for /sbin/shutdown and /sbin/reboot only. Then hardware.php was changed to call sudo reboot now and sudo shutdown now instead. There is no working sleep command so it happens right away. I don’t think the new permissions on shutdown and reboot will be an issue.