Windows laptop Linux laptop

Installing Debian Linux on a Dell Inspiron 2600


by: Ky MacPherson
last updated: 23 Jun 2006

1. Introduction


This document contains some notes on the steps I took to install Debian Linux on my laptop. It also includes some system configuration files that I needed to modify, and also some customization files that are tailored purely to suit my own preferences. I also have an older reference document that details installing Mandrake 9.0 Linux on this same system.

Let me begin with a foreword about distributions: When I first decided to switch from Windows to Linux for my home computer, I found the abundance of Linux distribution choices to be a bit imposing. But after several years working and playing with Linux, it is more obvious to me now that the similarities between all the variants far outweigh the differences, and the choice of which distribution to select is not as critical as I had originally been concerned that it was.

Having said that, I will go ahead and offer some recommendations. For any home user considering installing Linux for the first time, I think an ideal choice of distribution would meet the following criteria:
Ubuntu, Fedora, and Mandriva are some examples of distros that satisfy the above criteria.

Debian, on the other hand, may not be a great choice for a user who is completely new to Linux. It is a bit more work to set up, and the resulting system will be a bit more spartan in features and appearance than what the distros listed above would provide. However, a veteran Linux user will appreciate the bare-bones configuration for its leanness and suitability for customization, which can be achieved using the excellent Debian package management tool apt-get.

The installation procedure detailed below begins with a Debian 3.0 Woody installation. This is no longer the latest Debian version. However, as per the Debian philosophy, the initial version installed is of little consequence, as all upgrades from Debian are easily accessible on-the-fly via apt-get. And the procedure below diverges quickly from the stable main line, as I will download some packages from the testing branch, and eventually recompile a custom kernel.

2. My hardware


My laptop has the following configuration:
My laptop also includes a winmodem, but I will not address its usage in this document because I currently use a cable modem for internet access. Refer to my Mandrake installation notes for some details about configuring the winmodem.


3. The initial Debian installation


My starting point for the installation is Debian 3.0 r3 installation disc One. Presuming that you can access the internet through an Ethernet connection, only disc 1 is needed, because the installation program can obtain additional packages from the Debian online repositories via ftp.

There is an excellent walkthrough of the installation procedure available online, so rather than duplicate the description of the procedure, I will refer you to The Very Verbose Debian 3.0 Installation Walkthrough . Note that the laptop screen may flicker severely during some portions of the installation, since the default video mode is not suitable for the Inspiron 2600. When the installation disc gives the boot: prompt, rather than pushing "enter" as the walkthrough suggests, type: This will eliminate the flickering during the first part of the installation, but when the system reboots it will begin flickering again. Just be prepared to bear through it, and take an aspirin if necessary ;-) After installation we can correct the problem with some changes to /etc/lilo.conf.

After finishing the steps in the installation walkthrough, the base installation should be complete. Now let us address two issues: the flickering display, and security.

To fix the flickering screen during boot, edit /etc/lilo.conf and make the following changes: Specify the VGA text mode at boot time as: Remember to run lilo after making the changes.

Since the system is connected to the internet, I would suggest turning off all services. Edit /etc/inetd.conf and comment out every service that is turned on (i.e. prepend a "#" character to any line that doesn't already have it). I also disabled exim at this point with the following command: After rebuilding the kernel, we will harden the system further using bastille.

We will need to update XFree86 to a version >= 4.3.0 and also build a kernel version >= 2.4.24 to get full system support for the Intel i830 chipset.

At the time I did my Debian installation, the version of XFree86 on the stable line was not new enough to include Intel 830 chipset support. It is possible that this is no longer the case. But either way, now is a good time to configure apt to add the sources from the testing branch, increase the cache size, and preferentially choose stable versions. To accomplish this I modified the following files:


Now we can get XFree86 from the testing branch using the commands:

4. Rebuilding the kernel


The 2.2.20 kernel provided by the Debian installation is a bit antiquated. I chose to build a 2.4.27 kernel, which is new enough to have the i830 drivers (but still a bit dated by now). The following lines retrieve the source code for the 2.4.27 kernel and some additional packages needed to compile it. I used the menuconfig target for the configuration, which required the ncurses library below. Note that if you prefer to use the xconfig target, there may be other dependencies.

There are a lot of online HOWTOs/guides to building the kernel so again I will defer to these other resources. The one critical step in building a kernel that will be compatible with your hardware is getting the correct settings in the .config file in the kernel source directory.

These options are required to run DHCP:

These options are necessary for the bastille firewall (iptables):

The usb-storage module is needed to allow access to USB devices, such as my iPod and digital camera. However, I had some problems from compiling the driver directly into the kernel (see the Troubleshooting section on my iPod Shuffle page). So I recommend building usb-storage as a module:

Here is my complete configuration:
A side note on rescue discs: an error or forgotten step during the process of building and installing a kernel can leave your machine in an unbootable state. As a precaution before attempting to rebuild the kernel, I would recommend burning or otherwise obtaining a "LiveCD" distribution of Linux, which you can boot to in case you find yourself in such difficulties! I have successfully restored my own system after such a disaster, by booting with a "Mandrake on the Move" CD, then mounting the hard disk partitions and chrooting into the hard drive filesystem to fix the problem. Here's a link to keep handy: LILO crash rescue HOWTO

5. Intel 82801CA/CAM AC'97 Audio Controller


The Intel ICH driver module included with the 2.4.27 kernel is compatible with this audio chip, so I am using the builtin kernel driver as opposed to using ALSA. The following command needs to be executed to enable non-root users to utilize sound: Add these lines to /etc/modules to load the i810 sound modules every time the system is booted. Also I used the following command to eliminate unneeded ALSA startup scripts:

6. Further security measures


In section 3, I suggested disabling external services in /etc/inetd.conf for security reasons. After building and booting into the 2.4.27 kernel, we can further harden our system by configuring a firewall with iptables. I prefer for my system to drop all incoming ping or traceroute packets, so that to a potential hacker there will not even appear to be a computer connected to the internet at my IP address. This can easily be achieved using ip_tables.

Debian provides a package called bastille which will configure iptables quite painlessly. Use the following commands to install and run the utility: I chose to disregard some of the security measures it recommends targeted more for multi-user systems, such as restrictive file permissions, password aging, etc. since I am not concerned about untrusted users on my laptop. For my purposes, the important part of the bastille configuration is the firewall configuration. I would definitely recommend to answer 'yes' to enabling the firewall automatically on bootup.

Use a port scanner to verify the firewall is functioning. There are some web-based port scanners you can use for this, such as the ShieldsUp! scanner at http://www.grc.com


7. nweb: a simple http server


For a simple and secure http server, I chose nweb, available from http://www.ibm.com/developerworks/eserver/library/es-nweb.html . For an added security measure I run the nweb server in a chroot environment. The following steps can be used to set up the server:

Download the nweb.c code from the ibm site. Compile it into a static binary with the command: Create an unprivileged user "nweb" with no login shell: Copy the nweb executable into the newly created home directory: I chose to create a "public_html" directory in the home directory, which will be the root directory for the web directory structure. This directory must be writable by the "nweb" user, because the server daemon will create a log file in this directory for server activity. I chose to have it writable by all users, so that I can manipulate the web pages with my normal (unprivileged) login account. This may or may not be appropriate for your system! I modified the nweb.c code to log the time whenever a request is processed. This required that /etc/localtime be copied into the chroot directory structure. Create the script /etc/init.d/nweb that will be used to start and stop the web server: Start the server automatically on startup (runlevel 2) and stop it on shutdown or reboot: Finally, edit /etc/Bastille/bastille-firewall.cfg to add the http port (8080) to TCP_PUBLIC_SERVICES. Alternately, you can run the server on a nonstandard port number; edit /etc/init.d/nweb and /etc/Bastille/bastille-firewall.cfg appropriately.

8. System configuration files


The /dev/hda* entries in /etc/fstab are specific to the way my hard disk is partitioned. I use /mnt/camera as the mount point for my Nikon Coolpix 3100 camera, and /mnt/ipod as the mount point for my iPod Shuffle. I had to use the idescsi emulation to burn CDs with cdrecord, but idescsi caused problems with cdparanoia / cdda2wav. The temporary solution I have found is a bit inelegant; I have two boot modes, one for using the CD burner (2.4.27-chuck-b) and a separate one that is compatible with the CD reading tools (2.4.27-chuck-r). (Note the 2.6.* linux kernel does not require idescsi to utilize an IDE CDRW, so a better solution to this problem might be to upgrade to a kernel on the 2.6 tree. I'm saving this for another day!)

9. User configuration files


Remember that the .xsession file needs to have execute permission set.
My editor of choice at home is nvi. It is a fast and lightweight implementation of the classic vi editor. Note the "^M" is a single ctrl-M character.
At work I use vim, which has some more extensive editing features, like split windows, the vimdiff utility, and folding. Again, the "^M" in the "K" macro is a single ctrl-M character.



Ky's Home Page
Hosted by www.Geocities.ws

1