June 10, 2007

Back on Fedora

Posted in Life, Linux, Me at 11:45 am by mj

I’m kicking myself for not thinking of this earlier–fastboot!. This allows me to boot my old FC6 system, which allows me to be productive and hold off on configuring a new system (I’ve concluded Kubuntu is just broken, too many things didn’t work for me). I don’t get to take advantage of the new 64-bit system, but I can get some work done. Which is more important?

On the off-chance somebody else may find themselves in a similar position someday, searching Google or Technorati for an answer at 4AM, here’s essentially what I did to get up (granted, I took the scenic route). Remember, on the system with the fried motherboard, I have an old IDE primary HDD, but the new system only boots SATA. I also bought my new PowerEdge with 2x160GB SATA drives (“for free” if you believe Dell’s special offers). This means:

  • Disk A. Old primary IDE HDD, with working system and no dependencies on secondary drives.
  • Disk B. New primary SATA HDD.
  • Disk C. New secondary SATA HDD.

If I only had a single new primary SATA HDD, I probably would have bought a cheap IDE-to-SATA adapter from Fry’s to see if the new system would boot it that way. But I try to avoid Fry’s if I can, especially the one in Milpitas.

Step 1. Install new Linux distro on Disk B. Doesn’t really matter which distro at this point, since you’re not going to use it.

Step 2. Copy an image of Disk A onto Disk C. Be sure to connect disk A before booting. In my case, it meant disconnecting the CD-ROM and sitting the old drive on top of the case. Your command might look like this:

$ dd if=/dev/sda of=/dev/sdc

This will, undoubtedly, take a while (I got 18.1MB/s for 80GB data–for a total of 74 minutes). It doesn’t matter if disk A is smaller than disk C.

As above, an IDE-to-SATA adapter might have worked. But this way, whatever happens to your data as you’re messing with it (including the remote possibility of a poorly-wired new system that fries all your components), you’re just working off a copy.

Step 3. Reboot. This is the only way I know to get Linux to refresh its view of the volumes on disk C. There may be other ways.

Step 4. fsck your new volumes manually. Just to make sure they’re OK.

$ e2fsck -f -c /dev/sdc1
$ e2fsck -f -c /dev/sdc2

Step 5. Disable init-time fsck. I think the problem with e2fsck failing during init has something to do with moving from IDE to SATA, with the device view switcheroo that entails. Never really figured it out.

$ sudo mkdir /mnt/sdc2
$ sudo mount /dev/sdc2 /mnt/sdc2
$ sudo mv /mnt/sdc2/.autofsck /mnt/sdc2/NO.autofsck
$ sudo touch /mnt/sdc2/fastboot

Step 6. Disable disk B and boot into disk C. In your BIOS, turn off SATA controller 0, or else it’ll never boot disk C.

You should now see the GRUB (or LILO) boot menu from your old system. I tried passing various kernel boot parameters to the system (GRUB allows you to edit the command before booting), but no hint I provided the kernel about the root device or root filesystem prevented the e2fsck failure. Hence, the need for fastboot.

Your experience and results may vary. I’m just excited to be able to get some work done.

June 9, 2007

Frustrated with Kubuntu

Posted in Life, Linux, Me at 4:23 pm by mj

This is just a rant, nothing more.

After my motherboard died, I decided it’s still OK to continue patronizing Dell, and bought their PowerEdge 840 with a “special offer.” And I decided to try out Kubuntu.

This is the first time I’ve run a Debian-based distribution since Debian 1.3.1 in 1997! That was my first Linux distribution, and, aside from the cool package management UI, I was not satisfied with some of its configuration choices. I know the version because I still have the 9 floppies I used at that time.

Debian is also where I learned to pronounce “Linux”–incorrectly! So, I happily went around for a year sounding like a total fool (some would say I’ve sounded like a total fool for the last 30 years, har har). Update: Actually, it was probably the Linux FAQ at li.org with the pronunciation guide for “Linux”.

So far, I am less impressed with Kubuntu than I expected. Sure, it boots fast. But several things that worked out of the box with Fedora, just don’t in Kubuntu.

For example, SCIM/SKIM. I’ve futzed with that for hours, and still no love. Comments on various forums and blogs lead me to believe this is a long-standing problem with Kubuntu/Ubuntu, since everybody’s concluded it just won’t work with KDE. But, that’s patently untrue. FC guides me through a wizard at install, and it works the first time I log in. I’ve spent more time on this than I should. Sure, it’s not a core tool I use–I use it for practicing Chinese and doing a quick sanity check of how well my applications support international input, both of which I could do in Windows–but it’s still irritating.

Also, for some reason, Kubuntu does not install all KDE components. I’m not talking about the games and edutainment, I’m talking about adjusting your monitor resolution. I had to manually install all the KDE components just to do simple configuration tasks. (I do give Kubuntu credit for correctly detecting my widescreen monitor, which I was afraid wouldn’t work given the specs for this on-board video card. Still, I prefer not to run at full resolution because it hurts my eyes.)

Speaking of manual package installation–the whole “desktop” versus “server” downloads for Ubuntu tripped me up. Kubuntu is only the “desktop” option, and there doesn’t appear to be any metapackage that allows me to install all the “server” packages. I’ve tracked down a number of packages–emacs, mysql client, etc., none of which I really consider “server” software–but still have more to install.

I do really love Adept and Synaptic, though. Really slick.

The disheartening thing is all this futzing is in addition to the normal upgrade woes. I’ve grown accustomed to removing the god-awful gcj and so on. That takes an hour or two anyway.

This is really why I try to avoid clean installs, and why I tend to stick with the same distro. Upgrades put you through enough pain, but complete reinstalls make it even worse.

I tried booting my old disk, but the new PowerEdge won’t boot IDE disks, grub won’t even see IDE disks for chain loading, and copying the disk image onto a SATA drive results in a phantom boot-time e2fsck failure (despite manual e2fsck runs working just fine). So much for trying to save time until I can truly spare a few days to configure a new system.

Now I’m starting to remember why I considered never buying from Dell again. That motherboard is the first time I’ve had any computer die on me in 20 years. I wouldn’t even be surprised if it caused a chain reaction, perhaps starting with this 9-year old Pentium II sitting around collecting dust, whose (sentimental) disk contents I still haven’t backed up…

breathe

Looks like I still have a weekend of configuration to do, then a week of quiet meditation, then maybe I can get some real work done.

June 3, 2007

Linus Torvalds on Source Control

Posted in Coding, Development, Software at 12:51 pm by mj

This was on Slashdot earlier. It’s a really interesting video of Linus speaking at the Googleplex about the design philosophy of GIT, and why other version control systems are solving the wrong problems.

Forget all the comments about Linus being an arrogant git and so on, he makes a compelling point about distributed repositories and networks of trust, even inside corporate environments. Toward the end, he also talks about how GIT’s use of SHA-1 to provide consistency also aids in recovery of a lost/corrupted repository even from people you don’t trust.

Of course, he is a bit wrong about the problems with CVS/SVN merges. Developers experienced with merging in those environments know how to get around some of the most annoying problems (e.g., remember (tag) the point at which you last merged to avoid phantom conflicts). But he’s still right about the more fundamental design flaws.

June 2, 2007

Suggestions for my next Linux workstation?

Posted in Me at 10:32 am by mj

So, my Dell PowerEdge 400SC has given up on living in a world run by war-mongers. Or, at least, that’s the explanation I prefer for why it has refused to boot since we returned from vacation.

In truth, the motherboards on these are known to have problems with overfilled capacitors, causing it to overheat. Sure enough, mine keeps complaining about a thermal event–that is, when it’ll boot at all. More often than not, the fan powers up for half a second, but not even the diagnostic lights come on. None of my capacitors look to be leaking or even bulging.

I bought mine a few years ago when I could get it cheap. $250, I think, not including the store-bought RAM (never buy RAM from Dell!). My primary motivation for the PowerEdge was support for more RAM, no need to buy an OS (== cheaper), and a bigger tower (== more room for hard drives if you don’t buy them up front from Dell).

I should say I am neither a gamer nor an uber geek–I never need the latest-and-greatest, and, in general, I’m not good at spending money on myself. I do wish to do a fair bit of computation on my home box (which I can’t do currently), as I have some personal projects lined up and I’m growing increasingly spoiled by my work environments.

I’ve considered replacing the motherboard (something I haven’t done in ages, since they started gluing heatsinks to the CPU), and I’ve also looked at HP’s ProLiant, which is a better class machine, has better service, and is only a bit more than the new Dell PowerEdges anyway.

I appreciate any suggestions. What do you run at home for development stuff?