A Quick Start to Debian

Debian is one of the main Linux distributions, and although not designed for the beginner is the basis for many newcomer friendly versions. Aimed at the more experienced, it has the reputation of being rock solid stable and, once installed, extremely easy to maintain.

This page is not designed for the complete newcomer, but it is my hope that I'll save the more experienced Linux user a bit of time. The information is all out there, but sometimes you have to dig a little bit to find it. (It's also to save me the trouble of looking up things I forget if I have to install it on another machine--as one friend said, since it's true that once installed, you don't have to install it again, one does forget.)

(Beginners, and even the more experienced might find the Distrowatch reviews Part 1 and Part 2 useful.)

Firstly, you have to install Debian. The easiest way is from CD. Although they don't make it easy to find a complete iso, suggesting you use jigdo, a bit of searching will usually find it. (Hint: try linuxiso.org.) However, using jigdo isn't very difficult. One installs it (for example, in FreeBSD it's in ports), gets a url from the Debian web pages and types something like

jigdo-lite http://us.cdimage.debian.org/jigdo-area/3.0_r2/jigdo/i386/woody-i386-1.jigdo

(If your browser broke that, it should be on one line) After that, just press return when it asks for files to scan and it will ask for a Deb ftp site. You can type in (assuming you live in the US)

and it will do the rest, creating an iso image to burn. (I use stable, woody, as an example, one could use testing or unstable as well). Note that jigdo does require wget. FreeBSD installs it as a dependency.

I just use Woody (Stable) as it seems to have more on the first CD. I downloaded Sid (unstable) once, and it didn't seem to really be an install CD. (I just downloaded CD-1.) I did a quick google search, saw that didn't sound completely wrong, shrugged and just got Woody. I didn't research it in depth at all, just did a quick google search, so take that statement with a grain of salt.

Since, as you'll see below, upgrading on a reasonably fast machine with a broadband connection probably takes less than an hour, I didn't research this any further.

Once you have the CD burned, installation, despite its reputation of being difficult to install, is fairly straightforward. Again, this page is not for the complete beginner, so I'm not going to walk you through the installation. They have information on their web page. If you are used to text or ncurses based installations, it is fairly typical. Once the CD boots, hit F3 for the various options--I choose bf24 which uses a 2.4 kernel rather than the default 2.2 one. You'll have to pick your swap and / partitions, and if you're only used to GUI installs, this might be initimidating. However, it's no more difficult than say, Slackware, and actually far quicker.

Upon reboot, you are given various configuration options. One is deciding what you will use for your sources. I usually choose the first two or three ftp sites listed in the US. When all this is done, you can log in. (I skip tasksel and the like during this part, it makes the upgrade go more quickly.)

As Debian unstable is far more stable than most distros' release versions, the first thing I do is upgrade to unstable. (Assuming that one installed the stable version.)

Note that you can actually install unstable from the beginning. I learned this afterwards. When first installing, add verbose to your boot arguments--for instance, I install the the 2.4 kernel so when booting from the cd I type at the boot prompt

bf24 verbose

Then, upon first reboot, when choosing sources and the like, unstable is one of the choices.

For those used to source based distros like Gentoo, the upgrade of an entire distribution is amazingly quick. Debian uses binary packages. The first thing to do is change the ftp sites to get unstable sources.

In /etc/apt there is a file called sources.list. It will have lines like

deb ftp://mirrors.kernel.org/debian/ stable main non-free contrib

Change stable to read unstable (but leave security at stable) then

apt-get update
apt-get upgrade
apt-get dist-upgrade

This will take awhile, and will require a bit of input while going on. However, when it's done, you have successfully upgraded from stable to unstable.

Debian's apt-get is well known as one of the best package management tools around. People have different ways of doing things and for me, I usually install ssh next

apt-get install ssh

This installs ssh and gives you the option of running the sshd daemon as well. It will also create keys. Next, I install a few other packages, such as wget, sudo and the like.

Something that I've only noticed in Deb and its derivatives is that sometimes, one way or another, a user is added to the sudo group. (Being used to FreeBSD, I usually create a wheel group and use that as the group that can do things.) If a user is in the sudo group, if they run a command with sudo, they aren't asked for a password. So, if that's happened, and you wish to change it, as that user

sudo deluser $USER sudo

will work.

Next, I want to install X.

Debian's tasksel will do this for you. However, it installs, in my opinion, far too many packages that I don't want. So, I just install x-window-system and xlibs-dev. By now you probably have the syntax figured out

apt-get install x-window-system xlibs-dev

As these are binary packages, it is far quicker than a source build.

After installation, it takes you through a dialog similar to xf86config.

If you leave things as is, the next reboot will boot you up into X. I prefer to boot into text mode so I remove xdm from the start up scripts.

update-rc.d -f xdm remove 

In Debian, once it's installed, most things just work. For example, if you install mozilla-firebird and flashplugin-nonfree, Flash will just work in firebird. I actually prefer opera, which doesn't seem to be included (as of January 2004) in unstable (sid). So, I download the static linked deb package, add the /usr/lib/mozilla/plugins path to its plugin directories path and then install lesstif2. After that, Flash works in Opera as well.

Sound and other things in the 2.6 kernel

This one took a bit of searching to get working. Upgrading to the 2.6 kernel and using ALSA took away my sound, which had pretty much worked out of the box when I added the module for my card during installation. Firstly, I installed alsa-base with apt-get. After that, in compiling the kernel, as well as including my card, I added the modules for SND_PCM_OSS SND_MIXER_OSS and SND_SEQ_OSS. Then, add the following lines to /etc/modules.conf
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

(This has, at times, if you compile the above options, been automagically done for me.)

I also (but only once) had an issue when upgrading to the 2.6 kernel--suddenly, although DNS was working, I was getting connection refused from the apt sites and couldn't get to web sites either. A bit of googling indicated that it was the tcp_ecn flag. I fixed it with

sysctl -w net.ipv4.tcp_ecn=0

XFree 4.3.0

NOTE: (Since this was written XFree 4.3.0 is now in unstable. Another thing to PLEASE note about the advice below is that experimental IS experimental.)

The downside of Debian's well-earned reputation for stability is that its packages are often slightly older versions. If one needs, or just wants, Xfree 4.3.0 this is how I went about getting it. First, I added this line to my /etc/apt/sources.list

deb http://http.us.debian.org/debian/ ../project/experimental main contrib non-free

Then, run apt-get update. After that

apt-get -t experimental install x-window-system

(By the way, one can always search for packages at apt-get.org)

One of my mentors has created the following guide for determining whether to run stable, testing or unstable. He pointed out, after looking at this page, that despite my blithe assurances, much can go wrong in unstable, which is why it is called unstable. I'm putting his guide below.

Is it a server?
Y - run Stable
N - next question

Is it an important workstation?
Y - run Testing, or even Stable if it's really mission-critical
N - next question

Does it matter if this workstation actually works or not?
Y - Next question
N - Run Unstable, and install anything from Experimental that strikes
   your fancy.

Is it a workstation on which you can afford some possible downtime?
Y- Run Unstable
N - Go back to the top and try again, or write another question :-)

There's a few other things that are a bit different in Debian. Many of them are covered in the distrowatch article mentioned above. This covers, among other things, the Debian way to build a kernel. Debian's way to build from souce is in one of their faqs, but I also have it covered in the Debian section of my fluxbox page. I also cover the steps necessary to get Japanese working in Debian in my Japanese in *nix page.

The main purpose of this page is to save the person new to Debian a bit of searching.