February 22, 2010

Booting computers on the network from Bubba|Two

I have a Linux computer on the network which I use for boring tasks that Bubba is not powerful enough to handle (tip: do not try to start jboss on Bubba|Two), but it's noisy and power hungry, so I turn it off when it's not in use. This is of course a bit of a bother when I need to access it from somewhere else.

The solution; Wake on LAN.
First off, you need a motherboard (or motherboard/network card combo) that supports WOL. Head into bios and enable it, often under the power settings. Do this for all computers you wish to be able to start over the network. Next you need to find the MAC address of the respective computers. On linux computers use the ifconfig command (try /sbin/ifconfig if it's not on your path), on windows open a command window (start -> run -> 'cmd' -> enter) and type 'ipconfig /all'. Write down the HWaddr/Physical address of the interface. It should look something like 00:12:34:56:78:9a. I recommend storing these in a file on your bubba/the computer you access from the outside. Shut down the computer.

Now, on bubba as root, install wakeonlan, I installed 'at' too, for part 2.
> apt-get install at wakeonlan

To boot the computer we will broadcast a "magic packet" to the network, using the hardware address from the previous step:
> wakeonlan 00:12:34:56:78:9a

I stored it in a script, start_something.sh. To make it executable use the command
> chmod u+x start_something.sh

Note: for WOL to work you have to shut down your computers to power-standby, not by holding the power button for a few seconds, turning off the power supply, etc. This will terminate power and the network card will not be able to listen for the power-on instruction. You also need the appropriate ACPI modules in you kernel. (which seems to be default in the latest ubuntu at least)

February 12, 2010

Installing flash on 64bit Linux

I had to cave in and install flash on my Fedora computer at work today. The "right" way of doing it did not yield much results, so I had to install the development version instead.

Download the file from http://labs.adobe.com/technologies/flashplayer10/64bit.html (follow the links on the right side)

Uncompress (tar -xvf filename) and move the .so file to the mozilla plugin folder. On my system it was /usr/lib64/mozilla/plugins/

Then run
sudo mozilla-plugin-config -i -g -v

Restart your browser and "enjoy" flash-enabled content.

February 4, 2010

Installing Java on the Bubba|Two

Java isn't very fast on the Bubba|Two, but if you still want to, here's how I did it.

Sun doesn't seem to have a JDK for power pc (the embedded section of the
java site was so bloated that I gave up on it), but IBM does.
I downloaded
32-bit IBM POWER SR-7 from

http://www.ibm.com/developerworks/java/jdk/linux/download.html
(You need to registrer for an account, just fill in some random noise)

As root or sudo:
apt-get install libstdc++5

Then unpack the file you downloaded (tar -xvf filename), and move it
into a suitable place, I moved it to /usr/local/java/jdk.


Add JAVA_HOME to your shell or system wide (/etc/profile)

JAVA_HOME="/usr/local/java/jdk"
export JAVA_HOME

Optional add $JAVA_HOME/bin to path:
PATH=$PATH:$JAVA_HOME/bin
export PATH

java -version should now work.