Did you roll your own or use a Gentoo Mining guide somewhere? I am basically dangerous with Linux, but can follow a recipe.
My setup is self-designed. The whole install fits on a 8GB drive with plenty of free space for compiling other mining software, running coin daemons, etc (the base install is less then 3GB). I bought a bunch of tiny SSDs (8GB), because I find USB drives to be super flakey as boot drives. The gentoo install has absolutely bare minimum components, runs a stripped down kernel, is optimized for haswell chips, and includes only the most basic xorg install, xterm, sgminer, and asimple series of startup scripts to launch everything automatically. Took me a few days to throw together, and I continue to tweak it on occasion.
The majority is pretty simple straight forward (although it might just be me that thinks so... I have installed gentoo many times over many years):
- follow the gentoo handbook to make a very basic install
- optimize your cflags in make.conf to optimize for your CPU (refer to handbook), and set VIDEO_CARDS="fglrx" in make.conf
- emerge cgminer (which pulls in the most basic x11 install, opencl dependencies, etc)
- emerge xterm and xset (barebones terminal and user preference utility for x11)
- emerge ati-drivers (you might need to pick a specific version e.g. emerge =x11-drivers/ati-drivers-13.12 , or specify the version properly in portage config files - refer to gentoo wiki)
- create a non-root user called mine (or whatever name you desire)
- set the user to auto login (
http://wiki.gentoo.org/wiki/Automatic_login_to_virtual_console)
- auto-start x11 by adding "[[ $(tty) = "/dev/tty1" ]] && exec startx" (without quotes) to ~/.bash_profile of your non-root user
- emerge git
- retrieve sgminer source from github, and compile (I pull and install to ~/src/sgminer)
- create a startup script that launches from .bashrc and starts sgminer if needed. I wrote this script for this purpose:
#!/bin/bash
if ! xset q &>/dev/null
then
echo "No X server at $DISPLAY"
else
if mkdir gominelock
then
if screen -list | grep -v "Dead" | grep -q "miner"
then
echo "sgminer is currently running..."
else
sleep 5
if screen -list | grep -v "Dead" | grep -q "miner"
then
echo "sgminer already running [2nd test]..."
else
echo "Launching mining!!!"
./mine.sh
fi
fi
rm -rf gominelock
else
echo "lockfile already exists"
fi
fi
echo "done"
The above script checks if X11 is running yet, uses a folder as a lockfile (a super handy *nix shell trick), checks if sgminer is already running in a screen, and then launches my mining script if needed. Since you're calling it from .bashrc, it will launch every time a terminal session is started. This means that it will launch before X11 starts, and exit because there is no X server; launches again in xterm when xorg starts up (xterm launches 3 times by default, so the lockfile causes 2 instances to exit, and the third to start up mining); and will run when you login via SSH (and display "sgminer is currently running..").
~/mine.sh then contains:
cd /home/mine/src/sgminer
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
export DISPLAY=:0
screen -dmS miner ./sgminer --api-listen --config=/home/mine/sgminer.conf
cd ~
You can then use "screen -r" from ssh to access sgminer, and edit ~/sgminer.conf to change your config.
I should probably throw this together into a decently detailed tutorial in it's own thread - maybe I will do that a bit later today or over the weekend.