How to Install Debian 8.2 "Jessie" and LinuxCNC2.7

More
12 Oct 2015 03:26 - 12 Oct 2015 16:17 #63698 by grub
As someone who returned to Linux after a very long time (still recall having to manually mount everything) I am stuck somewhere between the ranks of "novice" (using pre-built everything) and "experienced user" ((used to be able to) finding install images, manipulating apt sources, changing kernel flavours, etc.). While intuitive pre-build versions of Linux CNC are available: here , and "older" versions of Ubuntu/Debian are provided (which makes sense as "newer/different" OS may increase the latency ( here )), I am still a fan of using the most up-to-date system, mostly because of my recent return (or the long planned switch) from Windows to Linux.

As there might be other people out there that do not consider themselves "experienced" with Linux (yet), but willing to give it a try, but feel dubious about using an outdated (first version of Ubuntu 8.04 was released in 2008, 10.04 LTS (Long Time Support) 2012, Debian "Wheezy" 2013) system, I am trying to give a "more detailed" tutorial on how to set up Debian 8.2 aka "Jessie" (note: all Debian releases are named after Toy Story characters) starting from a Windows platform and (hopefully) with support from the people of this board as soon as I hit a wall.

First information on how to set up Linux CNC on a "fresh" install of Linux can be found here (starting at 7.1).

The following tutorial will focus on installing Debian 8.2 64-bit.

Pre-build Debian 8.2 images (*.iso) can be found under the following link: cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/
For 32-bit images follow the parent directory link until you can switch to i386.
As one will note there a all kind of different builds in the following convention "debian-live-[version]-[amd64/i386]-[name]-desktop.iso". The [name] will indicate the different desktop environment. Desktop environements will both affect the performance ( see here in the linux CNC board ) as well as the look and feel of your OS. I personally prefer xfce (which was also shipped with the Linux CNC Debian build), but feel free to download whichever you prefer.

1. Download: debian-live-8.2.0-amd64-xfce-desktop.iso

2. If still stuck with Windows and in order to create a bootable medium one can either burn the *.iso file on a DVD or create a usb-stick with it. I did the latter and used the Universal USB Installer (UUI) by pendrivelinux. Found here: www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/. Just select "debian live" in Step 1, the downloaded *.iso in Step 2, and your ~1-2 GB USB Flash Drive in Step 3.

3. Insert the USB flash drive in your soon to be Linux CNC computer. On start-up enter the boot device selection list (usually by hitting F12, F10, F8 or Esc) and select the flash drive. Now you should get to the Debian boot menu, hit "I" or select "Install" by using the arrow keys, then hit enter.
Now you should be guided through the Debian installation.
Sometimes (depending on your hardware) your are asked to provide third party files, so having another working computer and a second flash drive at hand might be useful. If everything goes well your computer will eventually start with Debian. If troubles arise, e.g. supplemental files not found, restart with both usb drives installed; if the wifi does not work, use LAN first, wirless usually works as soon as everything is installed.

4. Run terminal (either from the top menu, short-cut or by clicking the black icon on the bottom). If your default account is not sudoer (more info here ) enter
su
first, then enter the super user password that you set during the installation of Debian.
Now (following the Linux CNC tutorial found here, 7.1.2 ), run the following in terminal to bring the machine up to date with the latest packages.
sudo apt-get update
(this will update the package/software manager of Debian)
sudo apt-get dist-upgrade
(this will update the Linux distribution)

5. Install the Preempt-RT kernel and modules (RT = realtime, more explanation here ).
As the RT-kernel is put with the backport files one has to add the appropriate repository. To do so in termial enter:
synaptic
(to launch the synaptic packet manager, this can also be done via the Menu -> Settings -> Synaptic...)
In Synaptic* click on "Settings -> Repositories" now add a new source with the following settings:
Binary (deb); Address: http://ftp.de.debian.org/debian; Distribution: jessie-backports; Section: main
To check whether everything worked out use the Synaptic -> Search and type: "linux-image-rt" you should either find the ...-rt-amd64 or ...-rt-686-pae release.

Back in terminal run:
sudo apt-get install linux-image-rt-amd64
or
sudo apt-get install linux-image-rt-686-pae
(or install directly in Synaptic)

6. Reboot (fastest by typing "reboot"), and make sure you boot into the Preempt-RT kernel (note: this can also be seen shortly on bootup). When you log in, run terminal and verify that the following includes PREEMPT and RT.
uname -v
(this is similar to the Windows cmd systeminfo)
In my example I got: "SMP PREEMT RT Debian 4.1.6-1~bpo8+1 (2015-09-09)" as an output.

7. Add the LinuxCNC Archive Signing Key to your apt keyring by running:
sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 8f374fef

8. Launch synaptic again to add the "Linux CNC" repository. Once again, click on "Settings -> Repositories" now add a new source with the following settings:
Binary (deb); Address: http://linuxcnc.org/; Distribution: jessie; Section: 2.7-uspace base

9. Update the package list from linuxcnc.org, either by "reload"-ing in Synaptic or by running:
sudo apt-get update

10. Install uspace/LinuxCNC, either by selecting "linuxcnc-uspace" in Synaptic (this will auto-select dependencies and documentation) or run:
sudo apt-get install linuxcnc-uspace
both should result in the exact same outcome.

This should conclude installing both Debian and Linux CNC on a computer.
While browsing through this board I also found a post ( here ) regarding the 2.8 release of Linux CNC which can be pulled from the following resource ( here ), but I don't know whether that is still stable. I guess I will leave that to others.

P.S. Still need to test if everything works as supposed.

*I prefere using the GUI approach in synaptic to have a better picture of dependencies and stuff. Afik the repositories can also be added by terminal.
Last edit: 12 Oct 2015 16:17 by grub. Reason: rewording subject
The following user(s) said Thank You: mstrick96

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

More
29 Oct 2015 17:35 #64431 by ebe2305
Hi,

Getting to point 5. in your Installation instructions.

No linux-image-rt found. Tried to find it on Debian Homepage. Only got results for:

You have searched for packages that names contain linux-image-rt in all suites, all sections, and all architectures. Found 2 matching packages.

Package linux-image-rt-686-pae
•squeeze-backports (kernel): Linux für moderne PCs (Metapaket), PREEMPT_RT
3.2+46~bpo60+1 [backports]: i386
•wheezy (oldstable) (kernel): Linux für moderne PCs (Metapaket), PREEMPT_RT
3.2+46: i386

Package linux-image-rt-amd64
•squeeze-backports (kernel): Linux für 64-Bit-PCs (Metapaket), PREEMPT_RT
3.2+46~bpo60+1 [backports]: amd64
•wheezy (oldstable) (kernel): Linux für 64-Bit-PCs (Metapaket), PREEMPT_RT
3.2+46: amd64

Any suggestions?

Thank you.

Volker

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

More
06 Nov 2015 00:57 - 06 Nov 2015 01:58 #64840 by grub
Sorry for the (very) late reply.

It looks like the package was removed (either because of a new version in the making or whatever kind of issues with the original package itself (my guess with linux-image-4.1.0-0.bpo.2-rt-amd64 being relatively new (2015-09-09)). This is all I found.

Apparently Ben Hutchings is the one maintaining the packages for Debian. I will try to share news if I get some more info. Unfortunately I couldn't locate a mirror for the package, which means that one will be stuck at step 5 until a new package is available or unless one decides to do the patching oneself (rt.wiki.kernel.org/index.php/Main_Page).

The packages can be downloaded from the following links:

Linux-Image-RT-686 Search: snapshot.debian.org/package/linux-latest...1:2b:68:7e:bpo8:2b:1
Package link (*.deb): snapshot.debian.org/archive/debian/20151...%7Ebpo8%2B1_i386.deb
Debug: snapshot.debian.org/archive/debian/20151...%7Ebpo8%2B1_i386.deb

Linux-Image-RT-amd64 Search: snapshot.debian.org/package/linux-latest...1:2b:67:7e:bpo8:2b:1
Package link (*.deb): snapshot.debian.org/archive/debian/20150...7Ebpo8%2B1_amd64.deb
Debug: snapshot.debian.org/archive/debian/20150...7Ebpo8%2B1_amd64.deb

I will change the text of the tutorial until the package officially returns to the repository.
Last edit: 06 Nov 2015 01:58 by grub. Reason: I was in a hurry to eat lunch when I wrote this post which ... anyway I edited it.
The following user(s) said Thank You: islander261

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

More
01 Dec 2015 01:16 - 01 Dec 2015 03:13 #66148 by design_dude
Hi Grub --

Sorry for the noob question but do you have any guidance on the best way to install these package files once I have downloaded them?

I have tried a couple of different ways with a little help from google and I seem to be striking out / doing something wrong.

Cheers!

(edit)
Some info on what I have done to try:
root@cnc:/home/tybo# sudo dpkg -i /home/tybo/linuxcnc_files/linux-image-rt-amd64_4.1+67~bpo8+1_amd64.deb
Selecting previously unselected package linux-image-rt-amd64.
(Reading database ... 102747 files and directories currently installed.)
Preparing to unpack .../linux-image-rt-amd64_4.1+67~bpo8+1_amd64.deb ...
Unpacking linux-image-rt-amd64 (4.1+67~bpo8+1) ...
dpkg: dependency problems prevent configuration of linux-image-rt-amd64:
linux-image-rt-amd64 depends on linux-image-4.1.0-0.bpo.2-rt-amd64; however:
Package linux-image-4.1.0-0.bpo.2-rt-amd64 is not installed.

dpkg: error processing package linux-image-rt-amd64 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-rt-amd64
root@cnc:/home/tybo# sudo apt-get install
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
linux-image-rt-amd64 : Depends: linux-image-4.1.0-0.bpo.2-rt-amd64 but it is not installable
E: Unmet dependencies. Try using -f.
Last edit: 01 Dec 2015 03:13 by design_dude. Reason: Added info on current attempt to install

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

More
04 Dec 2015 15:56 #66390 by LinuksGuru
Its seems RT kernel deb completely removed from Jessie.
Someone have tried to use linux-image-3.2.0-4-rt-amd64 from Wheezy?

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

More
04 Dec 2015 16:05 #66391 by ebe2305
Hi LinuksGuru,

yes, I've tried that. At first installed fine, but after launching Linuxcnc there were many Errors.

Now I compiled the preempt rt kernel myself. First with Debian jessie, worked! Now using the LinuxMint Deb Edition.

At least i got comfortable with kernel compiling to a point where I think i am not doing totally stupid things.

Greets Volker
The following user(s) said Thank You: LinuksGuru

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

More
04 Dec 2015 16:29 #66393 by LinuksGuru
Does LinuxCNC have its own kernel modules?
In other words, does it depend upon particular kernel version, or RT patch is enough?

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

More
04 Dec 2015 23:11 #66422 by jepler
"uspace" linuxcnc does not use any kernel modules, so it is not dependent on having a specific matching kernel version number like "rtai" linuxcnc is.

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

More
19 Jan 2016 13:43 - 19 Jan 2016 21:35 #68757 by mstrick96
Thanks, Grub!
Your tutorial is helpful. I'm not a newbie, but am also not experienced.

I am currently running Wheezy that I installed from the live cd. I've been playing with installing and compiling packages and would like to try an install like yours.

Question... do I need to wipe out my current Wheezy installation first or can I just install Jessie on top of it?

UPDATE: I decided to blow away everything and install over the entire disk. Was dual booting with XP, but now XP is no more! Have installed freecad and teamviewer. Next is linuxcnc!
Last edit: 19 Jan 2016 21:35 by mstrick96. Reason: Update

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

More
08 Feb 2016 21:12 #69785 by vre

"uspace" linuxcnc does not use any kernel modules, so it is not dependent on having a specific matching kernel version number like "rtai" linuxcnc is.


can i install linuxcnc uspace on jessie-amd64 to control machine from parport or it is only for simulation ?

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

Time to create page: 0.367 seconds
Powered by Kunena Forum