Grub error 17

Earlier this week, I moved offices (hooray!), which meant I had to move all my stuff.  Since I had just moved a few months ago when I changed jobs, I had things pretty well pared down, but it still took two trips in the Jeep to get my office mate and I moved across campus.  Everything went pretty well, though, until I tried to boot my desktop.  After the BIOS screen, the video went black for several seconds and then an ominous “Error 17” came up.  That was it, no other information.

Doing some research, I found that this is the error you get when grub thinks the partitions are out of order and freaks out.  So what the heck?  I burned a Knoppix CD because I left my boot USB at home and followed the instructions on this site.  One thing I noticed was that my sda2 partition overlapped with the two partitions around it. The last cylinder of sda1 was the same as the first cylinder of sda2, and the last cylinder of sda2 was the same as the first cylinder of sda3.  Since sda2 was just my /tmp partition, it was no big deal to re-size the partition so as to not stop on any toes and then create a new filesystem on it.

I have no idea how that happened, and I would expect that if it was an existing problem it would have made itself known when I rebooted for kernel updates. Maybe the cylinders got shaken up in the move?  I didn’t think they could do that.