RACHEL-Kolibri on Linux Mint

Hi Andrew,

The main thing is getting the hotspot working consistently so if the GUI created one isn’t persistent we may have to look at getting hostapd running and disabling network-manager instead. The new installer doesn’t install hostapd as I thought the other way was working. If you want to try hotsapd instead, but you may run into the network interface getting disabled again if we disable network-manager. If you want to try that then roll back if it breaks, I think “sudo systemctl disable network-manager” “sudo systemctl mask network-manager” “sudo systemctl stop network-manager” “sudo systemctl unmask hostapd” “sudo systemctl enable hostapd” “sudo systemctl start hostapd” should do it.

We’ll just have to keep at this until something works haha.

James

James

I didn’t notice you had replied as for some reason the topic is not always notifying me even though I have it set as “Watching”. I have just set it that way again. To summarise where I think we are:-

The GUI-enabled hotspot does not persist after a reboot but is easy to set with just a few clicks, so we could put something in the instructions for use and live with that if we had to.
More of an issue is that nothing else on the Ethernet LAN can be accessed despite me making (I think) the changes you suggested. That would not be the way I would expect a hotspot to work by default, so something we did seems to have messed it up.
If you want me to check and edit some files that your commands should have changed let me know. Else I can roll the system back and start again but that will of course destroy any audit trail.
I’ll leave it with you to decide what you want me to do as you are clearly on top of this stuff!

Regards
Andrew

Hi @andrewc,

I will @ you in the future as I think that guaranteess a notification.

At this point I would suggest rolling back, trying the new installer which doesn’t include hostapd, and then we can see if anything in the installer’s network settings was breaking the ethernet connection or if it was the commands run afterwards. From there we can try to make the GUI created hotspot persistent. I’m not familiar with making hotspots that way in mint but there should be a way to make the hotspot connection the default on boot. If that works we’ll be done other than a few updates. Hope that makes sense.

James

Hi James

So I rolled back to the Mint image I took on 13 June which worked fine.
Just doing the install… the RACHEL menu installed OK and I ran the Update first and rebooted.
Then I ran the RACHEL Install and got

“The RACHEL installation failed. Please exit the installer and read the console…”

[Errno 2] No such file or directory: ‘/usr/lib/python3/dist-packages/kolibri/plugins/demo_server/kolibri_plugin.py’
Traceback (last called is first):
main() in /var/lib/dpkg/info/kolibri.postinst:450
The command py3compile -p kolibri -V 3.4- exited with exit code 1.
dpkg: error processing package kolibri (–configure):
installed kolibri package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
kolibri
ERROR: apt-get -y install python3-psutil command failed
user1@X240-7252:/var/tmp/installer$ ^C

It may be that I am rolling back to a point where we don’t know the correct system state. Perhaps Python3 not installed or something ?
Unfortunately Restoring with Timeshift seems to have deleted the 13 June image record I have restored from so the next available is 14 June, or an original one from 19 May.

I will try 14 June and run the whole shebang again. Sorry!

UPDATE
14 June snapshot is no good. The Mint Hotspot won’t connect and the RACHEL-PI one appears briefly on my tablet. So now going back to 19 May… and I’ll make another snapshot of that as it is the last resort!

Got another snapshot from 1200 today (same as after restore of 13 June) and Mint Hotspot working but the Rachel install failed again after a successful update:-

“The RACHEL installation failed. Please exit the installer and read the console…”

The Mint Hotspot is still working with its own SSID…

Posting Rachel install console log here… :-

https://drive.google.com/drive/folders/1HzptXpqZIdSTW9g0nBJNbkzyH-Lcwl59?usp=sharing

Hope you can figure out what is going on!

Regards
Andrew

Hi @andrewc,

Very strange! This definitely has to do with python3, but I have installed this on my Mint VM without issue. I made sure it worked before I uploaded it. Can you try running the script alone without the interface and as python and not python3.

“sudo python installer.py” and see if the same issue happens or if it completes normally?

James

Hi James

Tried that but it fails with errors again, RunFromPython.log is in same GDrive location as before for you to have a look. (For some reason the forum tells me “Sorry. You can’t post a link to that host”)

I think I could try rolling back to a much earlier build 19 May as that definitely won’t have any RACHEL or Kolibri stuff already in it. I will just have to update Mint with the latest fixes after doing that. What do you think?

Hi @andrewc,

I think this is to do with remnants of an old Kolibri installation on this snapshot. The log shows that Kiwix is being installed and when it installs the package python3-psutil it starts throwing a bunch of errors for Kolibri. Kolibri shouldn’t be on the system at this point. Usually it should have a bunch of logs inbetween like “kiwix successfully installed” “installing web server” etc, as Kolibri is installed after kiwix and the web server have been successfully installed and set up.

I think installing python3-psutil is triggering python3 packages that use it to recompile and because it thinks Kolibri is still there it tries to recompile it which is indicated by the “E: py3compile:183: cannot create directory” errors for Kolibri folders and files. So all of those errors are from the python3 compiler looking to compile every Kolibri related python file that it has in a list somewhere, which suggests it wasn’t removed cleanly if it was previously installed.

I have 4 suggestions that you can try

  1. Try finding a clean snapshot that didn’t have Kolibri installed.
  2. Since python3-psutil is already installed from a previous Kolibri installation, open up installer.py and put a # before install(“python3-psutil”) inside of the install_kiwix() function. This would skip the installation of that and hopefuly skip the compiling and we can hope that it would make it through the kolibri install as well.
  3. We can try to find a command that clears python3 packages that are removed. Maybe even try “sudo apt-get remove kolibri” to see if it thinks it’s installed.
  4. Try not upgrading the system before running install just as a test.

I hope one of these works.

James

James

Success with option 1!

It looks as if I just was not going back far enough after losing my 13 June snapshot (I had set only 5 generations of snapshot so it got auto-deleted - now changed to 15!).

I restored from 19 May, immediately backed it up again for safety and ran your RACHEL menu.

I then ran the System Update which took a while (20 mins and 26,902 files) and made another backup.

After a reboot I then ran the RACHEL install and it has worked perfectly! There was the same failed message that we had before after dnsmasq but I just ignored that and now have a RACHEL-Kolibri menu ready to add stuff.

Even better setting up the Mint Hotspot (only 4 clicks) has resulted in a SSID “rachel” on 10.10.10.10.

A result. Well done!

Where do we want to go now?

Regards
Andrew

Hi @andrewc,

That’s great! That’s smart to make a backup after updating so you don’t have to wait 20 minutes every time you test. It sounds like everything worked out. I want to confirm a few things before we start moving forward.

  1. Is the ethernet working now and can you download modules?
  2. Is the kolibri-index module working and can you install Kolibri channels?
  3. Is the hotspot persistent?
  4. Is the internet working from a phone connected to the hotspot?
  5. Are you able to access domain names like google.com on the laptop or phone
  6. Can your phone access the rachel interface from “http://rachel.pi” or “http://rachel”.
  7. Are there any errors on the admin “stats” page’s error log?
  8. Do Kiwix modules work after installing?
  9. Can you import Kolibri content with a USB device?

If all of that is working I can start customizing the installer to work with other devices and a few other things. Here’s the list of things I’d like to do.

  1. Make the network interface naming more dynamic. Right now everything uses the hardcoded ones you told me from the ifconfig command but other devices will use different names. I’d like to find a way to automate that so we don’t have any issues with other laptops/hardware.
  2. Future proof it giving the ability to customize some of the arguments like the package versions. This will mean when a package is updated on the operating system like php7.3 goes to php7.4, we don’t have to update the installer every time.
  3. Automate your GUI created hotspot settings in case someone needs to run the installer that doesn’t understand this stuff.
  4. GUI Input at install time for Wifi SSID/Channel and any other relevant settings

That’s about it. These are mostly optional except the network interface names which I know will be an issue on other hardware. I have made GUI installers like this that are more advanced and have been really useful for me when making images so I think we should make it as automated as possible.

James

Hi James

I didn’t get any notification of your post again and just went to look now if you had replied. I don’t know why that isn’t working - it used to work fine.

I’ll get onto these checks for you tomorrow and report back.

Regards
Andrew

Hi @andrewc,

I’m not sure why that’s happening. I did notice some changes to the forums in the past week so I guess they were updated. I generally just check back here a few times a day to be sure I catch any responses.

Hopefully everything is working.

James

Hi James

Having problems with this forum today…

“Sorry new users can only put 2 links in a post”

I have not put any links in!

I have had to retype the whole post to a text file and put it on Google Drive as Post20200623.

I WILL PUT IT IN SAME LOCATION AS BEFORE (IN CASE IT WON’T LET ME PUT THE LINK) - “Post 20200623” and “ifconfig 20200623 on X240”
Link to post

Regards
Andrew

Hi @andrewc,

The forums seem to have been updated to block file upload links from new users. I had to review your first posts with them and approve/restore them but I didn’t see your latest post at all. I just updated your forum membership from “new user” to “regular” so hopefully that doesn’t happen again. If it does let me know and I’ll look at those settings again.

I read through and it looks like our remaining issues are

  1. Persistent GUI hotspot
  2. Internet forwarding
  3. Accessing domain names
  4. Two ip ranges are available

I don’t have much experience with Network Manager so it’s going to take some googling/researching to figure these out. Once the hotspot is persistent we can check the other settings

From this post there’s a comment that says to open /etc/NetworkManager/system-connections/Hotspot and change “autoconnect=false” to “autoconnect=true”. Maybe try editing that with “sudo nano /etc/NetworkManager/system-connections/Hotspot”.

If that works can you paste the output of “sudo iptables --list”. That would tell me if the internet forwarding rules are there and what they are. The internet domain names not being accessible is likely related to internet forwarding not working. When the http://rachel.pi address didn’t work, did you write in the “http://” or just “rachel.pi” ? I’ve noticed on some devices you have to put in the http://.

This post I found talks about that 10.42.0.1 IP. It seems like it’s a DHCP setting that’s set through the network manager interface for connection sharing.

Hope that works.

James

Hi James

change “autoconnect=false” to “autoconnect=true”
Well done. Hotspot is now persistent!

did you write in the “http://” or just “rachel.pi”
I typed it in full. if you don’t Firefox does an internet search for rachel.com.

It seems like it’s a DHCP setting that’s set through the network manager interface for connection sharing.
I can’t see where to change that. The only interfaces I see for Network Manager are from the Network icon and that just gives Network Settings and Network Connections.

I have posted the output “iptables list” on the Google Drive link.

IPtables List

Regards
Andrew

Hi @andrewc ,

Great! The hotspot is the biggest thing to tackle so that’s perfect. Can you send me the “/etc/NetworkManager/system-connections/Hotspot” file? I would like to add it to the installer and take a look at the settings in it so I can see if we can automate the creation of it.

I’d like to avoid people going to rachel.com when the internet is working. Seems like a weird site. We can change the domain name in /etc/dnsmasq/dnsmasq.conf to anything you want so let me know if you have another name you think would be good.

I’m going to do some more research on that 10.42 IP to better understand what’s going on. It looks like there are some iptables rules set for that connection and I’m wondering if that’s interfering or the commands at runtime are set for that instead of the other range. I’ll let you know when I find something.

James

Hi James

I don’t seem to have permissions to copy the file but here are the contents:-
GNU nano 2.9.3 /etc/NetworkManager/system-connections/Hotspot

[connection]
id=Hotspot
uuid=e973b865-9ee8-4a73-a7ad-a9f1100a9605
type=wifi
autoconnect=true
permissions=
timestamp=1592920741

[wifi]
mac-address=CC:3D:82:4E:E9:CC
mac-address-blacklist=
mode=ap
seen-bssids=CC:3D:82:4E:E9:CC;
ssid=rachel

[wifi-security]
group=ccmp;
key-mgmt=wpa-psk
pairwise=ccmp;
[ Read 30 lines ]

FWIW that MAC address is the WiFi adaptor.

For my part I would not worry too much about the search going to rachel.com as our schools are unlikely to be internet connected for some time. But if you want we could make it reachelfriends.org :slight_smile:

Regards
Andrew

Hi @andrewc,

Great. We can try adding that to the installer if you want. If copying that file over works to set up the wifi manualy, then I can start adding some code and settings to make it work automatically.

For the 10.42 issue. Can you try the following.

  1. Click the network icon in the task bar
  2. Click Network connections
  3. Select your wired ethernet connection and click the gear icon
  4. Click IPv4 Settings
  5. Take note of what the “method is”. If it says “share to other computers” or not
  6. Change the method to Automatic ( DHCP ) and save
  7. reboot
  8. Check if the 10.42. IP is in the output of an ifconfig command

That should have fixed the weird ip to be one assigned from your router. Then we can try setting the iptables rules if that ip isn’t there anymore.

What I think I’ll do is add an option to change the rachel home page in the installer. That should be helpful.

James

Hi James

Checked that, but the wired connection is already set to Automatic (DHCP)

The WiFi adaptor is set to “share to other computers” as soon as I make it a Hotspot.

Strangely, the ifconfig only shows the address being shared as 10.42.0.1

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 121126 bytes 39889384 (39.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 39585 bytes 7931566 (7.9 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 2224 bytes 611133 (611.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2224 bytes 611133 (611.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.42.0.1 netmask 255.255.255.0 broadcast 10.42.0.255
inet6 fe80::5359:c2ec:621e:c9b prefixlen 64 scopeid 0x20
inet6 fe80::60ef:f222:4d9f:fc0 prefixlen 64 scopeid 0x20
ether cc:3d:82:4e:e9:cc txqueuelen 1000 (Ethernet)
RX packets 19814 bytes 4379264 (4.3 MB)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 19089 bytes 12931581 (12.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

So I don’t know how the Dell laptop is able to connect also on 10.10.10.10 - but it still does!

Regards
Andrew

James

This is really weird. I have not changed anything (apart from shutting down the machines overnight) but they are all now able to access internet sites via the rachel hotspot!

That applies to my android phone and tablet, the Dell laptop on Mint and the X240 on Mint.

Trying to get my head round this. I use a little network tool called Fing that shows all the devices on the LAN. It sees the 10.10.10.10 host, the tablet and phone on 10.10.10.x IPs but does not seem to see the 10.42.0.1. As these are two different subnets I can’t see how RACHEL is accessible on both (although I think it is valid for an adaptor to have 2 IPs).

???
Regards
Andrew

Hey Andrew,

The 10.42.0.1 address seems to be something that routes the network to share the wired connection. I was hoping to get rid of it with changing those settings. Did you go through those steps above before getting this result or did it happen before you tried those? Also, is the 10.42 address in the output of an ifconfig command still?

I’ve used fing on ios before and saw some strange results so it’s possible that it’s the app itself too.

James