Getting LinuxCNC
This section describes the recommended way to download and make a fresh install of LinuxCNC. There are also Alternate Install Methods for the adventurous. If you have an existing install that you want to upgrade, go to the Updating LinuxCNC section instead.
Fresh installs of LinuxCNC are most easily created using the Live/Install Image. This is a hybrid ISO filesystem image that can be written to a USB storage device or a DVD and used to boot a computer. At boot time you will be given a choice of booting the "Live" system (to run LinuxCNC without making any permanent changes to your computer) or booting the Installer (to install LinuxCNC and its operating system onto your computer’s hard drive).
The outline of the process looks like this:
-
Download the Live/Install Image.
-
Write the image to a USB storage device or DVD.
-
Boot the Live system to test out LinuxCNC.
-
Boot the Installer to install LinuxCNC.
1. Download the image
This section describes some methods for downloading the Live/Install Image.
1.1. Normal Download
Download the Live/Install CD by clicking here:
1.2. Download using zsync
zsync is a download application that efficiently resumes interrupted downloads and efficiently transfers large files with small modifications (if you have an older local copy). Use zsync if you have trouble downloading the image using the Normal Download method.
-
Install zsync using Synaptic or, by running the following in a terminal
sudo apt-get install zsync
-
Then run this command to download the iso to your computer
zsync http://www.linuxcnc.org/linuxcnc-2.7-wheezy.iso.zsync
There is a Windows port of zsync. It works as a console application. It can be downloaded from:
1.3. Verify the image
(This step is unnecessary if you used zsync)
-
After downloading, verify the checksum of the image to ensure integrity.
md5sum linuxcnc-2.7-wheezy.iso or sha256sum linuxcnc-2.7-wheezy.iso
-
Then compare to these checksums
md5sum: 978ca074c51194e72f93e8c8d7110cfa sha256sum: a3c29850cbc44da7b1ecdbe584a915f158c0b84428acfbcf3271df85c24e34aa
Windows and Mac OS X do not come with an md5sum program, but there are alternatives. More information can be found at: How To MD5SUM
2. Write the image to a bootable device
The LinuxCNC Live/Install Image is a hybrid ISO image which can be written directly to a USB storage device (flash drive) or a DVD and used to boot a computer. The image is too large to fit on a CD.
-
Writing the image to a USB storage device in Linux
-
Connect a USB storage device (for example a flash drive or thumb drive type device).
-
Determine the device file corresponding to the USB flash drive. This information can be found in the output of dmesg after connecting the device. /proc/partitions may also be helpful.
-
Use the dd command to write the image to your USB storage device. For example, if your storage device showed up as /dev/sde, then use this command:
dd if=linuxcnc-2.7-wheezy.iso of=/dev/sde
-
Insert a blank DVD into your burner. A CD/DVD Creator or Choose Disc Type window will pop up. Close this, as we will not be using it.
-
Browse to the downloaded image in the file browser.
-
Right click on the ISO image file and choose Write to Disc.
-
Select the write speed. It is recommended that you write at the lowest possible speed.
-
Start the burning process.
-
If a choose a file name for the disc image window pops up, just pick OK.
-
Download and install Infra Recorder, a free and open source image burning program: http://infrarecorder.org/
-
Insert a blank CD in the drive and select Do nothing or Cancel if an auto-run dialog pops up.
-
Open Infra Recorder, and select the Actions menu, then Burn image.
3. Testing LinuxCNC
With the USB storage device plugged in or the DVD in the DVD drive, the shut down the computer then turn the computer back on. This will boot the computer from the Live/Install Image and choose the Live boot option. Once the computer has booted up you can try out LinuxCNC without installing it. You can not create custom configurations or modify most system settings like screen resolution unless you install LinuxCNC.
To try out LinuxCNC from the Applications/CNC menu pick LinuxCNC. Then select a sim configuration to try out.
To see if your computer is suitable for software step pulse generation run the Latency Test as shown here.
4. Installing LinuxCNC
To install LinuxCNC from the LiveCD select Install (Graphical) at bootup.
5. Updates to LinuxCNC
With the normal install the Update Manager will notify you of updates to LinuxCNC when you go on line and allow you to easily upgrade with no Linux knowledge needed. It is OK to upgrade everything except the operating system when asked to.
Warning
|
Do not upgrade the operating system if prompted to do so. |
6. Install Problems
In rare cases you might have to reset the BIOS to default settings if during the Live CD install it cannot recognize the hard drive during the boot up.
7. Alternate Install Methods
The easiest, preferred way to install LinuxCNC is to use the Live/Install Image as described above. That method is as simple and reliable as we can make it, and is suitable for novice users and experienced users alike.
In addition, for experienced users who are familiar with Debian system administration (finding install images, manipulating apt sources, changing kernel flavors, etc), new installs are supported on following platforms:
Distribution | Architecture | kernel | Typical use |
---|---|---|---|
Debian Jessie |
amd64 & i386 |
Stock |
simulation only |
Debian Wheezy |
i386 |
RTAI |
machine control & simulation |
Debian Wheezy |
amd64 & i386 |
Preempt-RT |
machine control & simulation |
Debian Wheezy |
amd64 & i386 |
Stock |
simulation only |
Ubuntu Precise |
i386 |
RTAI |
machine control & simulation |
Ubuntu Precise |
amd64 & i386 |
Stock |
simulation only |
Ubuntu Lucid |
i386 |
RTAI |
machine control & simulation |
Ubuntu Lucid |
amd64 & i386 |
Stock |
simulation only |
The RTAI kernels are available for download from the linuxcnc.org debian archive. The apt source is:
-
Debian Wheezy: deb http://linuxcnc.org wheezy base
-
Ubuntu Precise: deb http://linuxcnc.org precise base
-
Ubuntu Lucid: deb http://linuxcnc.org lucid base
The Preempt-RT kernels are available for Debian Wheezy from the regular debian.org archive. The packages are called linux-image-rt-amd64 and linux-image-rt-686-pae.
7.1. Installing on Debian Wheezy (with Preempt-RT kernel)
-
Install Debian Wheezy (Debian version 7), either i386 or amd64. You can download the installer here: https://www.debian.org/releases/. One version that is tested is the net install debian-7.9.0-i386-netinst.iso. Be careful and don’t download Debian 8.
-
After burning the iso and booting up if you don’t want Gnome desktop select Advanced Options > Alternative desktop environments and pick the one you like. Then select Install or Graphical Install.
WarningDo not enter a root password, if you do sudo is disabled and you won’t be able to complete the following steps. -
Run the following in a terminal to bring the machine up to date with the latest packages.
sudo apt-get update sudo apt-get dist-upgrade
-
Install the Preempt-RT kernel and modules
sudo apt-get install linux-image-rt-amd64 or sudo apt-get install linux-image-rt-686-pae
-
Reboot, and make sure you boot into the Preempt-RT kernel. When you log in, verify that the following includes PREEMPT and RT.
uname -v
-
Add the LinuxCNC Archive Signing Key to your apt keyring by running
sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 3cb9fd148f374fef
-
Add a new apt source that looks like this:
sudo add-apt-repository "deb http://linuxcnc.org/ wheezy base 2.7-uspace" or sudo add-apt-repository "deb http://linuxcnc.org/ jessie base 2.7-uspace"
-
Update the package list from linuxcnc.org
sudo apt-get update
-
Install uspace
sudo apt-get install linuxcnc-uspace
7.2. Installing on Ubuntu Precise
-
Install Ubuntu Precise 12.04 x86 (32-bit). Any flavor should work (regular Ubuntu, Xubuntu, Lubuntu, etc). 64-bit (AMD64) is currently not supported. You can download the installer here: http://releases.ubuntu.com/precise/
-
Run the following to bring the machine up to date with the latest packages in Ubuntu Precise.
sudo apt-get update sudo apt-get dist-upgrade
-
Add the LinuxCNC Archive Signing Key to your apt keyring by running
sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 3cb9fd148f374fef
-
Add a new apt source
sudo add-apt-repository "deb http://linuxcnc.org/ precise base 2.7-rtai"
-
Fetch the package list from linuxcnc.org.
sudo apt-get update
-
Install the RTAI kernel and modules by running
sudo apt-get install linux-image-3.4-9-rtai-686-pae rtai-modules-3.4-9-rtai-686-pae
-
If you want to be able to build LinuxCNC from source using the git repo, also run
sudo apt-get install linux-headers-3.4-9-rtai-686-pae
-
Reboot, and make sure you boot into the rtai kernel. When you log in, verify that the kernel name is 3.4-9-rtai-686-pae.
uname -r
-
Run
sudo apt-get install linuxcnc