Linux Installation and Configuration Notes

 

Contents

This page contains random notes about my experiences while installing and using Debian Linux (Version 3.1) on a Dell Inspiron 8600 laptop. Installation notes for other portable devices can be found at TuxMobil. Installation notes for Woody (Version 3.0) on a Dell Poweredge 400SC server are also available

 
Debian Sarge (3.1) Installation
 
[Back to Top of Page]

Hardware Specs

  • Dell Inspiron 8600
  • Intel Pentium (M) 1.5GHz
  • 15.4" Widescreen LCD
  • 768 MB RAM
  • VGA compatible controller: nVidia Corporation NV34M [GeForce FX Go 5200] (rev a1)
  • Ethernet controller: Broadcom Corporation BCM4401 100Base-T (rev 01)
  • Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03) (aka Dell 1350 Wireless Network Adapter)

Note that if you are unsure exactly what hardware is installed on your system, the command lspci should reveal some information.

[ Comments () ]
 
[Back to Top of Page]

Basic Installation Steps

See also http://resolute.ucsd.edu/diwaker/articles/linux-dell-8600.html and http://ltswww.epfl.ch/~dsanta/resources/dell-i8500-linux#nvidia.

  1. Download a Sarge (Debian 3.1) installation ISO and burn it to CD.
  2. If you want to keep your existing Windows partition then you will need to re-partition your hard drive. Use a tool such as Partition Magic for this task. Things to note:
    • Linux does not work well with the Windows XP NTFS filesytem, so if you want to share data between the operating systems you will need to create a FAT32 filesystem.
    • When re-partitioning, you should create a Linux boot partition (about ten megabytes) near the beginning of the hard disk. If your boot loader gets installed near the back of the disk then you will not be able to boot from it.
    • If you are not planning to keep a Windows partition then ignore this step and use the installer's partitioning tools during the installation process.
  3. Boot the server using the new CD image. Note that you may have to adjust the system BIOS settings so that you can boot from CD.
  4. Follow the instructions on screen, noting the following:
    • To install a 2.6 kernel you will want to enter linux26 at the first prompt of the install CD.
    • Using the installer's partition tools, I created three Linux partitions: a boot partition (10 MB should be large enough), a Linux swap partition (should be the same size as the amount of RAM on your system), and a Linux ext3 partition (mounted as /). My final partition table looked like the following (fdisk -l):
      Disk /dev/hda: 60.0 GB, 60011642880 bytes
      255 heads, 63 sectors/track, 7296 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      
         Device Boot      Start         End      Blocks   Id  System
      /dev/hda1               1           6       48163+  de  Dell Utility
      /dev/hda2   *          24        1551    12273660    7  HPFS/NTFS
      /dev/hda3            1552        7296    46146712+   f  W95 Ext'd (LBA)
      /dev/hda4               7          23      136552+  83  Linux
      /dev/hda5            1552        6013    35840983+   b  W95 FAT32
      /dev/hda6            6014        6108      763056   82  Linux swap
      /dev/hda7            6109        7296     9542578+  83  Linux
      
      Partition table entries are not in disk order
  5. After installation is complete you will want to download the latest nVidia driver for Linux. The file can be downloaded from the nVidia web site. Follow the instructions in the README file, as well as the notes below.
  6. After installation you can pick and choose the packages for your system using dselect or a similar tool.
[ Comments () ]
 
[Back to Top of Page]

nVidia Driver Setup

To take full advantage of the nVidia GeForce 5200 card you will need to install nVidia's binary driver:

  1. Download the driver from nVidia's web site. Read the README file in the download bundle.
  2. Using dselect or a similar tool, install the kernel-source and kernel-headers packages.
  3. Unzip the kernel sources and compile:
    1. cd /usr/src/
    2. Unzip the kernel sources: bunzip2 /usr/src/*.bz2
    3. Copy your current kernel config file into the kernel source directory: cp /boot/config-n.n.n /usr/src/kernel-n.n.n/.config
    4. cd /usr/src/kernel-n.n.n
    5. Compile the kernel (but do not install): make
  4. Install the nVidia driver using their installer script.
  5. If xFree86 was already installed, reconfigure it to use the nVidia driver (not the nv driver): dpkg-reconfigure xserver-xfree86

Note that every time the kernel is updated these steps must be repeated, otherwise the nVidia driver may fail to load.

[ Comments () ]
 
[Back to Top of Page]

XFree86 Configuration

From http://ltswww.epfl.ch/~dsanta/resources/dell-i8500-linux#nvidia.

# XF86Config-4 (XFree86 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 XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# This file is automatically updated on xserver-xfree86 package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xfree86
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands as root:
#
# cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom
# md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum
# dpkg-reconfigure xserver-xfree86

Section "Files"
FontPath "unix/:7100" # local font server
# if the local font server has problems, we can fall back on these
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/cyrillic"
FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/Type1"
FontPath "/usr/lib/X11/fonts/CID"
FontPath "/usr/lib/X11/fonts/Speedo"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"
EndSection

Section "Module"
Load "GLcore"
Load "bitmap"
Load "dbe"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "record"
Load "speedo"
Load "type1"
Load "vbe"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/psaux"
Option "Protocol" "PS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
Identifier "Generic Mouse"
Driver "mouse"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection

Section "Modes"
# Here we define 16:10 modes
Identifier "16:10"
# 1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz
ModeLine "1280x800" 83.5 1280 1344 1480 1680 800 801 804 828
# 1280x800 @ 75.00 Hz (GTF) hsync: 62.62 kHz; pclk: 107.21 MHz
Modeline "1280x800" 107.21 1280 1360 1496 1712 800 801 804 835
# 1280x800 @ 85.00 Hz (GTF) hsync: 71.40 kHz; pclk: 123.38 MHz
Modeline "1280x800" 123.38 1280 1368 1504 1728 800 801 804 840
# 1280x800 @ 100.00 Hz (GTF) hsync: 84.80 kHz; pclk: 147.89 MHz
Modeline "1280x800" 147.89 1280 1376 1512 1744 800 801 804 848
EndSection

Section "Device"
Identifier "Generic Video Card"
Driver "nvidia"
VendorName "Videocard vendor"
BoardName "NVIDIA GeForce 4 (generic)"
VideoRam 32768
# nvidia specific options
Option "UseEdidFreqs" "yes" # Use DCC
#Option "FlatPanelProperties" "Scaling = centered"
Option "NoLogo" "yes"
EndSection

#Section "Monitor"
# Identifier "Generic Monitor"
# HorizSync 28-50
# VertRefresh 43-75
# Option "DPMS"
#EndSection

Section "Monitor"
Identifier "Generic Monitor"
VendorName "Any"
ModelName "Generic 1280x800"
UseModes "16:10"
HorizSync 31.5 - 82
VertRefresh 50 - 90
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "Generic Monitor"
Option "dpms"
DefaultDepth 24
SubSection "Display"
Depth 24
#Virtual 1680 1050
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

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

#Section "DRI"
# Mode 0666
#EndSection
[ Comments () ]
 
[Back to Top of Page]

Broadcomm 1350 Wireless Driver

There is no Linux driver available for the Broadcomm 1350 Wireless card, so you must use NdisWrapper and the Windows driver:

  1. Using dselect or a similar tool, install the wireless-tools package.
  2. Install NdisWrapper (also see the NdisWrapper Wiki):
    1. Add deb http://ndiswrapper.sourceforge.net/debian ./ to the /etc/apt/sources.list file.
    2. Using dselect or a similar tool, install the ndiswrapper package.
    3. Download the latest Broadcom Wireless driver for Windows from the Dell support web site.
    4. Read the NdisWrapper install instructions: http://ndiswrapper.sourceforge.net/wiki/index.php/Installation.
    5. Unpack the NdisWrapper source: tar -zxvf /usr/src/ndiswrapper-source.tar.gz
    6. Install a link to the kernel headers: ln -s /usr/src/kernel-src-n.n.n /lib/modules/n.n.n/build
    7. cd /usr/src/modules/ndiswrapper/
    8. make install
    9. Install the Broadcomm driver for Windows: ndiswrapper -i inf-file-location/ar/bcmwl5a.inf
    10. Install NdisWrapper as a module: ndiswrapper -m
    11. Verify that NdisWrapper installed correctly: ./ndiswrapper -l The output should be Installed ndis drivers: bcmwl5a driver present, hardware present
    12. modprobe ndiswrapper
    13. Verify that the driver loaded by looking at the /var/log/syslog file contains a line like ndiswrapper version 0.12 loaded (preempt=yes,smp=no). Also verify that it loaded your wireless card by validating that a second line appears indicating the card was loaded.
    14. Add ndiswrapper to /etc/modules
  3. Run iwconfig and verify that the wlan0 interface contains details for your wireless card.
  4. To see available networks, run iwlist wlan0 scan.
  5. Set the mode for your network based on the output from the iwlist command. In most cases it will be "Managed": iwconfig wlan0 mode Managed.
  6. Set the security key for the interface using iwconfig wlan0 key restricted key. If there is no key then skip this step.
  7. Set the network name for your network based on the output from the iwlist command: iwconfig wlan0 essid name.
  8. Add the following to /etc/network/interfaces:
    auto wlan0
    wireless_keymode restricted
    wireless_key KEY
    wireless_essid SSID
[ Comments () ]
 
Application Configuration
 
[Back to Top of Page]

Tomcat

The first step required to get Tomcat running is to install a JDK:

  1. Download a Linux JDK package from Sun.
  2. Make the downloaded file executable by executing the command "chmod 755 filename".
  3. Execute the file, which will uncompress it into the current directory. If you would prefer to have it in a different directory simply move the uncompressed files (ie "mv jdk1.5.0 /usr/share/jdk1.5.0/").
  4. Update environment variables:
    • In /etc/profile add the line JAVA_HOME=/JDK-install-folder/. In addition, update the PATH variable to contain the /JDK-install-folder/bin/ directory.
    • If Tomcat is installed, update the /etc/default/tomcat4 file to contain the line JAVA_HOME=/JDK-install-folder/.

Once the JDK is installed Tomcat can be installed by doing the following:

  1. Using dselect, install the following packages:
    • tomcat4
    • libtomcat4-java
    • tomcat4-webapps - Sample Tomcat applications (optional)
    • libapache-mod-jk - Apache connector module for Tomcat (optional)
  2. Once installed, the Tomcat configuration information will be in the /etc/tomcat4/ directory. Webapps configuration files are installed into the /var/lib/tomcat4/webapps/ directory and the actual webapps go into /usr/share/tomcat4/server/webapps/.
  3. To test the installation try viewing the http://localhost:8180/ page. If the page comes up, Tomcat is installed successfully. If the page does not come up, try running "/usr/bin/tomcat4 start" to view any error messages.

The libapache-mod-jk package allows Tomcat applications to be served using Apache as part of a normal web site (ie you don't need to specify port 8180 in the URL). To use libapache-mod-jk:

  1. Update the /etc/apache/httpd.conf file as follows:
    # mod_jk
    JkWorkersFile /etc/libapache-mod-jk/workers.properties
    JkLogFile /var/log/apache/mod_jk.log
    JkLogLevel info
    JkLogStampFormat "[%a %b %d %H:%M%S %Y] "
    JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
    JkRequestLogFormat "%w %V %T"
    JkMount /examples/* local
    If any other webapps are deployed then an additional entry is required in the mod_jk.conf file of the form "JkMount /myapp/* local.
  2. View http://your-site/examples/jsp/ and verify that the example servlets are running.

Once everything is running the following is worth noting:

  • Tomcat logs are found in /var/log/tomcat4/.
  • I kept getting a Java error about a missing file "/usr/bin/kaffe". I've got no clue what the hell that is, but some package installed a /usr/bin/java script that was calling /etc/java-vm. Modifying that file to contain only the line /JDK-install-folder/bin/java solved the problem. Note that this must be the topmost and ONLY line in the file.

mod_jk: see gpl.netixia.com/openxchange/openxchange-sarge-howto.html

[ Comments () ]
 
[Back to Top of Page]

Postgres SQL Database

I've not yet updated this section, but it is similar to the steps required for Woody, which are here.

To start Postgres: /etc/init.d/postgresql start

[ Comments () ]
 
[Back to Top of Page]

ipcheck

For more info please read www.jbisbee.com/linux/dyndns/.

  1. Using dselect or a similar tool, install the ipcheck package.
  2. Create a new directory to hold the ipcheck data: mkdir /etc/ipcheck/
  3. Run ipcheck once with the --makedat option:
    /usr/sbin/ipcheck.py -d /etc/ipcheck --makedat -r checkip.dyndns.org:8245 -l -c login password mountaininterval.org
    Note that the above script is for custom DNS. the -c option is not required if you are using a domain of the form mydomain.dyndns.org.
  4. Update CRON to regularly run the ipcheck script:
    1. Change to the root user: su.
    2. Tell crontab that you want to use vi as your editor:
      EDITOR=vi
      export EDITOR
    3. As root, type crontab -e to edit the current CRON schedule.
    4. Add the following to crontab using vi (this will run the script each two minutes):
      */2 * * * * /usr/sbin/ipcheck.py -d /etc/ipcheck -r checkip.dyndns.org:8245 -l -c login password mountaininterval.org
      Note that the above script is for custom DNS. the -c option is not required if you are using a domain of the form mydomain.dyndns.org.
[ Comments () ]
 
[Back to Top of Page]

Webalizer Web Log Analyzer

In the past I used analog and rmagic for web log analysis, but after discovering Webalizer I switched immediately. An example of the statistics produced is available for www.mountaininterval.org.

The software can be installed from Debian by installing the webalizer package. After install the configuration file is located in /etc/webalizer.conf. I made two important changes to this file:

# Hide the statistics generated from within the site. This string will
# match anything that contains "mountaininterval.org"
HideSite mountaininterval.org

# Hide referrals from this site. This string will match anything that
# contains "mountaininterval.org"
HideReferrer mountaininterval.org

Additionally, to generate reports for older log files I ran the following command:

/usr/bin/webalizer -c /etc/webalizer.conf -q log-file-name

Note that you must start with the oldest log files first due to Webalizer's incremental processing. If you run webalizer and later want to run it on older log files, first delete the webalizer.history and webalizer.current files that will be found in the output directory.

[ Comments () ]