Debian (Final) Installment

Over the Christmas break, I decided to replace Redhat 7.3 on my main machine with Debian. I had had plenty of practice at installing Debian, but even so I figured I ought to allow a few days to return to the state of the Redhat build.

I already possessed CDs for woody (stable) and sarge (testing). The sarge CDs are not installable, but can be used to upgrade from woody. So, I started with woody, being careful to only format the partitions /, /usr, /usr/local, /var.

I had fun with /var, because I had to use the (/xfer) E: FAT32 transfer partition as the new /var partition, since the original /var was too small. However, this caused problems with Windows 2000, since E: had disappeared without Windows knowledge. To get Windows 2000 back to sensibility, I created a new partition, copied all /var files to it (in single user mode), made the new /var mounted in /etc/fstab, and then deleted the original partition in Windows 2000. This fix caused a minor problem on the next reboot of Linux, since the deletion of a partition caused the higher partitions to be re-numbered (in this case /dev/hda13 became /dev/hda12). However, this was easily fixed by changing the entry for /var in /etc/fstab.

I was surprised to discover that the tasksel menu had no option to install X Windows. Remembering that choosing "Desktop Environment" loaded KDE and Gnome, but not X, I therefore decided to install X later. Once the install was complete, used apt-get to install xserver-xfree86. I configured X, but discovered I didn't have startx; I also noticed I didn't have any fonts. This was rectified by installing xbase-clients, xfonts-base, xfonts-100dpi, and xfonts-75dpi.

Now that startx was available, I found X wouldn't start, which was tracked down to the use of 'Option "UseFBDev" "true"' in the Device stanza in /etc/XF86Config-4. Once commented out, X was up and running.

Another strangeness: I noticed I could not ping other machines on the local network without giving the fully qualified domain name. I tracked this down to /etc/resolv.conf, which had a search option of "hydrus.org.uk\000". This trailing "\000" was causing the problem. The /etc/resolv.conf file is created by dhclient, when it gets DHCP information from the DHCP server, under the control of /etc/dhclient-script. However, as soon as I'd patched dhclient-script to remove the trailing "\000", the trailing text mysteriously disappeared of its own accord.

Upgrading the kernel

I upgraded the stock kernel (2.4.18-bf2.4) to 2.4.22. This was partly to correct issues with the stock kernel (e.g. would not power off the box on shutdown), partly because I needed to build the Alsa drivers (see below), which required the kernel headers (although I could have installed the kernel-headers package for 2.4.18-bf2.4), and partly because I could. There's a shed load of options that can be configured for the kernel, here's the .config file I eventually ended up with. The real important things are the usb devices, (usb-uhci, hid, usb-storage), mousedev, realtime clock, ide SCSI emulation, SCSI disk driver and SCSI generic support, and APM support.

Sound

The Hoontech soundcard in this machine corresponded to the ice1712 driver in Alsa, so the building of the driver was as follows:

  cd ~/dev/alsa/alsa-driver-0.9.8
  ./configure --with-cards=ice1712 --with-sequencer=yes;make;make install
    

The building of the driver must follow the installation of a new kernel, but that's the only element of Alsa that needs rebuilding. The other components (such as volume controls et al) do not need to be rebuilt for a new kernel.

Building the Alsa drivers was relatively painless, except that the master volume controls don't work for .WAV or .MP3 files. I still have no idea why - the sound still comes out (and it works fine for CD playing) - so I am still investigating. Note that users must belong to the audio group to allow access to audio devices.

Docbook

For Docbook, I installed docbook-utils, which loaded most everything I needed (except docbook-xml). However, I found that the kind of markup I was used to under Redhat wasn't produced. The solution for this is documented in Docbook Stylesheets.

Fluxbox

I was unable to find my preferred window manager, fluxbox, in the package collection. However, I already downloaded the source sometime ago, so I could build it locally. The only problem was it wouldn't compile - I needed to add #define HAVE_STRFTIME 1 to config.h in the fluxbox root directory, and also needed to add #include <cassert> to ./util/fbrun/FbRun.cc/.

TrueType Fonts for X

The fonts needed a little fixing up. After adding xfstt to get TrueType fonts, rxvt would not start properly. There was a significant delay before the window appeared, then a little while later, starting rxvt would crash X - this happened immediately with fluxbox, after a few seconds with wmaker. Found out that by getting the source (apt-get source rxvt), ./configure(ing) and recompiling, the problem went away. I assume this worked because I did not apply the -6 patches, and compiled using the original source.

Useful reference information

Final list of X related packages

Installed X packages from dpkg -l "x*":

  ii  xaw3dg         1.5+E-6        Xaw3d widget set
  ii  xbase-clients  4.2.1-12.1     miscellaneous X clients
  ii  xfonts-100dpi  4.2.1-12.1     100 dpi fonts for X
  ii  xfonts-75dpi   4.2.1-12.1     75 dpi fonts for X
  ii  xfonts-base    4.2.1-12.1     standard fonts for X
  ii  xfonts-scalabl 4.2.1-12.1     scalable fonts for X
  ii  xfree86-common 4.2.1-12.1     X Window System (XFree86) infrastructure
  ii  xfstt          1.6-1          TrueType Font Server for X11
  ii  xlibmesa3      4.1.0-16woody1 XFree86 version of Mesa 3D graphics library
  ii  xlibmesa3-glu  4.2.1-12.1     Mesa OpenGL utility library [XFree86]
  ii  xlibs          4.2.1-12.1     X Window System client libraries
  ii  xlibs-dev      4.2.1-12.1     X Window System client library development f
  ii  xmcd           2.6-17         X11 based CD player
  ii  xmms           1.2.8-2        Versatile X audio player that looks like Win
  ii  xpdf           1.00-3.1       Portable Document Format (PDF) suite
  ii  xpdf-common    2.03-1         Portable Document Format (PDF) suite -- comm
  ii  xpdf-reader    2.03-1         Portable Document Format (PDF) suite -- view
  ii  xpdf-utils     2.03-1         Portable Document Format (PDF) suite -- util
  ii  xscreensaver   3.34-3         Automatic screensaver for X
  ii  xscreensaver-g 3.34-3         GNOME binaries for xscreensaver
  ii  xserver-common 4.2.1-12.1     files and utilities common to all X servers
  ii  xserver-xfree8 4.2.1-12.1     the XFree86 X server
  ii  xterm          4.2.1-12.1     X terminal emulator
  ii  xutils         4.2.1-12.1     X Window System utility programs
    

Filesystem (final)

  Filesystem           1K-blocks      Used Available Use% Mounted on
  /dev/hda2               396623     82489    293652  22% /
  /dev/hda7              2071384    803120   1163040  41% /usr
  /dev/hda8              2071384    273132   1693028  14% /usr/local
  /dev/hda12             1272832    277824    930348  23% /var
  /dev/hda5              8262036   1086076   6756264  14% /home
  /dev/hdb2             30969600    626308  28770128   3% /rep
  /dev/hda6              8262036   4502664   3339676  58% /opt
  /dev/hda13             1241220     32868   1145300   3% /tmp
  /dev/hda11             1050156    196900    853256  19% /xfer
  /dev/hdb1             31463268  14056316  17406952  45% /win
    

Windows partitions

  /dev/hda1 (C:)
  /dev/hda10 (D:)
  /dev/hda11 (E:) FAT32 partition
  /dev/hdb1 (F:)