Testimony: Getting Linux on the Dell Inspiron 8500

What's on this page?


Background and Disclaimer

The following is a summary of what I did to get Linux running on the Dell Inspiron 8500 (I8500). This is here mainly to help encourage others that yes, it is do-able and it really wasn't too, bad. I made a few mistakes along the way. So hopefully you can learn from my mistakes. That being said, use at your own risk. I am just sharing what I have done. I make no claim as to how wise those steps were. So use a little caution.

First, I don't have everything going yet. Also, I wasn't able to figure much on my own. Fortunately there are two very good starting points: Graeme Wilford's Inspiron 8500 and Mike Hardy's Lattidue D800. For me neither one on their own made me fully comfortable in getting everything going. But after going through both of them, I had a better feeling of what to do.

I will be giving a very brief order of what I did. For more background on the why, you should check out both of these sites. Also, as I want to be multi-booting between Linux and XP, I will list some experiences on this too.


Introduction

The system came with:


Preparation

First before you do anything else there are some decisions you will need to make, especially if you are considering wiping out XP completely and installing Linux on the whole drive. Even if you are planning to share XP and Linux with part of the drive there are some things to ponder.

The Red Hat CDs will only give you a barely functional laptop. There are other things you will need to download to make it more functional. On of those things you will need are some files to get the internal network card working. In otherwords you are approaching a catch-22 situation: You need to have the network card working to be able to download files; You need to download files to get the network card working!

So here are some options:

So now with the Broadcom ethernet files handy, I was ready to start dividing up the hard-drive.

The Dell comes with two partitions on it. The first partition contains some of Dell's diagnostic programs and is around 31 Megs in size. The second partition is for XP and takes up the rest of the 27G drive.

So I wanted to create a multi-boot system with both Linux and XP. What I didn't want to do was wipe the drive, repartition it, and re-install XP. So enter PartitionMagic from PowerQuest.

With PartitionMagic I was able to non-destructively steal some space from the XP partition and create several more partitions to be used for my Linux install.

When I was finished, I ended up with a drive that looks like:

/dev/hda1             1         4     32098+  de  Dell Utility
/dev/hda2           643      3447  22531162+   7  HPFS/NTFS
/dev/hda3   *         5       642   5124735   83  Linux   #/
/dev/hda4          3448      3648   1614532+   f  Win95 Ext'd (LBA)
/dev/hda5          3448      3513    530113+  82  Linux swap
/dev/hda6          3514      3648   1084356   83  Linux   #/home
Note that the linux partition is the boot partition which uses LILO. From here I can multi-boot between Linux and XP. Or if there is some need I can use the linux fdisk command to change the boot partition back to XP the the machine will only boot into XP and behave just like it did when I received it from Dell.

PartitionMagic comes with PQMagic and BootMagic to allow one to switch between active partitions to boot from. After playing around with them, I decided that I didn't want to use them. One of them seems to hide the partitions from one OS from the other. Which means, I couldn't use one to boot to Linux and then use Lilo to selectively boot between Linux and XP.

These programs do not come with any kind of install program. I was was forced to break open my XP install disk that came with the laptop, go into Rescue mode, and do a 'fixboot' and 'fixmbr' to put these areas back into their proper states.


Installation

As of June 7th, 2003 there was no current Red Hat installation that would recognize and install everything on the I8500 completely. So I had to do everything piecemeal.

I started with the Red Hat 9.0 install CDs. The first CD, was able boot up into the RedHat install menu and perform a installation. I believe I picked the X version of the install menus. Just following the instructions that the installation CD provides. It should be fairly self-explanatory. So I won't really mention any of the details except about the disk setup section.

When the DiskDruid came up, the harddrive was already setup the way I wanted (I already divided it up with PartitionMagic while I was under XP, remember?) I only named the mount points:

/dev/hda3   /       #my linux root partition
/dev/hda6   /home   #its own so OS changes won't effect my work areas
/dev/hda5   swap    #diskdruid already noticed that this was swap
I told diskdruid to format these partitions and to check for bad blocks.

June 06, 2003: However, it reported something back like "that there were bad blocks and to not use this partition." And it aborted the installation process. I had always thought that this format and check would mark the bad blocks and not use them, not just check for bad blocks! I decided to ignore the message, as I didn't have much choice. So I restarted the installation process, but this time when it came time to format, I didn't check the "check for bad blocks" box.

As far as Boot Managers, go, I went with LILO. It is the one I am most familiar with. So when the time came to select boot managers, I selected LILO. Also soon after that there is a page that says it is going to install the boot manager at the /MBR.

I didn't want it there because I wanted to have the option of changing the active partition back to XP and have the system boot up XP directly just like it did when I received it from Dell.

So on that the bottom of that page, there is an Advanced button. This took me to a different page when I selected 'Next' to allow me to select have LILO placed at the head of the root partition (/dev/hda3). Also you can select to add other partitions for LILO to boot from. Once the install was complete and rebooted, upon coming up it asks me which OS do I want to run: Linux or XP.

Also, note my partitions again. Both Linux / and XP are below 8Gigs (1024 cylinder). Because of my particular boot requirements, I felt it would be more of a sure thing that I could boot into either OS if I met this criteria. I am pretty sure if I just decided to let LILO reside on the /MBR that I would have been OK letting the linux root partition start above the 8G limit.

After nearly 50 minutes (this is because the drive was only being used at 2MB/sec! There is a patch to fix this) I had a system that was running RH 9.0 linux. Though barely.

At this point, with just the standard RH9.0 CDs: I had a working keyboard, touchpad, and I believe X was kind of working (albeit at something like 800x600 which was this tiny rectangle in the center of the laptop display via the nv driver that came with RH9 . The rest was just black.).

So nothing left but to muck around with the kernel and some configuration files. Time to find great nuggets of information from: I wasn't able to figure much on my own. Fortunately there are two very good starting points: Graeme Wilford's Inspiron 8500 and Mike Hardy's Lattidue D800 sites!

There were three immediate main goals that I had at this point. The order depends on which is a higher priority to you. Each has its advantages and disadvantages:

  1. 1. Wouldn't it be great to have X fully functional at this point?
    This would allow one to use that mythical 19200x1200 display you have been staring at for so long. Then you can have a few windows up for reference and do things like building kernels under X via make xconfig.
    However how are you going to do that without your internal network card working? So somehow you need to get the nVIDA drivers (assuming that is the video card that you have) onto your system. There were a couple of options that I thought of:
    • Use another system to download the nVIDA drivers (and maybe the network card, too) and burn a CD to read from.
    • Maybe you have an PCMCIA network card laying around, who knows maybe the system will just recognize it.
    • If you had the floppy drive and another machine, I believe the network driver will fit on a disk.
    I had another system, So I downloaded all of the kernel drivers and config files. Burned a CD and mount it on the I8500.
  2. Get the built-in Ethernet card working
  3. Apply the patch to speed up the hard-drive access.
I essentially went in the order of: get the full res of the display working under X, get the Ethernet working, and speed up the drive.

Tweaking

Ethernet - Broadcom

  1. Downloaded the Broadcom Ethernet driver: v1.0.2 Graeme's site.
  2. (from the directory you saved the tar file:) mkdir bcm4400; cd bcm4400; tar zxvf ../bcm-4400-1.0.2.tar.gz # to extract the files
  3. cd src; make ; make install
      This bit isn't the best but it is what I did to get things up and running.

    • In /etc/rc.d/rc.local add:
      insmod FULLPATH_TO/bcm4400/src/bcm4400.o #Where FULLPATH_TO is the path to the driver
    • In /etc/modules.conf add:
      alias eth0 bcm4400
    • Now configure up your network (your on your own for that)
    • If you want to test things out without rebooting the following command should to the trick
      service network restart

Xserver & nVIDIA Geforce4 4200 GO -> 1920x1200

  1. Download the nVIDIA driver
  2. cd to where ever you downloaded the nVIDIA files.
  3. sh NVIDIA-Linux-x86-1.0-4363.run
    Follow the instructions that the install script displays

    NOTE: With this method, everytime you build a new kernel, you will need to re-run this script before X will work again. It would be nice if this was placed in the kernel somewhere and auto installed everytime modules are installed.

  4. You will need to modify the /etc/X11/XF86Config file to suit your situation. Here is my XF86Config file and you may want to compare Graeme's config file for reference, too.
    Two things to note about mine:
    1. I am using a serial mouse. Yes, the I8500 has the much needed paraell port instead of then obsurce PS/2 port. So I have a DB9 converter on my PS/2 mouse.
    2. I am using modmap for remapping my caps lock with my right Control key.

Kernel building

Ok we have reached a point where there is little we can do to improve the system without downloading, patching, and building Linux kernels.

What are we hoping to gain?

Speed up the harddrive from 2MB/s to closer to 30MB/s and ACPI power mangement were the main things I was looking for.

You could either do it piecemeal or just apply all of the changes into the same kernel source. I was a little cautious and built a new kernel for each stage. The main reason was if there was a problem, I would have a better feel as to what stage I messed up in.

If you haven't had much experience building kernels, then you should familiarize yourself with the process by check out the Linux Kernel HOWTO before continuing!

Hard disk IDE patch

From Mike Hardy's site, I found him recommending the 2.4.21-rc2-ac2 kernel. Which is what I went with. (Also, I picked up most of these steps from: here)

  1. Become root and cd /usr/src
  2. Get the linux-2.4.20 kernel
  3. tar jxvf linux-2.4.20.tar.bz2 # to unpack this new kernel
  4. Get the 2.4.20-rc2 patch
  5. bunzip2 patch-2.4.21-rc2.bz2 # to unzip the patch
  6. cd linux-2.4.20; patch -p1 < ../patch-2.4.21-rc2; cd .. # To patch the kernel
  7. Get the 2.4.21-rc2-ac2 patch
  8. bunzip2 patch-2.4.21-rc2-ac2.bz2 # to unzip the patch
  9. cd linux-2.4.20; patch -p1 < ../patch-2.4.21-rc2-ac2; cd.. #To patch the kernel
  10. mv linux-2.4.20 linux-2.4.21-rc2-ac2 # rename kernel to match its version
  11. ln -s linux-2.4.21-rc2-ac2 linux-2.4 # make a symbolic link of new kernel

    At this point you can either build the kernel as it is or add more patches (to get the Power Management working) patches before building the kernel. (If you want to stop where you are now and just build the kernel as it is skip to building the kernel. As it stands right now the kernel source can build improved support for the hard-drive and partial ACPI control. The main thing that is lacking is the DSDT)

    DSDT - Differentiated System Description Tables

    This is what I picked up from Graeme's DSDT section.
    • Create some working directory
    • cd to this new directory
    • Download Intel's iasl tool: iasl-linux-20030228.tar.gz into this directory
    • tar zxvf iasl-linux-20030228.tar.gz # to extract this file
    • cat /proc/acpi/dsdt > dsdt.dat
    • iasl-linux-20030228/iasl -d dsdt.dat
      This creates a disassembled file named: dsdt.dsl
    • iasl-linux-20030228/iasl -tc dsdt.dsl
      This created a file called: dsdt.hex.
      Also, I got 4 Warnings about "Unknown reserved name (_SOD)". Which I ignored. Hopefully this was ok.
    • cp dsdt.hex /usr/src/linux-2.4.21-rc2-ac2/drivers/acpi/tables/acpi_dsdt.c
    • download and save Graeme's Custom-DSDT.diff patch.
    • From the directory you saved the Custom-DSDT.diff patch:
      cat Custom-DSDT.diff | (cd /usr/src/linux-2.4 ; patch -p1)
      Will install Graeme's DSDT patch.

    CPU frequency and voltage scaling

    • Download Graeme's speedstep patch
    • From the directory where you saved the SpeedStep patch
      cat SpeedStep.diff | (cd /usr/src/linux-2.4; patch -p1)

    Now that we are done patching the kernel we are ready to build and install the kernel

  12. cd /usr/src/linux-2.4.21-rc2-ac2 #We will be working in the kernel directory
  13. Kernel configuration

    Either:

    • config the kernel manually: make xconfig (assuming you are running under X)

      or

    • As a frame of reference here is Graeme's kernel config file and my mine config file.
      To use either of this without any adjustments:
      • Copy one of these files to /usr/src/linux-2.4/.config
      • make oldconfig

      Or if you want to customize one of them:

      • Copy one of these files as /usr/src/linux-2.4/i8500.config
      • make xconfig
      • Select "Load configuration"
      • Enter the name i8500.config
      • Now customize it to your liking.

      NOTE to 'make xconfig' users: the kernel code has some problems that prevent it from working. When you do type it, you will see something like:

      rm -f include/asm
      ( cd include ; ln -sf asm-i386 asm)
      make -C scripts kconfig.tk
      make[1]: Entering directory `/usr/src/linux-2.4.21-rc2-ac2/scripts'
      gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkparse.o tkparse.cgcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkcond.o tkcond.c
      gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkgen.o tkgen.c
      gcc -o tkparse tkparse.o tkcond.o tkgen.o
      cat header.tk >> ./kconfig.tk
      ./tkparse < ../arch/i386/config.in >> kconfig.tk
      drivers/ide/Config.in: 69: can't handle dep_bool/dep_mbool/dep_tristate condition
      make[1]: *** [kconfig.tk] Error 1
      make[1]: Leaving directory `/usr/src/linux-2.4.21-rc2-ac2/scripts'
      make: *** [xconfig] Error 2
      
      
      The culprit is drivers/ide/Config.in. I did the following:
      Commented out line: 69 
          #dep_bool     '    Special FastTrak Feature' CONFIG_PDC202XX_FORCE
      
      
       Just before this section
      
      # no isa -> no vlb
              dep_bool '  Other ISA/VLB IDE chipset support' CONFIG_IDE_CHIPSETS $CONFIG_ISA
            if [ "$CONFIG_IDE_CHIPSETS" = "y" ]; then
               comment 'Note: most of these also require special kernel boot parameters'
               bool '    Generic 4 drives/port support' CONFIG_BLK_DEV_4DRIVES
               dep_tristate '    ALI M14xx support' CONFIG_BLK_DEV_ALI14XX $CONFIG_BLK_DEV_IDE
               dep_tristate '    DTC-2278 support' CONFIG_BLK_DEV_DTC2278 $CONFIG_BLK_DEV_IDE
      
      I added the line:
       bool '  Other IDE chipset support' CONFIG_IDE_CHIPSETS
      
      This should be line 130
      
      After those two changes, make xconfig should work again.
      
  14. Build the kernel
    make clean; make dep; make bzImage; make modules; make modules_install
  15. Install the kernel
    • cp System.map /boot/System.map-2.4.21-rc2-ac2
    • cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.21-rc2-ac2
  16. Set up to boot up with your new kernel. This is what I did my my LILO setup:
    • Add an entry to /etc/lilo.conf: This is my lilo.conf file looks like.
    • /sbin/lilo # to make lilo see my changes.
  17. Before you reboot to test out your kernel, you should have a recovery method in mind.
    • If you have a floppy drive, hopefully you made a rescue disk when the installed asked you to
    • The first CD of the RH9 can be used as a boot rescue disk
    • If your laptop came with a CD burner, then you could make your own bootable rescue disk.

Modem - PCTEL2304WT

From Graeme's site I found a starting point for getting the internal modem working. He listed two versions of the driver: pctel-0.9.6 and pctel-0.9.7. I went with the former driver as the link to the later wasn't working when I was trying to get my modem going.

  1. Downloaded and extracted: pctel-0.9.6.tar.gz
  2. configure --with-hal=i8xx
    This gave me the following message:

    checking for Linux kernel version >= 2.4.0... ./configure: line 3344: test: 2-rc2: integer expression expected no
    configure: error: You should have linux kernel >= 2.4.0 installed

    This failed because I am using the 2.4.21-rc2-ac2 kernel and the script doesn't account for a double - in the name.

    There are two lines in the configure script that look like:

    real_kernel_version="`eval echo $KERNEL_VERSION | sed -e 's/-[a-zA-Z0-9][^-]*$//g' | awk -F'.' '{ print $1"."$2"."$3 }'`"

    This resolves to: 2.4.21-rc2

    I added the following line after each of those two lines:

    real_kernel_version="`echo $real_kernel_version | sed 's/-[a-zA-Z0-9]*$//g'`"

    Which will resolve to 2.4.21 and then the rest of the script if happy.

  3. make
    During make I got the following message:

    pctel-0.9.6/src/ptserial/ptserial.c:2813: invalid operands to binary ==

    if (tty->count == 1 && (state->count != 1)) {

    Changed the line to be:

    if (atomic_read(&(tty->count)) == 1 && (state->count != 1)) {

    This change was needed because the tty code changed to atomic counters to fix a race.

  4. make install
  5. Here is what my /etc/modules.conf looks like:
    # pctel modem
    alias char-major-62 ptserial
    below ptserial pctel
    # force install due to gcc2/gcc3 complaints from insmod (as per pctel FAQ)
    install pctel insmod --force pctel
    # irq/iobase/iobase1 derived from lspci -v
    # country code 1 is US  found in FAQ
    install ptserial insmod -f ptserial irq=11 iobase=0xb400 iobase1=0xb080 country_code=1
    
    
  6. Note: the device for the modem is /dev/ttyS15.
    works just fine with PPP.

What is working

So after what is said and done, what exactly do I have working?


Not working at all or very well


Haven't Tried Yet So far I haven't tried out any of the following:
  • Firewire
  • Modem
  • USB
  • Infrared
  • Mini-PCI
  • PCMCIA

Life without Floppies

As my I8500 didn't come with a floppy drive, it took me a little while to get used to the idea of a world without floppies.

Normally having a bootable floppy around, to boot back into Linux if I screwed something up gave me a piece of mind. Even the RH installation asks (and recommends) for you to build a bootable floppy image, so you can always get back to your system if you mess something up.

As I didn't have much other choice, I looked into creating a bootable CD which contained my current kernel and misc. utilities.

I came across Mkcdrec. This is just what I was looking for. So I downloaded: mkCDrec_v0.7.1_utils.tar.gz and mkCDrec_v0.7.2.tar.gz from the site. From within the mkcdrec directory, I edited the Config.sh file to meet my needs.

Here is my Config.sh file in the mkcdrec directory.

The main thing to note is that, with my current setup, I couldn't get my IDE burner to be picked up as a SCSI device, so I had to tell the script that I didn't have a CD-burner. With this option set it doesn't actually burn the CD. The script just builds up an ISO file in the specified directory. Then I used XCDRoast to burn the image on CD.


Tal Lancaster
Last modified: Sat Jun 28 22:00:01 PDT 2003