Monday, March 30, 2009

The Debian Way

Debian differs from other distros in more ways than mere stability and "common sense". Some of it is hacked in a way not apparent to those of us who do not live and breath Debian. It's a real Linux problem - a different way to do things in various distros. This can often lead, and frequently does, to messed up machines.

My tale today about this, hoping to help someone else with Debian, was an aborted emacs-snapshot install in Debian Lenny on my mail/web server. The PSU on it overheats as the inaccessible fan which cools it has developed a problem - that is by the by. Anyway a sudden huge workload caused it to power off. No problem, reboot. (It wil be fixed btw...) Nothing. No access. What the hell? Damn. It's a headless server tucked away in the hall. So I dragged it out, attached a monitor and keyboard and with horror saw the boot process stall when locating the root file system. Uh oh! After a while it drops out into an initramfs prompt which grandly informs me is powered by the "ash shell". Never heard of it. Uh oh again.

Long story short. After some googling and reading nightmares of the usual "RTFM" replies from dorks who had zero clue how to fix it, it became apparent my file system was not hosed. No. The latest kernel update I had performed (and not rebooted yet) had rewritten my menu.lst file. And it had used Debian "automagic" to specify where the images were stored. It had ignored all the sda1 references and thought that all images were on hda4. Why? I still dont know the reason it picked hda4 since the automagic *commented out* (its how it knows its an automagic variable apparently....) setting for kopt was hd0. This had been correct when I used to have IDE drives. I recently moved to SATA. (HD to SD of cours ...) How does this clash with No idea. And after 4 hours googling and ripping my hair out with no live web or email I didn't really care. So moral of the story - if oyu use Debian read every damn line in every damn config file because otherwise it might just do somethings which you wont like because you are unaware of them.

Black and white : I made a mistake by not updating kopt in menu.lst. Reality : I had not found a Debian howto for transferring a system and had used a generic linux/grub one. It wasn't enough. IMO the automagic should have informed me that it was single handedly rewriting all the device references in my menu.lst. I dont know how. It just should have.

Still, alls well that ends well. And had it been Windows? Wouldn't have had a clue where to start looking.

No comments:

Post a Comment