Debian Lenny Mini Review

Dedication

Debian GNU/Linux 5.0 “Lenny” is dedicated to Thiemo Seufer, a Debian Developer who died on December 26th, 2008 in a tragic car accident. Thiemo was involved in Debian in many ways. He maintained several packages and was the main supporter of the Debian port to the MIPS architectures. He was also a member of our kernel team, as well as a member of the Debian Installer team.

Thiemo’s work, dedication, excellent technical knowledge and his large heart to share this with others will be missed. Rest in peace Thiemo.

Review

Having always been a Debian person at heart, I eagerly awaited the latest Debian version to hit the mirrors. When Lenny was released, I downloaded the DVD ISO through torrent and installed it.

There are three installers built into the DVD: text based installer, graphical installer and an advanced option.

The default text and graphical installers install GNOME as the desktop environment. To install KDE, LXDE or XFCE, select the advanced option, then alternate desktop environments and finally your desired desktop environment.

I used the default text based installer to install GNOME.

Previous to this install, I used Centos 5.2. I always partition the drive on my system into 4 partitions: a swap partition, a /boot partition, a /home partition and the root partition (/). I only needed to preserve /home so that my data stays intact.

I chose manual partitioning from the partition menu and reused my existing partitions. I chose the DO NOT FORMAT option for the /home partition as I wanted to preserve all my data and reuse them.

Once the partitioning was done, the system continued with setting up the network [which I set up manually as I have disabled DHCP on my router], setting up the time zone, setting up the users and then displayed the task selector that allows selecting the categories of software to be installed. I selected DESKTOP and STANDARD. The installer then began its work and Lenny was installed in about 20 minutes. The final step is to select the location where GRUB needs to be installed. I chose to install it to the MBR [Master Boot Record].

A quick reboot and the GDM screen was displayed. I logged in and GNOME came up smoothly. Lenny detected my video card [i915] properly, the resolution was perfect [1280 x 1024], but however the DPI was wrong [I prefer 100 x 100 pixels, but Lenny had set it to 91 x 91 pixels].

I opened up a terminal and ran dpkg-reconfigure xserver-xorg thinking I could change this. No amount of tweaking would get my DPI set properly. I finally ended up replacing my xorg.conf [/etc/X11/xorg.conf] with my hand crafted xorg.conf:

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
FontPath    "/usr/share/fonts/X11/misc"
FontPath    "/usr/X11R6/lib/X11/fonts/misc"
FontPath    "/usr/share/fonts/X11/cyrillic"
FontPath    "/usr/X11R6/lib/X11/fonts/cyrillic"
FontPath    "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath    "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
FontPath    "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath    "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath    "/usr/share/fonts/X11/Type1"
FontPath    "/usr/X11R6/lib/X11/fonts/Type1"
FontPath    "/usr/share/fonts/X11/100dpi"
FontPath    "/usr/X11R6/lib/X11/fonts/100dpi"
FontPath    "/usr/share/fonts/X11/75dpi"
FontPath    "/usr/X11R6/lib/X11/fonts/75dpi"
# path to defoma fonts
FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
Load    "bitmap"
Load    "ddc"
Load    "dri"
Load    "extmod"
Load    "freetype"
Load    "glx"
Load    "int10"
Load    "type1"
Load    "vbe"
EndSection

Section "InputDevice"
Identifier    "Generic Keyboard"
Driver        "kbd"
Option        "CoreKeyboard"
Option        "XkbRules"    "xorg"
Option        "XkbModel"    "pc104"
Option        "XkbLayout"    "us"
EndSection

Section "InputDevice"
Identifier    "Configured Mouse"
Driver        "mouse"
Option        "CorePointer"
Option        "Device"        "/dev/psaux"
Option        "Protocol"        "IMPS/2"
Option        "Emulate3Buttons"    "true"
Option          "ZAxisMapping"          "4 5 6 7"
EndSection

Section "Device"
Identifier    "Intel"
Driver        "intel"
EndSection

Section "Monitor"
Identifier    "Generic Monitor"
Option        "DPMS"
HorizSync    30-82
VertRefresh    50-85
DisplaySize 325 260
EndSection

Section "Screen"
Identifier    "Default Screen"
Device        "Intel"
Monitor        "Generic Monitor"
DefaultDepth    24
SubSection "Display"
Depth        1
Modes        "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth        4
Modes        "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth        8
Modes        "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth        15
Modes        "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth        16
Modes        "1280x1024" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth        24
Modes        "1280x1024" "800x600" "640x480"
EndSubSection
EndSection

Section "ServerLayout"
Identifier    "Default Layout"
Screen        "Default Screen"
InputDevice    "Generic Keyboard"
InputDevice    "Configured Mouse"
EndSection

Section "DRI"
Mode    0666
EndSection

I got the HorizSync and VertRefresh values for my Viewsonic VG-800 monitor from its manual.

Notice the line DisplaySize 325 260 in the Monitor section. This is the line that sets the DPI.

The calculation is as follows:

[Horizontal Resolution] * 25.4 /[Desired DPI]

[Vertical Resolution] * 25.4 /[Desired DPI]

In my case:

1280*25.4/100 = 325.12

1024*25.4/100 = 260.096

The numbers rounded down are the ones in the DisplaySize line.

To see the DPI values that the system is using, open a terminal and execute the command:

xdpyinfo | grep resolution

The output should be similar to the following:

michael@debian:~$ xdpyinfo | grep resolution
resolution:    100×100 dots per inch

The DPI issue along with the webcam issue [more on that later] were the only problems I faced. All my other hardware were detected correctly.

Lenny does not come with a vast majority of multimedia codecs [due to legal reasons] needed to play my video and audio files.

To remedy that, I added a mirror of the debian multimedia repository to my sources list [/etc/apt/sources.list]

Note: At the time of installation, the Indian mirror for the Lenny distribution was down. Hence I choose the Swedish mirror [http://ftp.se.debian.org/debian/]. Always choose a mirror that is geographically closest to you. The list of mirrors is here.

My sources list is as follows:

deb http://ftp.se.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.se.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib
deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main contrib
deb http://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia/ stable main

I then ran apt-get update && apt-get upgrade to update the system.

Next I opened Synaptic [System - Administration - Synaptic] from the GNOME menu and installed w32codecs, msttcorefonts, mplayer with plugins, Acrobat Reader, Sun Java, Adobe Flash, K3b with codecs, Digikam with plugins, gftp, transcode, sox, ffmpeg, mencoder, clive and Gstreamer with plugins.

Next, I navigated to Skype.com and downloaded the Debian Etch version of Skype.

I installed it with the command: dpkg -i <skype deb file name> || apt-get -f install

I started up Skype and noticed that my webcam was not detected. Using Synaptic, I installed the gspcav drivers for my kernel and rebooted. Still no joy.

I then installed the kernel headers for my kernel version. The command uname -r displays the kernel version as follows (for example):

michael@debian:~$ uname -r
2.6.26-1-686-bigmem

I also installed the kernel source along with the package build-essential (this contains the gcc compiler and related development tools).

I then downloaded the gspcav driver source and then installed it by unpacking the downloaded file and then running the command ./gspca_build inside the unpacked directory.

This installed the correct driver for my webcam.

I rebooted and the system came up with my webcam working. Yay.

Lenny does not come with a byte code interpreter to make fonts look nice. To remedy that, I downloaded the latest freetype2 source and unpacked it [tar -xvjf <filename>].

I then edited the file ftoption.h [/home/michael/freetype2.3.8/include/freetype/config/ftoption.h] and changed the following lines:

/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ to
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER

and

#define TT_CONFIG_OPTION_UNPATENTED_HINTING to
/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */

I then saved the file and executed the command: ./configure --prefix=/usr && make && make install && ldconfig to compile and install freetype2.

Next, I set all the fonts to my liking using QT4 settings [System - Preferences - QT4 Settings from the GNOME menu] for the KDE programs and Font settings [System - Preferences - Appearance - Fonts from the GNOME menu] for GNOME in general.

For people with LCD monitors, the default .fonts.conf in your home directory [e.g. /home/michael/.fonts.conf] is not proper. Replace it with this file to get better looking fonts.

I adjusted Iceweasel fonts to my liking.

I wanted Skype to start up automatically when I login to GNOME. To do this, I opened up the Sessions panel [System - Preferences - Session from the Gnome menu] and then clicked Add and added Skype.

My ADSL router has a built-in firewall that I have enabled. For people who do not have this facility, navigate here and select the relevant options.

Save the generated file as /etc/init.d/iptables. Make it executable by executing the command: chmod +x /etc/init.d/iptables/and start iptables by executing the command: /etc/init.d/iptables start. Your firewall is now in place.

Next, I went through the list of packages and removed all the ones I did not need. This can either be done using Synaptic [easier] or through the command line. The command dpkg -l lists all the installed packages and the command apt-get remove --purge <package> will remove the package.

Next, I installed rcconf [apt-get install rcconf], then executed it and disabled all the services that are not needed for my system.

I then edited my hosts file [/etc/hosts] and added the contents of this hosts file to it. This blocks out all malicious sites. My final hosts file is here.

I then added the command nospoof on to /etc/host.conf. This stops DNS spoofing.

I then disabled core dumps by editing the file /etc/security/limits.conf, and adding the following lines to it:
* soft core 0
* hard core 0

I then disabled spatial nautilus by executing the command: gconftool-2 –type bool –set /apps/nautilus/preferences/always_use_browser true

Finally, I cleaned up the apt cache by executing the command apt-get clean.

I rebooted the system once more and everything came up beautifully.

Here is a screen shot of my system.

Everything works as expected. However, I am a little unhappy that Lenny still includes Open Office 2.4 when 3.0 has been out for some time already. I will try and install OO 3.0 later and write another article about it.

Debian is a very reliable and stable system. The install took care of my /home partition well and I had all my files intact and preserved after the install.

Debian has a huge repository of around 22,000 packages. Any software I need is just an apt-get away. Sure, it takes some work to get it installed and configured. Once done, it runs very reliably without any issues.

All together, another fine release from Debian. (*****)

This very server ran a really minimal install of Debian Etch and ran it very well so far.

I just updated this server to Lenny. The process was simple and involved the following steps:

  1. Change all references of etch to lenny in /etc/apt/sources.list
  2. Execute the command: apt-get update && apt-get dist-upgrade and make sure NOT to overwrite old configuration files.
  3. Execute the command: rcconf and make sure that only the needed services are started at boot.
  4. Execute the command: apt-get clean to clean the apt cache.
  5. Reboot and everything should come up cleanly.

It did for me (Thank my Lord Jesus) and we are back in business:-)

Note 1: If you really want to perform the upgrade by the rule book, take a back up of the whole /etc directory, and allow the new configuration files to overwrite the old configuration files. For just the files that were changed, compare the new configuration file with the old one in the /etc backup and manually put in your changes in the new one.

In my case, the only two configuration files it wanted to overwrite were proftpd.conf and php.ini. I said NO to both of them. No other config file seems to have changed as regards this server.

Note 2: Use apt-get upgrade when upgrading within the same major version (for eg. Debian 5). Use apt-get dist-upgrade when upgrading between major versions (for e.g. Debian Etch (4) to Debian Lenny (5)).

Note 3: This site is running on a VPS. As such there is no kernel image installed as the VPS host takes care of that. Executing the command: dpkg -l | grep image on my server gives me the following:

dpkg -l | grep image
ii  djvulibre-desktop               3.5.20-8+lenny1            Desktop support for the DjVu image format
ii  libdjvulibre21                  3.5.20-8+lenny1            Runtime support for the DjVu image format
ii  libmagick10                     7:6.3.7.9.dfsg1-3~lenny1   image manipulation library
ii  libopenexr6                     1.6.1-3                    runtime files for the OpenEXR image library

As you can see no kernel images are installed.

However, if you are on a dedicated server and if you are paranoid like me, you will compile a handcrafted static kernel with grsec and boot that from GRUB. Once you confirm that the kernel works fine, you remove the kernel image deb packages installed by Debian and clean up GRUB.

If you are not so paranoid and you like your existing kernel installed by Debian and do not want it to be upgraded, then here is what you must do to prevent the kernel image from being upgraded:

  1. Install wajig, with the command: apt-get install wajig
  2. Execute wajig and instruct it to hold the kernel image from being upgraded: wajig hold linux-image*

Now when you execute apt-get upgrade or apt-get dist-upgrade, the kernel will not be upgraded. Your system will run on the existing kernel.

At any time, if you change your mind and you want the kernel to be upgraded, just execute the command: wajid unhold linux-image* and then do an apt-get upgrade or apt-get dist-upgrade.

To see the list of packages on hold, execute the command: wajig list-hold

Written by Michael R. M. David

VN:F [1.9.22_1171]
Rating: 9.1/10 (23 votes cast)
Debian Lenny Mini Review, 9.1 out of 10 based on 23 ratings

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>