The Rant of a Debian User, or the curse of the evil apt-get upgrade.

Dedicated to the developers of the Lynx web browser.

What is this?

This is my story of upgrading from Debian testing to unstable. It's a story of courage, heartbreak, multilingual profanities and tears of joy.

Background

About three years ago, my friend Wesley found me in a state of being fed up with Windows and properly introduced me to Linux. Being a Debian developer, he kindly offered to to dual-boot-ise my computer. I watched him install Woody and compile kernel 2.4.17. He set up lilo and alsa, and it all made sense, and it all worked perfectly. My 700MHz Duron was reborn. It took a new, deep breath of fresh air and started shining with joy. He showed me the wonders of apt-get and dselect, and I was eager to dive in and start turning knobs.

The next day, Wesley moved to Germany, and I made a promise to myself that whatever happens to my computer, I will always figure things out and fix them by myself. I loved the new operating system so much that within a week, the 2GB Windows partition became swap space. The foul demon was gone, never to pollute the hard drive again.

In the months since, I added some RAM and installed the nVidia driver that replaced the nv and dri modules. Life was good, but not without occasional troubles. Twice I managed to screw myself over by executing "apt-get upgrade". Both times something broke. The first time, it was the xserver, but that got fixed by installing the latest nVidia driver. The second time, I had to recompile the alsa modules to fix the broken sound. Nothing too drastic, but I decided to stay away from "apt-get upgrade" from then on.

When my friends started installing Linux on their computers, I became even more fond of Debian. When they mentioned Redhat or RPM dependencies, I laughed and told them about apt-get. I even got to install Debian once or twice, which is when I found out how difficult it was. It is impossible to install testing or unstable directly. You have to go through stable first. That means having a 2.2 kernel on an ext2 partition. Once you get that booting, you have to upgrade to testing or to unstable, and things break. If you want ext3 or reiserfs, forget it; your root filesystem is already ext2, and I still don't know how to go about changing that without major bloodshed.

After going through that experience, I decided that I was happy with my testing and I would just wait until nice things like KDE 3.0 and gimp 1.3 got there. So I waited and waited...

Downhill

One day, my friend Anand showed me a game called SuperTux. I spent an hour playing it and got addicted. SuperTux had 26 levels, and after finishing those, I wanted more. I searched on Google for people who made custom levels, but found none. Then I decided to make my own levels. By that time, some more of my friends got into SuperTux, so when I made some levels, I had somebody to test them out. My levels caused them a lot of troubles - I felt like Henry Stauf, the evil puzzle maker from The 7th Guest. It was great!

I could not install SuperTux on my computer becuase it depended on the SDL library, which was still in unstable. So I had to play and design levels at university or on other computers. That was a bit annoying, but understandable - it was a new game.

The feedback I received on my levels gave me the confidence to mention them on the #supertux IRC channel on Freenode. When I came back to the channel a few days later, I found out that they were going to use my levels in the upcoming Milestone 2 release of SuperTux, and that I should check out the game from CVS and clean up my levels. That day I was very excited - it was my first contribution to an open source project!

Of course, when I got the source code, it did not compile because I did not have the SDL library. Milestone 2 was to come out in a week, and that was the last drop. I decided to upgrade to unstable. I wanted KDE 3.2. I wanted the new kate, kpovmodeler and quanta. But most of all, I wanted SuperTux. I know that debian.org says that running unstable is not the way to get all the newest packages, but screw that.

So I add the unstable sources to /etc/apt/sources.list, and here I go:

% apt-get -t unstable upgrade
% apt-get -t unstable dist-apgrade

Nothing too drastic so far. Let me try logging out from KDE now. X server doesn't start. OK. I expected that. Need to reinstall the nVidia driver. I still have it in /root for a day like this.

% /root/NVIDIA-Linux-x86-1.0-4496-pkg2.run

Nope. It says the kernel headers don't match. What? I installed it before with these same kernel headers. My kernel is the same. The driver is the same. Fine. That was a pretty major upgrade. I should probably reboot, just to start fresh.

% reboot

Nope. Still no X server, and now alsa is gone, too. No problem; been there. Need to recomiple alsa modules, but let's get nVidia working first. No luck. Same error message. Lynx to the rescue - I'm getting the newest nVidia driver. Thank God my network still works.

% /root/NVIDIA-Linux-x86-1.0-6111-pkg1.run

Still no luck. A different error message though. Now module nvidia.o won't load. Oh well. Let's see if I can at least go back to the nv and dri modules instead of nvidia.

% dpkg-reconfigure xserver-xfree86

I enable GLcore, nv and dri, but it still tries to load nvidia. Well, since it's all so screwed up now, I might as well install kernel 2.6. It can't get much worse anyway. Trusty old lynx, get me 2.6.7 from kernel.org please.

% make menuconfig
% make dep
% make

I copy the kernel image and set up lilo, pray and reboot. I still have my 2.4.17 boot floppy just in case.

...

Kernel panic on boot. Great. Now it can't get much worse.

Kernel 2.6.7

Boot floppy, you are my last hope... Whew! It boots. Removing the weird kernel. Now let's do this right.

% apt-get install kernel-source-2.6.7
% apt-get install kernel-image-2.6.7-1-k7
% cd /usr/src
% tar -xjf kernel-source-2.6.7.tar.bz2
% cd kernel-source-2.6.7
% make oldconfig
% make menuconfig
% make-kpkg --initrd --revision=2:abednego.1.0 kernel_image
% cd ..
% dpkg -i kernel-image-2.6.7-abednego_abednego.1.0_i386.deb

Added "initrd=/initrd.img" under "image=/vmlinuz" in /etc/lilo.conf and...

% reboot

Nope - kernel panic, but in a different place now. Now it doesn't like my third hard drive - /dev/hdc1. It's complaining about some DMA errors. WTF? It worked fine under kernel 2.4. It's an 80GB hard drive with ext2 on it (which was a mistake, by the way - it takes half an hour to fsck that thing when booting after a crash). OK. Going into /etc/fstab and adding ",noauto" to the /dev/hdc1 line.

% reboot

It boots!!!

% mount /dev/hdc1

Again, more BS about DMA errors and wrong CRC sums, but it is mounted, and I can access files.

X Server

gdm is getting really annoying with its 6 retries to start. I have 2 X servers running - one on tty7 and one on tty8, and each one tries 3 times to start up. Why!? Has anyone ever had an xserver start on the 3rd try, or the 2nd try? It either starts or it doesn't. Anyway, I need to get that nVidia driver working.

% /root/NVIDIA-Linux-x86-1.0-6111-pkg1.run

Wow! Kickass! It installed just fine.

% /etc/init.d/gdm restart

Yay! The nVidia logo! But wait, now it's gone. What!? It's still not working? I read the output, and it tells me that my mouse is not found. WTF is this about? I have a Logitech USB optical mouse. It has a USB-to-PS/2 adapter (the little green thingy), but my PS/2 port was fried years ago. (I guess I shouldn't have played with it while the computer was still running.) But my mouse worked fine with the USB port in 2.4, with the wheel and everything.

% dpkg-reconfigure xserver-xfree86

Now I'm trying all the possible mouse drivers they have in there, one by one: /dev/psaux, /dev/ttyS0, /dev/ttyS1, /dev/input/mice, /dev/gpmdata - nothing. And the weird thing is, whatever I choose, the error message is always the same - "can not find device /dev/input/mice" (I forgot the exact message - the the error logs are gone now). That's strange; it's always trying /dev/input/mice, no matter what I choose. OK. So you want to play dirty?

% cd /dev/input
% mv mice mice.old
% ln -s /dev/mouse mice
% /etc/init.d/gdm restart

Crap. Now it's frozen and I have to reboot. Bang on the keys a few times and wiggle the mouse. Whew! It's still alive, and gdm is dead again. OK. Let's try linking /dev/input/mice to other things, like /dev/gpmdata - same effect. I try kudzu, and it teases me by saying I have a Logitech optical mouse. I know!! Tell that to the kernel! kudzu's "configure" does nothing.

Lynx to the rescue! Let's google for it. Ah! I need to recompile the kernel and make sure that I include all modules that have anything to do with USB or mice. Well, while I'm at it, I might as well disable alsa support - it's not working anyway; I can deal with it later.

% make menuconfig

I enable all the USB and HID stuff and disable alsa and OSS, leaving only "Sound support" compiled as a module. I rebuild the kernel .deb and install it.

% reboot

This time, I keep fingers crossed during the reboot, praying that I won't have to use the boot floppy again. It boots, but it's no help. Let's google some more. I come across a newsgroup thread that tells me to enable these modules: hid, hiddev, usbmouse, mousedev, ohci-hcd, uhci-hcd and psmouse. I modprobe all of those.

% /etc/init.d/gdm restart

Jiminy Jillikers! That did it! I "modprobe -r" all of those modules to see which ones are actually in use. Some of them cause the mouse to freeze - those must be important; we'll keep them. I add all the useful ones to my /etc/modules. They are uhci-hcd, mousedev and usbmouse. I also find snd-via686 in there - that's out.

ALSA

So now I should be able to log in. Yay KDE 3.2! Here I come. I type in my username and password at the gdm prompt and hit Enter. What!? Gnome? Why? Where's my KDE? Log out. I click on "Session" - there's no KDE. Fine.

% apt-get install kde

What do you mean you need to download 86MB and 260MB will be used? What were you doing when I said "apt-get upgrade"? No problem. Damn mirrors.kernel.org is fast! It's the only site I can get 300kB/s from on Shaw cable. It's here. It's configuring. Eh? Conflicts in texmf? Weird. OK. It's unstable after all; I'll cut it some slack.

% apt-get remove tetex-bin ipe tetex-extra
% apt-get install kde

I'll deal with those later. I want my KDE. Ctrl-Alt-Backspace gdm. Sweet. I have KDE in the sessions list now. Yes, I want to make it my default session. Why did you change it in the first place? (No offence to the Gnome people, but that's the beauty of Linux - I can pick the window manager I like, and you can choose your own.)

Hello, 3.2! Ahh, the kickass kate! Best editor ever! That's coming from a vi user and a long time hater of anything emacs. (If you disagree, see above about the window managers.)

But what's that nasty white noise in my left speaker? Must be arts acting up again. I never met a single person who got arts working properly. I fire up the Control Center to disable arts and click on "Test Sound" just in case. Wow! It works! That's a first. It played a music file on top of the white noise in the left speaker.

So it's not arts. It's probably alsa. My sound is on the VIA motherboard, so let's disable the module and see what happens.

% modprobe -r snd-ens1371

The noise goes away.

% modprobe snd-ens1371

The noise comes back. Hmm...

% alsamixer

I play around with the volume controls - no effect. I mute the master volume - no effect. [Insert various Russian profanities.]

I've been at it for 2 days now. I need a break. So I fire up quanta and write this rant. While I type, quanta is getting slower and slower. Now it is at two characters per second, and the "Parent tags" combo box in the lower left keeps blinking. No worries. It's unstable. My CPU is only 700MHz, and I have two web servers running (apache and resin), two databases (MySQL and firebird), awstats, x-chat, firefox and a lot of other things. I'm not too surprised. However, I restart quanta, and it's just fine. Memory leak? Possible, but I was prepared for this when I decided to upgrade to unstable.

Back to fixing alsa. I did not have MIDI working in 2.4, except through timidity, and now in 2.6 I have modules that deal with midi. That could be the problem. Let's try unloading them.

% /etc/init.d/alsa stop
% snd_rawmidi

Nope. Module is in use. I can only unload snd-ens1371, and then snd_rawmidi goes away, too. I'll look in /etc/modules.conf and try to find something about MIDI. There's nothing that's not commented, but I come across a reference to "alsaconf".

% alsaconf

Sweet! ALSA configuration. It's scanning for my cards. It found it! Ensoniq - yep, that's me. It's configuring... done. It's telling me to adjust the volume using my favourite mixer.

% alsamixer

Nope. ALSA is not working. Even the module is not loaded. I load it manually.

% modprobe snd-ens1371

Rats! The damn noise in the left speaker. I unload the module and every other module that is not being used by anybody, including things like ext3. Then I modprobe snd and snd_rawmidi - no noise. I try snd-ens1370 instead of snd-ens1371 - no noise, but alsamixer stil doesn't work - no cards found. That's expected; snd-ens1370 is the wrong driver. I unload it and load snd-ens1371 - the noise is back, and so are snd_pcm and some other modules. I try loading snd_pcm by itself - no noise. After messing with /etc/modules.conf a bit, I run alsaconf again to fix things up. I notice that alsaconf says:

Running update-modules...
Loading driver...
Restoring ALSA mixer settings ... failed:
       You may want to run 'alsactl restore' manually to view any errors.
Setting default volumes...

Running "alsactl restore" manually gives:

alsactl: load_state:1134: No soundcards found...

That means the module is not loaded. Wasn't it supposed to load it when it said "Loading driver..."? Ok. I'll load it myself:

% modprobe snd-ens1371
% alsaconf

Ooh. Funky noise! No errors though. It says I should try adjusting the volume. Alright. Let's try alsamixer again. I play around with the master volume, mute and unmute it - no effect. I really only need PCI sound and CD music, so I start muting everything else one by one. I play around with the PCI volume - the noise in the left speaker changes slightly - I must be poking in the right place. Its volume does not change though. I move on to the next volume control. Line, Microphone, Video (what's that?), Phone... I mute all of them. IEC958... The noise stops! [Insert French, German, Italian and Japanese profanities produced in a joyful fashion.] But I'm a pessimist. Let's see if I have any sound at all.

% xmms "/mnt/d/quake3/arena/music/Masada - All Systems are Go.mp3"

Oh sweet Mother of God! We have liftoff! I guess this rant will stay under 1000 lines long after all. There are still things that don't work - Opera crashes with a Segmentation fault. Galeon has never worked, but I don't really need it now that I have Firefox. mplayer plugin for Firefox still crashes the browser when I click on any kind of a video file link. All I have to do now is post this to my webpage and figure out why SuperTux still doesn't compile. But this is material for a whole new rant.

...and everyone lived happily ever after, until the next

% apt-get upgrade

Although, I guess I won't need one ever again, now that I'm running unstable.

Morale

I have not tried all operating systems. I have not even tried all Linux distributions. There are some I haven't even heard of. But of what I have seen, Debian is by far my favourite.

You say MacOS X? I say I don't want to pay Apple $100 to upgrade my whole system to 10.3 when I simply want the free Java3D package to work.

You say Redhat/Fedora? I say their directory structure is messed up beyond belief, and they've only now started fixing it. And I don't want to download an RPM just to find that it depends on 10 other RPM's I don't have, each of which depends on 10 more, and I have to install them all by hand, and there is a cycle in their dependency graph, so it's impossible to install at all (I've been there). Yes, they have by now ripped off Debian's apt-get, but they didn't get it right. Their package names are different and inconsistent, and their repositories are disorganised. They are moving in the right direction though, so time may change all of that.

You say Gentoo? I say the only thing I want to recompile is the kernel, occasionally, and when I absolutely have to. My CPU has better things to do, and people who are getting CVS updates through SSH from my machine or posting messages to the multiple Invision Power Boards on my website are going to be very unhappy if it's compiling the next version of tuxracer at the same time. I think it's too much of a price for too little gain in perfomance.

You say FreeBSD? I say read above about Gentoo, plus note that I would like to have Java (with extensions like Java3D) and KDE without having to sacrifice a goat.

You mention Windows? I smile and rub old wounds.

That said, I think that if Linux ever becomes widely accepted as a desktop platform, it will surely not be Debian leading the way. Yes, I've had Debian on my desktop for over 3 years, but I am a programmer, and my computer needs are very different from those of an average user. I am willing to whip out a wrench and mess with the insides of my operating system if that will make my life a bit easier. And more importantly, I know how to. But although there are lots of people like me, we are not average users who only need their computers to get e-mail, browse online catalogues and edit family photos. Those people don't need Debian, and there is not much use nagging them to try it out - they will only be disappointed. And who is going to hold their hand when they accidently wipe out their home directory? I don't want to fix it, so I won't suggest Linux to them in the first place.

I personally, on the other hand, would not trade Debian for anything. Yes, sometimes it is a pain, but what do you want from me? I use vi.


igor
August 8, 2004
Send your comments to igor at lexansoft.com. If I like them, I will post them here. :-)

PS: [June 7, 2005] My hard drive died, and I've just had to reinstall the system. The new installer is amazing! I thought SuSE's was nice, but it's not as nice as the new Debian installer. Two hours, and I have a shiny new system. Alsa works. nVidia driver works (thanks a lot for module-assistant). aptitude kicks ass. I'm happy...

Comments

Hello Igor:

I just wanted to thank you for you marvellous Debian Rant article.
It saves me from a noisy, very very noisy, SB PCI128, and you do know
what I mean.

I recently installed an abandoned PCI128 and you know?, it really
noised everything up. Thanks God, the almighty Google found your article
and I solved the problem. Now I'm wondering what the f***(bad word)
could the IEC9581 be.

Well, this is my little story, hope you like it. Ah! don't forget to
count on me if you have a problem I can solve.

Regards,

--
Raúl Sánchez Siles