On Wednesday, the official release of Bug Labs R1.4 came out. Summary: I tried to upgrade my Bug Root File System, and my Bug no longer works and I am not sure where to document my problem (should I put it on the wiki or the forums?). I guess I will get on good 'ole IRC to get this fixed on Monday (I really dislike IRC, it reminds of the 1990s, full of people trying to help you but no RSS feed, no archives without bots that require Kevin Marks level knowledge to keep them up and running, and no distillation of knowledge so you are doomed to explain the same things over and over again!). Help! If you can help, twitter me @rtanglao or email me roland AT rolandtanglao or I'll try to get help on IRC as well as post on the Bug Labs R1.4 thread on community.buglabs.net. Anybody who helps me, gets a free beer the next time they are in Vancouver (how about a Bug Labs meetup at Open Web 2009 in June 11-12 in Vancouver?) Read on for all details.


R1.4 = Bug Labs SDK 1.81 + Root FS 1.4 + Kernal 1.4 (Suggestion to Bug Labs: bundle these together or tag future releases so that tag 1.5 for example is the same release tag for SDK, FS and Kernal)

The Bug Labs documentation and web presence is confusing even for somebody like me who has been developing software for 20 years and uses confusing open source software like git and Drupal so that's saying something! And Bug Labs seems to admit it in this blog post from December, "Finding BUG Tutorials and Documentation". My off-the-cuff recommendation given my developer relations experience at Nortel  would be to create a single wiki page "Busy Developer's Guide to writing software for the BUG" (BDGB) with the bare minimum of info that is always up to date and to have the dev relations person (Alicia?) post a blog post on bugblogger.com whenever the BDGG is updated! Anyways...

Here's what I did:

Tried to upgrade my Root FS to R1.4 using the Mac instructions from HOW to upgrade ROOT FS aka "Update your BUG memory card" (see "Yak Shaving" section below for full details)

Here's what happened:

The Root FS upgrade appeared to work but when I boot the Bug it doesn't come up and doesn't activate the Ethernet over USB so I can't ssh in to check things out.

Here's what I expected:

I expected it to "just work" and then I could proceed to upgrading the kernal to R 1.4

Guesses as to what went wrong

  1. A bug in the Root FS image?
  2. A bug in the ext2fsx software that I used namely 1.4d4
  3. Something else?

Yak Shaving (or what I did in exquisite detail)

(raw gist is here)
dd if=/dev/disk1s1 of=BUG_backup.ext3.bin 
tar xvfjv bug-image-production-bug-R1.4-rootfs.ext3.bz2
dd if=bug-image-production-bug-R1.4-rootfs.ext3.bz2  of=/dev/disk1s1
95105+1 records in
95105+1 records out
sudo /usr/local/sbin/fsck.ext3  /dev/disk1s1
e2fsck 1.39 (29-May-2006)
Couldn't find ext2 superblock, trying backup blocks...
/usr/local/sbin/fsck.ext3: Bad magic number in super-block while trying to open /dev/disk1s1
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
sudo /usr/local/sbin/resize2fs  /dev/disk1s1
resize2fs 1.39 (29-May-2006)
/usr/local/sbin/resize2fs: Bad magic number in super-block while trying to open /dev/disk1s1
Couldn't find valid filesystem superblock.