GithubHelp home page GithubHelp logo

johnnyhuy / ubuntu-ethereum-miner Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 2.0 12.02 MB

Instructions on how to setup a miner on Ubuntu, includes a quick installation script.

License: MIT License

Shell 100.00%
ubuntu usb miner ethereum cryptocurrency

ubuntu-ethereum-miner's Introduction

Welcome!

The following steps will guide you to setup an Ubuntu operating system. This will have portability mind to run the operating system on a USB with a wifi connection.

Disclaimers

I am not the creator of Claymore's Miner (miner zip stored in /miner/*.gz).

This is an installation guide to install an Nvidia miner and I will not be responsible/liable for any damages once in use.

Automated Installation

Please feel free to inspect/modify the script to suit your configuration.

Prerequisites

  • Root access
  • Fresh installation of Ubuntu LTS

What does it do

  1. Install Ubuntu utility packages: git vim screen openssh-server
  2. Install Nvidia drivers: installs package nvidia-390
  3. Create Nvidia overclock script: adds script at ~/overclock.sh
  4. Extract Eth Miner: from ~/miner-installer/miner and install at ~/ethminer
  5. Disable nouveau: adds config at /etc/modprobe.d/blacklist-nouveau.conf
  6. Create miner start script: adds a start mining script at ~/miner.sh
  7. Create cron job: starts miner and overclock at reboot
  8. Edit .bashrc: set xorg display to root

The installation script requires you to input your username since all files related to the miner are stored in the user home directory.

Instructions

  1. Gain access to your Ubuntu instance

    Be sure to have the following prerequisites:

    • Git installed
    • An Internet connection on the device
  2. Get this Git repository

    cd ~ && git clone --depth=1 https://github.com/johnnyhuy/ubuntu-ethereum-miner.git ~/miner-installer
  3. Run the install bash script and follow the prompts

    cd ~/miner-installer/scripts && sudo bash ./install.sh
  4. Edit miner settings at ~/miner.sh

  5. Unlock overclocking on Nvida drivers by running the following script after reboot.

    cd ~/miner-installer/scripts && sudo bash ./nvidia_unlock_overclock.sh

Manual Installation

Follow the manual method of installing the miner at MANUAL_INSTALL.md in this repository.

Troubleshooting

Here are some solutions to some issues/gotchas that may occur when setting up the system.

Black screen when at boot after running overlock unlock script

Since the script overrides /etc/X11/xorg.conf the screen layout may default to a different device (GPU). After you have finialised your GPU setup, edit the /etc/X11/xorg.conf config file to set it back to the intended GPU.

Here's an example of two GPUs installed where Screen1 is the device I want to use. Note that the two zeros on the end are needed to fill in all the parameters of the config.

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      1  "Screen1" 0 0
    #Screen      0  "Screen0" 0 0
    #Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

I cannot set my overclock settings to new GPUs installed

You will need to run the Nvidia overclock unlock command again to detect new devices. Thankfully I've created that script here:

cd ~/miner-installer/scripts && sudo bash ./nvidia_unlock_overclock.sh

Reset files from installation script

If you need a clean installation of files from the installation script, run the following command:

cd ~ && sudo bash ./miner-installer/scripts/reset.sh

How do I see if screen terminal is running

Run the following command to view all screen instances:

screen -ls

How do I view a screen instance

To access a terminal instance from screen, run the following command:

screen -x [SCREEN NAME]

Replace square brackets with relevant information.

To exit out of an instance press CTRL+A+D to exit without closing the terminal instance.

Wifi is not connecting at login

Allow the network to be connected by all users. The UI method will need you to go your Network Manager and edit the connection to enable all users to connect to the network.

More info

Failed to connect to Mir on GPU overclock

When there is no Xorg server attached to the devices the following error appears when running nvidia-settings commands.

Failed to connect to Mir: Failed to connect to server socket: No such file or directory.

Make sure the Grub configuration is not set to runlevel 3 (text mode). To see if Xorg is running on GPUs, run nvidia-smi and under each GPU there should be a process called /usr/lib/xorg/Xorg.

Add the following enviroment variables in your overclock script to fix the issue:

export DISPLAY=0
export XAUTHORITY=/var/run/lightdm/root/:0

Sources

Majority of the information I have found are referenced below:

ubuntu-ethereum-miner's People

Contributors

johnnyhuy avatar

Stargazers

Cross avatar John McLem Adan avatar Frazile Inc. avatar George Antoniadis avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.