K.Mandla's blog of Linux experiences

Stupid mistake, drastic solution

Occasionally I make such dunderheaded mistakes, errors of such colossally huge proportions, that even I wonder how I could have been so dimwitted as to do it.

This time it was a mistake I’ve made several times before, though not in recent memory. I was setting up Crux on my Inspiron again, after a brief interlude with Ubuntu and some short refinements to the Ubuntu setup guide. I managed to install all of X and the core system over the day, recompiling while I was at work, and having a fresh and clean session ready when I got back.

Only this time I managed to pollute my pristine system by starting X before I had edited the xorg.conf file to allow for a HAL-less system. As I’ve mentioned before, if you do this without adding one specific option to your configuration file, you have a system that — despite your best efforts — will enthusiastically ignore everything you do, and sit there staring at you with a doll’s dead eyes.

And that’s what I did.

And the only way out of that situation — where everything is being ignored by your system — is to hold down the power button, and reboot.

And that, of course, is a horrific experience. It was even more so this time, because I had just populated my home directory with some configuration files, and all of them were corrupt when I rebooted. Accessing them, attempting to delete them or just checking file attributes spewed out a string of “Stale NFS handle” errors. Attributes were listed with question marks, and no way to get rid of them.

And of course, I can’t overwrite them. I couldn’t even delete them from a live environment, because each time those files refused to be adjusted. I even tried deleting the entire home directory, in hopes I could re-make it, reapply the proper permissions and ownership, and just start again from zero.

So in the end, I reformatted the entire partition, which was not a huge loss because I regularly build systems with a separate slice for home. Drastic, yes, but effective and quick. And after that it was a simple matter to make a new folder, change the attributes and continue as before.

I don’t know, there might actually be a solution for repairing files damaged like that, but I didn’t have the energy or the time to find it. And since there was nothing in there that couldn’t be replaced in a matter of seconds (I keep a folder of favorite configuration files on another drive … don’t you?), wiping out the entire business was the path of least resistance.

Sometimes when you have a hammer, everything looks like a nail. And sometimes when you have a nail, the best thing for it is a hammer.

Unfortunately, Mike is right. I compile in SysRq support but X completely ignores anything keyboard-based. I’m going to stop short of calling it a bug, but this, to me, is one of those situations where the default behavior of one program is impeding the core system functions, and unless you take one careful step and tell it not to do something, you end up like I did. …

Had the same thing happen while jacking around with an old i-opener. Tweaked the xorg.conf, startx … freeze. Hard booting on an ext2 file system sucks, since FSCK starts going bonkers trying to remedy the corruption. Ended up having to reinstall, this time on ext3. Figure I could live with a less snappy system as long as journaling provided a wee bit of protection against data corruption in such cases. Maybe not.