Monday, August 11, 2008

100 Pushups: Week 5 (take 3), Day 1

Last week was a bust. I just had too much going on, and either forgot about doing pushups or didn't have time. So I'm repeating week 5 again this week. And it's not looking too good so far:

Column 3

Level 1: 40/40
Level 2: 32/32
Level 3: 30/30
Level 4: 15/25
Level 5: 28/min 40

Not a very good performance. Hopefully Wednesday will be better.

Tuesday, August 5, 2008

100 Pushups: Week 5 (again), Day 1

Column 3

Level 1: 40/40
Level 2: 32/32
Level 3: 30/30
Level 4: 25/25
Level 5: 40/min 40

I did wait longer than 60 seconds before level 5.

Friday, August 1, 2008

Subversion, Vendor Branches, and svn-load

A while back, Ross Burton wrote an excellent tutorial for using vendor branches in subversion. I used this tutorial, or one like it, about a year ago when adding a vendor branch to one of my own projects, jpilot-icalendar.

A few days ago, I needed to update jpilot-icalendar with a new vendor version. I couldn't remember exactly how to do that, so I googled "subversion vendor branches" and found Ross's tutorial. As I was going through the steps, I discovered that svn_load_dirs was no longer installed on my system. I assumed this was a casualty of my recent hard drive failure and started looking for the package it belonged to so I could reinstall it. After a bit of digging, I found to my horror that svn_load_dirs had been removed from the Debian subversion-tools package. There was mention of an svn-load command, which "should function as a drop in replacement."

I couldn't find any documentation on svn-load, so I setup a test subversion repository to test it. I am happy to report that it does seem to be a drop in replacement for svn_load_dirs, at least to the extent that I used it.

Here is how I originally imported the vendor source:


$ svn import libical-0.23 \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
-m "Importing libical-0.23"

$ svn copy \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/0.23 \
-m "tagging libical-0.23"

$ svn copy \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/trunk/libical \
-m "bringing libical-0.23 into main branch"


Then I updated to libical-0.24-RC4:


$ svn_load_dirs \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical \
-t 0.24-RC4 current libical-0.24

$ svn merge \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/0.23 \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
libical


That brings me up to a few days ago, when I wanted to upgrade to libical 0.31. Here is how I did that:


$ svn-load \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical \
-t 0.31 current libical-0.31

$ svn merge \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/0.24-RC4 \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
libical


As promised, the svn-load command was a drop-in replacement for svn_load_dirs.

Edited 08/02/2008 11:11AM EST:Fixed layout again, after reading this handy guide.

100 Pushups: Week 5, Day 3

Column 2

Level 1: 16/16
Level 2: 16/16
Level 3: 14/14
Level 4: 14/14
Level 5: 12/12
Level 6: 12/12
Level 7: 10/10
Level 8: 40/min 35

Wednesday, July 30, 2008

100 Pushups: Week 5, Day 2

Column 2

Level 1: 17/17
Level 2: 17/17
Level 3: 16/16
Level 4: 16/16
Level 5: 14/14
Level 6: 14/14
Level 7: 12/12
Level 8: 40/min 35

I did wait longer than 45 seconds before level 8, but not for the others.

Monday, July 28, 2008

100 Pushups: Week 5, Day 1

Column 2

Level 1: 35/35
Level 2: 28/28
Level 3: 25/25
Level 4: 22/22
Level 5: 35/min 35

Steve Spiers, the creator of the hundredpushups site has been sending periodic updates to the people who have signed up to take the challenge. In his last update, he mentioned that week 5 is a tough one, which I find to be a bit of an understatement.

I was able to do 50 pushups during my last test (yesterday morning), so technically I should be in column 3 this week. But I was barely able to eke out the numbers in column 2, and only by resting a little longer than the 60 seconds in the plan. These numbers just seem a little ambitious to me.

Then again, I am pushing 40. Maybe a younger person wouldn't find it so challenging.

At any rate, I'm not giving up. I will probably repeat week 5 next week though. I don't think I'm going to be able to do week 6 if I'm struggling with week 5.

Friday, July 25, 2008

Hard Drive Failure

A few days ago we had an electrical storm, so I powered off my computer. After the storm was over I was unable to boot into linux. It had been shutdown cleanly, no signs of errors, but it refused to boot. I immediately suspected the hard drive, a Seagate 160GB, which had been giving me trouble since I bought it about a year ago. My BIOS has an option to check the SMART status of the installed drives, and can even run a short and long self test. Sure enough, the short self test was failing.

It was my belief that the boot was failing while probing the hardware, and my hope that I could just plug in a new drive, copy my files over, and be done with it. I should have known better of course.

I got a new hard drive, a 500GB Western Digital on sale at Circuit City. It installed without a hitch, and I was able to boot an ubuntu Live CD with both the old drive and the new drive installed. That bothered me a little; if the bad disk was causing the hardware probe to crash, then it should have crashed even when booting from a Live CD. Maybe it was booting from the bad disk that was causing the problem.

I partitioned and formatted the new drive, and copied all the files over from the old drive. Since the old drive had an IDE interface, and the new drive was SATA, I needed to update /etc/fstab and GRUB's menu.lst. After that, I should just be able to install GRUB on the new drive and reboot.

That's where I hit my first real snag. I planned to chroot to the new disk to install GRUB, but that didn't work. The chroot command kept giving me an error, saying it couldn't execute /bin/bash. That didn't make any sense at all, I could execute bash on the new disk without problems. Google was no help with the error, but I did find an alternate method for installing GRUB on the ubuntu forums. I installed GRUB and chalked up the chroot failure as an oddity with the Live CD.

Finally, it was time to boot my new disk. I restarted and got to the GRUB splash screen, which was a good sign. The first entry wouldn't boot, but it was no big deal, just the wrong hard drive number in menu.lst. I edited the entry and booted, and got the familiar ubuntu splash screen. Success! Except that it froze, in exactly the same way it had with the old drive. Dammit.

Now, I've been working with computer hardware long enough that I wasn't surprised by this outcome. And, looking back, I really should have known better. So I tried booting into single user mode, to see if that made any difference. It didn't, of course, but at least I got to see the actual error instead of a frozen splash screen. It was a kernel panic, because the kernel couldn't execute /sbin/init. So it was a corrupted filesystem preventing the boot, not an errant hardware probe.

So, back to the Live CD. Copy /sbin/init to the new hard drive, reboot. Nope. Live CD again, copy everything in /sbin. Everything in /bin too, what the hell. No dice. Maybe google can help. No, not really. Time to bite the bullet and reinstall. *sigh*

Google did help here. I found a howto for getting a list of installed packages, and reinstalling after just such a disaster. So, back to the Live CD, again, and get the list of all installed packages:
$ sudo mount /dev/sdb3 /mnt
$ sudo mount /dev/sdb4 /mnt/home
$ sudo su
# dpkg --root=/mnt --get-selections | grep -v deinstall > /mnt/home/ubuntu-files

Then I ran the installer and installed, taking care not to format my home partition. When that finished, I edited the new /etc/apt/sources.list and enabled the universe and multiverse repositories, then I chrooted into the fresh install to reinstall my packages:
$ sudo mount -t proc none /mnt/proc
$ sudo mount -o bind /dev /mnt/dev
$ sudo chroot /mnt /bin/bash
# apt-get update
# dpkg --set-selections < /home/ubuntu-files
# apt-get dselect-upgrade

That got me most of the way back. I unmounted everything, rebooted, and was eventually greeted by the GNOME login. Finally! Of course, I forgot to add my user account, or change the root password, so I couldn't login. But that was easy enough to fix.