Author

Topic: Install CGMiner on UBUNTU 11.4 x64 (Read 27444 times)

member
Activity: 98
Merit: 10
September 19, 2011, 10:05:50 AM
#9
Thanks guys. I will give this a shot. I reformatted the one windows box that's giving me an issue and it works fine now with the new CGMiner but, i will set up a dual boot on the system and try it again. I wiped the whole hard drive last time and thought... oh this will be easy i can figure it out LOL. I got as far as getting linux installed. Loading the new Catalyst drivers and installing SDK. But i couldnt figure out the compiling of CG Miner.  Thanks for your help.

donator
Activity: 305
Merit: 250
September 19, 2011, 12:36:45 AM
#8
Great, thanks. I have yet to try CGminer but maybe I will check it out on my Ubuntu box. I have heard lots of good things about it.
donator
Activity: 798
Merit: 500
September 18, 2011, 12:48:22 PM
#7
From an earlier post:

Good walk-through on Ubuntu:  https://bitcointalksearch.org/topic/ubuntu-natty-narwhal-1104-mining-guide-howto-7514

I like BAMT if this is a dedicated machine.  Burn the image onto a USB stick.  Boot up, edit a few lines in the config file and it's ready to mine: https://bitcointalksearch.org/topic/bamt-easy-persistent-usb-key-based-linux-for-dedicated-minersmining-farms-28967

Inaba's guide is very good but cgminer 2 + has all clock and fan control built in, much simpler to use for linux noobs.  And BAMT is definitely the easiest for dedicated rigs, that's what I use on all but one rig.  I have one rig that won't run BAMT because of hardware issues and a crappy connection that cg handles much better than phoenix.

Here is a procedure for making cg run at startup:

Set auto login
System->Administration->Login Screen
Unlock, enter password, select Log in as xxxxx automatically, close

Create mine start script
open terminal
Code:
cd ~
sudo nano mine.sh

If you plan on connecting with ssh put this in file
Code:
#!/bin/sh

export DISPLAY=:0
xhost +
screen -d -m -S cgminer cgminer
If you do not plan on connecting with ssh, this should work
Code:
#!/bin/sh

screen -d -m -S cgminer DISPLAY=:0 cgminer

Ctrl x then y and enter to save

Make it executable
Code:
sudo chmod +x mine.sh

Now set the script to run at startup
System->Preferences->Startup Applications
Click add, enter a name and comment, for command - click Browse and select the mine.sh script you just created.  Click Add, and Close.
Reboot and test.  This should launch cg in a screen session.  To view the session
Code:
screen -r cgminer
To detach from the screen session Ctrl a then d
donator
Activity: 305
Merit: 250
September 18, 2011, 12:28:56 PM
#6
From an earlier post:

Good walk-through on Ubuntu:  https://bitcointalksearch.org/topic/ubuntu-natty-narwhal-1104-mining-guide-howto-7514

I like BAMT if this is a dedicated machine.  Burn the image onto a USB stick.  Boot up, edit a few lines in the config file and it's ready to mine: https://bitcointalksearch.org/topic/bamt-easy-persistent-usb-key-based-linux-for-dedicated-minersmining-farms-28967
donator
Activity: 798
Merit: 500
September 18, 2011, 12:12:38 PM
#5
Just realized a much easier procedure, instead of compiling from source an easier way to install CG is using the Ubuntu bianary.
Code:
cd ~
wget http://ck.kolivas.org/apps/cgminer/cgminer-2.0.3-x86_64-built.tar.bz2
tar sxfv cgminer-2.0.3-x86_64-built.tar.bz2
cd cgminer-2.0.3
sudo mv cgminer /usr/bin
sudo mv *.cl /usr/bin

Now just start cg from any command line
Code:
DISPLAY=:0 cgminer


This should probably be moved to mining??
donator
Activity: 798
Merit: 500
September 17, 2011, 06:44:41 PM
#4
ok....I don't know how familiar you are with linux installs or command line, and I'm not a linux expert myself but I'll try anyway.

Ubuntu installation instructions can be found here:
http://www.ubuntu.com/download/ubuntu/download

Basically, download iso, burn to CD, boot from CD, run installer.

Then you need open a terminal "Applications->Accessories->Terminal"

run these commands (you will need to enter your password)
Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libcurl4-openssl-dev libncurses5-dev lib32gcc1 libc6-i386 lib32gcc1 libc6-i386 dkms openssh-server screen

Install Catalyst 11.6 - reference here
http://mygeekopinions.blogspot.com/2011/06/how-to-install-atiamd-catalyst-linux.html

Code:
cd ~/; mkdir catalyst11.6; cd catalyst11.6/
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-6-x86.x86_64.run
chmod +x ati-driver-installer-11-6-x86.x86_64.run
sudo sh ./ati-driver-installer-11-6-x86.x86_64.run --buildpkg Ubuntu/natty
sudo dpkg -i fglrx*.deb
If you get dependency problems after the last command run
Code:
sudo apt-get  -f install

Update X.org file
Code:
sudo DISPLAY=:0 aticonfig -f --initial --adapter=all

Reboot

Installation of SDK and CG can be found on github page
https://github.com/ckolivas/cgminer

Install SDK (2.4)
Go here

accept agreement and download, save file (default location).

Code:
sudo -s
cd /opt
tar xf ~/Downloads/AMD-APP-SDK-v2.4-lnx64.tgz
cd /
tar xf /opt/AMD-APP-SDK-v2.4-lnx64/icd-registration.tgz
ln -s /opt/AMD-APP-SDK-v2.4-lnx64/include/CL /usr/include
ln -s /opt/AMD-APP-SDK-v2.4-lnx64/lib/x86_64/* /usr/lib/
ldconfig
exit

Install CG
Code:
cd ~
wget http://ck.kolivas.org/apps/cgminer/cgminer-2.0.3.tar.bz2
sudo tar xvjf cgminer-2.0.3.tar.bz2

Do the following before configuring, (from readme in cgminer-2.0.3/ADL_SDK):
Please insert AMD ADL files adl_defines.h adl_sdk.h adl_structures.h here.
(http://developer.amd.com/gpu/adlsdk/Pages/default.aspx)
accept agreement and download, save file (default location)
Code:
cd ~/Downloads
unzip ADL_SDK_3.0.zip
sudo cp include/*.h ~/cgminer-2.0.3/ADL_SDK/

Then configure:
Code:
cd ~/cgminer-2.0.3/
CFLAGS="-O2 -Wall -march=native" ./configure
You should get this:
 OpenCL...............: FOUND. GPU mining support enabled
  ADL..................: SDK found, GPU monitoring support enabled
Then make:
Code:
make

Now you can run cgminer from the directory with
Code:
DISPLAY=:0 ./cgminer

Or do the following
Code:
sudo cp cgminer /usr/bin
sudo cp *cl /usr/bin
this will let you run from any directory by just typing cgminer
Just remember you need to set the DISPLAY variable for SDK support either by putting
Code:
DISPLAY=:0
before the cgminer command or
Code:
export DISPLAY=:0
then run the commands.

EDIT: I cleaned this up by testing on a fresh VM but I don't have any ATI cards on this machine to actually run the miner.  Let me know if you find any errors - it's late and beer makes it all look right to me.



member
Activity: 98
Merit: 10
September 17, 2011, 05:42:14 PM
#3
start to finish guide.
donator
Activity: 798
Merit: 500
September 17, 2011, 05:27:02 PM
#2
I just set one up a couple days ago.  Do you have any specific issues, or are you looking for a start to finish guide?
member
Activity: 98
Merit: 10
September 17, 2011, 05:04:35 PM
#1
Can anyone please help me install CGMINER 2.03 on Ubuntu 11.04. Im a noob on Linux. I couldn't stand my windows boxes crashing anymore. Thanks

Jump to: