Ever been in a situation where you are trying to solve one problem but have more hoops to jump than necessary!?
This rant has been building up this past week and it all started with bzr: ERROR: Unknown branch format: 'Bazaar Branch Format 7 (needs bzr 1.6)\n'

Seems that bzr has to be upgraded on hardy {--And now this? --after I had purged and re-installed bzr because the earlier installation was giving weird errors and I didnt want to waste time going off on a tangent. argh, I was wrong about wasting time with bugs!

I was suggested a PPA but for that was not an optimal path for me. Besides, here I was trying to pull a MM revision from LP, but instead have to build bzr and then work on MM..... ~fun.

Alan (thanks :)) suggested I edit the sources.list and add "deb http://ppa.launchpad.net/bzr/ppa/ubuntu hardy main" and then do an apt-get update, then apt-get upgrade which would upgrade bzr to the version in the ppa without all the compiling and building hoop jumping.

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
bzr
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

What a killjoy !!

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
python-configobj
The following packages will be upgraded:
bzr
[.....................]
Setting up bzr (2.1.2-1~bazaar2~hardy1) ...
removing incorrectly installed bash example /etc/bash_completion.d/bzr

Finally.... I upgraded bzr which allowed me to pull the branch: $ sudo bzr branch lp:mailman/2.1. An hour later.......gee, where was I now? The download was still 'in progress' and was'nt all this supposed to be incidental to testing Mailman...!? That was the night before. The next morning after yet-another-regular-unscheduled-power-outage, it was LaunchPad going down for an hour or so --some twit was DDOSing their server. What an incredibly productive activity!

LP returns and the development machine decides to die with a "/dev/sda1 error : fsck died with exit status 4". Now I knew this was my lucky day!!

Dug out a liveCD and ran 'fsck -f /dev/sda1' manually, where:

-f = force fsck even if filesystem seems clean
-cc = run badblocks check with a non-destructive test
-k = write new list of badblocks to current list
-p = automatically repair errors if possible without requiring human input
-v = verbose output

It found 5 inodes containing multiply claimed blocks and repaired it but for a while everything was in slow-motion --  I panicked about it taking ages to check a mere 40 gb of inodes and blocks. Colourless did the math on why it will take ages "just consider the sustained transfer rate of the drive which will probably be in the low 10s of mb/s. lets say you are getting 20mb/s second transfer, that is still going to be 2000 seconds to scan the disk, or 33 minutes".

Ah, talk of collective agida!

Earlier today fsck.ext1: No such file or directory while trying to open /dev/hda1. The superblock could not be read or does not describe a correct ext2 filesystem -- the hdd would not be detected and system refused to boot, refused to detect partitions. I spoke too soon earlier. It was super lucky saturday, not lucky friday!! This time the LiveCD was an arm's length away after last night's use and I checked out "fsck", "e2fsck" ...zilch, No response.

There is a good utility called TestDisk, which is available as a package for both debian and ubuntu -- sudo apt-get install testdisk, and you can run it from liveCD if your disk ever fails. It goes without saying that TestDisk will be useful only if your disk is detected by BIOS and hence alive.

Now, the worst I could think was "bad sectors==dead disk" but before that I had to check for loose wiring and then see if the BIOS detected the drive. The disk was spinning as I could hear the 'whrr' sound. Unplugged and re-plugged the wires a few times ...Nada...Bios would not detect the hdd. Convinced that it was the worst "bad sectors==dead disk", I shut everything down. A few hours later I switch it it on and voila the disk was detected and grub was soon asking which OS I wanted to boot into. That means it was just a loose connection (HOPEFULLY :)).

A BIG 'thanks' to ALL the folks who helped out with suggestions and listened to my kvetch. Much appreciated :)  If I'd ever have to calculate "productive time" sans all the idiocy around then its scary to note the amount of time that is wasted scheduling my day around a power outage, hardware issues and software bugs, and then there is this mundane thing called 'life'. I wish I had 10-days of silence instead.