Debian "Etch" on an Asus Z92J notebook (check here for other installations)
Changelog (you can always find an up-to-date version here)
* September 25, 2006
- Added a workaround patch for compiling ipw3945 (version 1.1.0) directly into a 2.6.18 kernel.
* September 20, 2006
- kernel: released version 2.6.18.
Patches available: ieee80211 (version 1.2.15), r1000 (version 1.04).
Support for ipw3945 (version 1.1.0) must be compiled after building the kernel
- Ensure that netenv really starts during boot
- Minor changes
* September 16, 2006
- Added paragraph to substitute cdrecord binaries with cdrkit ones from Sid
* September 9, 2006
- ipw3945 firmware is now installable through apt (the package is firmware-ipw3945)
* August 28, 2006
- Added ndiswrapper and rt2500 (kernel modules' compilation and utility packages)
- wireshark and tshark packages replace ethereal and tethereal respectively
* August 20, 2006
- ieee80211: released version 1.2.15
* August 12, 2006
- debian-installer: released beta3. Now it's possible to completely disable root login and configure sudo during the installation process.
* August 9, 2006
- r1000: released version 1.04. Added a 3-line patch to use module_param_array instead of the deprecated MODULE_PARM macro, so the driver compiles against recent kernels.
* August 7, 2006
* August 2, 2006
- ipw3945: released version 1.1.0
- Use update-java-alternatives instead of manually setting each java alternative using update-alternatives
* July 19, 2006
- Use of sudo extended
- Set the SUID bit manually for some programs (cdrdao, cdrecord.mmap and growisofs) to be used by k3b
- Forced fonts' cache rebuilding after installing msttcorefonts
- Minor cosmetic changes
* July 13, 2006
- Added nvidia-settings, a tool of configuring the NVIDIA graphics driver
- Added wengophone, a SIP-based software telephone with video and chat features
* July 7, 2006
- ipw3945d: released version 1.7.22
* June 26, 2006
- ieee80211 and ipw3945 support can be added using patch_kernel (and add_radiotap) targets
* June 21, 2006
- k9copy is now in debian-multimedia repository
* June 3, 2006
- xserver-xorg: version 7.0 entered testing, now the metapackage to install is simply xorg
* May 30, 2006
- Installation now uses a daily built netinst image
- Christian Marillat's repository is now at www.debian-multimedia.org
- VLC installation has its own paragraph (its package and dependencies come mostly from "Sid")
- Cosmetic changes
* May 20, 2006
- The latest Ubuntu kernel is already patched for r1000, ipw3945 and squashfs support
* May 17, 2006
- Sun Java packages entered Sid (non-free) because of license change
* May 9, 2006
- Blacklist asus_acpi to get rid of "Asus ACPI: Error reading LCD status" errors
- Really blacklist hw_random
- Added tor and privoxy packages
* April 27, 2006
- Added patches to build r1000 (v. 1.02), ieee80211 (v. 1.1.13) and ipw3945 (v. 1.0.2) against a 2.6.16 kernel
* April 21, 2006
- kismet: version 2006-04-R1 is now in Sid, no more need to build it from svn sources
- Be sure to have x-window-system-core installed after selecting "Desktop environment" task
* April 13, 2006
- First official release of this document
- kismet: released version 2006-04-R1
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: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System Size Mount point
/dev/hda1 1 243 1951866 1b Hidden W95 FAT32 2 GB
/dev/hda2 * 244 1548 10482412+ c W95 FAT32 (LBA) 10 GB /windows
/dev/hda3 1549 2201 5245222+ 83 Linux 5 GB /
/dev/hda4 2202 12161 80003700 5 Extended
/dev/hda5 2202 2854 5245191 83 Linux 5 GB /mnt/test
/dev/hda6 2855 3115 2096451 82 Linux swap
/dev/hda7 3116 12161 72661963+ 83 Linux 70 GB /home
Installation
The debian-installer project web page recommends to install Debian Etch using the beta3 installer, but you can install it using a daily-built netinst ISO image.
Once burned the ISO image it onto a CD (or even a miniCD), boot with the CD inserted and pass "expert quiet vga=791" at the "boot:" prompt.
The installer will use a 2.6 kernel, sending only important boot messages to the console.
Debian installer's default kernel (2.6.16-2-486) doesn't have neither r1000 nor ipw3945 support: you can compile the r1000 module for the kernel and load it manually to have internet connection during installation.
These are the steps I followed to install Etch:
boot: expert quiet vga=791
Choose language
Choose a language [ English - English ]
Choose a country, territory or area [ other -> Italy ]
Choose a locale [ en_US.UTF-8 ]
Choose other locales to be supported [ all en_US* and it_IT* locales ]
Select a keyboard layout [ PC-style (AT or PS-2 connector keyboard) -> Italian ]
Detect and mount CD-ROM
Load installer components from CD
Then, jump to
Detect disks
Partition disks
switch to a text console (pressing ALT+F2) and insert the kernel module:
# insmod /path/to/r1000.ko
The installation can now be resumed (pressing ALT+F1):
Detect network hardware
Configure the network
Choose a mirror of the Debian archive [ Italy -> debian.fastweb.it ]
Configure time zone
Configure the clock
Setup users and passwords [ do not allow login as root (use sudo instead) ]
Install the base system [ install linux-image-2.6.16-2-486 or linux-image-2.6.16-2-686-smp, if available ]
Configure the package manager
Before finishing the installation, you can enable a local repository (if available) and add the r1000 support to the installed kernel:
# cp /path/to/sources.list.local_install /target/etc/apt/sources.list
# cp /path/to/r1000.ko /target/lib/modules/<kernel_version>/kernel/drivers/net/
# chroot /target /bin/bash
# apt-get update
# depmod -ae <kernel_version>
# echo r1000 >> /etc/modules
# exit
Then, finish te installation:
Select and install software [ Desktop Environment, Laptop and Base system ]
Install the GRUB boot loader on a hard disk
Finish the installation
First boot
While rebooting, take a look at the console output and check dmesg: I get an error while loading hw-random module.
First of all, upgrade the system to the current available versions of the installed programs:
$ sudo apt-get dist-upgrade
and get rid of all previously copied packages:
$ sudo apt-get clean
Sound system
The sound system isn't working out of the box, but enabling it is simply a matter of:
$ sudo alsaconf
udev and hotplug blacklisting
I add hw-random to both udev and hotplug blacklists, and comment out the line regarding hw_random in /etc/modprobe.d/aliases:
$ echo 'blacklist hw_random'|sudo tee -a /etc/modprobe.d/blacklist
$ echo 'hw_random'|sudo tee /etc/hotplug/blacklist.d/hw_random
$ sudo sed -i -e 's/\(.*hw_random\)/# \1/' /etc/modprobe.d/aliases
Kernel and drivers
Kernel, drivers, and programs compilation should never be done as root: I use to add my everyday user to the src group.
$ sudo adduser bibe src
These packages are necessary to compile a custom kernel and the required modules "the Debian way":
#0# # apt-get install \
#0# Development: # build-essential module-assistant \
#0# Miscellaneous - Text Based: # kernel-package \
#0# Libraries - Development: # libncurses5-dev \
#0# Utilities: # fakeroot
If you want to compile the drivers against the running Debian "stock" kernel (say, 2.6.16-2-686-smp), install its headers and set up the system to compile modules for the running kernel:
$ sudo apt-get install linux-headers-$(uname -r)
$ sudo m-a prepare
Wired LAN
The latest "official" sources (version 1.04, released on August 8, 2006), available here, must be patched to use module_param_array instead of the deprecated MODULE_PARM macro.
While Realtek RTL8168(B) support makes its way into the kernel mainline, you can apply this patch against a 2.6.18 kernel.
$ cd /usr/src
$ tar zxf /path/to/r1000_v1.04.tgz
$ cd r1000_v1.04
$ patch -p1 < /path/to/r1000-module_param.patch
$ make clean modules
$ sudo make install
$ sudo depmod -ae
$ sudo modprobe r1000
$ dmesg
$ echo r1000 |sudo tee -a /etc/modules
Wireless LAN
Installation of the wireless LAN driver (ipw3945) requires the latest ieee80211 subsystem, the driver itself, a proprietary firmware, and a proprietary and (shame on you, Intel) binary daemon.
You can get all the information to compile and set up your system here.
Installing the firmware and the binary daemon is a simple matter of
$ sudo apt-get install firmware-ipw3945
$ cd /usr/src
$ tar zxf /home/data/Software/Linux/firmware/ipw3945d-1.7.22.tgz
$ sudo cp ipw3945d-1.7.22/x86/ipw3945d /sbin/
$ cat << EOF |sudo tee /etc/modprobe.d/ipw3945
> install ipw3945 /sbin/modprobe --ignore-install ipw3945; /sbin/ipw3945d --timeout=-1 --quiet
> remove ipw3945 /sbin/ipw3945d --kill; /sbin/modprobe -r --ignore-remove ipw3945
> EOF
$ echo ipw3945 |sudo tee -a /etc/modules
If you plan to build a 2.6.18 kernel, this patch replaces the ieee80211 subsystem with the latest available version, and this one adds ipw3945 support.
IMPORTANT: use this patch if you want to use the make patch_kernel script.
You can also compile the wireless stack against a running kernel:
$ cd /usr/src
$ tar zxf /home/data/Software/Linux/src/ieee80211-1.2.15.tgz
$ cd ieee80211-1.2.15/
$ patch -p1 < /path/to/ieee80211-1.2.15-patch_kernel.patch
$ sudo make
$ sudo make install
ipw3945 support can be compiled after rebooting with the new kernel:
$ cd /usr/src
$ tar zxf /home/data/Software/Linux/src/ipw3945-1.1.0.tgz
$ cd ipw3945-1.1.0/
$ make
$ sudo cp ipw3945.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/
$ sudo depmod -ae
$ sudo modprobe ipw3945
$ dmesg
$ ps -C ipw3945d
IMPORTANT: use this patch if you want to use the make add_radiotap and make patch_kernel scripts.
It seems that the ipw3945 module can't be loaded correctly at boot time.
As a workaround, I wrote this simple script that unloads and reloads the module.
You can install it and run it automatically with:
$ sudo install -m 755 ~bibe/public_html/etch/ipw3945 /etc/init.d/
$ sudo update-rc.d ipw3945 start 40 S . stop 40 0 1 6 .
Multiple networking environments
I use my laptop in several places (home, customers' offices, friends' homes), and I manage these network environments easily with netenv.
Install it and use the script provided as a Debian example (or this one, which requires gawk and manages multiple network interfaces, wireless settings and hosts in a friendly manner):
$ sudo apt-get install gawk netenv
$ sudo install -m 755 ~bibe/public_html/etch/netenv_setup /etc/netenv/
$ echo NETENV_SCRIPT=/etc/netenv/netenv_setup |sudo tee -a /etc/netenv/netenv.conf
Be sure that netenv starts during boot:
$ sudo update-rc.d netenv start 40 S .
I also add some altoptions directives in /boot/grub/menu.lst (leave these lines "commented", or you will lose them when updating grub) for commonly used network environments, say:
$ grep altoption /boot/grub/menu.lst
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(single-user mode) single
# altoptions=(wired) NETENV=wired
# altoptions=(wireless) NETENV=wireless
# altoptions=(recovery mode) single
Grub configuration gets updated automatically at every linux-image installation: to do it manually, simply run
$ sudo update-grub
KDE and KDE applications
I use KDE as the default desktop environment:
$ sudo apt-get install amarok digikam k3b kbiff kde kde-extras kde-icons-noia kompose ksensors smb4k
APT configuration
I use to add Skype repository for a Debian-packaged version of Skype, debian-multimedia (formerly 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 modifying your sources.list, issue an
$ sudo apt-get update
to update apt's local cache.
As all recent versions of apt rely on GPG to verify the signatures of the packages downloaded from the Internet, apt-get update will complain about missing keys: to avoid it, add the required keys to apt's keyring:
$ for key in $(sudo apt-get update 2>&1 |grep NO_PUBKEY |cut -d\ -f21); do
gpg --keyserver pgp.mit.edu --recv-keys 0x$key
gpg --export --armor 0x$key |sudo apt-key add -
done
and update it again to get rid of missing key errors:
$ sudo apt-get update
NVIDIA Proprietary drivers
Compiling, installing and using NVIDIA proprietary drivers is just a matter of:
$ sudo /etc/init.d/gdm stop
$ sudo apt-get install linux-headers-$(uname -r)
$ sudo apt-get install nvidia-kernel-common
$ sudo m-a prepare
$ sudo m-a a-i nvidia
$ sudo apt-get install nvidia-glx nvidia-settings
$ sudo dpkg-reconfigure -plow xserver-xorg
$ sudo /etc/init.d/gdm start
This is the Etch default xorg.conf, and this is a slightly tweaked one to use nvidia driver at the native 1280x800 resolution.
These are the steps for compiling the kernel from linux-source-2.6.18 (from kernel-archive.buildserver.net) applying the patches mentioned above and building some extra modules:
$ sudo apt-get install linux-source-2.6.18 ndiswrapper-source nvidia-kernel-source rt2500-source
$ cd /usr/src
$ tar jxf linux-source-2.6.18.tar.bz2
$ cd linux-source-2.6.18
$ zcat /path/to/ieee80211-1.2.15-for-2.6.18.patch.gz |patch -p1
$ zcat /path/to/ipw3945-1.1.0-for-2.6.18.patch.gz |patch -p1
$ zcat /path/to/r1000-1.04-for-2.6.18.patch.gz |patch -p1
$ cd ..
$ tar zxf nvidia-kernel-source.tar.gz
$ tar jxf squashfs.tar.bz2
$ cd linux-source-2.6.18
$ cp /path/to/config-2.6.18-1-686 .config
$ make menuconfig
- set Processor type and features -> Processor family (Pentium M)
- under Device Drivers -> Network device support:
- enable Ethernet (1000 MBit) -> Realtek 8111(B)/8168(B) gigabit ethernet support (EXPERIMENTAL)
- enable Wireless LAN (non-hamradio) -> Intel PRO/Wireless 3945ABG network connection (NEW) and:
- enable RF monitor module
- enable creation of a RF radiotap promiscuous interface
- enable Graphics support -> Logo configuration -> Bootup logo
$ 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 [ linux_image | buildpackage ]
$ fakeroot make-kpkg --append-to-version "<suffix>" --revision "<revision>" modules_image
$ cd ..
$ sudo dpkg -i linux-image-2.6.18<suffix>_<revision>_i386.deb
$ sudo dpkg -i ndiswrapper-modules-2.6.18<suffix>_<revision>_i386.deb
$ sudo dpkg -i nvidia-kernel-2.6.18<suffix>_<revision>_i386.deb
$ sudo dpkg -i rt2500-modules-2.6.18<suffix>_<revision>_i386.deb
NOTE: The latest Ubuntu "Dapper Drake" kernel source package is a heavily patched 2.6.15.7 kernel, and the patches include r1000, ipw3945 and squashfs support: you can skip the patches above and build your own kernel from Ubuntu sources.
Sensors, cryptographic options and CPU frequency scaling
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.
To automatically load the necessary modules (unless you build a custom monolithic kernel that includes them), put the module names into /etc/modules:
$ echo eeprom |sudo tee -a /etc/modules
$ echo cryptoloop |sudo tee -a /etc/modules
$ echo aes |sudo tee -a /etc/modules
$ echo cpufreq_powersave |sudo tee -a /etc/modules
$ echo cpufreq_userspace |sudo tee -a /etc/modules
$ echo speedstep_centrino |sudo tee -a /etc/modules
Additional packages/programs
Here's a list of other packages that I use to install:
#1# Base System: # apt-get install apt-file \
#1# Communication: # tor \
#1# Cross platform: # wine \
#1# Development: # bazaar cvs kompare subversion-tools websvn \
#1# Documentation: # apache2-doc apt-doc apt-dpkg-ref apt-howto-en asr-manpages bash-doc debian-history \
#1# debian-policy debian-reference doc-linux-html \
#1# euro-support funny-manpages harden-doc jargon-text perl-doc \
#1# quick-reference-en \
#1# Editors: # vim \
#1# Email: # courier-imap-ssl fetchmail freepops postfix spamassassin \
#1# GNOME Desktop Environment: # beagle beagle-backend-evolution gdesklets gdm-themes grip \
#1# Games and Amusement: # bomberclone bsdgames cappuccino chromium fortunes-bofh-excuses flobopuyo \
#1# frozen-bubble gweled knights ksudoku planetpenguin-racer supertux typespeed \
#1# Graphics: # cupsys-driver-gimpprint \
#1# Interpreted Computer Languages: # expect expectk xmltv \
#1# Libraries: # qca-tls \
#1# Libraries - Development: # libcurl3-dev libpcre3-dev libssl-dev libusb-dev \
#1# Miscellaneous - Graphical: # amule gdesklets-data hotkeys xchm xscreensaver-gl xt xtightvncviewer \
#1# Miscellaneous - Text Based: # chkrootkit linuxlogo mysql-server ndiswrapper-utils-1.8 qemu screen \
#1# Multimedia: # festival festvox-italp16k festvox-itapc16k \
#1# Networking: # aircrack-ng airsnort bitchx-ssl bittornado-gui cupsys-bsd debmirror \
#1# ftp-upload gftp iproute kismet links2 netdiscover nmap ntpdate p0f psi rt2500 ssh \
#1# tcpdump telnet-ssl tshark wengophone wireshark wpasupplicant \
#1# Perl Programming Language: # libarchive-tar-perl libgtk2-perl libmd5-perl libnet-dns-perl libxml-libxml-perl \
#1# System Administration: # alien apt-show-versions bootchart powernowd squashfs-tools rkhunter \
#1# Utilities: # apt-listchanges arj clamav clamav-daemon dvd+rw-tools gphoto2 gpsdrive hddtemp hpoj \
#1# laptop-mode-tools mc slocate vlock \
#1# Word Processing: # antiword convmv foomatic-db-gimp-print openoffice.org-l10n-it \
#1# openoffice.org-thesaurus-it witalian \
#1# World Wide Web: # bluefish libapache2-mod-php4 firefox-dom-inspector php4-mysql privoxy \
#1# smarty smarty-gettext
#2# Games and Amusement (contrib): # apt-get install crafty-books-medium \
#2# Miscellaneous - Graphical (contrib): # msttcorefonts
#3# Documentation (non-free): # apt-get install doc-linux-nonfree-html doc-linux-nonfree-text hwb phpdoc rutebook \
#3# Games and Amusement (non-free): # crafty \
#3# Utilities (non-free): # unrar
#4# Multimedia (license issues): # apt-get install flashplayer-mozilla lame libdvdcss2 k9copy mozilla-acroread mozilla-mplayer \
#4# mplayer-nogui realplayer w32codecs
#5# Skype: # apt-get install skype
Alternatives
Debian's way to manage multiple programs for the same task (i.e., editors) is the use of alternatives, which are symlinks provided in /etc/alternatives/.
I use to change a couple of them:
$ sudo update-alternatives --config editor
SUID commands
k3b needs some files to have the SUID bit set:
$ sudo chmod 4711 /usr/bin/cdrdao /usr/bin/cdrecord /usr/bin/growisofs
Font cache
After installing msttcorefonts, it's useful to update the fonts' cache:
$ sudo fc-cache -f
FreePOPs
The FreePOPs project releases new plugins quite frequently, so it's useful to install the latest available ones, especially if you are using them.
You can do it simply installing newer LUA files and restarting the daemon:
$ sudo install -o root -g root -m 644 /home/data/Software/Linux/lua/*.lua /usr/share/freepops/lua/
$ sudo /etc/init.d/freepops restart
Kismet (and Kismet Log Viewer)
Kismet added ipw3945 cards support in version 2006-04-R1, already available in Etch, but if you want the bleeding edge, you can use the kismet-newcore development trunk and install Kismet in /usr/local (the default location) to prevent issues with the existing installation:
$ cd /usr/src
$ svn co http://svn.kismetwireless.net/code/trunk kismet-newcore
$ 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>
Sun's JDK
Since Sun released Java under a new license (the Operating System Distributor License for Java, or DLJ), distribution of the JDK and JRE binaries is now possible: installing it is as simple as enabling non-free repositories and:
$ sudo apt-get install [ sun-java5-jre | sun-java5-jdk ] sun-java5-plugin
$ sudo update-java-alternatives -s java-1.5.0-sun
$ sudo ln -s /usr/lib/jvm/java-1.5.0-sun /opt/java
Videolan Client
If you want to enjoy your DVDs and other multimedia using Videolan Client, you would like to enable unstable repositories (and apt-pinning, of course), and install the packages with:
$ sudo apt-get install [ -t unstable ] mozilla-plugin-vlc vlc-plugin-arts
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 [ linux-image-2.6.16-2-486 | linux-image-2.6.16-2-686-smp ]
$ sudo dpkg --purge exim4-base exim4-config
$ sudo apt-file update
$ sudo apt-show-versions -i
NetBeans
To install NetBeans IDE (in your home directory), download the binary installer from here, be sure to have the JDK (not the JRE) installed and use NetBeans installation wizard:
$ chmod u+x /path/to/netbeans-5_0-linux.bin
$ /path/to/netbeans-5_0-linux.bin
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, Michele Bonera for the help with IrDA and Software suspend, and Lubos Vrbka for some hints for ipw3945 scripts.
TODO list
I still have to test modem, IrDA, 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