TuxMobil listed

Debian "Sarge" on an Asus M6842Ne notebook (check here for other installations)

Software/firmware versions (as of March 13, 2006)
  Official "Sid" "Etch" "Sarge"
Asus' BIOS 208Ae N/A
Linux kernel 2.6.15.6 (stable)
2.6.16-rc6 (prepatch)
2.6.16-rc6-git1 (snapshot)
2.6.15-8 2.6.8-16sarge1
2.6.15-7bpo1
swsusp2 kernel patch 2.2 (for kernel 2.6.15.1)
2.2.0.4 (for kernel 2.6.16-rc6)
N/A
ATI's fglrx driver 8.23.7 8.20.8-1.1 N/A
Rootkit Hunter 1.2.8 1.2.8-1 N/A
Kismet 2005-08-R1 2005.08.R1-1.2+b1 N/A 2005.04.R1-1sarge1
Kismet Log Viewer 0.9.7 N/A
Skype 1.2.0.18 N/A
Sun's Java JDK/JRE 5.0 Update 6 N/A
NetBeans 5.0 N/A

Actual configuration (kernel and drivers)

Now working on

Changelog

* March 8, 2006 * March 5, 2006 * February 23, 2006 * February 14, 2006 * February 2, 2006 * January 26, 2006 * January 24, 2006 * December 20, 2005 * December 15, 2005 * December 1, 2005 * November 28, 2005 * November 15, 2005 * November 7, 2005 * October 25, 2005 * August 22, 2005 * August 15, 2005 * June 6, 2005
IMPORTANT

Usage

I use this notebook for work (system/network administration and web/database development) and for fun (music, movies and sometimes games). I use KDE as window manager, Mozilla Firefox for browsing, Evolution as email client and organizer, BitchX for IRC channels, Psi for other instant messaging protocols, Skype for internet telephony, K3b for CD/DVD burning, VLC for watching DVDs and Juk for listening to music.

Operating Systems

This notebook runs Debian GNU/Linux most of the time. I also use a partition for the preinstalled Windows XP Home and another one to test other distributions or BSD flavours. See below for details.

Partitions

I use to install linux using only / and /home partitions. The partition table is set as follows:
# fdisk -l /dev/hda

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          Size    Mount point
/dev/hda1   *           1        1048     8418028+   c  W95 FAT32 (LBA) 8.6 GB  /windows
/dev/hda2            1049        1571     4200997+  83  Linux           4.0 GB  /
/dev/hda3            1572        2094     4200997+  83  Linux           4.0 GB  /mnt/hda3
/dev/hda4            2095        7296    41785065    5  Extended
/dev/hda5            2095        2228     1076323+  82  Linux swap      1.0 GB
/dev/hda6            2229        7296    40708678+  83  Linux            39 GB  /home

Installation

Debian "Sarge" comes in 14 "binary" CDs (plus 15 "source" CDs), but I use to install it from a "net install" ISO image, which includes a full base-system installer and lets you pick other (and up-to-date) packages from the Internet. Once burned the ISO image it onto a CD (or even a mini-CD), boot with the CD inserted and pass "expert26 nolapic quiet" at the "boot:" prompt to use the 2.6 kernel and to automatically power off the notebook after an halt command.
I followed these steps:
boot: expert26 nolapic quiet
Choose language [ English - English ]
Choose country or region [ other -> Europe -> Italy ]
Select a keyboard layout [ PC-style (AT or PS-2 connector keyboard) -> Italian ]
Detect and mount CD-ROM
Load installer components from CD
Detect network hardware
Configure the network
Detect hardware
Partition disks
Install the base system [ install kernel-image-2.6.8-2-386 or kernel-image-2.6.8-2-686 ]
Install the GRUB boot loader on a hard disk
Finish the installation
Once rebooted, proceed to base system configuration:
Display introductory message
Configure timezone
Setup users and passwords
Set the hostname
Configure apt [ choose stable, a local mirror and security updates ]
Configure the Mail Transfer Agent [ Internet Site ]
Finish configuring the base system
The base system is now installed and configured. Before upgrading base system's packages with the latest security patches, install the desired kernel for your architecture (686 is the best available for this notebook):
# apt-get install kernel-image-2.6-686
reboot, purge the installer's kernel image:
# apt-get remove --purge kernel-image-2.6.8-2-386
and upgrade the rest of the system:
# apt-get upgrade

First boot issues

I experienced two "null symbol found" errors during the boot process, just after the init call. As I could find here, this issue seems to be related to the available keymap and the choice of locale. I could fix it simply with
# dpkg-reconfigure console-data
selecting explicitly my keymap ("Select keyboard from arch list" -> qwerty -> Italian -> Standard).
I also noticed "no device found" errors loading hw_random and rtc modules; since there are no major issues, I blacklisted them:
# echo hw_random > /etc/hotplug/blacklist.d/hw-random
# echo rtc > /etc/hotplug/blacklist.d/rtc

APT configuration

The default Debian installation produces an /etc/apt/sources.list referring to the stable version: to avoid problems when a new version (say, "Etch") will become the stable version, it's better to replace all occurrences of stable with sarge (the upgrade to "Etch" will require a manual change to this file). I use to add testing, unstable repositories (referring to them as etch and sid, respectively) and backports to get recent versions of some packages (kernel, rkhunter), volatile and volatile-sloppy repositories, for rapidly-moving software as ClamAV and Spamassassin. To prevent apt-get dist-upgrade command to update the whole system to sid, I create an /etc/apt/preferences file setting the priority to packages from sarge. I also add Skype repository for a Debian-packaged version of Skype, and Christian Marillat's repository for some packages with license issues (Acrobat Reader, Flash Player, libdvdcss2 and Windows codecs) that are not officially supported by Debian.
After creating/modifying these files, issue an
# apt-get update
to update apt's local cache.

Wireless LED

This simple script manages the wireless LED status, turning it on only when the wireless network interface is up. Install it with the proper permissions:
# install -m 755 /path/to/wled /etc/network/if-up.d/
# install -m 755 /path/to/wled /etc/network/if-down.d/

Custom kernel compilation

These packages are necessary to compile a custom kernel and the modules required for getting the video card and the wireless LAN to work properly:
#0#                             # apt-get install \
#0# Development:                #         build-essential debhelper devscripts dh-make module-assistant \
#0# Miscellaneous - Graphical:  #         xserver-xfree86 \
#0# Miscellaneous - Text Based: #         kernel-package \
#0# Networking:                 #         wireless-tools \
#0# Libraries - Development:    #         libncurses5-dev libqt3-mt-dev libxtst-dev \
#0# Libraries - Old:            #         xlibs-dev \
#0# System Administration:      #         netenv rpm \
#0# Utilities:                  #         bzip2 fakeroot

Netenv

I have tweaked a sample script provided with netenv a little bit (you can find the patch here), now the package can also set wireless parameters "the Debian way" (i.e., using /etc/network/interfaces).

Kernel and drivers

I use to compile all programs as a "normal" user, simply adding myself to the src group with
# adduser bibe src
A quick way to get a fully working kernel is to install a stock kernel-image package and the corresponding kernel-source package, tweak the kernel configuration a little (more information below) and build a kernel package with make-kpkg.

To use the "Sarge" stock kernel for 686 processors, issue an
# apt-get install kernel-image-2.6-686 kernel-source-2.6.8
If you want the latest available kernel, you can use the backports' kernel image:
# apt-get -t sarge-backports install linux-image-2.6-686
or compile your own kernel, using backports kernel sources:
# apt-get -t sarge-backports install linux-source-2.6.15
and extracting /boot/config-2.6.15-1-686 from linux-image-2.6.15-1-686 package.
To get 3D graphic acceleration, you have to use the commercial ATI drivers. You can get the latest version (8.23.7, released on March 8, 2006) of ATI's graphical installer here, then build Debian packages and install them with
$ chmod u+x /path/to/ati-driver-installer-8.23.7-i386.run
$ /path/to/ati-driver-installer-8.23.7-i386.run --buildpkg Debian/sarge
$ su
# dpkg -i fglrx-driver_8.23.7-1_i386.deb fglrx-kernel-src_8.23.7-1_i386.deb
The wireless LAN (Intel PRO/Wireless 2200BG) requires a closed-source firmware, downloadable from here. The firmware version depends on ipw2200 driver, and versions 1.0.4 and above of the driver also require ieee80211 subsystem, already packaged for "Etch" and "Sid". This is the matrix of the firmware versions required for each version of the driver:

ipw2200 versionrequires ieee80211 subsystemfirmware version
up to 1.0.3No2.2
1.0.4 to 1.0.6Yes2.3
1.0.7 and aboveYes2.4

See "Software/firmware versions" at the top of this page for available versions.
Once downloaded the right firmware, install it and read the LICENSE:
# tar zxf /path/to/ipw2200-fw-2.4.tgz
# more LICENSE
# mv *.fw LICENSE /usr/lib/hotplug/firmware/
Kernels 2.6.15 and above include the latest version of ipw2200 driver and ieee80211 subsystem: if you want them on an older kernel, use Debian *-source packages from unstable:
# apt-get -t unstable install ieee80211-source ipw2200-source
If you want your wireless NIC to run in hostap mode, install the driver's *-source packages and related utilities:
# apt-get install hostap-source hostap-utils hostapd
The easiest and quickest way to get all these drivers to work properly is installing and rebooting into a "stock" kernel (say, kernel-image-2.6.8-2-686), the corresponding headers and module-assistant:
# apt-get install kernel-headers-$(uname -r)
# cd /usr/src
# m-a prepare
# m-a a-i fglrx
# m-a a-i ieee80211
# m-a a-i ipw2200
# m-a a-i hostap
The following steps are only required if you want to compile your own kernel, and thus use make-kpkg to compile the drivers too:
$ cd /usr/src
$ tar jxf fglrx.tar.bz2
$ tar zxf ieee80211-source.tar.gz
$ tar zxf ipw2200-source.tar.gz
$ tar jxf hostap-source.tar.bz2
IMPORTANT: As explained here, to use version 8.21.7 of ATI's official driver with a 2.6.15-rc5 or newer kernel, you have to apply this small patch:
$ patch -p1 modules/fglrx/firegl_public.c < /path/to/2.6.15-rc5-fglrx-bad-page.patch
A lazy way to configure a working kernel is to start from "Sid"'s .config file and tweaking the minimum kernel options to get everything to work: obviously, it's much more efficient to start from scratch, enabling only needed kernel options.
These are the steps for compiling the kernel from linux-source-2.6.15 (with built-in ipw2200 and ieee80211 support) applying swsusp2 patch (avoid [ swsusp2 ] lines if you don't want it) and this patch (to enable monitor mode for ipw2200):
$ cd /usr/src
$ tar jxf linux-source-2.6.15.tar.bz2
[ swsusp2 ] $ tar jxf /path/to/suspend2-2.2-for-2.6.15.1.tar.bz2
$ cd linux-source-2.6.15
$ cp /path/to/config-2.6.15-1-686 .config
[ swsusp2 ] $ /usr/src/suspend2-2.2-for-2.6.15.1/apply
$ patch drivers/net/wireless/Kconfig < /path/to/2.6.15_ipw2200-monitor-mode.patch
$ make menuconfig
  - enable Code maturity level options -> Select only drivers expected to compile cleanly
  - set Processor type and features -> Processor family (Pentium M)
  - enter Power management options (ACPI, APM) and:
[ swsusp2 ] - disable Software suspend
[ swsusp2 ] - enable Suspend2
[ swsusp2 ] - under Suspend2, enable File Writer and/or Swap Writer
    - enter CPU Frequency scaling and:
      - under CPUFreq processor drivers, disable all but ACPI Processor P-States driver and "Intel Enhanced Speedstep"-related options
  - under Device Drivers -> Network device support -> Wireless LAN (non-hamradio):
    - enable Intel PRO/Wireless 2200BG and 2915ABG Network Connection -> Enable promiscuous mode
  - disable Device Drivers -> Character devices -> ACP Modem (Mwave) support
  - under Device Drivers -> Character devices -> Serial drivers:
    - disable 8250/16550 and compatible serial support
    - disable Digi International NEO PCI Support
  - disable Device Drivers -> Graphics support -> Support for frame buffer devices
[ swsusp2 ] - enable Cryptographic options -> LZF compression algorithm
$ make-kpkg clean
$ make-kpkg --append-to-version "-<suffix>" --revision "<revision>" --rootcmd fakeroot clean
$ make-kpkg --append-to-version "-<suffix>" --revision "<revision>" --rootcmd fakeroot --initrd [ kernel_image | buildpackage ]
$ fakeroot make-kpkg --append-to-version "-<suffix>" --revision "<revision>" modules_image
$ cd ..
$ su
# dpkg -i kernel-image-2.6.15-<suffix>_<revision>_i386.deb
# dpkg -i fglrx-kernel-2.6.15-<suffix>_8.23.7-1+<revision>_i386.deb
# depmod -ae 2.6.15-<suffix>
Then, modify your /etc/X11/XF86Config-4 as specified on Flavio's page, or run fglrxconfig to reconfigure it with all ATI specific well-commented directives. This is a Debian default XF86Config-4 slightly modified and including configuration for synaptics touchpad, and this is a default fglrxconfig-generated XF86Config-4.
Versions 8.18.6 and above of the fglrx driver guess DPI from EDID information: since EDID information are not complete, the default settings lead to a (88,88) DPI setting. If you want to use the same fonts as versions up to 8.16.20, you should add "-dpi 75" option to the X server. Use startx -- -dpi 75, or read your DM (xdm, kdm or gdm) documentation. In my case, kdm settings are to be set in /etc/kde3/kdm/Xservers.

Cryptographic options, ACPI support, CPU frequency scaling and IrDA support

I use to keep my personal data on an AES-encrypted USB key; I also use ASUS acpi extensions (provided by asus_acpi kernel module), powernowd (to manage CPU frequency scaling), kensors (a KDE frontend to lm-sensors) to monitor CPU and battery parameters, and ircomm_tty module for IrDA support. Starting from kernel 2.6.14, evdev module has to be manually loaded to enable the Synaptics touchpad under X server. To automatically load the necessary modules (unless you build a custom monolithic kernel that includes them), put the module names into /etc/modules:
# echo cryptoloop >> /etc/modules
# echo aes >> /etc/modules
# echo asus_acpi >> /etc/modules
# echo cpufreq_powersave >> /etc/modules
# echo cpufreq_userspace >> /etc/modules
# echo speedstep_centrino >> /etc/modules
# echo i2c-i801 >> /etc/modules
# echo eeprom >> /etc/modules
# echo ircomm_tty >> /etc/modules
# echo evdev >> /etc/modules
The last step required to enable CPU frequency scaling is to add the following line to /etc/fstab:
sysfs           /sys            sysfs   defaults 0 0

Additional packages/programs

Here's a list of other packages that I use to install:
#1# Base System:                           # apt-get install apt-file \
#1# Cross Platform:                        #         cdrdao k3b smbfs \
#1# Development:                           #         cvs subversion \
#1# Documentation:                         #         apache2-doc apt-doc apt-dpkg-ref apt-howto-en asr-manpages bash-doc debian-history \
#1#                                                  debian-installer-manual debian-policy debian-reference doc-debian doc-linux-html doc-linux-text \
#1#                                                  euro-support funny-manpages harden-doc jargon-text java-common openoffice.org-help-en perl-doc \
#1#                                                  quick-reference-en \
#1# Editors:                               #         openoffice.org vim \
#1# Email:                                 #         fetchmail-ssl mutt postfix spamassassin \
#1# GNOME Desktop Environment:             #         gdesklets gnome-system-tools grip evince evolution evolution-exchange netapplet \
#1# Games and Amusement:                   #         bomberclone bsdgames cappuccino chromium fortunes-bofh-excuses flobopuyo frozen-bubble gweled \
#1#                                                  kmahjongg planetpenguin-racer supertux typespeed \
#1# Graphics:                              #         cupsys-driver-gimpprint digikam ksnapshot kuickshow vlc-plugin-alsa vlc-plugin-arts wxvlc \
#1# Interpreted Computer Languages:        #         expectk gawk \
#1# Libraries:                             #         qca-tls \
#1# Libraries - Development:               #         libcurl3-dev libssl-dev \
#1# KDE Desktop Environment:               #         amarok juk kde-icons-noia kdeartwork{,-misc,-style,-themes*} kdebase kdm klaptopdaemon kompose \
#1#                                                  knotes konsole ksensors kwifimanager oooqs-kde \
#1# Miscellaneous - Graphical:             #         gdesklets-data hotkeys rdesktop xchm x-window-system-core xfree86-driver-synaptics xscreensaver-gl \
#1#                                                  xt xterm xtightvncviewer \
#1# Miscellaneous - Text Based:            #         chkrootkit gpsd gpsd-clients linuxlogo mysql-server qemu screen \
#1# Multimedia:                            #         alsa-utils festival kmix kscd \
#1# Networking:                            #         aircrack airsnort bitchx-ssl bittornado-gui cupsys cupsys-bsd debmirror dnsutils ethereal gftp \
#1#                                                  iproute kismet links2 nmap p0f psi rdate smbclient ssh tcpdump telnet-ssl tethereal traceroute whois \
#1#                                                  wpasupplicant \
#1# Perl Programming Language:             #         libgtk2-perl libmd5-perl libxml-libxml-perl \
#1# System Administration:                 #         acpid alien apt-show-versions gksu kernel-patch-squashfs powernowd squashfs-tools sudo synaptic \
#1# Utilities:                             #         acpi apt-listchanges arj clamav clamav-daemon dvd+rw-tools gnupg gphoto2 gpsdrive hddtemp \
#1#                                                  laptop-mode-tools lm-sensors lsof kcalc kcharselect mc reportbug slocate unarj unzip vlock zip \
#1# Word Processing:                       #         antiword foomatic-filters-ppds less wamerican witalian \
#1# World Wide Web:                        #         bluefish libapache2-mod-php4 mozilla-firefox-dom-inspector php4-mysql

#2# Word Processing (contrib):             # apt-get install openoffice.org-hyphenation-en-us openoffice.org-hyphenation-it openoffice.org-l10n-it \
#2#                                                  openoffice.org-thesaurus-en-us openoffice.org-thesaurus-it

#3# Documentation (non-free):              # apt-get install doc-linux-nonfree-html hwb phpdoc rutebook

#4# Marillat (license issues):             # apt-get install flashplayer-mozilla lame libdvdcss2 mozilla-acroread mozilla-mplayer mplayer-nogui \
#4#                                                  realplayer w32codecs

IrDA support

To get IrDA support and to be able to communicate with most of infrared-capable cell phones, you have to disable all serial support when configuring the kernel (see above); then, simply
$ sudo apt-get install gnokii irda-utils
selecting "native" IrDA device type, "nsc-ircc" FIR chip type and "irq=3 dma=2 io=0x2f8 dongle_id=0x09" module options.

FreePOPs

FreePOPs releases new versions quite frequently, so it's useful to install the latest available package. Starting with version 0.0.95, installing the "Sid" version of freepops requires a glibc upgrade, so the best way to have the latest version is to download the "Sarge" Debian package provided on FreePOPs web site. So, download and install the binary and any newer LUA patch and restart the daemon:
$ sudo dpkg -i /path/to/freepops-<version>_i386.deb
$ sudo install -o root -m 644 /path/to/*.lua /usr/share/freepops/lua/
$ sudo /etc/init.d/freepops restart

Kismet

Kismet supports ipw2200 cards starting from 2005-06-R1 release, but "Sarge" only ships version 2005-04-R1. Since the latest available version from the unstable repositories require a libc6 upgrade, install it manually, downloading the latest stable (2005-08-R1, released on August 15, 2005) or development version from here and installing it in /usr/local to prevent issues with the existing installation:
$ cd /usr/src
$ tar zxf /path/to/kismet-2005-08-R1.tar.gz | $ svn co http://svn.kismetwireless.net/code/trunk kismet-newcore
$ cd kismet-2005-08-R1/                     | $ cd kismet-newcore/
$ ./configure
$ make dep
$ make
$ sudo make install
An interesting utility for viewing Kismet output as HTML pages is Kismet Log Viewer, available here. To install it, download the latest binary (version 0.9.7) and
$ cd /usr/src
$ tar zxf /path/to/kismet-log-viewer-0.9.7.tar.gz
$ cd kismet-log-viewer-0.9.7
$ install -o <kismet_suid_user> -m 700 *.pl <kismet_logs_path>
$ install -o <kismet_suid_user> -m 644 logo.png <kismet_logs_path>

Skype

To install Skype (version 1.2.0.18, released on October 25, 2005), you can use Skype's repository:
$ sudo apt-get install skype
or download it from here and install it with
$ sudo dpkg -i /path/to/skype_1.2.0.18-1_i386.deb

Sun's JDK

To install Sun's Java 2 Platform Standard Edition Development Kit (JDK), or simply the Java Runtime Environment (JRE), you have to download the binary file from here. Then, there you can install it manually:
$ chmod u+x /path/to/jdk-1_5_0_06-linux-i586.bin          | $ chmod u+x /path/to/jre-1_5_0_06-linux-i586.bin
$ cd /opt                                                 | $ cd /opt
$ sudo /path/to/jdk-1_5_0_06-linux-i586.bin               | $ sudo /path/to/jre-1_5_0_06-linux-i586.bin
$ sudo ln -s jdk1.5.0_06 java                             | $ sudo ln -s jre1.5.0_06 java
or build a Debian package with java-package:
$ sudo apt-get install java-package                       | $ sudo apt-get install java-package
$ chmod u+x /path/to/jdk-1_5_0_06-linux-i586.bin          | $ chmod u+x /path/to/jre-1_5_0_06-linux-i586.bin
$ fakeroot make-jpkg /path/to/jdk-1_5_0_06-linux-i586.bin | $ fakeroot make-jpkg /path/to/jre-1_5_0_06-linux-i586.bin
$ sudo dpkg -i sun-j2sdk1.5_1.5.0+update06_i386.deb       | $ sudo dpkg -i sun-j2re1.5_1.5.0+update06_i386.deb
$ sudo ln -s /usr/lib/j2sdk1.5-sun /opt/java              | $ sudo ln -s /usr/lib/j2re1.5-sun /opt/java
In both cases, if you want to use Sun's Java plugin (instead of the free gcjwebplugin) in Firefox, simply link the plugin with the following command:
$ sudo ln -s /opt/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/

Multixterm

I use to manage multiple identical servers: a really nice and helpful script is multixterm, which is installed as an example with expect. Installing the script (and its man page) is as simple as
$ sudo install -o root -m 755 /usr/share/doc/expect/examples/multixterm /usr/local/bin/
$ sudo mkdir -p /usr/local/man/man1/
$ sudo install -o root -g man -m 644 /usr/share/doc/expect/examples/multixterm.1 /usr/local/man/man1/

Reboot

Now the system is fully configured: reboot into your custom kernel and issue a
$ dmesg |less
to verify that there are no errors and/or problems during the boot process. Remove the unused "stock" kernels and exim4 residual packages (only if you installed postfix, or another MTA), and update dpkg's cache information:
$ sudo apt-get remove --purge kernel-image-2.6.8-2-386 [ or kernel-image-2.6.8-2-686 ]
$ sudo aptitude purge exim4-base exim4-config
$ sudo apt-file update
$ sudo apt-show-versions -i

NetBeans

To install NetBeans IDE, download the binary installer from here and follow these steps:
$ chmod u+x /path/to/netbeans-5_0-linux.bin
$ sudo /path/to/netbeans-5_0-linux.bin

Rootkit Hunter

Rootkit Hunter is a very useful program, to be launched from crontab. Install the latest available version from the unstable repositories:
$ sudo apt-get -t unstable install rkhunter
or download the latest release (version 1.2.8, released on February 14, 2006) and install it:
$ cd /usr/src
$ tar zxf /path/to/rkhunter-1.2.8.tar.gz
$ cd rkhunter
$ sudo sh installer.sh
Then, update the rootkit's database and check your system:
$ sudo rkhunter --update
$ sudo rkhunter --checkall --cronjob

Credits

I would like to thank #debian channel on irc.freenode.net for the excellent support, Flavio Stanchina and his page's mailing list for the very nice work and howto page, and Michele Bonera for the help with IrDA and Software suspend.

TODO list

I still have to test firewire and the card reader. I hope you will find some of these information useful, and if you have any suggestion for helping me to get everything to work, please email me at

bibe AT atworkonline DOT it