My drive is now solid state

I always learn something new when doing some misguided thing such as “let’s copy our OS onto a new disk using tar like they did back in the day!” The impetus was a shiny new OCZ Vertex 3 to replace the spinning rust in my ancient Macbook. As a co-worker says, it’s like putting a gold steering wheel in a 1970 Pinto. My plan was roughly to:

  • Stuff the new drive in the desktop

  • Make a tar backup of the old laptop drive across the network to the desktop

  • Partition new drive, aligning to flash block sizes

  • Mount the new partition somewhere, and untar the backup

  • Chroot in the new directory, and do a grub-install

Simple. All of that went great, I thought.

The first hurdle when swapping the new drive in was a physical one: the laptop disk bay uses Torx, smaller ones than any adapters I have. This obstacle was cleared by creative use of needle-nosed pliers, and I was on to my first boot attempt, and subsequent failure.

Among the exciting new discoveries:

  • You really, really need to remember to mark /boot as bootable. Otherwise, the dumb Mac firmware will give you the blinking question mark despite all of your previous care.

  • If your user/groups don’t match between the two systems, you probably just borked up a bunch of uid/gids. Luckily there are the -nouser and -nogroup args to find, and almost everything outside of /home is root:root.

  • Once again, Macs won’t boot a rescue USB flash drive unless it has EFI crud laying around in the root directory.

  • UUID-based fstab and grub.conf are not happy when you have an entirely new drive

  • Debian tar doesn’t understand xattrs, that’s a RedHat feature (although I caught this one in time and compiled RedHat’s tar on the Debian system).

On the whole though, it wasn’t too bad. The install took maybe twice as long as installing from media and restoring my usual backup despite the mistakes, and this way I don’t have to reinstall huge numbers of packages to get back to where I was. And so far the drive seems quite speedy, even with my sad 1.5 Mbps interface. Plus it doesn’t hurt that the installation did a giant defrag of the whole OS.

June 20, 2011 · bob

Build complete

293 I found time about a month ago to finish up my facet kite, just ahead of my family’s trip to the beach. Of course, the spars are too big for our suitcases, so it got left at home. Since then we haven’t had the free weekend to get it up in the sky.

As they say, until it flies, it’s just art. But here’s a picture of the final assembly anyway. To give a sense of scale, the kite is about 1.2 meters tall.

June 18, 2011 · bob

No comment.

Despite comments requiring moderation before posting, I’ve had a flood of thousands of spam comments over the last few days in the queue and I’m tired of pressing the delete button. Thus, they are disabled for the time being until I can set up something more automated.

Sorry spammers, none of those posts ever made it to any web crawler.

Update: or not. Of course WP makes this hard. Well you can’t comment on this one post at least!

May 19, 2011 · bob

Edge binding

Edge binding by bluesterror I finished reinforcements on my facet kite about a month ago, and there my project sat as I waited for supplies to come in. Last Thursday the shipment arrived, so when I got a free hour this weekend, I did the edge binding on four of the eight panels. On all of my previous kites, I used double-folded hems, where, as the name suggests, you fold the edge of the sail over twice and then sew it flat. With edge binding, you instead fold and sew a separate piece of material along the cut edge. Edge binding seems like it would be easier, but I find that it’s a bit of a battle to keep the sail and binding material aligned. Perhaps some sticky tape would help, but that just adds to the build time. On the other hand, binding can look nicer since the border stands out.

After I finish the bindings, there’s a bit more sewing, and then it’s ready for framing and its first flight.

April 18, 2011 · bob

Updates

So the blog mysteriously committed suicide recently, so I took the opportunity to update to the latest Wordpress. Everything now seems to be in order. Perhaps I should also upgrade the theme one of these days.

Also committing suicide this weekend was the two year old Ubuntu installation on my laptop. The automatic upgrade to 10.04 resulted in a non-bootable mess (it turns out this was merely foreshadowing), so I took a backup and then dropped the F15 alpha on it to see what the Gnome3 Shell hubbub is all about. It does make my computer feel like a giant cell phone, but I do actually hate it less than I thought I would. We’ll see if that faint praise holds up after I use it a bit. The actual F15 installation took four tries, all due to my Macbook’s quirky half-EFI, half-BIOS firmware. No manner of coercion would convince Fedora to make a hybrid GPT/MBR partition table that actually booted, so I eventually gave up and just created a plain MBR with fdisk and that was that. A full day of reloading the backup and updating packages later, and I am back to a functional desktop, sans all those pesky minimize buttons.

April 11, 2011 · bob

Wirth's Law avenged

Occasionally, rewriting other people’s code can be its own reward:

88 times speedup is not too bad for a few days’ work.

April 2, 2011 · bob

Even C has tsearch

I’m just going on record to state that the two reasons I’ve seen on the net for lack of tree-based collections in the Python standard library – (1) that they have bad locality ( gee, very unlike huge memory-hogging randomized hash tables, oh and just try scanning one of those…), and (2) that Python makes it so simple to write your own, just do that! ( well, yes I can and have, but hey it’s 2011 already, rbtrees are like 40 years old!) -- are inane.

March 29, 2011 · bob

New kite

Star Facet It’s almost spring and that means time to make another kite! I haven’t done one in a couple of years so hopefully I haven’t lost all of the necessary sewing skills. This time around I’m going with a cellular design (think box kite), the #54 star facet. This morning I spent about half an hour on the first step – cutting out the necessary shapes from rolls of ripstop nylon. We have an enclosed area with great big sunny windows in our apartment which are perfect for tracing the shapes out onto the material.

The next step is adding reinforcements and binding for which I’m waiting on supplies. The Cherry Blossom nee Smithsonian Kite Festival is coming up in a couple of weeks so I want to get it all done by then. I can’t wait to see what Alex thinks of kite flying!

March 14, 2011 · bob

Updated to version 6

I bought a new wireless router the other day, a D-Link DIR-825 dual-band a/g/b/n. This is a step up in several regards from my previous 2.4 GHz 11g Linksys, not least of which is the D-Link’s ability to run OpenWRT with ath9k. Installing OpenWRT with prebuilt binaries is dirt simple; it took all of about 5 minutes to set up.

One of my motivations was to do some IPv6 testing in advance of World IPv6 Day. Comcast doesn’t yet offer IPv6 addresses to the public at large, so I set up a Hurricane Electric 6in4 tunnel. This is quite easy to configure in OpenWRT.

So now I can load ipv6.google.com in my browser. It’s approximately 2 better than the normal site.

March 9, 2011 · bob

me &= ~grad_school

An unassuming cardboard tube arrived in the mail the other day, containing my MSCS diploma from Hopkins. Thus passes my academic career. I doubt the experience will ever pay for itself financially, but I did learn a great deal, even as a crusty practitioner of some years. Returning to the student life of never-ending deadlines took quite some getting used to, and the corresponding lack of sleep was good training for Alex’s concurrent arrival. (Said arrival also made up my mind to not pursue the thesis option.)

In the main, the classes were excellent, but the small size of the school means the catalog is limited compared to Georgia Tech. For example, I would have liked a class or two on the hardware side. Hopkins only offered the equivalent of GT’s CMPE 2510 (MIPS architecture with the Hennessy and Patterson book).

Through projects and reading papers, I gained a new appreciation for the difficulty of good science, and the prevalence of bad. I’ll always be an engineer first, as I lack the patience to do science well. Banging out a project out in 2-6 weeks was de rigeur; here are some of them:

  • A handwriting recognition program based on HMMs (basic stuff, but I had no prior machine learning experience)

  • A user-space version of mac80211 hwsim. With the simulator, I evaluated the Linux rate controllers for different rates of packet loss, and found and fixed a bug in Pid. There are a few things in Minstrel that can still be improved, but there’s no surprise that it is much better than Pid.

  • A failed investigation into cache-oblivious data structures for filesystems. It’s tough to beat B-Trees at their own game. Still, I’m very excited about CO algorithms since this stuff wasn’t even around when I was an undergrad. Hopefully the right problem will come along.

  • Demand paging and swap support for xv6. This was a class assignment, but I had a lot of fun putting it together. [Code deleted from the internet at prof’s request.] The swap daemon was crap due to time constraints, but most groups didn’t get beyond identity mapping.

  • An evaluation of parallel algorithms on massive graphs. I now have a better appreciation for the ease of implementation, and horrible performance, of barrier synchronization.

  • A streaming categorical ranking system for twitter graphs. Note to NoSQL graph DB developers: Postgres is still much faster.

There are of course writeups associated with all of these, but my latent inner perfectionist is not very happy with most of them. I might revisit them with more rigor if I get bored some day.

February 12, 2011 · bob