Cooking img_19548 125mW green laser D1278-056A img_14111 Rivers Of Sound crw_9395.jpg img_1106 Living Rainforest Hursley Model Railway crw_5589.jpg img_18341 img_14305 img_14073 img_14134 crw_9610.jpg crw_0368 crw_0265 img_14004 Hursley Model Railway

@antonpiatek on twitter

Posting tweet...

Powered by Twitter Tools

Australia

I recently got the chance to go back to Australia for the first time in several years, only this time my Wife came with me. Loads of photos from Melbourne to Sydney which we drove over about a week. A fantastic way to see the place, and despite being a very long drive was rather pleasant (presumably because it is such a long way that few people drive it often, so no commuter traffic for most of it – whereas in the UK it is almost impossible to drive anywhere without being stuck in commuter traffic jams)

Too many photos (thought I did get a few Infra-Red ones) all in a set on flickr: Australia 2010 or a brief selection below

img_11254 img_11279

crw_99813 img_11241

crw_99844 crw_99845

img_11171 Sydney skyline at twilight

Fixing broken LVM and Sofware Raid on Linux

I have been building a backup pc our of mostly spare parts, including several old disks. To get the most reliability and space our of the disks, which are all different sizes, I decided to use software raid to mirror each chunk of data in pairs (raid 0) and then use LVM on top of each piece of raid to make all the raid volumes appear as one storage device to the linux OS.

The disks are as follows: 250G, 200G, 160G 120G, so to get the most space out of them I divided them as follows (Note: this is a simplification for the purpose of explanation, the real disk also has a raid 0, mirrored /boot/ partition which is not mentioned below. You need this because LVM is not supported by GRUB, so you can’t boot from a LVM volume):
250G: A (200G), C (40G)
200G: A (200G)
160G: B (120G) C (40G)
120G: B (120G)

A,B,C are partitions on the disks for software raid – I then set up software raid for each pair of A,B,C and set the created LVM physical volumes on top of them, which then are grouped together into one large volume group, giving me around 360G (actually less once you convert to base 2 rather than 10) of mirrored data storage. Note that I can lose any one disk and still have all my data (though I wouldn’t want to hang around too long replacing the disk as a second disk failing could mean you lose most of your data).

I actually created 3 LVM logical volumes, one for mounting each of / (the root of the disk for all OS data), /home (for all the stuff I actually really care about), and a volume for swap that doesn’t really need to be in lvm or raid, but it was just easier to do.

I previously wrote instructions about how to setup LVM and software raid, but this time round managed to completely screw the whole lot up just near the end. I forgot to define one of the raid devices in /etc/mdadm/mdadm.conf so next time I rebooted this raid device was not found in the early boot stages. As this raid volume is needed to create the full set of LVMs for my root filesystem, the system stopped booting right at the beginning because the LVM array was incomplete.

Fixing it was actually not to difficult, but I mention it here in case it is of help to anyone else (or in case I manage to do it again, which is probably likely)

Fist I booted a Ubuntu Live CD (actually a USB stick image created from my running Ubuntu laptop and a spare Ubuntu CD), but nearly any live cd should do. Once booted, I had to install (in the live session) mdadm and lvm2 as Ubuntu does not have these installed by default. Once you have these tools you can start your recovery (note that this needs to be done with root permissions, so sudo -s or similar to get a root shell)

Find the raid devices with mdadm –assemble –scan and then use pvscan and lvscan as required until your system has found your lvm config, then mount it (don’t forget to mount /boot/ too as we will need to rebuild the initrd)

mkdir /tmp/root
mount /dev/mapper/main-root /tmp/root
mount /dev/md0 /tmp/root/boot
chroot /tmp/root

Now you should be pretty much inside your root filesystem on your lvm array. Now we need to make sure all the raid arrays are configured in /etc/mdadm/mdadm.conf

Run mdadm –detail –scan to generate the lines for the config file, and make sure each array is listed in /etc/mdadm/mdadm.conf

From here it is pretty simple, all we have to do is rebuild the initrd so that it knows how to find all the raid and lvm devices needed during boot. dpkg-reconfigure linux-image-<your current kernel version> It is imporant to make sure that you get the right kernel, so have a look in /boot to check you get the right version (uname -r wont work here because you have booted your live cd image and not the kernel your box will run)

I got several warnings about /proc/ not being mounted, but this did not appear to be a problem.

Reboot, and you should be ok. You may want to make a copy of your current kernel in case you accidentally break it, just copy the linux-image…gz and initrd…gz from /boot/ to new names and run update-grub and that should give you two kernels to choose from (hopefully booting choosing them in the right order, the order should be based on the version numbers in your kernel files so adjust if needed)

Google announces Google TV

I am surprised it has taken someone so long to try and merge the web and tv’s successfully (ignoring hobby projects like MythTv). I am slightly suprised it was Google, but given they own youtube maybe I shouldn’t have been so surprised

See the official announcement for more

O2 Joggler

My O2 Joggler just arrived and it is quite an interesting piece of kit.

I’ve not had much time to play with it yet, but the O2 software stack seems a bit limited. Google calendar can be installed, but no mail, and I’m not sure the calendar will pop-up if something is approaching.
No web browser was a major failing in my opinion – Sure you get Sky News, but the interface for that is rather simple and I expected better (feels like WAP on a phone!)

The weather apps (for some reason there are two) are ok, but the default one seems to show some odd forecasts (Joggler weather fail on TwitpicFriday, Thursday, Saturday with Friday and Thursday showing night forecasts for some reason)

I have yet to try uPnP for pictures and music, but the internet radio plays BBC stations fine.

The traffic app looks a bit simple, though the google maps app is nice. The messaging could be interesting as it can send/receive texts, but as I can’t see me using it much. The O2 calendar I have yet to try.

After poking that far, I decided to boot Ubuntu, so following http://www.stephenford.org/joggler/ I downloaded the Ubuntu image that has been customised for the Joggler, copied it to my usb key and it booted fine.

Getting wireless up was ok (at least I could copy and paste the wpa2 key from a file I put on the USB key before booting it, rather than typing the rather long random string I have on the on-screen keyboard as I had to for the O2 software), but I did find that using the touch-screen is not a good alternative to a mouse (and the on-screen keyboard can be really annoying!)

At least Ubuntu gives you a web browser (Chrome and Midori are installed by default in this image), but it is still tricky to use.
I had to increase the font sizes just to get windows that I could click the menus on.

So far the only thing it is actually great for is solitaire – which is a rather expensive deck of cards!

I need to try some of the hacks at http://www.jogglerwiki.info/ like installing telnet/ssh and then see what I can hack on top of the O2 software, as it seems better built for a touchscreen and keyboard-less device, though I am not sure what I will be able to get working. It does appear to have flash running on it, and one site suggests that any flash .swf file can be launched easily

Update: Good review at http://jtlog.wordpress.com/2010/05/20/new-clock-radio/