Build your own Litecoin Mining Rig, part 2: Linux Setup

Linux Litecoin Mining Setup Guide
In the second installment of our DIY litecoin mining guide, we’ll look at how to install and configure Linux to properly mine with your GPUs at optimal settings. Don’t be dissuaded if you’ve never used Linux before—our step-by-step guide makes it easy.

Linux has a few advantages over Windows, including the ability to install to a USB stick (which means you don’t need a harddrive), lesser hardware requirements (you can get by just fine with less than 4GB of RAM), and simpler remote administration capabilities. Best of all, Linux is free! However, be aware that if you’d like to undervolt your GPUs to save power, Windows might be a better choice for you (update 10/2013: no longer true!).

If you missed the hardware portion of our guide, make sure to check it out first. Otherwise, read on.

Build a Litecoin Mining Rig, part 2:  Linux Setup

So you’ve decided to use Linux to run your mining rig—a fine choice! If you’re still a bit nervous because you’ve a complete Linux newbie, don’t be. Simply follow the step-by-step instructions exactly as they’re written, and you’ll be fine. Even if you’ve never done anything like this before, you should be up and running in about an hour.

Step 1: Configure BIOS settings

Before we even get to Linux, make sure your mining computer’s BIOS settings are in order. Power on your computer, and press the “delete” key a few times immediately after power on. You should end up in the BIOS configuration area. Do the following, then save & exit:

  • Change power options so that the computer automatically turns itself on whenever power is restored. The reason for this is two-fold: first, it’ll make sure that your miner automatically starts up after a power outage. Second, it makes powering the computer on much easier if you don’t happen to have a power switch connected to the motherboard.
  • Make sure that your USB stick is first in the boot-up order (you may need to have a USB stick attached).
  • Disable all components that you don’t plan to use. This will save a little bit of power, and since your miner will likely be running 24/7, it’ll add up. For me, that meant disabling onboard audio, the SATA controller, the USB 3.0 ports (I only had a 2.0 USB stick), the Firewire port, and the serial port.

Step 2: Install Xubuntu Desktop to your USB stick

Xubuntu is a lightweight version of Ubuntu, a popular Linux distribution. Most other distros should work just fine, but be aware that the GPU drivers require the presence of Xorg, which means server distros that don’t have a GUI will not work properly.

  • Download the Xubuntu Desktop x64 v12.10 installation image.
  • You’ll need to either burn the installation image onto a CD, or write the image to a second USB stick. If you use a CD, you’ll need to temporarily hook up a CD-ROM drive to your mining rig for the installation (make sure you temporarily enable your SATA controller if you disabled it in step 1!).
  • Once you have the installation media prepared, you’re ready to install Xubuntu to the blank USB stick on your miner. Make sure your blank USB stick is inserted into a USB port on your mining, and then boot into your installation media. The Xubuntu installer should appear.
  • Make sure to click the “auto-login” box towards the end of the installer; otherwise take all of the default installation options.
  • If you’re using a USB stick that is exactly 8GB, the installer may complain about the default partition sizes being too small. Create a new partition table with these settings: 5500mb for root (/), 315mb for swap, and the remaining amount for home (/home). If you’re using a USB stick larger than 8GB, you will not have to do this.
  • When the installation is complete, you should automatically boot into the Xubuntu desktop. Make sure to remove your installation media.

Step 3: Install AMD Catalyst drivers

Open a terminal session by mousing over the bottom center of the screen so that a list of icons appears. Click on “terminal” (it looks like a black box).

  • Type the following commands (press “enter” at the end of each line and wait for Linux to finish doing it’s thing):
    sudo apt-get install fglrx-updates fglrx-amdcccle-updates fglrx-updates-dev
    sudo aticonfig --lsa
    sudo aticonfig --adapter=all --initial
    sudo reboot
  • After your computer reboots, you can verify that everything worked by typing:
    sudo aticonfig --adapter=all --odgt
  • If you see all of your GPUs listed, with “hardware monitoring enabled” next to each, you’re good to go.

Important: you may need to have something plugged into each GPU to prevent the OS from idling it. You can plug 3 monitors into your 3 GPUs, but that isn’t very practical. The easiest option is to create 3 dummy plugs, and leave them attached to your GPUs. They’ll “trick” the OS into believing that a monitor is attached, which will prevent the hardware from being idled. Check out how to create your own dummy plugs.

If you ever add or remove GPUs to your rig later, you’ll need to re-run this command:   sudo aticonfig --adapter=all --initial

Step 4: Install SSH, Curl, and package updates

  • Install SSH by typing:
    sudo apt-get install openssh-server byobu

With SSH installed, you can unplug the keyboard/mouse/monitor (put dummy plugs into all GPUs, though) from your miner, and complete the rest of the installation from your desktop computer. Simply download Putty onto your desktop, run it, and enter the IP address of your mining rig. That should bring up a remote terminal session to your miner, which is more or less just like sitting at the keyboard in front of it.

If you plan to manage your mining rig remotely over the internet, you’ll need to forward port 22 on your router to your miner. Make sure that you use a strong Xubuntu password!

Setup should be quicker from this point, as now you can simply copy text from this webpage (highlight it and press control-C) and then paste it into your Putty session by simply right-clicking anywhere inside the Putty window. Neat, eh?

  • Install Curl and package updates by typing (or copying & pasting into Putty) the following commands:

    sudo apt-get install curl
    sudo apt-get update
    sudo apt-get upgrade

Step 5: Install cgminer

Cgminer is the mining software we’ll be using. If the first command doesn’t work, you’ll need to check out the cgminer website and make a note of the current release version. Substitute that in the commands below.

Update: Cgminer 3.7.2 is the last version to support scrypt—do not use any version after that! In addition, depending on which version you choose to use, you may receive an error complaining about libudev.so.1 when you try to run cgminer—you can find the fix for that here.

  • Type the following:

    wget http://ck.kolivas.org/apps/cgminer/2.11/cgminer-2.11.4-x86_64-built.tar.bz2
    tar jxvf cgminer-2.11.4-x86_64-built.tar.bz2
  • If everything was uncompressed successfully, we can delete the downloaded archive; we don’t need it anymore:
    rm *.bz2
  • Now check if cgminer detects all of your GPUs properly:
    cd cgminer-2.11.4-x86_64-built
    export DISPLAY=:0
    export GPU_USE_SYNC_OBJECTS=1
    ./cgminer -n

Step 6: Create cgminer startup script

We’re almost done—now we just need to create a few simple scripts to control cgminer.

  • If you’re still in the cgminer directory from the previous step, first return to your home directory:
    cd ..
  • Type the following to create a new file with nano, a Linux text editor:
    sudo nano mine_litecoins.sh
  • Type the following into nano (note where the places you need to substitute your own usernames!) :
    #!/bin/sh
    export DISPLAY=:0
    export GPU_MAX_ALLOC_PERCENT=100
    export GPU_USE_SYNC_OBJECTS=1
    cd /home/YOUR_XUBUNTU_USERNAME/cgminer-2.11.4-x86_64-built
    ./cgminer --scrypt -I 19 --thread-concurrency 21712 -o stratum+tcp://coinotron.com:3334 -u USERNAME -p PASSWORD
  • Save the file and quit nano, then enter the following:
    sudo chmod +x mine_litecoins.sh

Note that the cgminer settings we’re using in our mine_litecoins.sh script correspond to a good starting point for Radeon 7950 series GPUs. If you followed our hardware guide, these settings will give you good hashrates. If you’re using another type of GPU, you’ll want to use Google to find optimal cgminer settings for it.

Also note that you’ll need to create an account at one of the litecoin mining pools, and plug your username and password into the script (the -u and -p parameters). I have Coinotron in there as an example, but there are quite a few to choose from.

Step 7: Create auto-start scripts

We want cgminer to automatically start mining whenever the rig is powered on. That way, we keep mining losses to a minimum whenever a power outage occurs, and we don’t have to worry about manually starting it back up in other situations.

  • Type the following to create a new script and open it in nano:
    sudo nano miner_launcher.sh
  • Enter the following text into the editor (substitute your Xubuntu username where shown!):
    #!/bin/bash
    DEFAULT_DELAY=0
    if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
       DELAY=$DEFAULT_DELAY
    else
       DELAY=$1
    fi
    sleep $DELAY
    su YOUR_XUBUNTU_USERNAME -c "screen -dmS cgm /home/YOUR_XUBUNTU_USERNAME/mine_litecoins.sh"
  • Save and quit nano, and then type:
    sudo chmod +x miner_launcher.sh
  • Now we need to call our new script during startup; we do that by adding it to /etc/rc.local. Type the following to open /etc/rc.local in nano:
    sudo nano /etc/rc.local
  • Add the following text, right above the line that reads “exit 0” (substitute your own username!):
    /home/YOUR_XUBUNTU_USERNAME/miner_launcher.sh 30 &

Step 8: Create an alias to easily check on cgminer

We’re essentially done at this point, but you’ll probably want to manually SSH into your miner from time to time to manually check on your GPU temperatures & hashrates, etc. Creating an alias will make that easy.

  • Type:

    sudo nano .bashrc
  • Scroll to the end of the file, and then add this text above the line that reads “# enable programmable completion…”
    alias cgm='screen -x cgm'
  • Save and quit out of nano.

That’s it—you’re done! You’ll probably want to test everything now. The easiest way to do that is to close your Putty session and power down your miner. Turn it back on and the following should happen:

  1. Your miner should boot into Xubuntu. This may take about a minute, depending on the speed of your USB stick.
  2. 30 seconds after Xubuntu has loaded, cgminer will automatically start and begin mining. You’ll probably notice the fans on your GPUs spin up when this happens.
  3. You should be able to SSH into your miner at any time and type cgm to bring up the cgminer screen. To close the screen (and leave cgminer running), type control-A, then control-D.
  4. If you ever need to start cgminer manually (because you quit out of it, or kill it, etc), simply type ./miner_launcher.sh
cgminer running

If all went well, you should see something like this when checking cgminer via your “cgm” alias.

Congratulations—you have your own headless linux litecoin miner!

The next section of our guide covers setup under Windows, and then we take a look at optimizing cgminer settings for better performance.

You can leave a response, or trackback from your own site.

1,431 Responses to “Build your own Litecoin Mining Rig, part 2: Linux Setup”

  1. Glenn says:

    BTW when I type “ls” I see “mine_litecoins.sh” listed twice. Should I delete the apparent extra file? if so, how do I do that? Thanks again!

  2. Glenn says:

    Just added “-I 19 –thread-concurrency 21712” into my log on line which I showed above, but still no success at logon to the pool.:(

  3. Gene says:

    ~$ sudo apt-get install fglrx-updates fglrx-amdcccle-updates fglrx-updates-dev
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package fglrx-updates
    E: Unable to locate package fglrx-amdcccle-updates
    E: Unable to locate package fglrx-updates-dev

    I followed the instruction exactly and am stuck trying to install catalyst drivers.

  4. August says:

    Great site!

    I followed your guide to the letter but I’m having a couple of problems:

    1. CGminer only recognizes 2 of the 3 gpu’s
    2. GPU 0 and GPU 1 are only running @ 300 Kh/s

    GPU 2 gets an “Error -5: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)”

    I’m not a pro and am unsure what could be causing this.

    Thanks in advance!!

    • CryptoBadger says:

      Are you running a 32-bit operating system? If you are, try switching to a 64-bit OS if at all possible.

      If you need to run a 32-bit OS, you can try making the change I suggest here – it has worked for a few people; others have said that their issues didn’t stop until they switched to x64.

      • August says:

        No, I’m running the one you link to at the top of this page : xubuntu-12.10-desktop-amd64.iso

        Do you think it’s worth it to do a fresh install of everything from the ground up?

        Also, what versions of the AMD catalyst drivers should I be using?

        Thanks for the quick reply!

        • CryptoBadger says:

          Do you have anything plugged into the GPUs (monitor or dummy plug)? If not try plugging something into each, and then re-run “sudo aticonfig –adapter=all –initial” (without the quotes), reboot, and then try cgminer again.

          The instructions in my guide will just fetch the latest catalyst driver. I didn’t notice much of a difference between the various versions on Linux like I did with Windows – you can try installing an older driver, but I don’t think it should be necessary. When you installed the driver, did you do it locally with a keyboard & monitor hooked up to the rig, or did you use SSH? Sometimes installing a video driver over SSH messes things up.

          I should have asked this first, but are you running the exact same hardware that I recommend in my guide? If not, the –thread-concurrency value I recommend may be too large for your cards. Try using 16384 or 8192. Also, make sure that these lines are in your startup script:

          export GPU_MAX_ALLOC_PERCENT=100
          export GPU_USE_SYNC_OBJECTS=1

          If none of that helps, try starting cgminer with no parameters other than –scrypt and your pool’s URL, username, and password.

          • August says:

            I didn’t have anything plugged into the GPU’s. I’ll plug in the white adapters that came with the cards. Or should I do the dummy plugs that you link too?

            It’s the EXACT same hardware. Even the Rubbermaid items are the same! Ha!

            I’ll give your recommendations a try and let you know how I make out.

    • Qnfauf says:

      You are having the exact same problem I had. I spent hours trying to figure it out, and finally fixed it.

      The fix is very simple: use dummy plugs.

      Here is the reason. Even though the miner sees all three GPUs, it is actually using only one of them for mining. That is the reason why the “two” cards are getting 300kH/s as it is actually two GPU threads running on a single GPU. The “third” one is failing because you are trying to create too many concurrent threads on a single GPU. Using dummy plugs fix this issue.

      • August says:

        Dummy plugs was the answer!!! I had read somewhere that they weren’t needed when using Linux but obviously they are.

        They’re a $1.50 for a pack of 5 so def worth it!

        Now onto optimization since the cards are only avg 550 kh/s each…

  5. Glenn says:

    Eureka!! After MANY assembly errors and fixes, erasing pendrives several times and starting over, fixing errors and confusion in the programming, about 2:30 this morning cgminer successfully logged onto my pool and went to work. Cryptobadger, I’ve never done more on a computer before than mousing to a website. Building this rig has been fulfilling and exciting, and I’m glad to have become a part of the cryptocurrency community. Without your information and guidance, I could NEVER have done it on my own. Thanks for your patience and prompt replies to very confused questions! I’m sending you every tenth litecoin out of my first 100 mined, as you definitely deserve. Thanks again…now I’m going to read your section on performance…

  6. burnt says:

    Hi there

    I have followed this guide but using a normal ubuntu install 13.04 32bit on a standalone mining pc / rig

    I can get to the point where I am trying to run cg miner using

    ./cgminer -n

    then I get the following error

    bash: ./cgminer: cannot execute binary file

    Can anyone please advise as to what I am doing wrong

    many thanks!

    burnt

    • CryptoBadger says:

      It looks like you’re trying to execute a 64-bit binary on a 32-bit operating system. If you’re using 32-bit ubuntu, you’ll need to build the cgminer binary from source code (for some reason the author does not supply a compiled 32-bit binary for linux).

      Unless you have a good reason to run 32-bit ubuntu (e.g.: you have some hardware that is incompatible with a x64 OS), I highly recommend using a 64-bit operating system. Many people have reported issues running a 32-bit OS.

  7. nightengale says:

    Was smooth sailing until I got to the ./cgminer -n command. I keep getting “cannot execute binary file”. Installed an updated version of cgminer (3.1.1) — maybe the syntax of the program has changed slightly? Can’t figure it out. Any ideas?

  8. nightengale says:

    Alright, strike that. My bad for not reading all of the comments before posting and I did, in fact, mistakenly install an x86 version of Xubuntu. So I’ll give it another go with x64…

    While I’m posting though, I’d like to ask. Once you have your cards running stable, in your experience, what’s the uptime with Xubuntu + cgminer? Typically how long before you have to restart cgminer, or restart the OS? I know every system is different, but is it stable enough that you can commonly set and forget for days or weeks?

    Thanks for the guide — very well written!

  9. Glenn says:

    Hi Crypto, To respond to your question as to issues in my build, all came from being totally unfamiliar with computer assembly and software installation, a condition of ignorance that left me often unsure as to how to implement the steps that you instructed to be done at any point. One case in point, unfamiliarity with seating the cpu left bent pins and no function. (“00” is actually an error code indicating no cpu activity, I learned). I didn’t even know at first that the cpu had its own power supply from the psu! Trial and error showed me when some commands were continued beyond one line, since I couldn’t recognize a command line as complete or not. Your quick answers and help aided me a lot. At one point, I had an xubuntu install that I had given a password to open, even removing the password still left that o.s requiring a manual login at each start-up, etc, etc. Although I entered the file lines in nano mine-litecoins.sh, and the next command following exit, I returned to the file twice to find it empty.
    The great thing is that having done it, the mystery is much less, and I feel comfortable with all that was learned in the process. By the way, I turned 65 this April, so what gamers know has never been in my reservoir of experience! What has kept me in the game has been that I have followed new trails and experiences all my life, done many different kinds of work, and the chance to be a part of this and continue with building rigs and litecoin speculation/investment is really exciting and enjoyable. Will be in touch again,
    Best Wishes, Glenn

  10. Bryan says:

    I hate being special! I followed you guide, same hardware, when I run i get the following error:

    [2013-05-25 07:43:25] Error -5: Enqueueing kernel onto command queue. (clEnqueu
    eNDRangeKernel)

    Also,

    cgminer version 2.11.4 – Started: [2013-05-25 07:46:04]
    ——————————————————————————–
    (5s):370.3K (avg):479.7Kh/s | A:3 R:0 HW:0 U:15.0/m WU:464.2/m
    ST: 2 SS: 0 NB: 2 LW: 13 GF: 0 RF: 0
    Connected to pool.litebonk.com diff 31 with stratum as user XXX
    Block: e19bb1a529f19008… Diff:39M Started: [07:46:17] Best share: 226
    ——————————————————————————–
    [P]ool management [G]PU management [S]ettings [D]isplay options [Q]uit
    GPU 0: 49.0C 1175RPM | 349.4K/305.3Kh/s | A:2 R:0 HW:0 U: 9.98/m I:19
    GPU 1: 33.0C 922RPM | 321.4K/392.5Kh/s | A:2 R:1 HW:0 U: 9.98/m I:19
    GPU 2: 33.0C 977RPM | OFF / 0.000h/s | A:0 R:0 HW:0 U: 0.00/m I:19
    ——————————————————————————–

    [2013-05-25 07:46:13] Accepted b2544924 Diff 68/31 GPU 0
    [2013-05-25 07:46:13] Stratum from pool 0 requested work restart
    [2013-05-25 07:46:14] Accepted 5a9aac74 Diff 109/31 GPU 1
    [2013-05-25 07:46:15] Accepted 7c86533f Diff 64/31 GPU 0
    [2013-05-25 07:46:17] Stratum from pool 0 detected new block
    [2013-05-25 07:46:18] Pool 0 stale share detected, submitting as user requested

    [2013-05-25 07:46:18] Rejected 2a2a2c93 Diff 77/31 GPU 1 (unsupported operand
    type(s)
    [2013-05-25 07:46:20] Accepted dd5ecf9e Diff 226/31 GPU 1

    The two cards that are running are 1/2 of what you are getting. Any thoughts or what else should I post to help? Thanks for your help and great site! My first few days of successful mining are coming you way!

    • Bryan says:

      Sorry, the error is on GPU 2.

      When I run with your optimized settings for the next page of instructions I get slightly better speeds, GPU 2 crashes still. GPU 0 runs at 80.C, GPU 1 runs at 33.0C, and GPU 2 runs at 32.0C, but OFF for hashing.

    • CryptoBadger says:

      It looks like your second and third GPUs aren’t doing anything.

      Do you have something plugged into all three GPUs (a monitor or dummy plug)?

      Are you running a 32-bit or 64-bit OS?

      • Bryan says:

        You know, seeing stats in the 2nd video card, which i am sure was just split from the default card, made me forget that I had not yet stopped at Radio Shack. Have the transistors in now, all 3 cards are humming away. With the “tweaked” script settings you have set for these cards, I am only getting 1811 to 1821KH/s, that is not too far off from where you are, any idea how i could tweek that extra 100 or so in? I am wired to my cable modem and have plenty of bandwidth. Also my cards are running at 77/78.0C…

        • CryptoBadger says:

          Try changing –gpu-engine to 1070 and –gpu-memclock to 1275. All of your cards should be stable at those settings, and that should get you a bit more speed.

          If you’re feeling ambitious, you can set the –gpu-engine to 1100. It’s likely that at least one of your cards won’t be stable at that speed, though, so it’ll require a little bit of tweaking. If the GPU can’t handle it, you’ll eventually see cgminer report that card as “sick” or “dead” (it might take 24+ hours). Drop the –gpu-engine by 5-10mhz each time that happens until you no longer see sick/dead messages.

          You can set different –gpu-engine speeds for each of your GPUs if necessary by separating the values with commas. For example, passing –gpu-engine 1100,1085,1085 would run GPU 0 at 1100mhz and GPU 1 and 2 at 1085mhz.

          • Bryan says:

            Thanks for all your help. I am getting about 1.949Mh/s now with the following settings:

            ./cgminer –scrypt -I 20 -g 1 -w 256 –thread-concurrency 21712 –gpu-engine 1090 –gpu-memclock 1500 –gpu-vddc 1.087 –temp-target 80 –auto-fan -o

            Any concerns running at those levels long term on the cards? I do not have a power meter to see what power consumption looks like to see if it is less efficient, but speeds are a bit higher 🙂

          • CryptoBadger says:

            If your cards are stable at those settings and your temperatures are good, then you should be fine running long-term. If you see “sick” or “dead” messages in cgminer, drop your clock speeds a bit until they go away. Happy mining!

    • Harm says:

      I had the same error, the drivers proposed in this guide didn’t work for me. In the end the combi was Catalyst 12.8, APP SDK 2.7 (not 2.8!) and the 5.0 other driver of which I forgot the name.

  11. Glenn says:

    Hi Cryptobadger,
    I entered some additional script, which I found on my pool forum, into my scrypt line in nano mine_litecoins.sh (“–worksize 256 –vectors 1 –lookup-gap 2”), and immediately destabilized the computer.
    I tried this because after setting E at 1050 and M at 1400, I’m still hovering at 499 kh/s ( I’m running only one sapphire 7950)
    Consequently I went back in (mouse and cursor, typing response all almost non functioning) and removed the offending lines, exited, then typed chmod +x mine_litecoins.sh and hit enter. I shut off the power and tried to reboot but no response from xubuntu (got a screen but would not finish loading). Going into BIOS and into “boot” there is now only 1 option given “UEFI: Built-in EFI Shell” The only choice is “Enable” or “Disable”. Help Please! Thanks!

    • CryptoBadger says:

      That is odd. Make sure your USB stick is fully inserted into the slot – maybe it came out? If it still doesn’t show up as a boot option, try moving it to a different USB port. Some people reported issues booting from the USB 3.0 ports on the ASRock board, try a USB 2.0 port if you’re currently using a 3.0 one.

      When you do get back into Xubuntu, try removing everything from your cgminer startup script except for the –scrypt option and your mining pool URL/username/password. Then add parameters one by one so you can see if they help or hurt your hashrate. I haven’t played with Sapphire cards much, so I don’t know what the ideal settings would be, but I suspect you’ll get better results with 16384 for thread-concurrency (vs the 21712 I recommend in the guide). Good luck!

  12. Glenn says:

    Correction: There is no option given. The “UEFI Built-in EFI Shell” screen in the Boot section of BIOS simply says “Disabled”, and no “Enabled” choice is given.:(

  13. Kurorising says:

    Hi cryptobadger, thanks so much for writing all this stuff, has helped immensely as I have no idea about Linux. unfortunately I am currently stuck at Step 3! I can enter the first 3 command lines and everything is fine, the GPU shows up, then I reboot. When I start up terminal again, and run the command:
    sudo aticonfig –adapter=all –odgt.

    It suddenly says sudo : aticonfig: command not found

    🙁 have no idea why. I am running xubuntu 12.04 because I had loads of problems with the version given at the beginning of the tutorial. I only have one msi twin frozr gpu hd 7950.
    Any help would be much appreciated!

    • CryptoBadger says:

      It looks like either the catalyst driver installation didn’t complete correctly, or the symbolic links to aticonfig weren’t created for some reason.

      If it’s the latter, try typing:

      cd /usr/lib/fglrx/bin

      before running:

      sudo aticonfig –adapter=all –odgt

      If this works, don’t worry about the missing symbolic links – you don’t need them. If this doesn’t work, then the driver installation probably failed – did you see any error messages?

      • kurorising says:

        hi cryptoB, thanks for the super quick advice, I will remember that. It was because I was making the USB on unetbootin and even though I chose persistence it didnt seem to work somehow. Used another usb writing program, and it worked great, now all changes are saved 🙂

        now im stuck at step 5 lol! it seems to download cgminer fine, and then when I do the jxvf command it wont let me unpack it, saying:

        $ tar jxvf cgminer-2.11.4-x86_64-built.tar.bz2
        bzip2: (stdin) is not a bzip2 file.
        tar: Child returned status 2
        tar: Error is not recoverable: exiting now

        Any ideas? I@ve tried googling but no luck so far…

        • CryptoBadger says:

          Try downloading the cgminer archive again. If tar says that it isn’t a valid bzip file, it probably got corrupted during the download, or didn’t finish properly. Just delete it (rm *.bz2) and grab it again.

  14. Jon says:

    Cryptobadger,

    excellent guide! as soon as i start making some litecoins i’m definitely going to send a few your way.

    I am having some problems with the automation script. nothing seems to be working. i also cannot connect via the ‘cgm’ alias.
    any assistance would be appreciated.

    thanks
    Jon

    • CryptoBadger says:

      Does your mine_litecoins.sh script work (type “./mine_litecoins.sh” in your home directory without the quotes). If not, what is the error?

      • Jon says:

        Yes the ./mine_litecoins.sh scrypt works. for some reason i cannot add all of the fancy parameters that you have but i can get in and then manually adjust to get about 605 k/h (btw i’m only running one 7950 (vapor x)

        i have installed and reinstalled numerous times and i just can’t seem to get the autostart scrypt to work.

        any thoughts?

  15. Glenn says:

    Halfway through reinstall of cgminer, suddenly being denied permission to write to nano files. Getting these responses: “changing permissions of miner_launcher.sh :Operation not permitted” and “Error reading /home/glenn/.nano_history:Permission denied” I have no clue why this suddenly began! Thanks for all help!!!

  16. Glenn says:

    Hi Cryptobadger, Its possible I used sudo at one point in attempt to get into a file. HOWEVER, Today I reformatted and started completely fresh. Tonight cgminer is still not starting, and when I type ./miner_launcher.sh, (and then give xubuntu password as requested) I am returned to the prompt with no activity or response. I have opened “nano mine_litecoins.sh and nano miner_launcher.sh” files and carefully reread each command line. Everything looks OK.The lines are inserted in “sudo nano /etc/rc.local and sudo nano .bashrc” as directed. I’ve checked to see if cgminer is there by running the lines you gave to see if it recognizes the GPU, and I get the correct response info. Just don’t know what to try next. Thanks!

  17. Glenn says:

    Just read your advice to Jon, so tried “./mine_litecoins.sh” command. Got this response: “./mine_litecoins.sh 5: cd: can’t cd to /home/glenn/cgminer…” and “./mine_litecoins.sh 6: ./mine_litecoins.sh ./cgminer not found”

    • CryptoBadger says:

      Have you downloaded and extracted cgminer? It looks like its directory doesn’t exist. Make sure that you’ve followed step 5 in the guide exactly.

      • jon says:

        CryptoBadger,

        now i am getting this error when i try and run the ./mine_litecoins.sh
        this is frustrating, i have followed and repeated step 5 numerous times and i’m stuck.

        jon@jon:~$ ./mine_litecoins.sh
        ./mine_litecoins.sh: 5: ./mine_litecoins.sh: cd/home/jon/cgminer-2.11.4-x86_64-b uilt: not found
        ./mine_litecoins.sh: 6: ./mine_litecoins.sh: ./cgminer: not found

        i know Glenn was having this problem too but i have try cut and paste and i have manually entered everything and nothing seems to be working.

        • CryptoBadger says:

          It looks like you have a couple typos on this line:

          cd/home/jon/cgminer-2.11.4-x86_64-b uilt

          It should read:

          cd /home/jon/cgminer-2.11.4-x86_64-built

          There is a space between the “cd” and the first “/”. Also make sure there is no space in “built”.

          If possible, use SSH to create these files so that you can simply copy and paste the command from my guide. If you get errors, or something doesn’t work, carefully check your scripts for typos – everything has to be entered exactly as it is written in the guide.

  18. Glenn says:

    Thanks, it was cut and paste, but I had to manually re enter into the nano files, so for some reason the cut and paste wasn’t working at all for me, apparently. Going to try manual entry throughout.

  19. Glenn says:

    Hi Cryptobadger, Just downloaded cgminer and watched it unpack again. ran “rm * .bz2” to delete archive, then ran “./mine_litecoins.sh”. The same two error messages came, “cgminer not found”, “can’t cd to…”

  20. Glenn says:

    Just found the error, my bad. Left out the underscore between x86 and 64 in mine_litecoins. Will report progress. Thanks!!

  21. Glenn says:

    now, when cgminer launches, getting “max buffer memory device O supports says 536870912. Your scrypt settings come to 1073741824.
    Error -61: clCreateBuffer (padbuffer8), decrease TC or increase LG”

    This is with the bare minimum scrypt “–I 19 –thread-concurrency 16384 -o…(and address)
    cgminer IS connecting with pool, but no memory speed showing, and no work happening. Thanks for the help!

    • fher98 says:

      “max buffer memory device O supports says 536870912. Your scrypt settings come to 1073741824.

      Thats cuz your thread setting is too high.

  22. Glenn says:

    Thx fher98, this is a problem with the memory clock in my gpu, that is all I know at this moment. Don’t know how to reset the settings in the gpu bios. Formerly it was mining when the TC was set at 21712. Now it is at 16384 and not working.

  23. Glenn says:

    Reformatted and painstakingly manually entered each line to do complete re-install from the beginning, once again. At present time, cgminer must be started with “./mine_litecoins.sh” command because it does not auto start on power-up. SSh’ing into the rig gives me the terminal screen. Typing “cgm” brings message “no screen to be attached matching cgm”. (have checked the “alias cgm=’screen -x cgm'” line in .bashrc several times, it’s there, and so are the commands in miner_launcher.sh). So then I start cgminer with “./mine_litecoins.sh”, and it starts and connects to pool.
    Question: At step 6 after checking if cgminer recognizes the GPU, are the nano directories we create supposed to be sub directories of cgminer, because it continues to show in each command prompt, or should we reboot after installing cgminer? Reason I ask is because in typing”‘sudo nano .bashrc” after creating the two previous nano files (with cgminer in the command prompt line), what I get is the named .bashrc file with nothing in it. Blank! If I reboot so cgminer isn’t in the command prompt anymore, and sudo nano .bashrc, then it comes up with everything in it as it should. From the directions, from step 5 onward, it looks like we are to just continue entering commands without any change to procedure. Your clarification much appreciated, as well as any hints on getting the non-working parts functioning.

    • CryptoBadger says:

      Setting up the screen session happens in miner_launcher.sh, so if that isn’t getting called at startup properly, then your cgm alias will not work.

      What happens if you run miner_launcher.sh manually (type “./miner_launcher.sh” without the quotes)?

      As for your question on step 6, all of the files that you create are supposed to be in your home directory, unless explicitly specified. So if you’ve departed from the guide’s instructions at some point and changed to another directory, and the guide says to type “nano miner_launcher.sh”, you’d need to first switch back to your home directory before proceeding, otherwise miner_launcher.sh is going to get created in the wrong place. If you follow the guide’s directions exactly, you should only ever need to type what I’ve written. If you type “ls” (without the quotes) in your home directory, you should see both mine_litecoins.sh and miner_launcher.sh listed there.

      I highly recommend performing all of the instructions starting at step 4 via SSH, so that you can copy & paste them and eliminate the possibility of a typo.

      The .bashrc file is also in your home directory (it’s hidden). Basically, any place that the guide says to simply type nano followed by a filename (with no directory path in front of the file) means you should be in your home directory. If you’ve left your home directory for some reason, you need to go back there first.

  24. Glenn says:

    All problems resolved! I found that miner_launcher was missing the quotation marks at the end of the command line. It’s amazing how Cryptobadgers instructions work, when I follow them! Looks like I’m finally on my way, with enough understanding of the system to keep it going. I’ll be checking in from time to time to see whats new and share my progress. A big Thanks, Cryptobadger, and you are scheduled for every tenth LTC out of my first 100, with appreciation!

Leave a Reply