Best version for Parport machine and how to install

More
19 Nov 2024 20:58 #314872 by floris
Hey guys,

I first installed Linuxcnc 2.7 a few years ago just to have a look at it. Recently I finished the mechanics of my machine, which has dual Y steppers.
I found a good tutorial to add the second stepper in the HAL and INI, but I found out that 2.7 is quite old and the method described in the tutorial wouldn't work. I decided to do a fresh install of 2.9 per download page (LinuxCNC 2.9.3 Debian 12 Bookworm PREEMPT-RT ISO).

I did a latency test and got terrible results (120000ns while I got 15000ns on the previous install of 2.7). From what I can gather, this is due to the PREEMPT kernel. I can see a pinned post on the forum for "RTAI deb", but I have no idea how I would install this on my machine since it is not connected to the internet.

As you may be able to tell, I'm a bit out of my depth here. What I'm looking for is idiotproof instructions on how I can get 2.9 with the RTAI kernel on my PC, preferrably in a way that is as simple as installing the ISO.

Hope you guys can help.

Please Log in or Create an account to join the conversation.

More
20 Nov 2024 16:40 #314927 by NTULINUX
You can put the .deb files on a flash drive and install them as you usually would with `sudo dpkg -i <all .deb files go here>`

For example:

1.) Download all the .debs from this sticky:

forum.linuxcnc.org/9-installing-linuxcnc...ng-rtai-debs-for-2-9 (the 5.4.279 ones)

2.) Put them on a flash drive on one machine that has access to the internet (any machine, doesn't need LinuxCNC)

3.) On the LinuxCNC machine, run:
sudo apt purge linuxcnc*

4.) Now plug the flash drive into your LinuxCNC machine that doesn't have internet access

5.) Make a directory in your home folder (/home/<your user>) called RTAI on the LinuxCNC machine

6.) Use the graphical file manager to copy the files off the flash drive into your newly created RTAI folder

7.) In a terminal, go to that directory:
cd "${HOME}/RTAI"

8.) Run:
for i in *.deb ; do sudo dpkg -i "${i}" ; done

9.) Reboot and select the RTAI kernel via the GRUB menu (this is the menu that has a list of kernels you can choose from at boot. It launches right after the BIOS is done.)

10.) Run the latency test or latency histogram.
The following user(s) said Thank You: gaston48, tommylight, Aciera, floris

Please Log in or Create an account to join the conversation.

More
20 Nov 2024 20:40 #314944 by floris
Thanks! You're a legend. Got it to work and the jitter dropped to about 12000ns.

I've tried to edit the grub file so it loads the RTAI kernel by default as a quality of life improvement. Unfortunitely, editing GRUB_DEFAULT didn't work because the kernal options are in the "advanced options" menu. I'd love to know how to get the system to boot using the RTAI kernal without having to intercept the GRUB menu every time.

Please Log in or Create an account to join the conversation.

More
21 Nov 2024 06:06 - 21 Nov 2024 06:15 #314966 by NTULINUX
In /etc/default/grub:

GRUB_DISABLE_SUBMENU=true

You will need to modify the file with superuser permissions, but if you're new to Linux, using vim or nano might be too tedious. You can use something like:
sudo apt install kate
or:
sudo apt install geany
and then launch the graphical editor as a superuser like so:
gksudo kate
or:
gksudo geany
I'm not on Debian right now, so if gksudo doesn't work, try gksu, and if that doesn't work, then resort to using `sudo` instead. Common practice is to never use `sudo` though for graphical applications.  After modifying /etc/default/grub (there should be a comment already in the file about GRUB_DISABLE_SUBMENU) run:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Now count the number of menuentries starting from 0, then make that your `set default=` setting. Afterward, re-run:
sudo grub-mkconfig -o /boot/grub/grub.cfg
command again. :)
Last edit: 21 Nov 2024 06:15 by NTULINUX. Reason: more specific
The following user(s) said Thank You: floris

Please Log in or Create an account to join the conversation.

More
21 Nov 2024 19:07 - 21 Nov 2024 19:09 #314996 by NTULINUX
Looks like gksudo and the likes have been removed from Debian and Ubuntu.

One thing you could do:
sudo cp -rLv /etc/default/grub /home/<your user>/grub
sudo chown -R <your user>:<your user> /home/<your user>/grub

And then modify the file without escalated privileges in any editor of your liking, then cat the file back:
sudo cat /home/<your user>/grub &> /etc/default/grub
sudo grub-mkconfig -o /boot/grub/grub.cfg
Last edit: 21 Nov 2024 19:09 by NTULINUX.

Please Log in or Create an account to join the conversation.

More
21 Nov 2024 19:33 #314998 by floris
Awesome, that did the job!

Please Log in or Create an account to join the conversation.

More
22 Nov 2024 03:08 #315016 by NTULINUX
Yay, I helped someone!
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
22 Nov 2024 18:52 - 22 Nov 2024 18:52 #315044 by andypugh
You can select from submenus, but the format isn't well documented and it might take some experimentation to figure out which menu and submenu are which number.
I have:
GRUB_DEFAULT="4>2"
Last edit: 22 Nov 2024 18:52 by andypugh.
The following user(s) said Thank You: NTULINUX

Please Log in or Create an account to join the conversation.

More
23 Nov 2024 08:03 #315089 by NTULINUX

You can select from submenus, but the format isn't well documented and it might take some experimentation to figure out which menu and submenu are which number.
I have:
GRUB_DEFAULT="4>2"
 


Heh! I never knew!
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.176 seconds
Powered by Kunena Forum