|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Archives Mail archives Daynotes Gang |
[Previous entry: "Linux on a Power Mac 7500"] [Main Index] [Next entry: "If you want to chase rainbows..."] 01/12/2002 Archived Entry: "Why I run Debian, and some Debian tricks" After Dan Bowman pointed out Bob Thompson's recent difficulties installing Evolution on Mandrake 8.1, I had little comment other than, "That wouldn't be an issue if you're running Debian." Well, I think I said a few other things because I tend to be wordy, but that was the only important thing I had to say. Debian is one of the more difficult Linux distributions to install (you have to know what hardware is in your machine--it doesn't nicely autodetect everything like Mandrake), but it's far and away the easiest distribution to maintain. We'll get back to that in a minute. Released versions of Debian tend to be ultra-conservative. The current version, Debian 2.2r5, still uses the 2.2.19 kernel, for one thing (and that's a fairly recent change). The current 2.2 kernel is either 2.2.39 or 2.2.40. All packages (at least all the ones anyone uses anymore) are constantly checked and maintained and patched. In theory, the current stable Debian release ought to be the most bullet-proof Linux available. Besides Debian Stable, there's also Debian Testing and Debian Unstable. Debian Unstable is pretty cutting-edge, but I've had no problems running it. I just keep up with the current patches and the system runs fine. I know people who run production servers on Testing and Unstable and get away with it. If you want the latest and greatest stuff, after you install Debian, edit the file /etc/apt/sources.list and uncomment the ftp and http lines. Next, copy and paste those lines, then edit the "stable" to read "unstable." (Or if you're more conservative, edit it to read "testing.") Be aware that occasionally you'll run into problems running packages from unstable under stable. I ran Evolution, Galeon, Dillo, Sylpheed, and a multitude of other packages from unstable just fine, but when I installed AbiWord (a really nice, lean, mean, superfast word processor, by the way) it failed to run right. I upgraded to unstable, and then it worked perfectly. OK, let's talk some tricks. Want to upgrade your distribution after a new version comes out, or upgrade from stable to testing or unstable? Easy. Type this: apt-get update ; apt-get dist-upgrade Then Debian will go download the pieces it needs to upgrade itself. Want to keep your system up to date with any little changes (security patches, whatever) that may have happened recently? Type this: apt-get update ; apt-get upgrade So Debian lets you keep a current and presumably secure installation very easily. If you run that line regularly, you can rest assured that if your system is insecure, it's not Debian's fault but rather a misconfiguration on your part. Want to try out some new piece of software? Forget having to hunt down RPMs or keep track of your distribution CD. Check availability with this command sequence: apt-get update ; apt-cache pkgnames [name of program] Found it? Excellent. Install it with this command: apt-get install [name of program] And if it wasn't as great as you heard, you can uninstall it with this command: apt-get remove [name of program] System acting goofy? This'll cure much that ails you: apt-get clean ; apt-get update ; apt-get check So from a system administration standpoint, Debian is great. Debian developers often try to justify the difficulty of installation by saying you only have to run it once, and to a degree, they're right. Compiling a kernel under Debian I found a nice document detailing customizing your kernel under Debian. The standard method works under Debian, of course, but it's cleaner to do it within the confines of your package manager--then it doesn't go stomping on files you modified. Plus it's actually a little easier to let Debian handle some of the details. Here are the notes I took while using the document. With additions: export CFLAGS="-O3 -mcpu=i686 -march=i386 -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -malign-functions=4" Using -march=i686 is known to cause instability and not improve performance by any noticeable amount. The kernel mostly ignores these settings but I set them anyway. You can alternatively set them in the file /etc/profile. If you ever find yourself compiling apps from source, you want these options set so they'll perform optimally. A correction: the -k switch tells bzip2 to keep the original file intact, while -c tells it to extract to stdout. The | redirects stdout to the specified program, in this case, tar. -xf tells it to extract the file. I got an error on make xconfig: make: wish: command not found. So I headed off to www.debian.org/distrib/packages. At the bottom of the page, there's a form where you can type a filename and it'll tell you what package it comes from. Type in "wish," hit enter, and I get a long list, including /usr/bin/wish8.3 in a package named libs/tk8.3. Sounds promising. So I do an apt-get install tk8.3 and I'm in business. Type make xconfig again, and we're set. This page is also a really good way to hunt down packages if you don't know exactly how Debian named it. Options I chose for kernel compilation: Code maturity level options: prompt for development and/or incomplete code/drivers. I answered Yes, so I'd get modern filesystem support. The end result was an up-to-date kernel (2.4.17) that was about 200K smaller than the stock 2.2.19 kernel and boots to a login prompt in 18 seconds flat, as opposed to 45 seconds before. Much of the improvement is due to the 3c590 driver loading faster as part of the kernel rather than as a module, and the kernel no longer searching for phantom SCSI devices. But Charlie Sebold told me it's his experience that recent 2.4.x kernels boot a lot faster than earlier kernels. It's not perfect--I don't have sound completely working yet--but I found some clues. I'm not overly concerned about sound support though. The system beeps at me when I have mail, and for work purposes, that's all the sound I need. I don't see any point in turning my PC into a multimedia tribute to Billy Joel or Star Wars or Quake III.
Replies: 2 comments Three things: 1. Debian's tar uses "j" for bzip2. Didn't check potato but I know that's true for woody. Not sure why the change. 2. Latest 2.2 kernel is 2.2.20. 3. On a production server directly connected to the internet, some people turn off kernel module support to avoid someone getting limited root power and then loading modules that give them more. Just one more way to nail things down, I guess. Posted by Charles Sebold @ 01/13/2002 09:04 AM CST Ah, I was thinking of the 2.0 series; 2.0 is at 2.0.39 and about to go to 2.0.40. My foggy memory... Thanks for the corrections. Posted by Dave F. @ 01/13/2002 04:27 PM CST |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 1999-2002 by David L. Farquhar. All rights reserved.