Tuesday, 29 March 2011

Listen To This...

If you listen to just one new song this week then make it this one.


Now if you liked that you should know that I don't think it's the best track on the album.

The song is called Amazing and it's taken from Brian Hurren's debut album A Hundred Thousand Welcomes. I only know about the album as Brian is also the keyboard player with Runrig, who I've mentioned a number of times in the past.

If you think you'll like the album (if you liked this track, trust me, you will like the album) then go buy a copy

Sunday, 20 March 2011

The Never Ending Non-Story, Part III

Approximately a year ago I blogged about a particularly bad BBC news article. The "journalist" who wrote the article appeared to be trying to scare users of Windows XP into upgrading to Vista because of a change in the way hard drives were being manufactured.

Three months later I showed just what a non-story the whole thing was when I bought one of the new advanced format drives and correctly installed and used it under Windows XP. It took me a total of 10 seconds to ensure maximum performance of the drive by using the manufacturers tool to correctly align the partitions. Well it may have been a complete non-story but I seem to keep finding things to blog about it. So here is part III of the story.

I recently re-installed my machine and switched away from Windows to Ubuntu Linux. During the switch I moved all my data around to allow me to reformat all my drives to use ext4 rather than Microsoft's proprietary NTFS filesystem. For speed reasons I created the new partitions using the graphical Palimpsest utility and didn't really think about aligning the partitions manually. Palimpsest will correctly align partitions on advanced format drives but it assumes that the drive metadata will correctly report the physical sector size. Unfortunately the Western Digital Caviar Green drive that I have reports that it uses 512B clusters even though it actually uses 4K clusters. So Palimpsest used the information it was given and created badly aligned partitions. While annoying it turns out that manually creating aligned partitions is easy. The downside is that I couldn't find an easy way of doing it which didn't require a full format, so I had to empty the disk of data first.

So partly to continue the tale and partly as a reference so I don't have to figure this out again in the future here are the steps to create a single aligned partition on an advanced format drive.

WARNING: THESE INSTRUCTIONS WILL COMPLETELY DESTROY ANY DATA ON THE DISK.

Firstly you need to determine which device the disk you want to partition is available as. Palimpsest will tell you this or you could drop to a terminal and use sudo fdisk -l to list information about all the drives connected to the machine. My drive was /dev/sdd so that is what appears in the following. Make sure you replace that with the correct device information for your machine or you may end up formatting the wrong drive -- you have been warned.

Now you have the device id we can use GNU Parted to create the actual partitions. I'm assuming that the drive is currently blank with no partitions. If this isn't the case then you may need to delete the existing partitions first. I'd originally hoped I could do all this with a single command but I kept having problems with Parted not liking some of the sector offsets unless I entered them in the interactive mode. So here is a record of the Parted session, I've made the commands I entered bold to make things easier to read.
user@machine:/$ sudo parted /dev/sdd
GNU Parted 2.3
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit s
(parted) mklabel msdos
(parted) mkpart
Partition type?  primary/extended? primary
File system type?  [ext2]?                         
Start? 2048
End? -1
(parted) print
Model: ATA WDC WD15EARS-00M (scsi)
Disk /dev/sdd: 2930277168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End          Size         Type     File system  Flags
 1      2048s  2930277167s  2930275120s  primary

(parted) align-check optimal 1
1 aligned
(parted) quit
If you don't understand what this does then you probably shouldn't be trying it yourself, but one number does need a little explaining. I set the start sector to 2048 based on the information from Western Digital about formatting these advanced format drives.

Once you have a valid partition then it is easy to format it as follows...
user@machine:/$ sudo mkfs.ext4 /dev/sdd1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
91578368 inodes, 366284390 blocks
18314219 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
11179 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
 102400000, 214990848

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
So there you have it. Not quite as easy as using the Windows tool, but I think you will still agree a complete non-story from start to (hopefully) finish.

Saturday, 19 March 2011

Hidden Tracks

I quite like the surprise of listening to an album for the first time and suddenly hearing a track I wasn't expecting. An extra unlabeled track is good, but a hidden track that you come across by accident is even better. According to the excellent Wikipedia article there are quite a few different ways of hiding tracks (some more ingenious than others) and plenty of well known albums with extra tracks. What all hidden tracks have in common though is that they are not listed on the album cover.

So now we come back to Avril Lavigne's latest CD which I mentioned a few days ago. Take another look at the back of the album and you will notice that track 14, Alice, is labeled as a hidden track. That just has to be a mistake -- it can't be hidden if it's labeled! I'm guessing that they wanted to make it clear that it wasn't part of the main album (it's actually from the soundtrack to Tim Burton's recent film Alice in Wonderland), but why not just label it as a bonus track, or better still make it into a proper hidden track?

Wednesday, 16 March 2011

URL Hunter

If you enjoyed playing Rogue or other ASCII art based games then I'm almost certain you'll enjoy URL Hunter. It's certainly worth a 30 second diversion from whatever else you are currently doing.

Tuesday, 15 March 2011

A Mistake?

I was looking at the back of Avril Lavigne's newest album the other day whilst it was playing (I like my music loud so it's a good job we live in a detached house) and spotted something that I think must surely be a mistake. After what happened the last time I thought something was wrong, I won't point it out quite yet so everyone can make up their own mind first (check back in a day or so).

The album itself is pretty good. The single that has been released already, What The Hell, is very similar to her previous work, the rest of the album, however, is very different. It is much more laid back and acoustic rather than full on pop, but the biting lyrics are just the same.

Thursday, 10 March 2011

A Warm Welcome?

The Liberal Democrats annual conference starts at Sheffield City Hall tomorrow. Something tells me that they aren't expecting the warmest of welcomes in Sheffield.

Wednesday, 9 March 2011

Corrections: Singluar versus Plural

Yesterday I received a PDF of page proofs for an article we have been working on getting published for a while (more details when it's actually available). I actually got two PDF files; the proof and a delta file showing linguistic corrections that had been made. Most of the corrections seem reasonable but one class of corrections seems plain wrong to me. Have a look at the following paragraph.


As far as I'm concerned all three of those corrections are wrong. Is it just me or does everyone else think that the original text, using plural forms, is correct?

Tuesday, 8 March 2011

Shitaki Mushrooms

Hopefully this won't be my last blog post, but if it is then you can probably blame the mushrooms!

Whilst on occasions I might like living dangerously I'm not stupid enough to go harvesting my own wild mushrooms. Picking wild mushrooms when you don't know what you are doing is analogous to playing Russian roulette and my life doesn't need that kind of stress. I do, however, like mushrooms and I do like trying different varieties. I also quite like growing plants that I can eat (chillies being my favorite) so the idea of growing my own mushrooms was too good to pass up. Bryony spotted that one of the plant catalogues she was ordering from sold kits for growing mushrooms so we decided to give them a go.

We currently have three kits on the go (for Button, Oyster and Shitaki) but the first to fruit are the Shitaki Mushrooms. Last night I cooked Woodpigeon pasta which involves wild mushrooms and while I used the jar I had already bought I chopped up three home grown Shitaki mushrooms and used them as well. The taste of the mushrooms was excellent and 24 hours later we are both still alive so I call that a successful experiment. Let's just hope the other kits turn out to be as good.