sungate.co.uk

Ramblings about stuff

Debian: From Installation To Infinity (Part 1)

Rationale

This is the first in a series of documents about the experiences of
installing a new Debian workstation system.
As a result of confusing my old installation by selecting a strange mixture of
Debian/Testing and Debian/Unstable sources, I decided to re-install.

And this time, I intend to Do It Right and also to
Do It The Debian Way.

This first document looks at the installation and the immediate
post-installation configuration.

Installation

After making the decision to re-install the operating system, I did three
things:

  1. Chose Debian Sarge as the version to install;
  2. Backed-up my existing /home partition and most of the existing
    /etc, for
    configuration files;
  3. Downloaded the first three Debian Sarge ISOs for burning to CD (from the
    2004-10-12 snapshot).

Installation was very smooth; all hardware was automatically detected. There
are some nice extra features available in the new installer. I suspect that, had
I been installing completely from scratch it would have been even easier. I
had to take care, however, because I had pre-existing disk partitions, some of
which I wanted to keep. A nice feature of the partitioning tool during
installation was the option to set some basic filesystem parameters. For
example, I use leafnode to allow
fast, offline reading of newsgroups. Since this results in a high turnover of a
large number of small files, I put the /var/spool filesystem on its own
partition. The installer actually gave a ‘news’ option for the partition
filesystem settings, optimized for small files.

Post-installation tweaking and customisation

Debian Package Repositories

The installation used the three CDs I downloaded, but I now wanted to make sure
that I had access to the full Debian archives. I changed
/etc/apt/sources.list to include the following:

    deb .../debian/ sarge main non-free contrib
    deb-src .../debian/ sarge main non-free contrib
    deb .../debian-non-US/ sarge/non-US main non-free contrib
    deb-src .../debian-non-US/ sarge/non-US main non-free contrib

Note that this includes entries for both the binaries and also the source,
since I know that there are some packages I’ll want to rebuild using different
options, for which the source code will be required.

nVidia Graphics Card

The base system included a stock 2.4.27 kernel optimised for 386 systems, so
I upgraded to the 686-optimised version. At the same time, I downloaded the
binary module for my nVidia graphics card. In the past, I’ve always rolled my
own kernel (as I will do shortly with this installation too), but to get up and
running quickly, using a binary nVidia module matching the stock kernel is a
helpful option.

When installing the nVidia module, one or two minor edits to
/etc/X11/XF86Config-4 are required, in particular to get the OpenGL
side of things working properly. The GLX README in the Debian documentation
tells you to remove GLcore and dri support. It should
be possible to have the above changes happen automatically, or be triggered as a
result of doing a dpkg-reconfigure xserver-xfree86, but I didn’t
try that. The
nVidia card using the device file /dev/nvidiactl which, by default,
can only be accessed by user root and members of the group ‘video’. So, there
are three options here:

  1. Set chmod 666 to allow all users access;
  2. Add required users to the group ‘video’;
  3. Add all local users to a group ‘everyone’ and chown root.everyone
    /dev/nvidiactl

The first option is probably the simplest, although the second is probably
considered more correct and is the one I used. The third option occurred to me
while I was doing the setup, although I didn’t use it.

Similar group membership tricks are required to permit access to the CDROM,
floppy and sound system.

Extras

It seems that the Macromedia Flash
plugin (for web browsers) depends on the package gsfonts-x11, which
wasn’t installed by default and wasn’t picked up as a dependency by
apt-get when installing the package
flashplugin-nonfree – in fact, it’s listed as a ‘recommended’
package, not a dependency. The symptoms were that Flash had not been installed,
when this was clearly the case.

Next I had to edit the Exim4 setup in order to send all
outgoing mail via authenticated SMTP – this was fairly straightforward, since
the stock configuration file is very well commented.

My own project, colordiff, is now part
of Debian and so it was very nice to be able to simply type:

    apt-get install colordiff

and have it downloaded and installed automatically.

I also installed ntpdate to keep the clock on my system properly
synchronized with an accurate time source.

The installation process setup my networking by installing a DHCP client to
pick up an IP address automatically. This worked because I have a DHCP server
on my network. However, my workstation normally boots up much faster than all
the other systems, so when it tries to bring up networking, the system running
the DHCP server hasn’t finished booting up yet. So, I decided to hardwire the
IP configuration on my system. I knew I could do this by editing various files
such as /etc/network/interfaces, /etc/resolv.conf and
so on, but wanted to do this the Right Way. I knew I needed to
dpkg-reconfigure a package, but it wasn’t clear which one. A quick visit to the #debian IRC
channel on freenode got the answer,
appropriately enough from diffrentcolours.
The answer is to install and configure the package etherconf which
asks a couple of questions about the (static) IP configuration and writes out
all the appropriate configuration files.

Future

Before I trashed my old setup, I was running a 2.6.x series kernel and, since
general system performance seemed very good under that setup, I plan to migrate
to a 2.6 kernel as soon as possible. I have downloaded the Debian source
package for 2.6.8 and will build this together with the corresponding nVidia
graphics module. I have a configuration file from my old 2.6.6 kernel as a good
starting point.

3 Responses to Debian: From Installation To Infinity (Part 1)

  1. On 19 October 2004 at 19:58 sir_galahad said:

    i’ve started using gentoo, fast, lots to configure …

  2. On 19 October 2004 at 20:08 davee said:

    But does using Gentoo really allow you to squeeze much extra performance out of your system? And is it worth the effort? I can see the benefit in optimising certain key components, certainly the kernel, probably libc and maybe some commonly-used apps (OpenOffice, Mozilla?), but I can’t believe it’s really worth the effort otherwise.

  3. On 9 March 2005 at 02:12 fuzzix said:

    Not to be cruel or anything, but why do gentoo advocates generally have some sort of gamer avatar coupled with terrible grammar?

    …Anyway, you should be using Slackware – fast, lots to configure. 😉