28 April 2009

Nightmare

Update: See bottom.

You know that sinking feeling you get when you're sitting in the root directory of your Linux box, trying to recover the system from a configuration mishap and slightly unaligned update, when you press Enter after typing in "rm -r *"?

Yeah, well, I kinda had a stressing day today. Well, it started yesterday with PulseAudio (the default sound server in the latest Ubuntu) not giving me the desired effect (which is, you know, sound), so in my infinite wisdom I chose to prod a little, configure a little and run various tools in order to fix things. Because I'm a bit of a noob when it comes to all things Linux and Ubuntu these days, little by little I chipped away the things that were working, ending up with a system completely broken.

My computer is a Toshiba Satellite P300. So, I upgraded Ubuntu 8.10 (which I have been very, very happy with) to the new and tasty 9.04. I tried to upgrade through the update-manager a number of times, but my internet connection is a bit flakey, so it panicked on me a few times. In the end, it kinda worked, and the upgrade happened and most things seemed to have worked, except that sound was gone.

So, I tried to make sound work again, because my new boss wants to chat with me over Skype, and it would be a bit pointless without, you know, sound. Somewhere in that process I killed sound completely, and it went from just noise to no noise at all. SO I thought that something was amiss in the upgrade, and so I played around in Synaptic (the package manager) for a while, installing and uninstalling sound stuff. No good results.

Then things got blurry. I got a hint online somewhere to boot into recovery mode and use apt-get from the command line, and run things like dpkg-reconfigure stuff. Well, at some point, and I can't think of where, someone pointed to a major reconfigure of the environment might work, so dpkg-reconfigure * went into action. Ouch, bad move, because when I returned to normal booting, the mouse and keyboard had stopped working. A reboot (well, a crash boot) later and a well-meant dpkg-reconfigure xserver-xorg further killed my graphics card, so now I was at the point of no mouse, no keyboard and no graphics.

I noticed while doing apt-get that it claimed some packages were installed automatically and no longer needed, and told me to uninstall them. Which I did, and before my eyes I saw things like "uninstalling dkpg-*" which is the whole packaging system, which would leave me stranded with a useless system without the tools needed to fix them. A very, very sinking feeling came over me.

However, the brilliant Ubuntu folks have a menu option for just this kind of stupid user actions, called "fixing broken packages" (or something like that). A run of that, and my system got apt-get again. I uninstalled xserver-xorg completely, and reinstalled it, ran the "xserver fix it!" option from the boot menu, and rebooted.

I got my graphics settings back, but still no mouse and keyboard, rebooted into recovery, found one package had been mangled called "udev", uninstalled and reinstalled, run the "xserver fix it!" again plus "apt-reconfigure console ... something", rebooted again with my mouse unplugged (thinking it might be an autodetection problem, and that plugging it in afterwards might reconfigure it properly), got the graphics and the keyboard working, plugged in the mouse which it autodetected and worked, I tapped in username and password, and friggin' VOILA! I was back to where I left off a few days ago.

With no sound.

But hey, at least I got my system back, and if nothing else my Ubuntu / Linux foo has increased, through manual backups and USB mounting and killing processes and linking up dynamic libraries and editing lots and lots of configuration files. Now, if only I can fix that sound, although I'll leave it alone for a few days before I venture down that path. And, I'll burn myself an ISO of my current system right now. Happy, happy.

Update: Got sound working; the rather common pitfall of having your PCM sound set to no sound. Slide it up, and voila! But my microphone is still dead, not sure how to fix that one. Possibly I need to install Windows, boot into it, unclick the mute button there (as it seems the Linux drivers haven't got some access to that), reboot into Linux and kill Windows again. Like, a 2 hour roundtrip because the mute on the microphone might or might not be accessible there. *sigh*

Labels: , ,