Category Archives: Uncategorized

Injection of Interest to BBC`s “The Voice”

BBC TV show The Voice

Declining viewing figures for BBC`s vocal talent show “The Voice” have resulted in writer Steven Moffat being rushed on board to widen audience appeal.


Now without CLOUD POWER

Back to regular servage, and the shit slow WordPress. Bye bye memcached, APC, and MySQL tweaks.


So, I`ve temporarily moved the website away from some shared hosting to some cloud servers. These are load balanced, along with a cluster of MySQL servers. It shows how bloody slow WordPress sites actually are until you add a shitload of caching and tweaks. Interesting stuff.

I may keep the site here, but may move it back in a while. I`ve noticed there`s almost no traffic these days – how quickly you lot grow bored with sweary ringtones – apart from search engine spiders.

As you were.

Bonk – Scrapping the Other Site

Eagle-Eye Cherry, and eagle-eyed viewers may notice a proliferation of extra junk on headstaggers. I`ve decided to move all my other crap here, so it`s all in one place and I can perhaps save a fiver a year on another domain name.

I feel your excitement.

Cloning VirtualBox VMs… Sledgehammer – Meet Nut

So I want to play around with a few bits and bobs, specifically Puppet, and MySQL/Tomcat clustering.  I never really have the time, but the aim is there, but it also means I don`t have time to faff around with lots of fiddly, shite configuration.  It`s possible to do all of this on one server, but in the real world, these services will be distributed over a number of servers, either physical or virtual.  So I decided to get a few VM instances up and running in VirtualBox.

The source VM was built with 2CPUs and 1024MB of RAM to speed up installation and was carried out using the latest build of Umbongo 10.10, The Naughty Numpty, and as Windows (eesh) is used as the host, the virtual disks (vdi files) are stored at c:virtual.


The idea was fairly simple, install a build of Umbongo, get the latest updates, install openssh server, and then create a couple of clones for messing around with.


In the ideal world, you`d run a script, or press a button in VirtualBox to create a cloned VM with the same virtual hardware, disk, etc.  In the real world, faffing about is required.  The steps were broadly as follows – in case I need to do it again:


1. Create new (source) VM with 1024MB of RAM and 8GB virtual hard disk, install Umbongo.  I installed a full desktop build in case I fancied running a GUI or VNC on there.


The Laughing Gnome

2. Switch off the graphical desktop.  By god this was a pain in the arse.  By day I work with RedHat Enterprise Linux, using /etc/inittab, chkconfig, runlevels as expected, etc. Umbongo ditched most of this a few releases back so there is no inittab, the default runlevel, 2 also starts X, Gnome, etc.  This is a complete head melter as it`s not how things are done anywhere else.  It`s a nobel aim to fix a lot of problems with sysv init gubbins, but this is a big tangent.  After a bit of searchy searchy, I took a sledgehammer to the system and stopped the GUI from loading using GRUB.  This is a terrible approach but sysv-rc-conf, update-rc.d, and checking /etc/rc?.d/ gave no joy.


Notice I`m not afraid to work as root.. fear my lack of fear.  We need to edit the GRUB configuration to tell the system to boot in text mode, then update the GRUB bootloader.


richard@virtual:~ sudo bash
root@virtual:~# vi /etc/default/grub




root@virtual:~# update-grub2


3. The next step was to update the system as it`s pointless having clones all requiring updates as soon as they`re booted.

root@virtual:~# apt-get update && apt-get -f upgrade
Hit maverick Release.gpg
Ign maverick/main Translation-en
Hit maverick-updates/universe i386 Packages
Hit maverick-updates/multiverse i386 Packages
Fetched 220kB in 1s (177kB/s)
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

4. Then to install the SSH daemon so I can log in through PuTTy, use scp, etc.  I also checked PermitRootLogin was enabled.

root@virtual:~# apt-get install openssh-server


5. Finally, mount the VirtualBox Guest Additions and install those various bits and bobs to hopefully pump up performance a little.  The virtual CDROM presented as /dev/sr0 here, so your mileage may vary.


root@virtual:~# mkdir /mnt/vbox
root@virtual:~# vi /etc/fstab


/dev/sr0 /mnt/vbox      udf,iso9660     user,ro,exec 0 0


root@virtual:~# mount /mnt/vbox
root@virtual:~# /mnt/vbox/

Verifying archive integrity… All good.
Uncompressing VirtualBox 3.2.8 Guest Additions for Linux……..
VirtualBox Guest Additions installer
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module …done.
Building the shared folder support module …done.
Building the OpenGL support module …done.
Doing non-kernel setup of the Guest Additions …done.
Starting the VirtualBox Guest Additions …done.
Installing the Window System drivers
Warning: unknown version of the X Window System installed.  Not installing
X Window System drivers.
Installing graphics libraries and desktop services components …done.

Oddness – VirtualBox or Umbongo?

After a reboot, the VM wouldn`t come up cleanly, freezing at the “checking battery state” step.  I love when that happens.  Spend time slowly installing the OS, and updating only to find it`s buggered.  A newer build of VirtualBox didn`t sort this out.  However, adding a second CPU to the VM and switching on IOAPIC did the trick.  What the hell?  Lame.


6. Next to clone the VM.  This clone will be named – clone2.  It`s hard to be original when you just want to get stuff done.

Make sure the VM has been fully shut down and quit out of the VirtualBox GUI thingie.  Off into a smelly DOS prompt we go…


Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:Windowssystem32>cd virtual

Volume in drive C has no label.
Volume Serial Number is ECB9-BDA2

Directory of C:virtual

13/10/2010  22:17    <DIR>          .
13/10/2010  22:17    <DIR>          ..
14/10/2010  12:12     3,239,084,544 clone1.vdi


We then copy the current disk to a new disk…


C:virtual>copy clone1.vdi clone2.vdi
1 file(s) copied.

VirtualBox (reasonably) expects all disks to have a unique ID, so we need to use the sneaky setvdiuuid function:

C:virtual>”C:Program FilesOracleVirtualBoxVBoxManage.exe” internalcommands setvdiuuid clone2.vdi
Oracle VM VirtualBox Command Line Management Interface Version 3.2.10
(C) 2005-2010 Oracle Corporation
All rights reserved.

UUID changed to: a1df35a6-1d30-4673-8826-72779a541f57


7. Now we can create another virtual machine within VirtualBox, using clone2.vdi as “existing hard disk”.  Unfortunately you can`t just pick up the same hardware configuration, which is a pain in the bum so the virtual hardware needs to be configured all over again.

If you`re feeling adventurous,  you can copy the existing VM definition (XML format) for clone1, and carry out some hackery, setting up clone2.xml from clone1.xml.  Each VM has its own directory on disk, and its own XML configuration file.




If you look at the XML, you`ll see unique IDs for the network interface MACs and all storage devices, so it`s not a 30 second job to hack as these must make some kind of sense and VirtualBox will barf if it sees IDs it doesn`t recognise, so the GUI is actually quicker.


vbox-cloned - 2 VMs

It`s not an ideal setup, but by default Umbongo brings network interfaces up with DHCP, so there`s no risk of IP address conflicts.  Just remember to change the hostname of each VM.


root@virtual:~# vi /etc/hostname


It`s a little quicker than configuring a PXE system, but that`s for another day where I`ll try to set up PXE, have it create a bunch of VMs, and get Puppet up and running to configure a bunch of services on each VM.

New Job. EastEnders Plot-Liner. DONE.

I`m a bloody genius, I am.  I`ve written the plot of EastEnders for the next 15 years.  Enjoy.

Dup dup duppaduppadup.

  1. The Vic changes hands.
  2. A wedding.
  3. Scene directed by art student.  Includes music by Coldplay, faded across scenes via various radios to deliver a sense of continuity.
  4. New character arrives.
  5. Phil starts drinking.
  6. The Caff changes hands.
  7. A murder.
  8. The Vic changes hands.
  9. The Arches changes hands.
  10. Someone thrown out of pub.
  11. The return of Nasty Nick.
  12. New character is prime suspect in murder.
  13. Phil stops drinking.
  14. Dinner at Fargo`s.
  15. New character leaves.
  16. Celebrity appearance by pop star and/or politician.
  17. The Caff changes hands.
  18. New family arrives.
  19. Dinner at Fargo`s.
  20. The Vic changes hands.
  21. Character X opens stall.
  22. Dinner at Fargo`s.
  23. The Arches changes hands.
  24. An affair.
  25. New family in “hilarious” hi jinks.
  26. Phil starts drinking.
  27. Dinner at Fargo`s.
  28. Someone thrown out of pub.
  29. The Arches changes hands.
  30. Character X loses stall.
  31. The Vic changes hands.
  32. Phil stops drinking.
  33. Dinner at Fargo`s.
  34. Pregnancy.  50% chance of it being teenage.
  35. Another affair.
  36. New family proves unpopular, leaves.
  37. Someone thrown out of pub.
  38. Dinner at Fargo`s.
  39. The return of an old character.
  40. Phil starts drinking.
  41. The Vic changes hands.
  42. Character X opens stall.
  43. Dinner at Fargo`s.
  44. Key character diagnosed with illness or becomes a junkie.
  45. A divorce.
  46. Baby`s father revealed.
  47. Phil stops drinking.
  48. Dinner at Fargo`s.
  49. The Vic changes hands.
  50. The Caff changes hands.
  51. Someone thrown out of pub.
  52. Dinner at Fargo`s.
  53. Phil starts drinking.
  54. The Arches changes hands.
  55. Dinner down the Argee Bhagee.
  56. The Vic changes hands.
  57. Character X loses stall.
  58. Phil stops drinking.
  59. Dinner at Fargo`s.
  60. The Caff changes hands.
  61. Revamped title sequence.  Proves unpopular.  Titles reverted.
  62. Murderer is uncovered, 28 weeks after event takes place, just to keep audience on the edge of the seat.
  63. Someone thrown out of pub.
  64. Dinner at Fargo`s.
  65. Phil starts drinking.
  66. Key character lives for another 5 years, or cleans up act depending on popularity and/or newspaper “romp” revelations.
  67. Affair ends badly.
  68. Nasty Nick caught doing sommat, kicked out by Dot.  Dot clutches Bible.
  69. Phil stops drinking.
  70. The Arches changes hands.
  71. Other affair ends badly.
  72. Goto 1

That`ll be my first million quid then, BBC.  Keep the cheques coming.

Berry Nice

Berry Nice

Originally uploaded by reckless_rik

A little photo to spice up the UK autumn. Unfortunately I`ll be working weird hours until the end of October, so will probably miss most of the good stuff out and about. Hopefully, in November, I`ll be able to go mad with the camera and take 1,000,000 photos. They should be uploaded sometime in 2014.

Just What Is The Problem With Freeview?

With the UK`s digital switchover looming like the Hindenburg it`s likely to turn into (when has anything ever gone right in the UK?), just why are Freeview receivers so flakey?

For the PC I have a little Hauppage WinTV USB box – not a bad little device, but a flakey blob of Freeview data and the device can freeze, occasionally with the software just bombing out, requiring a reset of the PC as the USB controller just gives up and cries.  I haven`t used it much since I moved house from about 10 miles away.  The girlfriend has had to return a couple of Bush boxes as they`ve frozen to the point of being useless.  She lives about 12 miles away.  And now my Humax has started acting up.

From oldest to newest, these receivers have around 4 years between them, so it`s hard to believe they could all contain the same chipsets or whatever else is required to decode the signal.  So the question is – why are these things so flakey?  Both of us, independently, have gone out or gone to bed, and come back to find a frozen box on several occasions.  These are different models manufactured at different times, located in different properties, with different environmental conditions.

Anyway – some useful information I picked up this morning for a “dead” Humax Freeview box.  You must power down, remove the aerial, and power up again if you want to get “in” and reset bits and pieces.  Seems an odd approach, but it worked for me.  The PVR was resetting constantly (you could hear the hard disk being reinitialised) and no buttons on the remote control or device itself helped.  This worked for a Humax 9150T  but is apparently a common “fix”.