Skip to content
Home » Ubuntu » Page 5

Ubuntu

Ubuntu Linux Technology, Related Information, How-To’s, Tips, Tools, and Guides

Deleting Linux Partitions on USB Drive From Windows 10

How to Delete Linux Partitions on USB Drive using DISKPART on Windows 10

On your Windows 10 computer, insert the linux USB drive

Press the Windows + R button on your keyboard

In the newly launched RUN box, type:

diskpart

And press Enter

From the DISKPART box, type in the following commands

list disk

Now find your USB Drive.  My USB Drive is Disk 1, so I will use that for the rest of the guide.

select disk 1

list partition

select partition 1

delete partition 1 override

select partition 2

delete partition 2 override

Do those steps until you have deleted all of the partitions.  Close the dialog box.  Remove the Drive, and you are ready to go with a new, fresh, unformatted drive.

 

Mount USB Drive

How to Mount a USB Drive on Ubuntu Server

Login

sudo bash

fdisk -l

Identify the usb drive by looking for the size/name/etc and then note the path (ex /dev/sdb)

mount /dev/sdb /mnt

cd /mnt

Now you should see your files!

Installing Teamviewer on Ubuntu Server

How-To guide for installing and running Teamviewer on your Ubuntu Mining Rig

This is the quick and dirty to get it up and running.  I find that running Teamviewer on my Ubuntu Mining Rigs helps me manage them on the fly.  For this guide you will replace the home directory named tacticalware with the name of your home directory.  The rest of the commands will work as they are listed.

From a command prompt run the following commands:

sudo bash

mkdir /home/tacticalware/teamviewer

cd /home/tacticalware/teamviewer

wget https://download.teamviewer.com/download/linux/teamviewer-host_amd64.deb

dpkg -i teamviewer-host_amd64.deb

The installation will fail

Now run:

apt-get -f install

y

After it installs then run

teamviewer setup

Enter your username

Enter your password

Log into your email, and find the Teamviewer email

Allow/Add the device

And now you can log into your server using Teamviewer

 

Installing XMR-STAK on Ubuntu with NVidia 1080TI

How-To guide for installing XMR-STAK on Ubuntu 16.04.04 for Mining LOKI

I prefer linux (more specifically Ubuntu) for mining, and have preferred linux since I began mining in 2012/2013.  I was finally fed up with Windows 10 mining of Loki after the most recent set of Windows updates broke several of my rigs.  So I used a small ubuntu rig that I used for testing, and was able to install the XMR-STAK app onto it.  As happy as ever to be able to mine Loki now with Ubuntu, I thought I should put together this quick guide and hope that it may be beneficial to others.  Some of the steps are from github, some are from other sites, some I had found myself.  This is a central place to get you up and running without having to look too far.

For this guide I am assuming you already have a mining rig built with the following:

Ubuntu 16.04.04

NVidia 1080TI Cards

Loki Wallet already downloaded, installed, and the wallet address ready

I am going to run the commands logged in as sudo to make this quick and easy

Now, onto the guide:

sudo bash

apt-get install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev screen

mkdir /miner && mkdir /miner/drivers

git clone https://github.com/fireice-uk/xmr-stak.git

mkdir xmr-stak/build

cd xmr-stak/build

cmake ..

make install

cd /miner/drivers/xmr-stak/build/bin/

./xmr-stak

You will need to insert a port for monitoring the progress.  I use port 30131 and press Enter

Next type in cryptonight_heavy and press Enter

For the pool address, I use loki.ingest.cryptoknight.cc:7733  press Enter

Your username will be your wallet address, for example

LChtjHqr29p5FojLdMtcUW5ApLWyQHH5j4366V78YECEjUkgK99Y7uLDVLpHjXpYM3UcZ39FFL5Gvd4debF95mcJHbnx5ke

The password will be your worker name.  For example mine is Miner23

Your Rig Identifier can be empty, so just press Enter

Input N for TLS and press Enter

Insert N for Nicehash and press Enter

Input N for multiple pools and press Enter

Select Yes when prompted

Mining will begin!

Once you see it mining properly, hit CTRL + C to cancel the mining.  You will want to run it in screen, so you can disconnect from the terminal and the miner will continue to run. To do that run:

screen ./xmr-stak

It will run and you can now disconnect from your putty session or whatever way you are logged in.  If you want to reconnect to your terminal at any time, run the following and you can see your miner running

screen -r

That’s it!  Thanks for reading!

The hardware that I used in this guide:
Gigabyte AORUS GeForce GTX 1080 Ti (QTY 6):
https://amzn.to/2JqvXC8

Motherboard (QTY 1): 
https://amzn.to/2JqGJZ7

CPU (QTY 1): 
https://amzn.to/3qevp2X

Memory (QTY 1): 
https://amzn.to/2JqHn8Z

Hard Drive (QTY 1):  
https://amzn.to/3lic3X5

Risers (QTY 6):  
https://amzn.to/33rIgVE

Power Supplies (QTY 2):
https://amzn.to/3fTRpLR

Add2PSU (QTY 1):
https://amzn.to/39s4URY

Power Switch (QTY 1):  
https://amzn.to/3ljmNVk

Mining using AMD RX480 Nitro & RX580 Nitro on Ubuntu

How-To Guide for mining with the AMD Series cards on Ubuntu Server 16.04.04

This guide assumes you already have the Rig built, and Ubuntu Server 16.04.04 installed on it.  Once the rig boots to the terminal, this guide begins.  I am going to install everything as root, yes there are reasons why you should and should not do it that way.  I just prefer to get it up and running as quickly as possible.  I do not store anything on my miners, and you should not either.  Keep your wallets off your mining rig.  Keep your coins secure.  Keep your miners with limited data on them, so you can wipe and reinstall on the fly if you need.

Once Install Ubuntu 16.04 Server is installed type the following in bold as they appear

sudo bash

ifconfig

apt-get install openssh-server

Now you can use your laptop/desktop and log into the server.  Download putty, and connect to the server via it’s IP or Server Name.  My Username Name is tacticalware, so you can change everywhere you see tacticalware listed, you will change that to the username of the account you are logged in as

sudo bash

apt-get update

apt-get upgrade

apt install git screen nmap ncdu busybox inxi clinfo links unzip python xorg xserver-xorg-legacy xserver-xorg-video-dummy libcurl3

systemctl disable lightdm.service

mkdir /miner && mkdir /miner/drivers && mkdir /miner/drivers/amd && cd /miner/drivers/amd

Download the drivers from on a laptop

Now use Winscp on the laptop to copy the drivers to the Ubuntu Server

cd /home/tacticalware/ && cp ./* /miner/drivers/amd/ && cd /miner/drivers/amd/

The version I downloaded and used was amdgpu-pro-17.30-458935.tar.xz … you will need to change that part of the name to the version you have

tar -Jxvf amdgpu-pro-17.30-458935.tar.xz && cd amdgpu-pro-17.30-458935 && ./amdgpu-pro-install -y

usermod -a -G video $LOGNAME

Download the SDK from here to your laptop

Winscp it to the server

Move the SDK from your home directory to /miner/drivers/amd

tar xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 && ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh

reboot

Log back into the server now

sudo bash

clinfo

clinfo | grep compute

nano /etc/X11/Xwrapper.config

delete the last line:
allowed_users=console

insert at end of file:

allowed_users=anybody
needs_root_rights=yes

Create a new file for operating without a monitor:

nano /etc/X11/xorg.conf

Section “ServerLayout”
Identifier “X.org Configured”
Screen 0 “Screen8” 0 0
EndSection

Section “Files”
ModulePath “/usr/lib/xorg/modules”
FontPath “/usr/share/fonts/X11/misc”
FontPath “/usr/share/fonts/X11/cyrillic”
FontPath “/usr/share/fonts/X11/100dpi/:unscaled”
FontPath “/usr/share/fonts/X11/75dpi/:unscaled”
FontPath “/usr/share/fonts/X11/Type1”
FontPath “/usr/share/fonts/X11/100dpi”
FontPath “/usr/share/fonts/X11/75dpi”
FontPath “built-ins”
EndSection

Section “Device”
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: “True”/”False”,
### <string>: “String”, <freq>: “<f> Hz/kHz/MHz”,
### <percent>: “<f>%”
### [arg]: arg optional
#Option “ShadowFB” # [<bool>]
#Option “DefaultRefresh” # [<bool>]
#Option “ModeSetClearScreen” # [<bool>]
Identifier “Card8”
Driver “dummy”
VideoRam 16384
EndSection

Section “Monitor”
Identifier “Monitor8”
HorizSync 15.0-100.0
VertRefresh 15.0-200.0
Modeline “1600×900” 33.92 1600 1632 1760 1792 900 921 924 946
EndSection

Section “Screen”
Identifier “Screen8”
Device “Card8”
Monitor “Monitor8”
SubSection “Display”
Viewport 0 0
Depth 24
Virtual 1600 900
EndSubSection
EndSection

Save the file and exit

cd /home/tacticalware/

nano .bashrc

Add the following at end of .bashrc

export DISPLAY=:0

Save the file and exit

nano /etc/profile

Add the following at end of /etc/profile:
export XAUTHORITY=~/.Xauthority

Save the file and exit

nano .xinitrc

#!/bin/bash
DISPLAY=:0 && xterm -geometry +1+1 -n login

Save the file and exit

cd /miner/drivers/ && mkdir claymore && cd /miner/drivers/claymore

On your laptop download Claymore from

https://drive.google.com/drive/folders/0B69wv2iqszefdmJickl5MF9BOEE

Winscp it to the mining rig

Move it to /miner/drivers/claymore

tar zxvf the file

nano zec.sh

#!/bin/sh
xinit &
sleep 5
export GPU_FORCE_64BIT_PTR=1
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100

./zecminer64 -zpool us1-zcash.flypool.org:3333 -zwal t1QYSbLrnbECDu76KDcvoyjBbbhsuWxZXWm.miner20 -zpsw x

Save the file and exit

chmod +x zec.sh

Update config.txt file, also modify epool and dpool with your wallet info and remove default dev info

Save the files

screen ./zec.sh

Now you will want to watch for issues

You can close putty whenever, it does not need to be open for your miner to work, and if you want to reattach a screen, log back in using putty and type

screen -r

Installing TPRUVOT’s CCMiner on Ubuntu 16.04

How-to Guide for Installing the Linux version of ccminer (tpruvot) on Ubuntu 16.04.04

This is a quick guide that I created a few months back.  It gets the latest version of tpruvot’s ccminer installed and running on your Ubuntu mining rig.  There are a lot of algos which can use this, and since most of my rigs run on linux, I had to find a way to get it installed.  It is the general commands that I use from a terminal.  The assumption here is that you already have Ubuntu 16.04 installed and updated.  It is also assumed that you are running NVidia 1080Ti cards, and they are all functional.  I am going to run it all logged in as sudo to make it quick and easy.

From the terminal:

sudo bash

apt-get dist-upgade

apt-get purge nvidia*

reboot

mkdir /drivers && mkdir /drivers/nvidia

wget https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux

mv cuda_9.1.85_387.26_linux cuda_9.1.85_387.26_linux.run

chmod +x cuda_9.1.85_387.26_linux cuda_9.1.85_387.26_linux.run

sh cuda_9.1.85_387.26_linux.run

Answer “yes” for installing the nvidia-drivers, the cuda tools and the symbolic link.

apt-get install git automake openssl libssl1.0.0 libssl-dev libcurl4-openssl-dev

cd /drivers/

git clone https://github.com/tpruvot/ccminer.git

cd ccminer

nano Makefile.am

CTRL & W

Search for 61

Remove comment at the beginning of the line which refers to “61

CTRL & X

Y to save

nano /etc/ld.so.conf.d/cuda-9.1-x86_64

Put only one line:
/usr/local/cuda-9.1/lib64

CTRL & X

Y to save

ldconfig

cd /drivers/ccminer

./build.sh

make install

cd /home/miner/ && nano .bashrc

add this to the end:
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-9.1/bin:$PATH

CTRL & X

Y to save

nano start.sh

Insert the following into the file:

nvidia-smi -pm 1
nvidia-smi -acp 0
nvidia-smi -pl 300
./ccminer -a x16r -i 20 -o stratum+tcp://us.bsod.pw:2176 -u RMzHAFgqgjV5qLkajBjLQ325V7HWBpG3d9 -p c=RVN

CTRL & X

Y to save

chmod +x start.sh

./start.sh

You are now up and mining.  I have chosen Raven for this one, only since I was mining it when I put it together.  You will want to remove my wallet address and insert your own.  Otherwise, the rest will get your rig up and running.

Happy Mining!

Burning the Ubuntu Server 16.04.04 ISO onto a USB

Step One – Prepare the OS Installation Media

Below you will find the default way in which I use a Windows 10 Computer, Etcher, and a USB Drive, to create and install Ubuntu Server 16.04.04 onto a mining rig.  Once you have that ISO flashed onto a USB drive, you can go from mining rig to mining rig, installing the Operating System.  So this really is step one in the entire process.  This guide will in turn become the starting point for each linux based coin/token/masternode that we will gather.  Shoot me any questions you have.

From your Windows 10 machine, Download and install the Bittorrent Client:

http://www.bittorrent.com/downloads/complete/track/stable/os/win

 

Then download the Official Ubuntu Server 16.04.04 (x64) Release:

Finally, Download and Install Etcher (this will write your ISO to the USB Drive)

https://etcher.io/

Once the Ubuntu software has been downloaded, insert a USB drive to write the Operating System Installer to

Make sure this USB drive has nothing else on it.   Everything will be erased

To write Ubuntu to the USB drive:

Open Etcher

Click Select Image

Navigate to where you downloaded the Ubuntu ISO (it is probably located in your Downloads folder)

Select the ubuntu-16.04.4-server-amd64 image and click Open

Click Select Drive

Select the USB drive

Click Continue

Click Flash

Select Continue to Flash the drive

It should take a few minutes for Ubuntu Server to be written to the USB drive

When it has completed flashing the USB drive you can click the X at the top right corner to close the window

Now, you are ready to begin the installation.  So, insert it into a USB 3.0 port on your mining rig, and turn the rig on

 

My Setup – Ubuntu Mining Rig with NVidia 1080Ti cards

Rig Parts Breakdown and Driver Installation for the NVidia 1080 TI GPUs on Ubuntu 16.04.04

I have several rigs running at any given time. Below you will find the equipment list for my NVidia 1080 TI Rigs, and also the installation instructions on getting the Drivers working under Ubuntu 16.04.04

Rack to Install the Hardware On.  I usually put two full rigs onto one single rack.  It saves space and I end up stacking mine (QTY 1): Seville Classics 3-Tier UltraZinc Cabinet Organizer, 7.5″ W x 17.5″ D x 18.5″ H

These steps will help you install the drivers.  It assumes that you have the hardware connected and Ubuntu Server 16.04 already installed.

Log into your Rig

Open a Terminal

sudo bash

apt-get update && apt-get upgrade

apt-get install gcc libglu1-mesa libxi-dev libxmu-dev libglu1-mesa-dev screen

lspci | grep -i nvidia

Check to see if all gpus are listed

apt-get install linux-headers-$(uname -r)

mkdir /miner && mkdir /miner/drivers/ &&  mkdir /miner/drivers/nvidia && cd /miner/drivers/nvidia

sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt update 

wget https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux

chmod +x cuda_9.1.85_387.26_linux

mv cuda_9.1.85_387.26_linux cuda_9.1.85_387.26_linux.run

apt-get purge nvidia*

screen sh cuda_9.1.85_387.26_linux.run

Answer “yes” for installing the nvidia-drivers, the cuda tools and the symbolic link.

nano /etc/ld.so.conf.d/cuda-9.1-x86_64

put only one line:
/usr/local/cuda-9.1/lib64

Save the file and exit

Then run

ldconfig

In the next step you will want to change tacticalware to the name of your home directory

cd /home/tacticalware/ && nano .bashrc

add this to the end:
# add cuda tools to command path
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-9.1/bin:$PATH

Save the file and exit

systemctl disable lightdm.service

reboot

Log back in and check to ensure all of your GPUs are still accessible

nvidia-smi

That’s it.  Your GPUs are setup and ready to mine!

Hardware that I use:
Motherboard (QTY 1):
https://amzn.to/2JqGJZ7

CPU (QTY 1):
https://amzn.to/3qevp2X

Memory (QTY 1):
https://amzn.to/2JqHn8Z

Hard Drive (QTY 1):
https://amzn.to/3lic3X5

Risers (QTY 6):
https://amzn.to/33rIgVE

Power Supplies (QTY 2):
https://amzn.to/3fTRpLR

Add2PSU (QTY 1):
https://amzn.to/39s4URY

GPUs (QTY 6):
https://amzn.to/2JqvXC8

Power Switch (QTY 1):
https://amzn.to/3ljmNVk