This project covers the nuances of installing Linux CNC 2.8 pre and setting up a consistent environment.
When I tried to install Linux CNC, I found that there was a lot of useful information, but the world had moved on and the information was not as applicable as it once was. I spent a significant amount of time trying to update the guides for the current software but no dice.
Anyway, the reasons I want a current Linux CNC install:
I know Linux Mint has current software repositories, and a decent UI that I am familiar with, works with the USB wifi dongle and the USB RS485 converter I have. So lets start there.
I (mostly) followed the instructions here:
(Side note: the information on this site was invaluable, I am glad the time was taken to collect that information in a single place. Thank you.)
I started off by downloading Linux Mint 19.3 - Mate - 32-bit
The Mate desktop environment is great for older hardware as it doesn't use as many resources as the fancier desktops but it still has all the comforts I have come to expect with a modern Linux. I chose the 32-bit to ensure that my old hardware would be compatible.
Installed Mint from USB
My old hardware would not boot from a USB 3 flash drive, so I had to use a USB 2 drive instead. :(
Downloaded the real-time patches, as per the 'Linux Mint 19.1 RT Kernel' page.
I initially downloaded the newest real time patches I could find, to got with the newer Linux distro (I had downloaded Mint 19.3, the tutorial covered Mint 19.1) This was a mistake.
Built the Preempt Kernel.
What a pain in the ass is kernel building. I ran out of hard disk space once because the build files were 16 GB and I had used a small SSD as a boot drive. This was a mistake.
The actual build process itself takes a very long time, especially on a Pentium D, without using the proper build flags and limiting the build to a sensible hardware configuration. This was a mistake.
After the Kernel built over night, I followed the rest of the tutorial.
Installed the Kernel, installed grub-customizer, reboot.
Linux Mint not boot into Preempt Kernel, will boot into other Kernels, just not the new one. I found the problem is that the Kernel I built is too large to fit in the initial RAM disk that is used to boot Linux. Great.
To fix this, I had to reboot into a working Kernel, then re-make the Kernel, using commands to strip the built modules. Wow that was a pain. I used this website as a guide:
I started the build process again, deleting the extracted files (all 16+GB Gone :( ), to ensure I was starting with a clean slate. I ended up running these commands specifically:
make INSTALL_MOD_STRIP=1 modules_install
This gave me an initrd image that was ~60MB instead of 580MB as before. Great.
Sort grub, reboot.
Not having it. Some very strange errors that I can no longer remember and that google did not help with. Bugger.
So I started again.
This time with Mint 19.1 and the older RT patches. I followed all of the steps in the guide and got to the 'sort grub, reboot step' without too much trouble. Still, Linux would not boot to the Preempt RT Kernel.
At this point I ordered a more modern CPU for my motherboard. I upgraded to a Q9300 quad core, costing only £7 from eBay. I did this because the Pentium D was limited to 32-bit, and I wondered if the 64-bit versions of Linux Mint would have better luck. It was also an upgrade in terms of the performance and should reduce the jitter of the LinuxCNC's base thread.
New CPU, new day, same...Read more »