thebsdbox

Now hosted on linux !

thebsdbox header image 1

Travel Numbers

November 4th, 2008 · 1 Comment

Using the GPS function on my phone I’ve manage to capture some simple statistics of my twice daily journey:

(statistics from train setting off, and train stopping [Manc to Sheff])

Trip Distance: 69.0 km
Trip Time: 01:00:57
Max Speed: 140.9 km/h
Avg speed: 68.4 km/h

This journey is repeated twice a day and 5 times a week, giving a total of 690 km (428.7 miles a week). That’s an average of 1714.8 miles a month, and 20577.6 miles a year. I’m about to finish my second year so thats a grand total of 41155.2 miles, or (given that earths circumference is 24,901 miles) nearly my second lap of earth…

These numbers are based on averages, and don’t include the walk to the train station, the tram to the Salford Quays and the walk to the office.

Grim :(

→ 1 CommentTags: Computers

Jee See Ess Eeezzz

November 3rd, 2008 · 1 Comment

Evidently the person who wrote this has none…

 

 

Spelling isn't my strong point

Oh Dear

 

Click the image to read the rest of the text (it gets worse)

→ 1 CommentTags: Computers

A Long while coming

September 22nd, 2008 · No Comments

Been a long while since I updated, partially due to going on  holiday, however more based on the fact i’ve just been lazy. 

Dominican Republic was amazing

Kims Birthday was also amazing/expensive.

In other news before I actually submit and update that has something worth mentioning in it, my dell machine has gone from a Vista with hacked pci-E ports to now running osX 10.5.4 (iATKOS), which runs pretty flawless. I’ve also picked up a PAYG iPhone 3g, which at first turned out to be a bit of a mistake due to not researching it. So the 3G still suffers from a lack of sim unlock, but given that o2 are doing free 3G for the time being i’ll stick with the PAYG sim for a while.

→ No CommentsTags: Misc

Openfiler (x86 & x86_64) iSCSI in Xen

July 31st, 2008 · 2 Comments

A nice all round NAS/SAN storage system for small businesses fits well into a virtualised infrastructure, a seperate nic is recommended but for a small business a shared core and a reasonable allocation of memory is all that is required. There has been a disk image domU release for openfiler however this official release was version 1.0 and had only a x86 kernel (meaning that x64 xen builds would complain). Here is a simple how-to to having a complete NAS and SAN (using iSCSI) solution using xen.

1. Download domU filesystem image for openfiler (ensure correct architecture is downloaded) At current time openfiler-2.3-x86_64.tar.gz
2. Create a root filesystem for openfiler to live on:
- lvcreate -L 5G -n openfiler rootdg
- dd if=/dev/zero of=/export/openfiler.img seek=5G count=1

These will create either a 5GB logical volume or a 5G disk image to use as a disk for the openfiler filesystem
3. Create a filesystem on the disk/image. This is down with mkfs [path to file system/disk image]
4. Label the filesystem, which is required for the fstab for openfiler. This is done with e2label [path to file system/disk image]
5. Mount the new filesystem and extract the archive into it. If it is the logical volume then directly mount it (e.g. /mnt) or if a disk image a loop back mount will be required (e.g mount -o loop /export/home/openfiler.img /mnt). Copy the archive into the mount, then change directory to the mount and untar the archive (e.g. tar xvf openfiler-2.3-x86_64.tar.gz)
6. Unmount the filesystem and create a second 100mb filesystem. This second filesystem will be used as swap so needs a swap fs creating on it (e.g. mkswap /path/to/swap[fs/img])
7. Create xen config file (this example will need paths altering)

name = ‘openfiler-xen’
memory = ‘256′
kernel=‘/boot-a/vmlinuz-2.6.20-xenU’
disk = [ ‘tap:aio:/dev/rootdg/openfiler,xvda1,w’, ‘tap:aio:/dev/rootdg/openfiler_swap,xvda1,w’ ]
vif = [ ]
root=“/dev/xvda1 ro”
#bootloader = ‘/usr/bin/pygrub’
on_reboot = ‘restart’
on_crash = ‘restart’

8. Start the xen image with a (e.g. xm create -c /path/to/configfile) and there you go, follow the install instructions from the relevant place on openfilers website to configure and finish the setup.

Note: Obviously this example has no extra disk space attached, it would make sense to add a large third disk to the xen config file. So that openfiler then can use that to allocate space as NFS/SMB or iSCSI etc..

→ 2 CommentsTags: Computers

Sun Cluster 3.2 in Vmware (Fusion)

July 2nd, 2008 · 3 Comments

Some quick notes regarding getting a cluster working in vmware on the mac
Each VM will require:
3 or more Nics
1 or more root disks
512MB or more ram 

On the first virtual machine also add a load of extra scsi disks these I created in the parent directory so that I could see them. The next step is to then right click on the Solaris Cluster Node A and “Show Package Contents”. Inside the Node ‘Package’ will be a .vmx file, this is a text file that contains the configuration information for this particular Virtual machine. Cluster File systemOpen the vmx file and look for the scsi information (specifically that relating to the extra scsi disks we added) this will need copying. Then open Node B and add this scsi information to it’s vmx file (sometimes absolute paths are required) 

scsi0:2.present = “TRUE”
scsi0:2.fileName = “../SCSI_Disk1.vmdk”
scsi0:3.present = “TRUE”
scsi0:3.fileName = “../SCSI_Disk2.vmdk”
scsi0:4.present = “TRUE”
scsi0:4.fileName = “../SCSI_Disk3.vmdk”
scsi0:5.present = “TRUE”
scsi0:5.fileName = “../SCSI_Disk4.vmdk

This will have both nodes pointing to the same scsi disks, in essence this would be shared scsi storage. When one of these nodes is starts it will create a bunch of .lck files that will mean that the scsi devices are locked to one particular virtual machine. Either manually delete these lck files or script something to remove them.

#!/bin/bash

# Script to remove locks on Disk Images
# Dan - 27/3/08
# ——————–

SCSI_LOCKS=( SCSI_Disk1.vmdk.lck SCSI_Disk2.vmdk.lck SCSI_Disk3.vmdk.lck SCSI_Disk4.vmdk.lck )

for (( i = 0 ; i < ${#SCSI_LOCKS[@]} ; i++ ))
do
    echo “Checking for” ${SCSI_LOCKS[$i]}
    if test -s ${SCSI_LOCKS[$i]}
    then
        echo “found “ ${SCSI_LOCKS[$i]}
        rm -R ${SCSI_LOCKS[$i]}
    else
        echo “” $i
    fi
done

→ 3 CommentsTags: Computers

Baggys Barnet

May 15th, 2008 · 4 Comments

R.I.P. Long hair baggy1.jpg

→ 4 CommentsTags: Computers

Fletch :/

April 23rd, 2008 · No Comments

→ No CommentsTags: Misc

xen hvm error -> (12, ‘Cannot allocate memory’)

April 14th, 2008 · No Comments

Recently the xen server that hosts all my domains has been randomly crashing, completely powering itself off. This usually has happened when i’ve been nowhere near it, so by the time i’ve gotten back there is no real obvious reason as to why this happened. This weekend I managed to bring it up straight after a crash plugged a vga cable into the box and logged into HW monitoring on the bios. 

CPU TEMP: 110c/203F


So I immediately powered off the box and went and picked some thermal paste up. Cleaned the heat sink and cleaned off the told thermal paste, and replaced it with new paste etc.. System so far has been stable, however on reboot this time i’ve been affronted with a strange new error that appears only whilst booting hvm domains.  (12, ‘Cannot allocate memory’) However the xen virtualized domains booted fine, which led me to believe that this was something to do with the ‘balloon driver’

spike / # xm info | grep memory

total_memory           : 4093

free_memory            : 4

This output is straight from reboot, it appears the xen dom0 has taken all of the memory. There are two fixes to this either a  dom0_mem = mem_size in grub or  xm mem_set

→ No CommentsTags: Computers

This handbagged face lady can tell me nothing..

February 26th, 2008 · 1 Comment

Spending her time sniffing poo, and making fat people cry.

From the outset (flakey accreditation)

  • The value of McKeith’s certified membership of the American Association of Nutritional Consultants = Guardian journalist Ben Goldacre managed to buy the same membership online for his dead cat for $60.
  • ‘Dr’ Gillian McKeith = a non-accredited correspondence-course PhD from the US

“If you contact the Australasian College of Health Sciences (Portland, US) where McKeith has a “pending diploma in herbal medicine”, they say they can’t tell you anything about their students. When you contact Clayton College of Natural Health to ask where you can read her PhD, they say you can’t. What kind of organisations are these? If I said I had a PhD from Cambridge, US or UK (I have neither), it would only take you a day to find it.”

Examples of her technical reasoning

  •  ”She talks endlessly about chlorophyll, for example: how it’s “high in oxygen” and will “oxygenate your blood” - but chlorophyll will only make oxygen in the presence of light. It’s dark in your intestines, and even if you stuck a searchlight up your bum to prove a point, you probably wouldn’t absorb much oxygen in there”
  •  ”She says DNA is an anti-ageing constituent: if you “do not have enough RNA/DNA”, in fact, you “may ultimately age prematurely”. Stress can deplete your DNA, but algae will increase it: and she reckons it’s only present in growing cells. Is my semen growing? Is a virus growing? Is chicken liver pate growing? All of these contain plenty of DNA”
  • McKeith argues that examining and smelling faeces can give clues to bodily misfunction. - According to Catherine Collins, chief dietician at St George’s Hospital, London, “it is impossible to diagnose medical conditions from looking at a normal brown stool.”

[Read more →]

→ 1 CommentTags: Misc

NetBSD quick fix

February 22nd, 2008 · No Comments

This is a quick list for bits and bobs on getting a ‘working’ netbsd box after the installation has completed. This will generally focus on getting the network up and then related services.

1. set up network editing the files /etc/resolv.conf, /etc/rc.conf and /etc/ifconfig.xxN. (xxN is your adapter name, e.g. xennet0 for a xen network interface)

echo “nameserver x.x.x.x” >> /etc/resolv.conf
echo “inet 202.233.42.4 netmask 255.255.255.0″ >> /etc/ifconfig.xxN

Open /etc/rc.conf with vi and add/change the following lines.

hostname=“xxxx”
domainname=“xxxx.xxxxx”
defaultroute=“x.x.x.x”

This will now have you set up with a permenantly configured network interface. Next step is enabling remote logins either ssh or telnet, obviously ssh is the prefered method as it’s secure. Enabling ssh involves adding an overide to /etc/rc.conf, the /etc/defaults/rc.conf has the directive sshd=NO.

echo “sshd=YES” >> /etc/rc.conf
/etc/init.d/sshd start

Enabling telnet is done through /etc/inetd.conf and consists of removing the hash from the beginning of the telnet directive. Also remove the ‘-a valid’ from the end to allow all types of logins.

A reboot will then allow remote users to log into the system, also remember to add a user to the ‘wheel’ group allowing them to su to root.

→ No CommentsTags: Computers