Finally feel a little like im on holiday!

Night out on Friday with some guys from home. Simpy, Adam, Claydon and me went to the hyndburn for a quick four pints before getting a taxi into blackburn.

Was good to see a load of people again, and I don’t think anyone remembers much about the night.

It started in spoons then onto the bridge (I think :S.. it’s somewhere that’s been done up anyways) Then the Malt, then the cellar for a few games of pool. Finally onto liquid/envy for cheap drinks and bad music! 🙂

Anyway, yes.. Much drinkage! was good fun!


Merry Christmas!

Hello all, and Merry Christmas to anyone that reads this blog!

I’m Back home (Single Bed 🙁 ) for a few days (until the 1st Jan) with the family / catching up with mates up here etc.

Have got a few new things to mention, such as ubuntu 7.10, a fresh look at wine, fully crypted root drives using LUKS and some good news about my final year of uni, but I guess christmas day isn’t really the time to start rambling! Maybe later this week.

Anyway, Have a good day all!


A strange bug relating to Grub

Just something I have noticed while playing around with my solaris box today.

First off, USB keyboards wont work in grub, but that’s probably more my BIOS’s problem (however I can use it for selecting Setup or the boot selection screen :S (f2,f11 etc)

But the main thing I have noticed,

If I press enter to boot the default item in grub (PS2 Kbd as USB wont work), I get the solaris sunOS banner, then a few shared IRQ notices (running Xvm)  and then a blinking cursor, forever.

However, letting grub choose the SAME item itself (allowing the 4 second countdown to expire and boot the item, without pressing anything) it boots fine:

SunOS banner, IRQ notices, Hostname, ZFS config info, Starting GUI.

This is 100% reproducable, and I’m wondering if anyone else has come accross the same thing? Not really a problem, but strange all the same.


xVM Centos5.1 domU on solaris dom0

Runs with xenblk loaded
Originally uploaded by TrX07

Following on from my last post, I finally got the centos 5.1 install running as a guest VM under solaris xVM.

The problem (as expected in the last post), was the initrd-xen ramdisk that was created when I installed the centos kernel-xen package did not have the xennet or xenblk kernel modules needed to run as a xen guest.

However, installing the kernel-xen package HAD installed the needed arch and version specific modules, just had not put them into the xen initrd (I think centos5.1 expects to be run as a dom0).

So, once chrooted into your centos5.1 filesystem, and after installing the kernel-xen package (yum install kernel-xen)

Unpack the initrd image:
gzip -cd < /boot/initrd-2.6.18-53.1.4.el5xen-img | cpio -iv
(would suggest running this in an empty folder, as it makes including the right files when rebuilding the initrd easier]

Next, find the modules needed in the centos filesystem:
find /lib/ | grep xenblk

find /lib/ | grep xennet

Then add these to the unpacked initrd (under lib dir):
cp /lib/modules/rest_of_path/xennet.ko
cp /lib/modules/rest_of_path/xenblk.ko

Finally, we need to tell the init script of the initrd to load the modules at boot, and re-pack the initrd.
(Im using vi as my editor, you could use nano, emacs etc)

vi /path_to_your_extracted_initrd/init

add 'insmod /lib/xenblk.ko'
and 'insmod /lib/xennet.ko'

before all the other ‘insmod’ lines, and save

Now re-pack your initrd:
cd /path_to_extracted_initrd
find . | cpio -c -o -v | gzip -9 -n > ../newinitrd-xen.img

This will have placed a file called newinitrd-xen.img, one folder back up your directory tree. Now make your xVM / Xen config file point to this .img file for the ‘ramdisk=’ option… and boot!

voila! away it goes!
(as you can see from the image, it does not crap out anymore at the ‘switchroot’ stage, and you can see further up my xennet and xenblk modules being loaded)

Anyway, that’s all for now, hope someone finds this useful!

Back in the UK (and xVM meddlings)

Hey all,

Been back in the UK since last wed morning, and really looking forward to seeing family and drinking with mates at christmas!

Work is going well since I got back, have a whole new appriciation for the GMP building after working in kista, stockholm for a few days (Sorry Hans, but our building rocks! and kst just, well, dosn’t!)

Anyway, Been trying a couple of things on the geeky side of life since I got back. One is that I finally got myself a solaris supported 8xSATA2 PCI-X card (TrendMicro with a marvell chipset) for my NAS

Can finally think about some more disks now (although I still need a new case, as this one just sucks (never spend £16 quid or less on a case :P))

I have also got round to having a look at xVM, (solaris virtualisation) (pretty much Xen.. but well integrated) I decided a few days back I would install a couple of instances of CentOS5.1 and migrate my asterix PBX and scalix MTA/Webmail/calender systems over… Not as simple as it first sounds.

Running the same OS as the guest (domU) as the main os (dom0) is pretty simple, and it’s documented all over, solaris on solaris is a peice of cake, Centos on centos, buntu on buntu, and gentoo on gentoo are all pretty easy and the steps for each can easily be found online.

However, one linux on another linux is slightly more hard work.. and then there is my corner; linux on a solaris Dom0

The idea is pretty simple,
use a spare partition, or a loopback mounted ext2 filesystem and put the linux userspace you want to run in it (first problem… all the tools for cutting out a nice copy of a userspace for centos.. are where? you guessed it, on a centos install.. Not in solaris :P)

I got round this problem with some excellent pre-made xen-ready images of the latest flavours of linux from

Then, you simpy write a quick config showing the xen userspace tools where the OS filesystem is, and where the xen-patched kernel and initrd for the guest os are..

Next problem: I dont have a xen-patched kernel OR initrd for the guest OS.
My first guess was that they would be in the OS image under /boot, and Xen would find them when it mounted the loopback filesystem from
… Not a chance.

So then I mounted the image on a linux box myself
mount -o loop -t ext2 centos51.img /centos
and had a look in the boot folder.. nothing there.

So my next cunning plan involved the fact I had already mounted this centos environment, I chrooted into it.

mount -t proc proc /centos/proc
mount -o bind dev /centos/dev
chroot /centos /bin/bash
source /etc/profile
echo nameserver x.x.x.x > /etc/resolv.conf

And from here, I used centos’s package manager to install me the xen enabled,patched kernel binary.
yum install kernel-xen

Good news! /boot suddenly had a kernel, and an initrd in it, both with xen in the name. Things were looking up.

I then copied the kernel + initrd over to my solaris box, added their paths to the xen config… and off we go again.

xm create /xvm/centos/centos1.cfg -c

…Wrong again!
This time Xen crapped out about not getting the ELF type it was expecting. It was expecting a 64Bit kernel, and it got a 32bit one.
A bit of googling was required…

Turns out the xen core 3.0 (which is the current one, and therefore shipped in solaris_nevada 77) only supports 32bit guests on 32 bit dom0’s and 64 bit guests on 64bit dom0’s (Xen 3.1 will fix this, if your CPU supports both (amd X64, X2 | intel core, pentiumD etc, but that’s too much of a waste)

Luckily moving between 64 and 32 bit in solaris is INFINATLEY easier than in linux or windows, simply a reboot with some different grub options (remove (/$ISADIR))

And sunos 5.11 is booting, in 32 bit :).. rock on!

So I try to start the vm again..
xm create /xvm/centos/centos1.cfg -c
Well, for about 4 seconds, then bombs out with some errors trying to mount root devices.

More googleing,
Looks like the kernel and initrd that centos’s installer gets for you when you do a ‘yum install kernel-xen’
is the kernel needed for running centos as a Xen dom0 (master) not a domU (guest) and so lacks two xen libraries in the initrd, which would allow a guest to mount shared /dev devices and access filesystem images and such.

And so that’s where im upto now, trying to find a centos xen DomU initrd, or failing that, extracting my initrd and adding the modules myself.
Will let you know how it goes.

Btw, cheers to James Legg, who got me upto speed with what he had found out about xVM so far!


A quiet weekend in sweden

This last week has been pretty hectic. Not been on the PC much at work as there has been so much in lab work todo.

It’s getting there tho, Hans hopes we will be finished on schedule by tuesday.

The weekend has been quiet, slept in on saturday morning because I was nackered, and then got the train from sollentuna to the centre of Stockholm in the afternoon to take some pics (Will put them online when I get home as i’m not sure how much data uploads from my phone costs over here)

Spent last night at the hotel bar, as the internet connection here kinda sucks, and I needed to get out of my hotel room (there is only so much pseudo-english tv you can take!)

Got talking to the girl behind the bar who was pretty cool, and it was kinda nice to talk to someone outside of work. Anyway, she said I should come to this bar her and some mates are going to Sunday (tonight)  as it was her night off, so that’s what I’m currently contemplating, can I afford (and be assed) to have a big night out in stockholm?

Will let you know how things go.