How To:cgminer (Bitcoin, litecoin etc.) + AMD Radeon driver Install on CentOS

Source: Internet
Author: User
Tags crypt scrypt snmp object amd radeon

UPDATE 7/7/13:if want to use Catalyst drivers version 12.8 you'll find that X won ' t Start (Error msg:/US r/lib/xorg/modules/drivers/fglrx_drv.so:undefined symbol:noxfree86driextension) If you installed CentOS 6.4. Catalyst > 12.8 would work fine. To fix this, you can downgrade to the Xorg version, which ships with CentOS 6.3:

yum --disablerepo=\* --enablerepo=C6.3\* downgrade xorg\*
(also need to do: yum remove xorg-x11-drv-modesetting )

Do the Before you install catalyst!
UPDATE END.

Here's my how-to for cgminer/amd Radeon drivers under CentOS 6.4, 32bit in this example. You can basically copy & paste every line and you should end to with a working mining rig.

Install Required Packages:

yum install wget system-config-firewall-tui openssh-clients kernel-devel-2.6.32-358.el6.i686 libcurl-devel ncurses-devel compat-libstdc++-33 screen xterm
yum groupinstall "X Window System" "Development tools"

Download and extract Cgminer 3.7.2–later versions don ' t support GPU Mining:

cd /root
wget http://ck.kolivas.org/apps/cgminer/3.7/cgminer-3.7.2.tar.bz2
tar xjvf cgminer-3.7.2.tar.bz2

Download AMD APP and ADL SDKs for Cgminer compilation from:

AMD APP sdk:http://developer.amd.com/tools-and-sdks/heterogeneous-computing/ Amd-accelerated-parallel-processing-app-sdk/downloads
AMD ADL SDK:HTTP://DEVELOPER.AMD.COM/TOOLS-AND-SDKS/GRAPHICS-DEVELOPMENT/DISPLAY-LIBRARY-ADL-SDK

Install the AMD APP SDK:

cd /opt
tar xvzf /root/AMD-APP-SDK-v2.8-lnx32.tgz
cd /
tar xvzf /opt/icd-registration.tgz
cd /opt
tar xvzf AMD-APP-SDK-v2.8-RC-lnx32.tgz
ln -s /opt/AMD-APP-SDK-v2.8-RC-lnx32/include/CL /usr/include
ln -s /opt/AMD-APP-SDK-v2.8-RC-lnx32/lib/x86/* /usr/lib/

Install AMD ADL SDK:

cd /root
mkdir ADL
mv ADL_SDK_5.0.zip ADL
cd ADL
unzip ADL_SDK_5.0.zip
cp include/*.h /root/cgminer-3.7.2/ADL_SDK

Build Cgminer for Litecoin (with scrypt support):

cd /root/cgminer-3.7.2
CFLAGS="-O2 -Wall -march=native -I/opt/AMD-APP-SDK-v2.8-RC-lnx32/include" LDFLAGS="-L/opt/AMD-APP-SDK-v2.8-RC-lnx32/lib/x86" ./configure --enable-scrypt
make
make install
(If you want to run the Cgminer binary from Everywhere)

Install Fglrx AMD graphics card drivers:

AMD Catalyst Driver (Fglrx) from:http://support.amd.com/us/gpudownload/linux/pages/radeon_linux.aspx

(e.g.

cd /root
wget http://www2.ati.com/drivers/linux/amd-catalyst-13.4-linux-x86.x86_64.zip

)

unzip amd-catalyst-13.4-linux-x86.x86_64.zip
chmod 700 amd-catalyst-13.4-linux-x86.x86_64.run
./amd-catalyst-13.4-linux-x86.x86_64.run --buildpkg RedHat/RHEL6
rpm -Uvh fglrx_p_i_c-12.104-1.i386.rpm

Reboot

amdconfig --adapter=all --initial

If your mining rig is headless you can start X in a screen session:

screen
xinit

Detach Screen Session:ctrl+a+d

Create cgminer.sh and put this into the file:

export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export DISPLAY=:0

cgminer --scrypt ...your parameters go here...

Make it executable:

chmod 700 cgminer.sh

Configure Cgminer parameters as needed and start mining ( ./cgminer.sh ). done!

This entry is posted in tech and tagged bitcoin, CentOS, Linux, Litecoin on May 15, 2013.

Post Navigation

←junos:finding SNMP Object identifiers for your Juniper device Quick Copy & paste How-to:install KVM on CentOS →

Thoughts on "How To:cgminer (Bitcoin, Litecoin etc.) + AMD Radeon driver Install on CentOS "
    1. SpinelessNovember at 19:37

      I am getting an error when I install Cgminer. I downloaed The drivers and the Gcminer and is about to start installing Gcminer. I entered the command./autogen.sh and I get the following error:


      configure.ac:39: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
      autoreconf: /usr/bin/autoconf failed with exit status: 1
      Configuring...
      ./autogen.sh: line 10: /root/cgminer/configure: No such file or directory

      Not sure where to start with the this one. Any ideas?

      Reply↓
        1. < Cite class= "FN" >univ Post author November, at 20:16

          hi! Wow, your comment is the 2nd legitimate comment ever in my blog. :-) Anyway, it seems like not all development tools required for compiling from source were installed. Is sure you executed the "Yum install ..." line? In Particular:yum install the "Development tools"
          Let me know if this helps or not.

          Reply↓
    2. homer December 5 at 16:22

      Wow! A bloggers who are arrogant to their readers!
      Wanna is the third:

      Q:What happened to CPU and GPU mining?
      A:their efficiency makes them irrelevant in the Bitcoin mining world today
      and the author have no interest in Supportin G alternative coins that is better
      mined by these devices.

      So, what could the Radeon Driver make sense?

      Felix

      Reply↓
      1. univ Post author December 5, @ 19:27

        I Think you misunderstood my comment. His comment is the 2nd legitimate comment ever, all other comments were spam so far.

        Reply↓
    3. Homer December 5 at 16:27

      Serious:cgminer after 3.7.2 does no contain GPU mining any more, so does not check out Cgminer from git, use Http://ck.kol ivas.org/apps/cgminer/3.7/cgminer-3.7.2.tar.bz2

      Reply↓
      1. Univ Post author December 5 at 19:37

        Thanks for the heads-up. I adjusted the instructions.

        Reply↓
    4. Pingback:help with a Gigabyte gv-r928xoc-3gd REV2 | Coinregime.com

    5. PortosJanuary at 09:11

      ops! Fulfilled your instructions, but starting./cgminer-n reports:

      Fatal:module Fglrx not found.
      error! Fail to load Fglrx kernel module! Maybe can switch to root user to load kernel module directly
      Fatal:module Fglrx not found.
      error! Fail to load Fglrx kernel module! Maybe can switch to root user to load kernel module directly
      [2014-01-18 08:05:22] CL Platform 0 vendor:advanced Micro Devices, Inc.
      [2014-01-18 08:05:22] CL Platform 0 NAME:AMD Accelerated Parallel processing
      [2014-01-18 08:05:22] CL Platform 0 Version:opencl 1.2 amd-app (1214.3)
      [2014-01-18 08:05:22] Error-1: Getting Device IDs (num)
      [2014-01-18 08:05:22] Cldevicesnum returned error, no GPUs usable
      [2014-01-18 08:05:22] 0 GPU devices Max detected

      Why?

      Reply↓
        1. Univ Post author January at 09:43

          Hm, for some reason the kernel driver Fglrx are not being loaded. As Root, try

          Modprobe Fglrx

          and afterwards run

          Amdconfig–lsa

          To see if your GPUs is found then.

          Reply↓
    6. PortosJanuary at 12:55

      Alas, nothing:

      # modprobe Fglrx
      # Amdconfig–lsa
      # Amdconfig:no supported adapters detected

      Reply↓
        1. < Cite class= "FN" >univ Post author January at 11:53

          Hmm. It could be this either Fglrx gets not properly loaded, or that Fglrx was fine by itself and your GPUs was really not found . Is you 100% sure the GPUs is working in this box? If you had only GPUs and that's the one where you had hooked up your monitor to, then that ' s a yes. :) I would boot the box, and then check for "DMESG" to see if the output was while Fglrx tried to load. Did it even try to load?

          reply↓
        2. < Cite class= "FN" >univ Post author January @ 11:55

          Ps:the fact "modprobe Fglrx" didn ' t produce any o Utput is good. Looks like it is loaded then. But make sure it was really there by running "lsmod" or "lsmod | grep Fglrx ".

          Reply↓
    7. VitalJanuary at 05:17

      Hi. I have this:
      [Email protected] cgminer-3.7.2]# cflags= "-o2-wall-march=native-i/amd-app-sdk-v2.8-rc-lnx32/include" LDFLAGS= "-L/ Amd-app-sdk-v2.8-rc-lnx32/lib/x86″./configure–enable-scrypt
      Checking build system Type ... X86_64-unknown-linux-gnu
      Checking host system Type ... X86_64-unknown-linux-gnu
      Checking target system Type ... X86_64-unknown-linux-gnu
      Checking for a bsd-compatible install .../usr/bin/install-c
      Checking whether build environment is sane ... yes
      Checking for a thread-safe mkdir-p .../bin/mkdir-p
      Checking for gawk ... gawk
      Checking whether make sets $ (make) ... yes
      Checking whether make supports nested variables ... yes
      Checking for style's include used by make ... Gnu
      Checking for gcc ... gcc
      Checking whether the C compiler works ... no
      Configure:error:in '/root/cgminer-3.7.2′:
      Configure:error:c compiler cannot create executables
      See ' Config.log ' for more details

      Before and after this, Evrth was good.

      As a result–i cant run Cgminer:
      [Email protected] cgminer-3.9.0]#./cgminer.sh
      ./cgminer.sh:line 5:cgminer:command Not found

      Any suggestions?

      Reply↓
        1. Univ Post author January at 12:05

          Strange. "Checking whether the C compiler works ... no" means gcc is there and not working properly. Did you follow my installation instructions on the required packages and were all packages successfully installed? Double-check whether they were all installed! Make sure yum install "development tools" finishes without problems.

          Is this CentOS 32bit? (Show output of "uname-a" and "Cat/etc/issue")

          Did you really extract the AMD APP SDK in/instead of/opt?

          I noticed when you tried to execute cgminer.sh is in a directory called cgminer-3.9.0 instead of before cgminer-3.7.2 . cgminer-3.9.0 does not the support GPU mining and so throw it away.

          Reply↓
    8. Alex BarringerOctober at 18:36

      For those of your that claim so Cgminer doesn ' t support graphics boards, you ' d is full of it. Anything beyond 3.7.2 and it's forks Don has GPU support, they has ASIC and FPGA support.

      The CPU mining support is dropped in the Cgminer 3.5 series.

      If you can ' t get your graphics cards to be recognized by Cgminer, that's not the fault of the blog owner, your ' re not Readi ng the instructions carefully and obviously not browsing the Cgminer (README) file, if you do, you ' d realize your error. Make sure if you install the APP SDK so reboot your computer, there is a specific reason what you should do th Is.

      In order for-you-be-able to get it-to-work with say, ATI based cards. Your first has a gp-gpu and not a older card of doesn ' t support OpenCL, otherwise it won ' t sure.

      You need to install the AMD FGLRX entire package (not just the driver, you need Catalyst, too), I ' m using the 14.9 stable Driver Currently, then install AMD APP SDK. I don ' t recommend using the Release candidates (RCs), they ' re really buggy, you can use the Verion 2.9 and make sure you D Ownload the ADL 7.0 SDK they ' re paired together for a reason.

      When "all" and "done" and "said" and "all" the prerequisites out of the "the" and get all the dependencies downloaded and Stalled.

      You can use this command line to get the graphics boards to be recognized:

      ./configure–enable-scrypt–enable-opencl

      Those-required for the Do graphics board mining, even if you ' re not doing s-crypt mining and just doing sha256d , you still need-declare s-crypt to is enabled, otherwise you can ' t do mining on the cards.

      It's in the "README"! Do read it, next time!

      You can get the Cgminer 3.7.2 here:

      http://ck.kolivas.org/apps/cgminer/old/3.7/

      Alternately, you can get Kalroth's version fork of 3.7.2 here:

      Https://github.com/Kalroth/cgminer-3.7.2-kalroth

      You must has GIT installed to use the GITHUB version of this.

      Please read the readme.md on this site before you go ahead and try to use it, it'll save a lot of headaches. Do-read-on-to-use GIT correctly, too.

      Note:if you get massive hardware errors and then receive no accepted shares on either version of Cgminer or If doing S-CR Ypt only and use Sgminer (a fork of Cgminer) you is more than likely using the wrong graphics driver for the ADL and APP SDKs (meaning too old).

      I line up the following installations:

      1. ATI FGLRX Full installation including Catalyst, version 14.9
      2. AMD APP SDK version 2.9 (not the RC version)
      3. AMD ADL SDK version 7.0

      This is the I use on Ubuntu and on CentOS and has no trouble at all using Cgminer or Cgminer-kalroth.

      Many of the problems I see people has with this software is because they don ' t read the instructions!

      Note:cgminer 3.8.x and beyond do not support the graphics mining anymore, up to 3.7.2 does.

      Also, don ' t install AMD APP SDK directly as root, that's dangerous, use "sudo" instead.

      There is a script in the installation for the SDK called, "install-app-sdk.sh", I highly suggest your use it.

      sudo./install-app-sdk.sh

      By default, it'll install in the/opt directory, which are what you want, anyhow. After you install it, reboot your computer normally, it's actually a requirement for the installation to is completed, do This before your attempt to compile cgminer.

      Reply↓
    9. Alex Barringer October at 18:42

      I should also point out if you use Cgminer for the first time, don ' t overclock anything, leave your card the IT IS and double check your setting for the mining site you ' re using. If you had your Intensity up too high can also receive massive hardware errors and no accepted shares, same thing can occur when your GP-GPU overheats and/or your dedicated memory on the card (which usually have no heatsinks on them (design Problem).

      Reply↓
    10. JOctober at 20:46

      I had a question, If I am not running a GUI on my CentOS system, and I had 2 x Sapphire toxic R9 270x cards does one STI ll need the Radeon drivers? is they only for X of is they needed for Cgminer also?

      Reply↓
        1. J October at 21:17

          Seems like the post from ' Alex Barringer ' is pretty helpful.

          Reply↓
          1. Univ Post author October at 21:20

            Agreed. :)

            Reply↓
        2. Univ Post author October at 21:18

          Yes, you still need the Radeon drivers. They is needed for Cgminer also.

How To:cgminer (Bitcoin, litecoin etc.) + AMD Radeon driver Install on CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.