Skip to content

johnnyhuy/ubuntu-ethereum-miner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages