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.
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.
Please feel free to inspect/modify the script to suit your configuration.
- Root access
- Fresh installation of Ubuntu LTS
- Install Ubuntu utility packages: git vim screen openssh-server
- Install Nvidia drivers: installs package nvidia-390
- Create Nvidia overclock script: adds script at ~/overclock.sh
- Extract Eth Miner: from ~/miner-installer/miner and install at ~/ethminer
- Disable nouveau: adds config at /etc/modprobe.d/blacklist-nouveau.conf
- Create miner start script: adds a start mining script at ~/miner.sh
- Create cron job: starts miner and overclock at reboot
- 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.
-
Gain access to your Ubuntu instance
Be sure to have the following prerequisites:
- Git installed
- An Internet connection on the device
-
Get this Git repository
cd ~ && git clone --depth=1 https://github.com/johnnyhuy/ubuntu-ethereum-miner.git ~/miner-installer
-
Run the install bash script and follow the prompts
cd ~/miner-installer/scripts && sudo bash ./install.sh
-
Edit miner settings at
~/miner.sh
-
Unlock overclocking on Nvida drivers by running the following script after reboot.
cd ~/miner-installer/scripts && sudo bash ./nvidia_unlock_overclock.sh
Follow the manual method of installing the miner at MANUAL_INSTALL.md
in this repository.
Here are some solutions to some issues/gotchas that may occur when setting up the system.
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
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
If you need a clean installation of files from the installation script, run the following command:
cd ~ && sudo bash ./miner-installer/scripts/reset.sh
Run the following command to view all screen instances:
screen -ls
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.
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.
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
Majority of the information I have found are referenced below: