/ docs / src / getting-started / getting-linuxcnc.txt
getting-linuxcnc.txt
  1  [[cha:getting-linuxcnc]]
  2  
  3  = Getting LinuxCNC
  4  
  5  This section describes the recommended way to download
  6  and make a fresh install of LinuxCNC.  There are also
  7  <<_alternate_install_methods,Alternate Install Methods>> for the
  8  adventurous.  If you have an existing install that you want to upgrade,
  9  go to the <<cha:updating-linuxcnc,Updating LinuxCNC>> section instead.
 10  
 11  Fresh installs of LinuxCNC are most easily created using the Live/Install
 12  Image.  This is a hybrid ISO filesystem image that can be written to a
 13  USB storage device or a DVD and used to boot a computer.  At boot time you
 14  will be given a choice of booting the "Live" system (to run LinuxCNC
 15  without making any permanent changes to your computer) or booting the
 16  Installer (to install LinuxCNC and its operating system onto your
 17  computer's hard drive).
 18  
 19  The outline of the process looks like this:
 20  
 21  . Download the Live/Install Image.
 22  . Write the image to a USB storage device or DVD.
 23  . Boot the Live system to test out LinuxCNC.
 24  . Boot the Installer to install LinuxCNC.
 25  
 26  
 27  == Download the image
 28  
 29  This section describes some methods for downloading the Live/Install
 30  Image.
 31  
 32  
 33  === Normal Download
 34  
 35  Download the Live/Install CD by clicking here:
 36  
 37  http://www.linuxcnc.org/iso/linuxcnc-2.7.14-wheezy.iso
 38  
 39  
 40  === Download using zsync
 41  
 42  zsync is a download application that efficiently resumes interrupted
 43  downloads and efficiently transfers large files with small modifications
 44  (if you have an older local copy).  Use zsync if you have trouble
 45  downloading the image using the <<_normal_download,Normal Download>>
 46  method.
 47  
 48  .zsync in Linux
 49  
 50  . Install zsync using Synaptic or, by running the following in a <<faq:terminal,terminal>>
 51  +
 52  ----
 53  sudo apt-get install zsync
 54  ----
 55  . Then run this command to download the iso to your computer
 56  +
 57  ----
 58  zsync http://www.linuxcnc.org/iso/linuxcnc-2.7.14-wheezy.iso.zsync
 59  ----
 60  
 61  .zsync in Windows
 62  
 63  There is a Windows port of zsync. It works as a console application. It can be
 64  downloaded from:
 65  
 66  https://www.assembla.com/spaces/zsync-windows/documents
 67  
 68  === Verify the image
 69  
 70  (This step is unnecessary if you used zsync)
 71  
 72  . After downloading, verify the checksum of the image to ensure integrity.
 73  +
 74  ----
 75  md5sum linuxcnc-2.7.14-wheezy.iso
 76  ----
 77  +
 78  or
 79  +
 80  ----
 81  sha256sum linuxcnc-2.7.14-wheezy.iso
 82  ----
 83  . Then compare to these checksums
 84  +
 85  -----
 86  md5sum: bdd85ad00f05d7c67e5037a72bae4934
 87  sha256sum: 079ba1fae48861b0814187b8048d6f2f299f943427d8c4806b65519f3a560d48
 88  -----
 89  
 90  .Verify md5sum on Windows or Mac
 91  
 92  Windows and Mac OS X do not come with an md5sum program, but there are
 93  alternatives.  More information can be found at:
 94  https://help.ubuntu.com/community/HowToMD5SUM[How To MD5SUM]
 95  
 96  == Write the image to a bootable device
 97  
 98  The LinuxCNC Live/Install Image is a hybrid ISO image which can be written
 99  directly to a USB storage device (flash drive) or a DVD and used to boot
100  a computer.  The image is too large to fit on a CD.
101  
102  .Writing the image to a USB storage device in Linux
103  
104  . Connect a USB storage device (for example a flash drive or thumb
105    drive type device).
106  . Determine the device file corresponding to the USB flash drive.
107    This information can be found in the output of `dmesg` after
108    connecting the device.  `/proc/partitions` may also be helpful.
109  . Use the `dd` command to write the image to your USB storage device.
110    For example, if your storage device showed up as `/dev/sde`,
111    then use this command:
112  +
113  -----
114  dd if=linuxcnc-2.7.14-wheezy.iso of=/dev/sde
115  -----
116  
117  .Writing the image to a DVD in Linux
118  
119  . Insert a blank DVD into your burner. A 'CD/DVD Creator' or 'Choose Disc Type'
120    window will pop up. Close this, as we will not be using it.
121  . Browse to the downloaded image in the file browser.
122  . Right click on the ISO image file and choose Write to Disc.
123  . Select the write speed. It is recommended that you write at the lowest
124    possible speed.
125  . Start the burning process.
126  . If a 'choose a file name for the disc image' window pops up, just pick OK.
127  
128  .Writing the image to a DVD in Windows
129  
130  . Download and install Infra Recorder, a free and open source image
131    burning program: http://infrarecorder.org/
132  . Insert a blank CD in the drive and select Do nothing or Cancel if an
133    auto-run dialog pops up.
134  . Open Infra Recorder, and select the 
135   'Actions' menu, then 'Burn image'.
136  
137  == Testing LinuxCNC
138  
139  With the USB storage device plugged in or the DVD in the DVD drive, the
140  shut down the computer then turn the computer back on. This will boot
141  the computer from the Live/Install Image and choose the Live boot option.
142  Once the computer has booted up you can try out LinuxCNC without installing
143  it. You can not create custom configurations or modify most system
144  settings like screen resolution unless you install LinuxCNC.
145  
146  To try out LinuxCNC from the Applications/CNC menu pick LinuxCNC. Then select
147  a sim configuration to try out.
148  
149  To see if your computer is suitable for software step pulse generation
150  run the Latency Test as shown <<latency-test,here>>.
151  
152  == Installing LinuxCNC
153  
154  To install LinuxCNC from the LiveCD select 'Install (Graphical)' at bootup.
155  
156  == Updates to LinuxCNC (((Updates to LinuxCNC)))
157  
158  With the normal install the Update Manager will notify you of updates
159  to LinuxCNC when you go on line and allow you to easily upgrade with no
160  Linux knowledge needed.
161  It is OK to upgrade everything except the operating system when asked to.
162  
163  [WARNING]
164  Do not upgrade the operating system if prompted to do so.
165  
166  == Install Problems
167  
168  In rare cases you might have to reset the BIOS to default settings if
169  during the Live CD install it cannot recognize the hard drive 
170  during the boot up.
171  
172  == Alternate Install Methods
173  
174  The easiest, preferred way to install LinuxCNC is to use the Live/Install
175  Image as described above.  That method is as simple and reliable as we
176  can make it, and is suitable for novice users and experienced users alike.
177  
178  In addition, for experienced users who are familiar with Debian system
179  administration (finding install images, manipulating apt sources, changing
180  kernel flavors, etc), new installs are supported on following platforms:
181  
182  [options="header"]
183  |===================================================================
184  | Distribution   | Architecture | kernel     | Typical use
185  | Debian Jessie  | amd64 & i386 | Stock      | simulation only
186  | Debian Wheezy  | i386         | RTAI       | machine control & simulation
187  | Debian Wheezy  | amd64 & i386 | Preempt-RT | machine control & simulation
188  | Debian Wheezy  | amd64 & i386 | Stock      | simulation only
189  | Ubuntu Precise | i386         | RTAI       | machine control & simulation
190  | Ubuntu Precise | amd64 & i386 | Stock      | simulation only
191  | Ubuntu Lucid   | i386         | RTAI       | machine control & simulation
192  | Ubuntu Lucid   | amd64 & i386 | Stock      | simulation only
193  |===================================================================
194  
195  The RTAI kernels are available for download from the linuxcnc.org
196  debian archive.  The apt source is:
197  
198  * Debian Wheezy: `deb http://linuxcnc.org wheezy base`
199  * Ubuntu Precise: `deb http://linuxcnc.org precise base`
200  * Ubuntu Lucid: `deb http://linuxcnc.org lucid base`
201  
202  The Preempt-RT kernels are available for Debian Wheezy from the
203  regular debian.org archive.  The packages are called `linux-image-rt-amd64`
204  and `linux-image-rt-686-pae`.
205  
206  === Installing on Debian Wheezy (with Preempt-RT kernel)
207  
208  . Install Debian Wheezy (Debian version 7),
209    either i386 or amd64.  You can download the installer here:
210    https://www.debian.org/releases/. One version that is tested is the net
211    install 'debian-7.9.0-i386-netinst.iso'. Be careful and don't download Debian
212    8.
213  
214  . After burning the iso and booting up if you don't want Gnome desktop select
215    'Advanced Options' > 'Alternative desktop environments' and pick the one you
216    like. Then select 'Install' or 'Graphical Install'.
217  +
218  WARNING: Do not enter a root password, if you do sudo is disabled and you won't
219  be able to complete the following steps.
220  
221  . Run the following in a <<faq:terminal,terminal>> to bring the machine up to
222    date with the latest packages.
223  +
224  ----
225  sudo apt-get update
226  sudo apt-get dist-upgrade
227  ----
228  
229  . Install the Preempt-RT kernel and modules
230  +
231  ----
232  sudo apt-get install linux-image-rt-amd64
233  or
234  sudo apt-get install linux-image-rt-686-pae
235  ----
236  
237  . Reboot, and select the Linux 3.2.0-4-rt-686-pae kernel. When you
238    log in, verify that `PREEMPT RT`is reported by the following command.
239  +
240  ----
241  uname -v
242  ----
243  
244  . Open Applications Menu > System > Synaptic Package Manager search for
245    'linux-image' and right click on 'linux-image-3.2.0-4-686-pae' and select
246    'Mark for Complete Removal'. Do the same for 'linux-image-686-pae'. Reboot.
247  
248  . Add the LinuxCNC Archive Signing Key to your apt keyring by running
249  +
250  ----
251  sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 3cb9fd148f374fef
252  ----
253  
254  . Add a the apt repository:
255  +
256  ----
257  sudo add-apt-repository "deb http://linuxcnc.org/ wheezy base 2.7-uspace"
258  ----
259  
260  . Update the package list from linuxcnc.org
261  +
262  ----
263  sudo apt-get update
264  ----
265  
266  . Install uspace (a reboot may be required prior to installing uspace)
267  +
268  ----
269  sudo apt-get install linuxcnc-uspace
270  ----
271  
272  
273  === Installing on Ubuntu Precise
274  
275  . Install Ubuntu Precise 12.04 x86 (32-bit). Any flavor should
276    work (regular Ubuntu, Xubuntu, Lubuntu, etc). 64-bit (AMD64)
277    is currently not supported. You can download the installer here:
278    http://releases.ubuntu.com/precise/
279  
280  . Run the following to  bring the machine up to date with the latest packages
281    in Ubuntu Precise.
282  +
283  ----
284  sudo apt-get update
285  sudo apt-get dist-upgrade
286  ----
287  
288  . Add the LinuxCNC Archive Signing Key to your apt keyring by running
289  +
290  ----
291  sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 3cb9fd148f374fef
292  ----
293  
294  . Add a new apt source 
295  +
296  ----
297  sudo add-apt-repository "deb http://linuxcnc.org/ precise base 2.7-rtai"
298  ----
299  
300  . Fetch the package list from linuxcnc.org.
301  +
302  ----
303  sudo apt-get update
304  ----
305  
306  . Install the RTAI kernel and modules by running
307  +
308  ----
309  sudo apt-get install linux-image-3.4-9-rtai-686-pae rtai-modules-3.4-9-rtai-686-pae
310  ----
311  
312  . If you want to be able to build LinuxCNC from source using the git repo,
313    also run
314  +
315  ----
316  sudo apt-get install linux-headers-3.4-9-rtai-686-pae
317  ----
318  
319  . Reboot, and make sure you boot into the rtai kernel. When you log in,
320    verify that the kernel name is 3.4-9-rtai-686-pae.
321  +
322  ----
323  uname -r
324  ----
325  
326  . Run
327  +
328  ----
329  sudo apt-get install linuxcnc
330  ----