Archive for the ‘power-hardware’ Category

From x61s to x60s

Sunday, January 22nd, 2012

Well. Once more I picked up some old equipment at work. This time an x60s. I have recently gotten my hand on a x61s. The x61s is a wonderful machine by most standards, especially as I bought a large 8-cell battery and a 64GB SSD for it. One major disadvantage however, is the fan and power usage: Even ad idle, light websurfing it is so hot that the fan has to spin so fast that it is annoying to listen to.

The switch from x61s to x60s took around 60 seconds: unscrew the screw holding the harddrive into place. Swap the drive. Do the same with the battery. And power on. Ubuntu 11.10 booted just fine. No errors whatsoever. But then again. I had forseen this might happen, so I was already running an 32-bit version of ubuntu 11.10. Had I run an x86_64 version I wouldn’t have been that lucky as the cpu in my x60s is on 32-bit.

So to sum up: The x60s is a  teeny weeny bit slower than the x60s, but has marginally better power-envelope, but most importantly is quite a bit more silent to use! I will recommend the x60s over the x61s for the noise alone.

Using the E3000 as a caching DNS server (on dd-wrt)

Saturday, December 31st, 2011

Due to popular demand I’ll post this on how to use the E3000 as a generic DNS server. I’t will be very brief, you have to fill in the blanks yourself.

First you have to get the support tools in place for this. dd-wrt is build for smallish setups as well, so some of the tools are quite limited to say the least. There are basically two routes:

  • Fiddle with the internal flash so that you can use the built-in ipkg on a jffs2 mounted flashdrive
  • Mount an USB stick, download ipkg-opt and work from there

I choose the latter. Primarily due to the fact that, that option gave me 4GB of space in /opt. It is actually quite simple

dd-wrt usb flash

dd-wrt usb flash

You then install ipkg-opt and companion tools (uclib-opt). You can use this wiki post on the dd-wrt wiki.

After that you can install all your extensions through ipkg-opt (or download them by hand). For my DNS resolver needs I choose the wonderful dnsmasq software. It acts as DNS/DHCP and TFTP software. From my router

root@dd-wrt:/opt/sbin# ipkg-opt list | grep -i dnsmasq
dnsmasq – 2.58-1 – DNS and DHCP server

The observant reader noticed that dd-wrt calls /opt/etc/config/startup in the screenshot abov (after having mounted /opt). This script is the startup script of all your /opt related stuff. I went with something like



[ -e /opt/etc/profile ] && mount -o bind /opt/etc/profile /etc/profile

grep nobody /etc/passwd > /dev/null
if [ $? -ne 0 ]; then
echo “nobody:*:65534:65534:nobody:/var:/bin/false” >> /etc/passwd

if [ -d /opt/etc/init.d ]; then
for f in /opt/etc/init.d/S* ; do
[ -x $f ] && $f start

and have a

root@dd-wrt:/opt/sbin# ls -al /opt/etc/init.d/S56dnsmasq
-rwxr-xr-x    1 root     root          215 Jan  1  1970 /opt/etc/init.d/S56dnsmasq
root@dd-wrt:/opt/sbin# cat /opt/etc/init.d/S56dnsmasq


if [ -f /var/run/ ] ; then
kill `cat /var/run/`

rm -f /var/run/

sleep 2
/opt/sbin/dnsmasq –conf-file=/opt/etc/dnsmasq.conf

Finally we are getting there. Before showing the dnsmasq.conf file, I will show a screenshot of the setup on the dd-wrt gui in order to use dnsmasq as DNS and DHCP server:

dnsmasq setup in dd-wrt

dnsmasq setup in dd-wrt

Notice how the built-in dhcp server is disabled and how I have choosen to use dnsmasq. Now onto the configuration of dnsmasq.conf:

root@dd-wrt:/opt/sbin# grep -v “^#”  /opt/etc/dnsmasq.conf  | grep -v “^$”

You will immediately notice a couple of things. Notice how I have the range setup for dhcp leases. Notice also how I have static leases. And finally notice how I have tftp enabled. Another blogpost on tftp another time (quite nifty for setting up servers on my vmware backend in minutes using kickstart, yast2 and solaris jumpstart).

You might think: where are the zone records? The answer can be found from the man page for dnsmasq

Dnsmasq accepts DNS queries and either answers them from a small, local, cache or forwards them to a real, recursive, DNS server. It loads the contents of /etc/hosts so that local hostnames which do not appear in the global DNS can be resolved and also answers DNS queries for DHCP configured hosts.

So I simply add my infrastructure to /etc/hosts and run /opt/etc/init.d/S56dnsmasq.

I only had the need for running DNS locally, so my choice was dnsmasq. You can also install a full fledged bind if you have that desire

root@dd-wrt:/opt/sbin# ipkg-opt list bind
bind – – Bind provides a full name server package, including zone masters, slaves, zone transfers, security multiple views.  This is THE

Brute force password cracking of ATA security locked harddrives

Monday, November 28th, 2011

Recently I found a x41 thinkpad in good condition, but with a locked 1.8″ drive. I google a bit and found that there is almost no chance of buying a new 1.8″ drive. So now what? I could mod the machine with SSD like this guy has done. Or I could try to crack the password of the 1.8″ drive. I’ll try the latter before I give in an mod the machine.

So how do I crack the password of a 1.8″ drive. You can buy all kinds of stuff of the internet. And lo and behold. Someone claims to be able to give you the master password if you give them some stash.

Instead of handing out my money to strangers on the internet, I read the ATA specs and tried to do it like this:

  • Realize that the drive is in maximum security mode. So you have to cycle the drive power for every X failed tries with the user password. Go for a security erase of the drive with the master password instead. Might be a harder password, but atleast I can try unlimited amount of times without the drive demanding a power cycle.

So I ended up like this

  • Download ubuntu 10.04. Create bootable usb pen.
  • pull out the drive of the x41
  • Boot the x41 of the usb pen
  • put the drive back into the x41 while ubuntu boots.
  • issue ‘echo “- – -”  >  /sys/class/scsi_host/host0/scan
  • download john the ripper from openwall together with a dictionary.
  • compile john the ripper.
  • Figure out details of the drive with hdparm -I /dev/sda
  • Execute this command: ./john –wordlist=./all –stdout | while read pass ; do hdparm –security-erase “$pass”  /dev/sda ; if [ $? -ne 5 ]; then exit 1; fi ; done > /dev/null 2>&1

Presently I brute force attack the drive with 1000 words pr. second. Might not yield anything. But atleast I tried ;-)


Using an Linksys E3000 AP as a general linux server

Wednesday, September 21st, 2011

Recently I said farwell and thanks for all the fish to my old Linksys WRT54G router(s). They served me well for many years, but end the end they lacked IEEE 802.11n and 1000BASE-T. After looking around I decided to buy the Linksys E3000 AP. It stayed within my budget, had almost all features I desired and could also run community based firmware.

I tried to run with the built in firmware. And I did. For a month or so. And then I gave in and installed dd-wrt on the thing. The built-in firmware works and is stable. But boy it lacks features!

Getting dd-wrt onto my AP was easy due to this tutorial. After I got dd-wrt onto the AP I had myself a full blown linux distribution. Comparing the E3000 with its 240MHz MIPS cpu and 64MB memory to my first PC with its 66MHz intel 80486 with 4MB memory made me smile ;-)

root@dd-wrt:~# cat /proc/cpuinfo
system type             : Broadcom BCM4716 chip rev 1
processor               : 0
cpu model               : MIPS 74K V4.0
BogoMIPS                : 239.20
wait instruction        : no
microsecond timers      : yes
tlb_entries             : 64
extra interrupt vector  : no
hardware watchpoint     : yes
ASEs implemented        : mips16 dsp
shadow register sets    : 1
VCED exceptions         : not available
VCEI exceptions         : not available

Having such a small nifty general purpose platform at my disposal ofcourse made me think what I should use it for (besides moving bytes around in my house). I found these things I want to and/or have implemented on it:

  • Local DNS server. I have many many projects brewing all the time and have vast amount of hardware. I utilize a DNS server to keep track of my ip assignments, either static or through DHCP. Running a DNS server on the router is a must.
  • PXEBOOT server.
  • TFTP server.
  • NFS server
  • DansGuardian filter

Fixing B155B071 errors on power systems

Sunday, June 26th, 2011

I recently got my hands on a couple of Power5 servers. IBM 9110-510 and 9110-51a to be precise. When powered up, one of them gave an unrecoverable error – B155B071 and halted. You can then power on the server again and it will continue.

Being new to all this power stuff, it took me a couple of hours to figure out what was wrong and how to fix the problem. Amongst IBMs many good pages about the power tech, you will find on titled “(B1xx) Service processor firmware reference code descriptions“. On that page you can read that B155B071 means “Invalid/Un-Programmed Serial Number in Enclosure”.

To fix that, connect to you power system using the ASMI and then

  • Power down you power server.
  • Expand the system configuration list
  • Expand the program Vital Product Data list
  • Click on “System Enclosure”
  • Put in a serial number for the system enclosure. A serial number that is different from the serial number of the server!
  • The service processor will reboot

You should now be able to boot your power server without any B155B071 standing in your way.