------------------------------------------------------------------------------ Debain Sid on a Dell Inspirion i8100 HOWTO Author: Jeff Peterson (jeff at coded _S-P-A-M-TRAP_ dot net) Date: 12/29/2003 Version: 1.0 This document may be freely used and distributed. Copyright (c) Jeff Peterson 2003 ------------------------------------------------------------------------------- Table of Contents: 1. Introduction 2. Installing 3. Configuring a. The Kernel I. Kernel 2.4 II. Kernel 2.6 III. Lilo b. XFree86 c. Sound d. Wireless Networking e. ACPI Support (Kernel 2.6) 4. Credits 5. Changelog 1. Introduction: This document explains the steps necessary to install the unstable tree of the Debian (http://www.debian.org) distribution (currently codenamed 'sid') on a Dell Insipron 8100 laptop. These are the steps that I have used and have found to work. That being said, no warranty of any kind is provided and the reader performs all actions at their own risk. I feel it necessary to also disclose that my main motivation for creating this document is as a reminder to myself if/when I ever need to reinstall my laptop. I have spent a good deal of time and frustration researching the topics covered in this document and have not desire to do it again any time soon. I also should disclose that much of this document is my recollection of the process and therefore may be inaccurate and/or incomplete. Should I decide to release this to the public, I would welcome any input, updates, bug fixes, etc. Please direct any such inquiries to my email address as displayed at the top of the page. 2. Installing The process of installing debian-sid is quite strait forward for anyone familiar with debian installations. Basically, I recommend getting a net-install ISO for the current stable tree and booting from it. Proceed with the usual install, partitioning as desired, setting up networking, and installing the base system. I found that the bf2.4 kernel from the net install cd with the eepro100 module for the network card worked well. Reboot the system when prompted. Do not select any packages with tasksel or dselect. This system is to be as virgin as possible. Login as root and update the sources.list file # vi /etc/apt/sources.list Change them to an appropriate debian-unstable mirror (see examples/sources.list). You may optionally include deb-src entries if you wish to retrieve the source code for any packages. Now, upgrade your system to debian-unstable. # apt-get update # apt-get -u dist-upgrade Optionally, you may also wish to follow up those commands with an # apt-get -u upgrade just to make sure that all the packages were upgraded. Congratulations! You are now running debian-unstable. 3. Configuring a. The Kernel For this setup I decided that it would be best to go with a custom kernel configuration. A number of development tools will be required to build the new kernel the 'debian way'. For starters, install the kernel-package package. # apt-get install kernel-package With any luck that should install all necessary development tools for the task at hand. If not, Ill leave it up to the reader to discover and fix any problems which should arise. I. Kernel 2.4 The next step is to retrieve the kernel source. At the time of writing 2.6.0 has just been released but is a little bit too new for my tastes. I recommend getting the most recent 2.4 series kernel with the debian patches. # apt-cache search kernel-source Locate the newest 2.4 series version, in my case it is 2.4.22 # apt-get install kernel-source-2.4.22 In the new kernel we are also going to want PCMCIA support and ALSA sound support. This would be a good point to get those ready to be compiled into the kernel. # apt-get install pcmcia-source # apt-get install alsa-source # cd /usr/src # tar -xzf pcmcia-cs.tar.gz # tar -xjf alsa-driver.tar.bz2 These two packages should create a pair of /usr/src/modules/* directories which will automatically be compiled with the kernel when we get to it. (Note to self: Much of this process up until this point I am recalling from memory. Portions may be inaccurate and may need double-checking.) Now we are ready to configure and compile the kernel. For the sake of ease, I typically create a symlink between /usr/src/kernel-source-2.4.* and /usr/src/linux. # ln -s /usr/src/kernel-source-2.4.22 /usr/src/linux I use the old-style curses configuration method, but feel free to use the newer x-based configuration apps if you like. # cd /usr/src/linux # make menuconfig I have provided a sample kernel configuration (examples/kernel.config), feel free to follow it your do your own. (Note to self: APM support is probably not necessary. I have included ACPI support which trumps APM. Recommend removing APM, but needs to be tested first) Now that the kernel is nicely configured. Lets do some compiling. # make-kpkg clean # make-kpkg --revision i8100.1.0 kernel_image # make-kpkg --revision i8100.1.0 modules_image The 'i8100.1.0' revision tag can be replaced with anything the reader desires but this is how I decided to organize it. A subsequent kernel compile would have the revision tag 'i8100.1.1' and so on. With any luck, everything should compile in about a half hour or so. Once the compilation is complete, presumably without any errors, it is time to install the new kernel and its modules. # cd /usr/src # dpkg -i kernel-image-2.4.22_i8100.1.0_i686.deb # dpkg -i pcmcia-modules-2.4.22_3.2.5-2+i8100.1.0_i686.deb # dpkg -i alsa-modules-2.4.22_0.98-3+i8100.1.0_i686.deb II. Kernel 2.6 I have now braved the new kernel and so far I like what I see. The install process is very similar to that of kernel 2.4. Get the most recent kernel source for the 2.6 tree either by going to http://www.kernel.org or through apt-get. We wont need to download any extra modules such as ALSA or PCMCIA-CS for this kernel. Everything we need is already inside. Next step is to configure and compile the kernel. Start by creating a symlink between /usr/src/kernel-source-2.6.4 (or where ever you put your kernel source) and /usr/src/linux # ln -s /usr/src/kernel-source-2.4.22 /usr/src/linux Now configure the kernel # cd /usr/src/linux # make menuconfig (or xconfig/gconfig) A sample config file is included (examples/kernel.2.6.config) Once the kernel is configured, its time to compile. Note: see section 3.e for information on how to get ACPI working # make-kpkg clean # make-kpkg --revision i8100.1.0 kernel_image The 'i8100.1.0' revision tag can be replaced with anything the reader desires but this is how I decided to oragnize it. A subsequent kernel compile would have revision tag 'i8100.1.1' and so on. With any luck everything should compile. Once the compilation is complete, presumably without any errors, it is time to install the new kernel and its modules. # cd /usr/src # dpkg -i kernel-image-2.6.4_i8100.1.0_i686.deb III. Lilo The kernel packages should take care of setting up lilo and installing the new boot sector. However, I like to check /etc/lilo.conf just to make sure. A word of caution, make sure that you have a line in lilo.conf that reads: append="hdb=ide-scsi" otherwise, you cd-rom drive will not function. (see examples/lilo.conf) If necessary, run lilo again. # lilo -v Make sure not errors are displayed and reboot. With a little bit of luck everything should work just fine and the kernel should boot up. Ill leave it as an exercise to the reader to fix any problems that crop up. b. XFree86 The first step to getting a functioning x-windows desktop is to install the required software. # apt-get install x-windows-system For a while I have been a little partial to the KDE window manager but at the time of writing the KDE packages are broken. Such is the risk you run when using the 'unstable' tree. I decided to try out Gnome and, so far, I like what I see. # apt-get install gnome-core Another option is to do # apt-get install gnome but that just installs a whole bunch of extra bloat that I didn't want -- gnome-office, evolution, balsa, bluefish, etc. Before X is ready to be stared up, the nvidia drivers must be compiled. There are two ways to do this. (1) apt-get the nvidia-kernel-source package, which I would suspect would require a make-kpkg modules_image or (2) go to http://www.nvidia.com and download their linux installer which will compile the module for you. If I recall correctly, I chose option 2 in order to insure that I had the latest and greatest drivers. My memory is kinda fuzzy on this and I should probably look into it a bit further. Once the appropriate modules are compiled, it is time to configure the beast it self. # emacs -nw /etc/X11/XF86Config-4 You will notice that I switched to using emacs from vi. Its just a personal preference, feel free to use what ever text editor makes you happy. (See examples/XF86Config-4) Now that that is done, lets tell the system that we would like to use gnome as the primary window manager # emacs -nw ~/.xsession Paste the following into the file (not including the 'Copy' lines): ------------- Copy --------------------- #!/bin/sh exec /usr/bin/gnome-session ----------- End Copy ------------------- The last step is to see if everything goes as planned. # startx Otherwise, fix any problems that arise and try again. c. Sound For the sound system I will be using the ALSA project's drivers and software. The kernel modules should already have been compiled and installed from section 3.a. Its a ESS Technology Maestro3 board which should be automatically detected. # apt-get install alsa-base alsa-utils alsa-xmms alsa-xmms is optional, and should only be installed if you wish to use xmms. No additional configuration should be required. d. Wireless Networking I have a Netgear MA401 802.11b wireless PCMCIA network card. With the compiled pcmcia-cs modules, it pretty much worked out of the box. A little bit of tweaking was required to the /etc/pcmcia/wireless.opts file and /etc/pcmcia/network.opts files in order to match my setup but both files are well documented. (see examples/wireless.opts and examples/network.opts) e. ACPI Support (Kernel 2.6) ACPI support is necessary to allow the laptop to be suspended (both to ram and disk). The following steps chronicle the path to getting a functional ACPI implementation on Kernel 2.6. First step is to obtain a functioning version of the ACPI DSDT for the Dell Inspirion i8100 (A15 bios). This can be found at (http://acpi.sourceforge.net/dsdt/view.php) or in the examples directory (Dell-Inspiron_8100-A15-custom.asl). Next we need to compile the DSDT in to a hex file. To do this we need the Intel ACPI compiler, available at (http://www.intel.com/technology/IAPC/acpi/downloads.htm). Note: the already compiled file is availble in the examples directory as well (Dell-Inspiron_8100-A15-custom.hex) Next step is to patch the kernel to use a static DSDT hex file override. A copy of the patch is in the examples directory (osl.diff). Issue the following commands: # cd /usr/src/linux # patch -p1 < /path/to/osl.diff # cp /path/to/Dell-Inspiron_8100-A15-custom.hex /path/to/linux/include/acpi/dsdt_table.h Now recompile the kernel as per section 3.a.II. 4. Credits a. Google (http://www.google.com) My number one credit goes to google. Without which I would never have been able to find any of this information. b. Linux on Laptops (http://www.linux-laptop.net) This excellent resource has a number of great howto's like this one for the Inspiron i8100. Most of which I read and many of which gave me the ideas, tips, and tricks necessary to make this possible. c. Unknown There was another great howto that I found for the Inspirion i8100 but I seem to have lost the link. d. HOWTO: Fix Common ACPI Problems http://forums.gentoo.org/viewtopic.php?t=122145 5. Changelog --- Date - Version --- --- 07/14/2005 – 1.0 --- Fixed Typo's --- 12/29/2003 - 0.1 --- First draft