Installing Debian Linux on a Dell Laptop

by Salman Ahmed

I recently bought (leased, actually) a Dell Latitude C800 Laptop. In my work as a software development consultant, I often need to have my own laptop at client sites. The Latitude C800 is one of Dell's high-end laptop models, and an impressive one at that. My laptop's hardware configuration is as follows:

  • PIII 1.0GHz Processor

  • 256MB RAM

  • IBM 32.0GB 5400RPM UDMA66 HD (IBM DJSA-232)

  • ATI Rage Mobility M4 Video w/ 32MB RAM

  • Built-in mini-PCI 3Com 56k modem + 10/100 combo

  • 15" UXGA Active Matrix (TFT) display (1600x1200)

  • Built-in ESS Maestro 3i sound card

  • LG 8X DVD-ROM Drive

  • BIOS Revision A09

In this article, I will discuss all the steps necessary to install the current stable release of Debian GNU/Linux (currently 2.2r3, also known as potato) on this laptop; upgrade from the stable release of Debian to the unstable branch (currently known as sid); and set up XFree86 4.1.0 to run at a resolution of 1600 x 1200 and at 24bpp color depth.

Installing Debian

I will do a network install of Debian on this laptop since I have cable-modem internet access. Debian has an excellent network installer that I would recommend to anyone who has reasonably fast cable/DSL internet access.

For people new to Debian, it is strongly recommended that they (at least once) read over the Debian Installation Manual, which can be found in various formats at www.debian.org/releases/stable/#new-inst.

For the case discussed here, you'll want to read the Installation Manual for the Intel x86 architecture.

Various flavours of Debian boot floppies are available, each geared (i.e., having kernel configuration options) for specific target hardware types. For the Dell C800 laptop, it is sufficient to have a kernel configuration that supports 3Com Ethernet drivers, so that the built-in Ethernet Card can be detected automatically and the network set up at the same time. The compact boot floppy set is ideal for this, available as three 1.44MB floppy images from http.us.debian.org.

  1. rescue.bin: floppy image for the bootable rescue disk

  2. root.bin: floppy image for the root disk

  3. driver-1.bin: floppy image containing kernel modules for various hardware not necessary for initial bootup. We don't need this floppy image as we are care only about having the internal NIC detected at bootup. So this floppy image can safely be ignored.

We will also need a floppy disk in order to create a bootable floppy, so that the Debian installation can be booted from it instead of the hard disk.

All in all, we will need three blank floppy disks, one for rescue.bin, one for root.bin and one for the boot disk (to be created later on in the install).

Once you have downloaded the rescue.bin and root.bin images, you have to write them to blank floppy disks (preferably brand new ones) using the instructions provided at www.debian.org.

Debian Install--Phase One

Boot the laptop with the rescue floppy. (If your laptop does not search the floppy drive at bootup for a floppy disk, you will have to change the bootup sequence, located in the BIOS settings, so that the first boot device is the disk drive).

Press Enter at the Welcome screen.

As the kernel starts booting, you should notice that the internal miniPCI 10/100 NIC card has been detected as eth0. If your C800 laptop has the 3Com internal miniPCI combo (like mine), you will notice the kernel's 3c59x.c driver has been loaded for the NIC.

You will then be prompted for the root floppy disk, after which the console-based Debian installer appears.

The first step will be to Configure the keyboard. Choose qwerty/us: US English (QWERTY).

Since I am starting out with a blank, unpartitioned hard disk, the next step presented by the installer will be Partition a Hard Disk. If you already have an OS installed, your choice will be different.

Select the drive to partition; there will be only one choice, /dev/hda, after which you will enter into cfdisk.

I will also create the following partitions:

Partition Name

Partition Type

Size (MB)

Purpose/Intended Use

/dev/hda1

Primary

256

/ for Debian

/dev/hda2

Primary

4000

Win2K

/dev/hda3

Primary

5000

FreeBSD

/dev/hda5

Logical

512

swap

/dev/hda6

Logical

500

/tmp

/dev/hda7

Logical

500

/var

/dev/hda8

Logical

3000

/home

/dev/hda9

Logical

3000

/usr

/dev/hda10

Logical

2000

/usr/local

Modify your disk partition layout to suit your needs and the intended use of the laptop. In my case, since I intend to use Win2k on this laptop, I have left a 4GB primary partition for it. I want to try out the recently released FreeBSD 4.4 as well, so I have left a 5GB primary partition for it.

You also don't have to follow my disk partition layout. I prefer to have mountpoints like /tmp, /var, /usr and /usr/local on separate partitions. Keeping /tmp and /home on separate partitions allows me to share/reuse these disk partitions (as well as the swap partition, of course) with other Linux installs on the same disk.

Also, since I do install some software from source (XEmacs 21.4.4, Xine and mplayer, for example), I prefer to keep /usr/local as a separate partition for software not tracked by the package management system.

Minimally, you will need at least two partitions, a swap partition (usually 2 * PhysicalRam) and a root partition for the / mountpoint.

By default, cfdisk will give all newly created partitions the Linux type. To prepare for the next step of the installer, change the partition type of the intended swap partition, in my case /dev/hda5, to the Linux swap type (type 82) by selecting that partition with the cursor keys. Then choose the Type option from the cfdisk menu at the bottom of the screen.

Once you have completed disk partitioning and are satisfied with your layout, select the Write option from the cfdisk menu to write out the partition layout to disk, and then the Quit option to return to the Debian installer.

The installer will prompt you to Initialize and activate a swap partition. A Swap Partition Selection menu should appear with the intended swap partition listed in it (/dev/hda5). Press Enter to select that partition. You will be asked if you want to skip the bad-block scan on this partition. After that, select Yes to initialize that partition as the swap partition.

For all other partitions you choose to initialize as Linux partitions, the installer will ask 1) do you want to retain Linux kernel 2.0 compatibility, and 2) should the bad-block scan be skipped on dev/hdXYY?

You should answer No to the first question since you probably don't intend to run a 2.0.x kernel. It's up to you whether you want to run a bad-block scan on partitions. Just remember that the larger the partition is, the more time it will take to check for bad blocks.

At the next step, Initialize a Linux Partition, choose the partition that you intend to mount as /, or the root partition. In my case, this is /dev/hda1. When this partition has been initialized (formatted), answer Yes to Mount as the Root Filesystem.

The next step of the installer will be Install Operating System Kernel and Modules. Since I have chosen to have separate partitions for other mountpoints (/tmp, /var, /home, /usr, /usr/local), I will select the alternate installation task, Initialize a Linux Partition, from the installer menu and specify the remaining mountpoints:

/tmp, /var, /home, /usr, /usr/local

For each of these remaining partitions, when initialization is complete the installer will notice that the root (/) partition has already been initialized and mounted, and it assume that the user wants to specify a non-root mountpoint for this partition. It's at this step that I will specify the remaining mountpoints (/tmp, /var, /home, /usr, /usr/local).

Once that is (finally!) complete, select Install Operating System Kernel and Modules, choosing network as the installation medium.

Configure your network settings, including hostname. Since I have a DHCP server running on my internal network at home, I will choose DHCP to automatically configure eth0. If you have a static IP configuration, say No to DHCP/BOOTP configuration, and you will then be prompted for all the settings.

At the Select Installation Server step, accept the default for the Download URL. If you use a proxy server, make sure to enter that information.

Once the rescue.bin and drivers.tgz files have been downloaded and installed, the installer will present the next task, Configure Device Driver Modules. You can skip this installation task, as we intend to compile a custom kernel from source later on. You will notice the following alternate tasks listed:

        Alternate : Configure PCMCIA Support
        Alternate1: Edit Kernel Boot Parameters

Skip both and instead choose Install the Base System by scrolling down the list of installation tasks. Again, select network as the installation medium. Follow the same steps as above when prompted to Select Installation Server.

Once the base system has been downloaded and installed, the installer will again present you with the next task, Configure Device Driver Modules. Two alternate tasks will be listed:

    Alternate : Configure PCMCIA Support
    Alternate1: Edit Kernel Boot Parameters

As before, skip both and instead scroll down the list of installation tasks and select Configure the Base System.

Select your Timezone and also indicate if the hardware clock will be set to GMT (recommended).

In the next step, Make Linux Bootable Directly from Hard Disk, you will have to specify where you want to install LILO. Select the first option listed, which will be to install LILO in the MBR.

We are at the last step of this first phase of installation, creating a boot floppy. The second step will be to boot the system from the HD and perform additional post-boot, base configuration tasks.

Select the final step (of this phase of installation) and reboot the system, making sure that the boot floppy you created has been removed from the floppy drive.

Debian Install--Phase Two

Some versions of the PCMCIA Card Services package (including the one that comes with Debian's potato release) are incompatible with the PCMCIA hardware on certain Dell laptops, including the Latitude C800. The result is the PCMCIA init scripts hang at system startup, as the PCMCIA bus is scanned. To fix this, we will reboot the system in runlevel 1 and remove the offending package.

As the system is rebooting, press and hold the shift key until the LILO boot: prompt appears. Type Linux single.

Linux will boot, and after the partitions have been mounted you will be prompted for the root password, which is "" (empty) at this point, i.e., press Enter.

To remove the pcmcia-cs package, type dpkg --purge pcmcia-cs at the shell prompt. With this done, type exit so that we leave runlevel 1 and the Debian System Configuration can continue. As this second phase continues, you will be asked:

  • if you want to enable MD5 passwords: Select Yes

  • if you want to install shadow passwords: Select Yes

  • to enter a password for root

  • to create a normal user account

Although it's a bit late for the installer to ask, select Yes when it asks whether you want the PCMCIA packages to be removed.

Since our Ethernet connection is already up, answer No to whether you want to use a PPP connection to install the system.

At the Apt Configuration step:

  • choose http as the method to access the Debian archives

  • answer Yes to "Use non-US software?"

  • answer Yes to "Use non-free software?"

  • answer Yes to "Use contrib software?"

  • choose the country the mirror should be in (I will select United States. And I will choose the main US mirror site, http.us.debian.org.) Enter Proxy information for HTTP access, if necessary.

When prompted whether you want to add another apt source, select No.

The next step offers two choices:

  1. simple: selecting groups of related software packages to install

  2. advanced: selecting packages to install one by one, which can be very daunting given that Debian currently has over 4,000 packages to choose from!

Choose simple (option 1) so that we can quickly complete the install and get to a login prompt.

At the Task Installer screen, leave all options unchecked. This will allow you to edit the /etc/apt/sources.list file by hand and change the source distribution from stable to unstable. That way, we can choose packages to install from Debian's unstable tree, which will allow us to get newer, updated packages, including XFree86 4.0.1.

With all options unchecked, select the Finish button. Type Y when asked whether you want to continue with the download of packages.

Once all the packages have been installed, and you have answered all remaining prompts, you will finally be presented with a console login screen that looks like:

    Debian GNU/Linux 2.2 matrix tty1
    matrix login:

You should now be able to login either as root or as the non-root user that was created earlier.

Installing XFree86 4.1.0

We have installed the base Debian system, but it is very minimal right now since we didn't choose any packages to be installed. Also, the X Window System has not been installed so we are limited to working from the console only.

What we have installed is the stable release of Debian, currently version 2.2r3, but known as potato. Debian's XFree86 4.1.0 packages are available in the unstable tree, currently known as sid. So, let's upgrade this new installation to Debian's unstable tree. After that, we will install the XFree86 4.1.0 packages.

Login as root from one of the virtual consoles, and edit the /etc/apt/sources.list file using vi so that the source lines use the unstable tree. Modify the file so that it contains only the following lines:

deb http://http.us.debian.org/debian unstable main contrib non-free
deb http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free

If you have selected different mirror sites during the Apt configuration step, your source lines will look different. In that case, it should be sufficient to change all instances of stable to unstable in lines that are not commented (begin with a # character).

To complete the upgrade, type the following:

    apt-get update
    apt-get dist-upgrade

Press Y to begin downloading the packages. Once all packages have been downloaded, installed and configured, the upgrade to Debian's unstable tree is complete. Its that easy.

We are now ready to begin downloading and installing the XFree86 4.1.0 packages. Two metapackages are provided in Debian's stable and unstable trees that allow for a full installation of XFree86:

Debian's unstable tree provides a metapackage that makes it easy to do a full install of XFree86 4.1.0, x-window-system. This package has as its dependencies all other necessary Debian packages needed for a full XFree86 4.1.0 install. To begin installation of XFree86 4.1.0, type apt-get install x-window-system.

Press Y to begin downloading and installing the packages.

A Debian Configuration screen, similar to the ones in the installer, should appear. This will be for configuring the xserver-xfree86 package. Select the following options to configure the C800's ATI Rage Mobility M4 video card:

  Select the desired X server driver                        : ati
  Use kernel framebuffer device interface?                  : no
  Select your keyboard model                                : pc101
  Choose your mouse port                                    : /dev/psaux
  Mouse type                                                : ImPS/2
  Is your monitor an LCD device                             : yes
  Choose a method for selecting your monitor characteristics: Advanced
  Monitor's horizontal sync range                           : 30-94
  Monitor's vertical sync range                             : 50-75
  Select the video modes you would like the X server to use : 1600x1200 (check only this option)
  Select your desired default color depth in bits           : 24

Once you have selected OK through the various info dialog boxes that appear, the /etc/X11/XF86Config-4 file, the configuration file for the XFree86 4.1.0 X server, should be written. We are essentially done with the installation and configuration of XFree86 4.1.0.

Let's test this configuration to make sure everything was set up properly, and that we can indeed run X at a resolution of 1600 x 1200@24bpp. Type startx to start up the X server. If everything goes well, you should see the familiar grey stippled background of X, but that's all you see. That's because we haven't set up an X display manager or a window manager.

First, press Ctrl+Alt+Backspace to kill the X server and return to the console. The Debian x-window-system package will have already installed xdm (the classic X Display Manager). To start xdm, type /etc/init.d xdm start. You should see a grey login panel against a grey stippled background. If you don't like xdm, you can install another display manager e.g., WDM (Wings Display Manager), KDM (K Display Manager), etc.

Congratulations, you should now have a minimal installation of Debian unstable, along with XFree86 4.1.0 running at a resolution of 1600 x 1200.

I have listed some resources below to help with installing Linux on the Dell Latitude C800 laptop. The Linux-Dell-Laptops (LDL) Yahoo! Group is an excellent help forum.

Part 2 of this article, "Post-Installation Configuration of a Dell Laptop", is now available.

Resources

Debian GNU/Linux Home Page

Debian GNU/Linux Installation Manual

Linux-Dell-Laptops Yahoo! Group

Linux-Dell-Laptops FAQ

Debian-Laptop Mailing List

Linux on Laptops

My XFree86Config-4 File

Salman Ahmed is a Toronto-based independent consultant specializing in Object-oriented Software Development, and all things Linux.

Load Disqus comments

Firstwave Cloud