New system!

Posted in Personal, Projects on 17/05/2012 by Undersys

Well its done.

The last few months I’ve been working on a new system to replace my laptop.

Specs :-
* Asus  Maximus IV GENE-Z/GEN3
* Intel Core i7 2600s
* 16GB DDR 3
* 1x Corsair M3pro 256gb SSD SATA 6g
* 2x Hitachi 2.5″ 500gb 7200RPM SATA 6G HDD’s
* Zotac Geforce 460se
* Seasonic X series 650w

Cooling :-
* XSPC raystorm
* XSPC Full cover block for Geforce 460
* Black ice SR 2×120 Radiator
* Swiftech DDC 2.3 with XSPC top
* Bitspower multi res
* Tygon 3/8ID hose
* late-loom fans

On Desk :-
* Dell U3011 , Wall mounted
* Asus SBW-06D2X-U USB bluray BDXL writer
* Ducky 82key mechanical keyboard (brown switches)
*  Logitech Marathon cordless mouse
* Pair of Genelec 8020a

Running Gentoo of course !
Idle Temps are CPU 38c | GPU 34c Celsius.
Conky set up to monitor temp’s fan and pump RPM’s and HK current weather including warnings
You can see the images of the build on my flicker

Hears a teaser..


Hears a shot of my Conky  :-








Leave me a note if you want the scripts and conkyrc.

Arduino 1.0 and Gentoo

Posted in HowTo on 14/04/2012 by Undersys

It has been a while since I used my Arduino.
Of course when I go to use it there is a new version of the software out 1.0.
As expected it won’t work out of the box on Gentoo.
Make sure you give my existing article a read though if you have other issues.

I had to change two things.


I got the following error :-

~/arduino-1.0/hardware/arduino/cores/arduino/Print.cpp: In member function ‘size_t Print::print(const __FlashStringHelper*)’:
~/arduino-1.0/hardware/arduino/cores/arduino/Print.cpp:44:9: error: ‘prog_char’ does not name a type
~/arduino-1.0/hardware/arduino/cores/arduino/Print.cpp:47:23: error: ‘p’ was not declared in this scope

It appears that Print.ccp is using depricated typedef.
avr-libc v1.8.0 and up have deprecated the “prog_char” type def and now its recommended to use of “char PROGMEM”.

So lets fix that…
Bash open the the “Print.ccp” file for me this is located at :-

On line 42 you will find the offending secion :-

size_t Print::print(const __FlashStringHelper *ifsh)
 const prog_char *p = (const prog_char *)ifsh;
 size_t n = 0;
 while (1) {
 unsigned char c = pgm_read_byte(p++);
 if (c == 0) break;
 n += write(c);
 return n;

Lets replace that section with one that supports new versions of avr-libc :-

size_t Print::print(const __FlashStringHelper *ifsh)
 const char PROGMEM *p = (const char PROGMEM *)ifsh;
 size_t n = 0;
 while (1) {
 unsigned char c = pgm_read_byte(p++);
 if (c == 0) break;
 n += write(c);
 return n;

After that I now got the following error :-
/usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr5.x: No such file or directory

Hmm we’ve seen this shit before, check my existing article.
Easy fix as root create the following symlink:-
# ln -s /usr/x86_64-pc-linux-gnu/avr/lib/ldscripts /usr/avr/lib/ldscripts

Done. If your lucky it should work correctly now!

Network/SQL multi host Emerge for Gentoo

Posted in Code on 09/03/2012 by Undersys

I have a lot of Gentoo hosts. Going to each one of them and running emerge xxxx what ever is really annoying.
Its also a waste of my time.  I set out to fix that.

Design goals are :-
1) Can query a SQL DB to find out what hosts need updating.
2) Can run against a single host or many hosts.
3) Can preform emerge sync, revdev- rebuld, emerge packages and tell me what needs uptating in etc.
4) Can run from a central host.
5) Can run from a crontab and generate a log file for me to inspect later.

Currently I can do this :-

Preform maintenance on mutiple Gentoo hosts over the network

 [options] {host} or {package}
 where {package} is the name of a gentoo package atom
 where {host} is the dns name of a host
 where [options] are:
 --esync, -e: Run emerge sync on {host}
 --breif, -b: Get a one line package update summary on {host}
 --detail, -d: Get a detailed package update list on {host}
 --world, -w: Emerge world on {host}
 --system, -s: Emerge system on {host}
 --revdep, -r: Run revdep rebuild on {host}
 --ipkg, -i: Install {package} on a {host}
 --etcup, -t: Check a host for etc-updates
 --esync-all, -y: Run 'esync' on all Gentoo hosts
 --breif-all, -f: Run 'breif' on all Gentoo hosts
 --detail-all, -a: Run 'detail' on all Gentoo hosts
 --ipkg-all, -p: Install package on all Gentoo hosts
 --world-all, -o: Run emerge world on all Gentoo hosts
 --system-all, -m: Run emerge system on all Gentoo hosts
 --revdep-all, -v: Run revdep-rebuild on all Gentoo hosts
 --echall-all, -c: Check all Gentoo hosts for etc-updates
 --help, -h: Show this message

There a few things that need to be done before this code will work.
1) you need to have an user set up on each host, in my example I have called the use “maint” currently I use a password to access the hosts rather then ssh keys.
2) sudo to be installed anc configured like this :-

maint ALL = NOPASSWD: /usr/bin/emerge, /usr/bin/rsync, /usr/bin/revdep-rebuild, /usr/bin/find

3) A SQL database that can be accessed over the network, see the attached schema.

You will need to rename the files from .doc to to .rb and .sql as wordpress won’t allow me upload anything else.
Gentoo Host ruby script
Gentoo Host sql schema 

Burning XGD3 and XGD2 xbox360 backups on Linux

Posted in Code, HowTo on 25/02/2012 by Undersys

There are a lot of guides out there on how to burn xbox360 backups under windows.
Well I don’t use windows.. and after fucking a lot of dual layer DVD’s I though a post was in order.

Firstly to have a correct XGD3 backup you need a Lite-on burner with the iXtream BurnerMax firmware. Find that your self..

Secondly you should be running abgx360 on all your backups prior to burning them.  They have a Linux version, make sure you have “xterm” installed to as it will use that for console output.

I wrote this small script that uses growisofs to burn xbox 360 backups to my Lite-on external burner.
Usage is simple:-
# ./ xgd3 filename.iso
replace xgd3 with xgd2 depending on what your burning.
Edit the DVD variable to your dvd-rw device.
Using this script and the below growisofs settings along side abgx360 i have had 100% success rate.


# Version: 1.0.0
# Date: 20120225
# Author:
# function: burn xbox 360 games with the correct layer break
# xgd2 layerbreak is 1913760, xgd3 is 2133520
# notes for growisfo :-
# -use-the-force-luke=notray = don't reload tray
# -use-the-force-luke=dao = burn disk at once
# -use-the-force-luke=break = manual set layer break
# Vars

# Chage this to match the dvd-rw device

# Functions

function testargs {
 if [[ -z $DTYPE ]]; then
 echo You must specify a disk type
 echo EG: xgd3 or xgd2

if [[ -z $INAME ]]; then
 echo You must specify a iso file name
 echo EG: /tmp/backup-game.iso

function burn {
 if [[ $DTYPE == xgd3 ]]; then
 echo Burning $INAME as $DTYPE with layerbreak 2133520..
 growisofs -use-the-force-luke=notray -use-the-force-luke=break:2133520 -speed=1 -Z $DVD=$INAME
 echo Done! Ejecting..
 eject $DVD
 echo Burning $INAME as $DTYPE with layerbreak 1913760..
 growisofs -use-the-force-luke=notray -use-the-force-luke=dao -use-the-force-luke=break:1913760 -dvd-compat -speed=2 -Z $DVD=$INAME
 echo Done! Ejecting..
 eject $DVD
# Main


# End

XSPC RayStorm on ASUS Maximus IV Gene-Z

Posted in Projects on 30/01/2012 by Undersys

Picked up my new motherboard yesterday, ASUS Maximus IV Gene-Z/GEN3. Very nice M-ATX board.

Since my new PC will be water cooled I also had the XSPC Raystorm as my selected water block.
Slight issue, the block hits some tall component legs around the front of the socket, it also hits a bank of SMD resistors. If you where to clamp down the block you’d get a big short and let the magic smoke out.

I am fairly certain this issue affects  the Gene-Z and Gene-Z/Gen3.

You can cut down the component legs so they no longer touch the back plate with a set of side snips.
For the SMD resistors you can easily file down the back plate to clear them.

Hears some pics on what I did to fix the issue.

You can see more pics of the back plate and the mount on my flicker

New Rack

Posted in Personal on 05/11/2011 by Undersys

Hears my new 42ru rack, holds all  my kit with lots of air circulation.

You can see the full set of images on my flicker.

From top to bottom :-
* ISP’s modem on the left (vdsl2+ 100/30mbit)  and a Buffalo wifi AP running dd-wrt on the right
*  Cisco 1812 terminating the PPPoE session from the above modem.
* Cisco 3500XL 48 port switch
* Sun Sparc Neta X1 running OpenBSD
* Dual Intel sossaman , socket 479 ,  Supermicro board X6DLP-EG2. Running Gentoo
* Just a rack shelf :)
* Custom HP zx2000 Itanium2 workstation. I modded it into a 4ru rack case.  Running OpenVMS,HP-UX and Gentoo
* Dual Opteron 2214, Supermicro board H8DME-2. Running ESXi 5
* HP J6750 Dual PA-risk 2.0  750mhz. Running HP-UX and Gentoo.
* IBM Power 4+ 275 workstation dual core 1.4ghz . Running AIX 5.5 and Gentoo.
* Next to the IBM is a Dell DDS 4 Tape drive for the HP J6750.

If you want any more info or config info leave me a message..

Cisco DDNS with namecheep

Posted in HowTo on 14/10/2011 by Undersys

First make sure you have correctly set up DDNS in the name cheep console.
You can test it with the following simple URL :-

Where :-
HOSTNAME = the host name of the machine eg
DOMAINNAME = the domain name eg
PASSWORD = the API password from namecheep, not your namecheep password
IPADDRESS = IP address you want to send to namecheep

Once you get a success message back from browsing to that URL you are ready to configure the Cisco IOS.

You need to parts, one on the external interface and one to set up the DDNS provider.

First we set up the provider section :-
I use the IP address as I do not have DNS configured on the Cisco, I use an internal BIND server.
Also note :-
ip=<a> is a Cisco substition for the interface’s IP.
The “method” can be called anything you want.
I want it to update every 15 minutes hence the interval command.

# conf t
ip ddns update method namecheap
 interval maximum 0 0 15 0

Second part is we add it to the external interface, in my case Dialer 0.

# conf t
ip ddns update namecheap

Exit from the config syntax.
Turn on debugging :-
# debug ip ddns update

Restart the physical interface that the Dialer is bound to. FastEthernet0 in my case. :-

# clear pppoe int Fa0

Check the logs and see what happens, if you entered everything right it should be up and running.
You can also check that IOS has parsed everything right by issuing this command :-
# show ip ddns update method