Sunday, January 31, 2010

Linux Woes--Lenny to Kubuntu in 48 Hours

Almost a year ago, I bragged about how smoothly the upgrade from Debian Etch (old stable) to Lenny (new stable) went. Only a few weeks later, the motherboard and hard drive went up in smoke. Because I grew up steeped in the works of the Brothers Grimm, I knew I had somehow caused this by being cocky. (cf. "Rumpelstiltskin;" "The Brave Little Tailor")

A sadder but wiser girl, I replaced the computer and installed Lenny (stable) from a netinstall CD image (via Debian.org) and everything went smoothly, with one exception. When I used the "ctrl-alt-F1" action to switch between tty consoles, all I got was a blank screen with a floating message from my monitor that the settings were not optimal. "ctrl-alt-F7" sent me back to the console running Xorg, and all the pretty stuff. I poked around the Debian forums a bit, but because I didn't really understand the problem, I didn't know what search terms to use. I eventually just learned to live without the tty consoles, although I really missed them.

Lately, though, I began to wish I had a newer version of OpenOffice, because I'm teaching a class in spreadsheets and word processing. I had Calibre, the dandy open source ebook management program, backported from sid (Debian unstable), but it only "sorta" worked, and Iceweasel (Debian version of Firefox) was choking for me pretty often. When the Lenny version of Miro crashed every time I tried to use it, I thought I'd upgrade to testing (Squeeze) or maybe unstable (Sid). (For a recent discussion, see What do you prefer for your desktop: Lenny, Squeeze or Sid?)

First, I backed up my data files. This reminded me how crummy my data backup procedures are. Here's the procedure:

  1. Whenever I'm working on a Really Important file, I ftp a copy to the Mac mini (currently in the living room where we're watching it in lieu of a TV), which machine saves it to the 1 terabyte external hard drive. (No, I still haven't set up a better system. Perhaps now is the time....) If it's a work-related file I send it to the work-related Mac Book Pro the same way.
  2. Periodically, I copy my data files to the Mac mini's external drive. Sometimes I use ftp (excruciatingly slow and painful), sometimes I copy the files to an external USB drive, carry the drive to another computer, plug in the drive, and copy the files over.
  3. Periodically, I copy the Mac mini's external hard drive files to the hard drive in my Linux box by one of these awkward procedures. Thus, I have two or three copies of my data files scattered around the house.
  4. If it's important, not huge, and not in some way confidential, I upload it to my web site, my work website, or here. (See Linux and Open Source for examples of things I don't want to misplace.)

I should fix this mess--I say that every time I have a problem, or do an upgrade. I could get an external USB hard drive and back up my Linux installation; I could set up my LAN to work more smoothly, I could set up an automated backup procedure that didn't rely on whim.... That should be my computer project for this spring.

The length of this post must tell you that my upgrade from Lenny (stable) to Squeeze (testing) did not go smoothly. In fact, I'm sitting here typing in Emacs on a spanking new Kubuntu 9.10 installation. I hope that in a few weeks or months, I'll be able to move back over to a working version of Debian, but right now, I seem to be out of luck, and I don't yet know why. Here's a rundown of my problems.

  1. I "googled around" for known problems and suggestions for the upgrade. I didn't see any generalized "Lenny-to-Squeeze angst," and I found the suggestion to upgrade the installer software first, and to use a "safe-upgrade" option, followed by a reboot, followed by a "full-upgrade." So, I updated my /etc/apt/sources.list to replace "lenny" with "squeeze," and started the process. Updating the installer programs and the aptitude safe-upgrade procedures showed no apparent problems, so I rebooted, and entered aptitude full-upgrade command.
  2. At the end of the upgrade process, I got messages that lots of programs could not be loaded. Many of them were associated with the KDE desktop. This thread from late December 2009 Failed to upgrade from Lenny to Squeeze. [SOLVED] on Debian User Forums points to problems with KDE in Squeeze. I thought that might be the problem. But, Gnome's still in there, so I rebooted, and got as far as the Gnome display manager (gdm). However, the computer wouldn't accept input from the mouse or keyboard.
  3. I found this relevant forum thread: keyboard problem with xdm and kdm. Of particular interest is this observation:

    When the keyboard doesn't work in xdm or kdm, even ctrl+alt+F1 doesn't respond....I think it might be related to the radeon driver, which seems quite unstable; when I work after a startx, everything works fine, as long as I don't work too much with the console. But if I switch to the console a lot and do a lot of work on the console, finally, when going back to X, my X ends up not responding to the keyboard nor to the mouse.

    As it happens, I have the same Radeon video chipset. A helpful forum responder pointed me to the appropriate proprietary driver. I don't know yet if I need this--Kubuntu 9.10 seems to be working well. I'll have to find out more about the driver eventually....

  4. Because I had no input hardware working, I declared the update project hosed, and downloaded the January 29, 2009 netinstall disk for Squeeze (amd64). The text-based installer wouldn't come up at all, and there was something seriously wrong with the graphical installer, too. It failed during the disk partitioning step, so anything that might have been usable on the hard drive was hosed.

  5. The only way to get Sid is through the upgrade path, and, for now, the same is true for Squeeze. So, I downloaded the Lenny netinstall disk image, burned it to a CD, and installed Lenny from scratch. It seemed to work, but the tty consoles were once again, unavailable. I wondered if that might be related to the video chipset driver, or perhaps to the Xorg installation. I hypothesized that my problem might have to do with the Lenny kernel, or the version of Xorg, so I decided to upgrade to Squeeze once more.

  6. This time, because all the failing KDE stuff wasn't there, I saw my Xorg-related stuff failed to update. I had no working Xwindow programs, just a console window. I found these relevant forum threads:

    • Blocked packages during upgrade Lenny to Squeeze:

      [i]t appeared that the sticking point for udev and older kernels is linked to the Squeeze libdrm2 package, which is depending on the drm (direct rendering manager) built into kernels >= 2.6.29. Since xorg, udev and hal are also linked to libdrm2, the whole upgrade process gets broken. Once you have a newer kernel, the upgrade process should work.

    • Lenny will not autoconfigure X suggests ways to examine the failure of the Xorg installation.

    • SMXI.org--A set of scripts that may be helpful if (more likely when) I have to troubleshoot this problem again:

      smxi is an interactive script designed to help people maintain their systems. It supports Debian (Stable, Testing, and Sid) and true Debian based distros (sidux, AntiX, Mepis). It does not support Ubuntu based distros because there are too many differences between Debian and Ubuntu.

    • Here are some more things to try if I get Ctrl-Alt-F1 = Black,blank screen? instead of a tty console.

  7. At this point, I suspected my graphics card driver was not working properly, I wasn't alone in having problems upgrading the Debian Xorg packages, and I needed a Linux machine before too long. I found this advice from a network administrator in Prague (city of my ancestors, the very ones who instilled in me the certainty that boasting is always punished by ill fortune): Putting new X.org version on Debian stable (lenny).

    Of course, there is a catch--new computers have graphic cards that lenny simply cannot cope with anymore. And if you want new drivers, you need new xorg version. There are no official backports. So you are faced with installing xorg from testing (squeeze), but this is a fairly large-scale operation: your libc6 package and other base libraries will be upgraded, your keyboard/console configuration will change, etc. Especially the library upgrade is troublesome, since in order to stay binary-compatible across the whole department, we would need to install libc6 etc. from squeeze on *all* our machines. It is not very likely significant breakage of these packages would go through to testing, but there are risks and overall it adds significant overhead to the task.

    Thankfully, there is a neat alternative solution--add Ubuntu to the repository cauldron! Ubuntu Jaunty is very similar to Debian Lenny package-wise, and in fact not even libc upgrade is necessary. Only a fairly isolated set of xorg-related packages will be upgraded, which seems ideal for the purpose.

    Perhaps my problem is compatibility with my newer machine. If the Ubuntu repositories have fresher drivers and x-org packages, why not use Ubuntu (or in my case, Kubuntu, because I need several KDE programs for my specialized projects) instead of Debian, at least until an upgrade path becomes available.

  8. I downloaded the Kubuntu 9.10 disk image and installed it. X-org seems to be working fine and the tty-consoles are there and behaving just as they should. I found it quite easy to change all the little things I didn't like about Ubuntu (the way it handles root, the behavior of the terminal windows), and the latest, greatest KDE versions of my favorite programs are very nice.

No comments: