RACHEL-Kolibri on Linux Mint

I have transferred this discussion from the Learning Equality Forum as more appropriate here.
For those interested in the long history of it with @jamesk you can find it here:-


James is currently looking at getting the best of both RACHEL and Kolibri resources onto a Linux Mint desktop/laptop platform to act as a server in our Turing Trust supported schools in Africa having already achieved that on Raspberry Pi.

1 Like

Thanks Andrew,

I’ll be sure to update this post when I have an update.

James

So it turns out Mint is very similar to Ubuntu so not much has to be changed. I will have a basic Mint installer very soon. The installer that I want you to have in the future would be much more complicated as it would take into account the networkign setup and other things we discussed, but at least you could test for now. I’ll let you know when it’s ready.

James

Hi James

That is indeed what I had hoped as Mint is based on Ubuntu I gather.

Look forward to hearing how you get on.

Regards
Andrew

1 Like

Hi Andrew,

I’m just running into some of the same issues I had before on Ubuntu. More specifically if you’re interested, systemd-reserved already uses port 53 which dnsmasq uses. Dnsmasq is part of my normal configuration so I’m just looking at the repercussions of disabling systemd-resolved. I am also looking at the proper hostapd settings for Mint if there is an adapter available. Hopefully I’ll have a better update soon.

James

Hi James

We run our Wiping systems on a Mint server using dnsmasq for DHCP etc so it should be possible. Whilst not necessarily understanding fully the issues myself (I know there were some) if it helps I’ll try and get some input from the guys that built it.

Regards
Andrew

James - Comment below from my volunteer colleague Philip…

Andrew,

Sorry for the delay in replying and also because I don’t really know what systems-reserved is trying is to do. Using port 53 is a bit strange because that is reserved for DNS. Is systems-reserved just making sure nobody uses it? I checked and hosted is available for Mint using the standard software distribution process

$ apt-get install hostapd

I haven’t installed it because it uses the wifi adapter as a wifi hotspot - not something I’d want to do. https://learningequality.org/kolibri/ does look like a way to extend the range of a wifi base station by having PCs act as wifi relays. So if the base station wifi signal can reach PC-A but not PC-B, PC-A can retransmit to PC-B. It also uses something like bit-torrent to distribute the content so if both PC-A & B have the content, a new PC-C which is in range of PC-A & B can download from both, thus doing it quicker.

I maybe misunderstand all this but it looks like Kolibri replaces the Internet in a village with an ad-hoc network of co-operating PCs using wifi, so breaking DNS may be deliberate. So you would place MINT servers in strategic locations around a village or school to implement this, and then serve up the Rachel content with Apache. You can instead create wifi hotspots with Windows 10, so PC-D which can see and connect to PC-B but not base station, and thus a Rachel server or the internet.

Philip

Does that make sense in light of what you are seeing? A.

1 Like

Hi Andrew,

Sorry I made a mistake and changed it. The service name was “resolved” not “reserved” and it’s the default DNS. I think it’s okay to replace it with dnsmasq.

What I am testing now for you is the separation of the networking code in the existing RACHEL installer so you can choose to install the wifi hotspot ( hostapd, internet sharing, etc ) or just have it wired.

I am completely unfamiliar with Kolibri’s automatic networking setups other than the brief debugging I did to find the slow shutdown speed on the Raspberry Pi recently. I believe that’s their zeroconf or zero configuration networking. It’s a bit of a mystery to me so I can’t say how that would work or if that includes wireless code as that is more like Mesh networking. This might be something to bring up on the Learning Equality forums to see how they intended that to work unless @benjaoming can answer here.

If that’s the system you’d want to go with instead of a more specific configuration we’d probably need to leave the networking portion up to Kolibri and somehow hook the RACHEL content/Apache into that setup.

James

Hi James

Sorry - I somehow missed your last post. I hope you are keeping well.

I have consulted with my colleagues and they think if you can get the RACHEL-Kolibri solution on Mint to work the same way as it does on RPi with the WiFi acting as a hotspot for the schools as well as hard-wired Ethernet that would be ideal.

We also don’t know anything much about Kolibri’s automatic networking stuff but it is not something we are banking on anyway so if it doesn’t work it is no issue for us.

Regards
Andrew

Hi Andrew,

Yes absolutely. Sorry for the delay, I usually have more time to work on RACHEL. I am testing in a virtual machine that makes testing networking awkward but I think I should have something for you in the next few days. I’ll make sure both options are there for wifi or ethernet. Hope you’re doing well.

James

Hi James

Good that you are making progress!

It might be helpful to know that the platform we intend to try the build on is Lenovo ThinkPad X240 Laptops. These are i5 machines and pretty well built so ideal as a server in an African school! They originally had Intel Centrino 7260 802.11b/g/n Wi-Fi but I don’t have one here at present so would have to confirm that by sneaking over to the warehouse and getting one.

Regards
Andrew

1 Like

Hi Andrew,

That helps a lot! thanks. I should be able to set things up properly based on that info. We can always tweak the settings after to make sure everything is working as well. I have been making progress and I think the non-networking errors I was running into are resolved now. I will have a lot more time this week to work on RACHEL so I’ll keep you updated when I have it working.

James

Hi James

I have some of the X240 laptops here now and can confirm the WiFi is Intel N7260.

Strangely Mint recommends that the Wireless Adapter needs an update but then can’t install it when I go to update it, even if I connect with Ethernet to allow the wireless driver to be updated. But it works fine with the default install anyway.

Regards
Andrew

Hi Andrew,

Very sorry for the delay. Can you try this installer? Here are the instructions

  1. Download installer.zip
  2. Transfer the zip to your Linux Mint machine
  3. “sudo apt-get update”
  4. “sudo apt-get upgrade”
  5. unzip the installer.zip to /var/tmp
  6. “cd /var/tmp/installer”
  7. “sudo python3 installer.py”
  8. Enter your password
  9. Wait for the installation to finish

I got past most of the errors but it does fail on hostapd for me since I’m using a VM. I suspect this might take some back and forth work to get hostapd working. Please let me know what happens and we’ll go from there. Sorry again for the delay!

James

Hi James

Thanks for that. I have downloaded your installer and will get on to it this week as soon as I clear the decks.

I’ll let you know how it goes.

Regards
Andrew

1 Like

You’re welcome Andrew. I suspect we’re going to run into some issues when hostapd starts among other things so this will likely be a back and forth for a bit. In a VM I can’t test past hostapd not being able to start. I will get another hard drive soon to test a proper Desktop mint installation with so it’ll be easier moving forward.

James

Hi James
All went swimmingly well until just before the end of the install when it failed on something to do with dnsmasq (but I think you anticipated something like that!).
I have copied the error part of the terminal window to a file and shared it on my Google Drive for you to have a look at:-
Link to Installer Log
Hope that helps.

Regards
Andrew

Hi Andrew,

Okay great. The dnsmasq issue can be ignored. For clarity on that, whats happening is a package pre-installed with mint called dnsmasq-base is already installed and running using port 53. When the dnsmasq package is installed by the installer it fails to start it because of that running. Unfortunately installing dnsmasq reinstalls dnsmasq-base as well, so I figured out a way to get around it by setting a setting in a network manager file to use full dnsmasq, then restarting the service later.

It looks like the issue here is actually at starting hostapd which is where it fails for me as well due to running in a VM, so this is where the fun begins. I think it’s possible the adapter names are different and not using wlan0 like on the pi. The other is that the hostapd settings need to be adjusted. Can you give me the output of the following commands

  1. sudo systemctl status hostapd
  2. sudo systemctl start hostapd
  3. ifconfig

That should give me a better understanding of how to move forward.

James

Hi James

user1@rachel:~$ sudo systemctl status hostapd
[sudo] password for user1:
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authent
Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset:
Active: failed (Result: exit-code) since Sat 2020-06-13 21:57:17 BST; 35min a

Jun 13 21:57:17 rachel hostapd[973]: nl80211: Driver does not support authentica
Jun 13 21:57:17 rachel hostapd[973]: nl80211: deinit ifname=wlan0 disabled_11b_r
Jun 13 21:57:17 rachel hostapd[973]: Could not read interface wlan0 flags: No su
Jun 13 21:57:17 rachel hostapd[973]: nl80211 driver initialization failed.
Jun 13 21:57:17 rachel hostapd[973]: wlan0: interface state UNINITIALIZED->DISAB
Jun 13 21:57:17 rachel hostapd[973]: wlan0: AP-DISABLED
Jun 13 21:57:17 rachel hostapd[973]: hostapd_free_hapd_data: Interface wlan0 was
Jun 13 21:57:17 rachel systemd[1]: hostapd.service: Control process exited, code
Jun 13 21:57:17 rachel systemd[1]: hostapd.service: Failed with result 'exit-cod
Jun 13 21:57:18 rachel systemd[1]: Failed to start Advanced IEEE 802.11 AP and I
lines 1-14/14 (END)

user1@rachel:~$ sudo systemctl start hostapd
[sudo] password for user1:
Job for hostapd.service failed because the control process exited with error code.
See “systemctl status hostapd.service” and “journalctl -xe” for details.
user1@rachel:~$

user1@rachel:~$ ifconfig
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.38 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::2f99:3cb9:434:a830 prefixlen 64 scopeid 0x20
ether 68:f7:28:7a:34:2a txqueuelen 1000 (Ethernet)
RX packets 132864 bytes 195034723 (195.0 MB)
RX errors 2 dropped 0 overruns 0 frame 1
TX packets 20162 bytes 2209404 (2.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xf0600000-f0620000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 775 bytes 75173 (75.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 775 bytes 75173 (75.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.10 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::65b:1407:e296:5073 prefixlen 64 scopeid 0x20
inet6 fe80::408d:d5d2:72af:3d09 prefixlen 64 scopeid 0x20
ether cc:3d:82:4e:e9:cc txqueuelen 1000 (Ethernet)
RX packets 106 bytes 8498 (8.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 488 bytes 69657 (69.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

I should add that running the installer broke DNS. Still had internet connection but could only ping sites by IP address not name. A reboot cleared that but may have changed things. However I had to get back online to copy and paste the above!

Regards
Andrew

Sorry about that! I think that is likely related to the dns workaround stuff. Let’s get the hostapd service working and then look at dnsmasq. I think it will be better to work with the existing broken install to get it working and then make the fixes in the installer afterwards.

So from your ifconfig output the interface name is wlp3s0 which is the new naming convention. So we will have to change “wlan0” wo “wlp3s0” in a few files.

  1. /etc/dhcpcd.conf
  2. /etc/dnsmasq.conf
  3. /etc/hostapd/hostapd.conf

You can either do this manually or you can use the following files.

mint_networking.zip

The other thing is that I made the hostapd settings extremely basic and commented out the driver setting. This is /etc/hostapd/hostapd.conf. You may want to try removing the # before the driver setting as from your log it looks like that’s the correct driver. I changed it in the one in mint_networking.zip

After this is done try “sudo systemctl start hostapd” and see what happens. If there’s no error try “sudo systemctl status hostapd” for the log and also check if you see a hotspot called RACHEL-Pi open with another device.

If this does fix everything I will make the changes to the installer and we can go from there with a fresh install. A successful install does reboot the device at the end so the dns issues may be resolved by that. Hope this works!

James