Friday, April 9, 2010

Interesting times

Previous: Microsoft drives another Windows user to Linux

Interesting times


My Ubuntu system had a bad night. I deleted some files from my external hard drive. When I clicked on "empty the trash," odd things started to happen. The external drive's filesystem switched to read-only mode. No error messages that I could find. At some point while I was fiddling around to try and clear out the trash folders, either I did something inadvertently or a glitch in the driver corrupted part of the Ubuntu kernel.

Now Ubuntu couldn't mount filesystems on the internal hard drive. I tried rebooting, on the chance that a fresh start would clear up whatever was wrong. No such luck. Now Ubuntu couldn't boot.

Using someone else's system and Internet connection, I searched for help. I discovered this sort of thing has happened to other Ubuntu users. Apparently the only thing to be done is to reinstall fresh.

The downside: My system was dead in the water. I was in a hotel room, far from any helpful resources I might have had in my home office.

The upside: I had a backup of my work from a few days earlier. I had bootable CDs with me for Ubuntu 9.10 and 9.04. I had my Firefox bookmarks online on XMarks, where I could sync them when ready. Finally, this very blog contains instructions for installing and configuring my system, and warnings about what not to do, just in case I've forgotten. Things could have been so much worse!

Recovering the system


I decided to take the opportunity to do a bit of housecleaning and to apply some of the lessons learned so far in my n00b journey. My hard drive had a dual-boot configuration with Ubuntu and Microsoft Windows Vista. It occurred to me that I hadn't even thought about booting into Windows in the past few months. Why use up half the hard drive space with Windows partitions?

More housecleaning: I had read that most Ubuntu users define a separate partition for their /home directory. It makes upgrades easier, since you can install a new release of the OS in the root partition and keep your /home intact. Another thing I've learned is that /usr/local and /usr/share are updated when you install software and customize gnome. You don't have to install things in those locations, but they are default locations. With that in mind I wiped the drive and created the following partitions:

* /
* /usr
* /home
* swap

I tried installing from the 9.10 disk, and had problems. Again using someone else's system to look for help, I learned that 9.10 has some known kernel issues, one of which is that it doesn't support the wireless adapter that my machine has (Intel AGN 5100). It also seemed to have problems mounting the /home and /usr partitions. No helpful error messages.

Next I installed from the 9.04 disk, and had similar problems booting and mounting the partitions. I also noticed that there was no driver for the wireless adapter and that audio was disabled. I remembered that these problems had been fixed at some stage in the evolution of 9.04, and surmised that I had an old release of Ubuntu on that disk.

I installed from the 9.04 disk again, this time defining just one partition for the whole OS. This instance could boot, but had no network support. Again using another system, I downloaded the last stable Ubuntu 9.04 iso from releases.ubuntu.com/9.04 to a thumb drive, and used the old 9.04 instance to burn it to a DVD.

This version of 9.04 installed nicely into the partitioning scheme described above and booted without complaint. I felt like the Apollo 13 astronauts after they'd restarted the Command Module. Well, okay, maybe that's a stretch.

Update mistake


To bring the new instance up to date, I opened a Terminal window and ran these commands:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get build-essential


At this point I made a mistake. I used Update Manager to check for available updates and install them. After more than two hours, the update process became confused when trying to install a package. The process hung, and the last message on the console was "stopping bluetooth." I waited a while just in case it was doing something under the covers, but ultimately I killed the process and rebooted. The system was very confused about what was installed and what wasn't. Network support was gone again.

Since I was still early in the recovery process, I just reinstalled from scratch again. This time, after running the update commands in Terminal, I didn't try to do any updates through Update Manager.

To the contrary, I started the gnome configuration editor (alt+F2, enter gconf-editor, click Run), went to apps > Update Notifier, and deselected the auto-run checkbox. This is to protect myself from responding to the prompt about available updates. I'll update packages that are flagged as dependencies for software that I want to install. Otherwise, I'll stick with the working version of 9.04.

Next: Rethinking directory structure

No comments:

Post a Comment