|
Alyz Solutions
|
|
Debian Linux
|
|
Table of Contents
This page contains a collection of notes and experiences from installing and using the unstable (sid) version of Debian Linux. We chose Debian over other distributions because:
- It is free, both in terms of cost and of freedom to use and to share.
- It has a very active community supporting its continual development.
- The apt-get system for managing software packages.
We chose the unstable version because we want to stay on the bleeding edge with updates to the latest and greatest packages soon after new versions of packages are released by their authors. Although the version is labeled "unstable", the active package maintainers do a very good job of keeping the system free of disasters. In the unusual situations when upgrades go bad, reports go into the bug tracker almost immediately and workarounds or fixes are posted within very reasonable time frames. In the worst case, one can use some apt-get or dpkg commands to back out and reinstall the previous versions until bugs are fixed.
As this is an attempt to capture what we learned through our practical experiences, not a tutorial on how to set up a Debian system, the descriptions tend to be straightforward and pragmatic without much background information or theorectical discussion. Much of the detail here is specific to the computing environments we are using. The solutions and actions shown here may or may not be general enough to apply to similar but non-identical situations.
We used the 100MB CD image of the Debian-Installer version Etch beta 1. As time goes on, the installer continues to improve in quality. For us, the goal of the installation is to get a minimal install that boots and loads up all the proper drivers. We plan to customize and configure the systems afterwards by choosing prebuilt packages using apt-get.
By default, the debian installer initializes the apt settings to use "testing". In order to set the system to use "unstable", modify the sources.list file and add references to "unstable" in addition to the ones for "testing". For completeness, make sure there are references to "stable" as well. Additionally, you may wish to add support for the "contrib" and "non-free" packages. For example, our sources.list was modified to be as follows:
deb http://ftp.us.debian.org/debian/ stable main contrib non-free deb-src http://ftp.us.debian.org/debian/ stable main contrib non-free deb http://ftp.us.debian.org/debian/ testing main contrib non-free deb-src http://ftp.us.debian.org/debian/ testing main contrib non-free deb http://ftp.us.debian.org/debian/ unstable main contrib non-free deb-src http://ftp.us.debian.org/debian/ unstable main contrib non-free deb http://security.debian.org/ testing/updates main
By default, the debian installer installs the linux-image-2.6-386 package, which will automatically upgrade to the latest available 2.6 kernel whenever you do a "apt-get dist-upgrade". However, we feel that it is dangerous to upgrade the kernel semi-automatically in this way. We prefer to require the user to explicitly choose a new kernel in order to install a new kernel release, so we do a "apt-get remove linux-image-2.6-386" and then a "apt-get install linux-image-2.6.15-1-686" to install the kernel that we wish to use.
To make better use of the features in the 2.6.* kernel, we installed the following packages:
We have compiled and packaged custom 2.6.* kernels and placed them in our public Debian repository. These kernels are compiled from the Debian kernel sources plus the host-skas3 patch (either v7 or v8, depending on the kernel). The host-skas3 patch is for use with User-Mode Linux, but it should be harmless on a system that is not intended to be used with User-Mode Linux.
To install the latest version of KDE, simply add the following packages in order:
The ALSA sound system is built in to the default 2.6.* kernels provided by Debian. However, the initial ALSA settings are all output channels disabled with volume levels of 0. This makes it appear that the sound card is not functional. To modify the settings on the sound card, use one of the many available mixer programs. Since We have KDE installed, we used kmix (part of the kdemultimedia package) to bring up a panel that allowed us to change the settings to something more reasonable.
From time to time, we find that we need functionality that is not available in the standard Debian repositories. Whether we add the functionality by downloading new or updated source code and then compiling them locally, or we develop our own programs or scripts, at the end we need to install them into our file system. If we install them manually, the file system can become cluttered and unmanageable as we add more locally generated programs to our OS. If, instead, we create Debian packages out of each of the locally generated programs and then use a custom debian repository to store those packages, we can take advantage of "one of the most elegant methods of installing, upgrading, and removing software available" to help maintain control over our file systems.
Using the techniques described in this article, we now create our own Debian packages for all of our locally generated scripts and tools. Some of these can be found in our public Debian repository. To use our public Debian repository, add the following lines to the end of the /etc/apt/sources.list file:
# alyz.com packages deb http://public.alyz.com debian/
You can also browse the package repository.
Recently, the debian apt packages started verifying signatures and gives warnings if any of the packages are from untrusted sources. In order to properly verify the official debian signatures, execute the following as root:
apt-get install debian-archive-keyring
If you are annoyed by the messages while using our repository and you trust our integrity, then you can add our key to your apt system by executing the following as root:
wget http://public.alyz.com/devel.asc -O - | apt-key add -
We have a Linksys WUSB11 v2.6 (based on the Atmel chipset) that needed to be connected to one of our machines. We use the at76c503a drivers found at http://at76c503a.berlios.de.
To help prepare the system to build the loadable kernel drivers, install the package module-assistant. After installation, run module-assistant as root and choose the "PREPARE" option to install all the packages and tools necessary for the build. The module-assistant contains a number of built in driver packages that can be built directly, but the at76c503a driver is not one of them.
Download and unpack either the released driver or the latest cvs tarball, then cd into the unpacked directory, do a "make" to compile the drivers, followed by a "make install" to install the drivers into /lib/modules.
Install (if not already installed) the wireless-tools, hotplug, and ifupdown packages to make sure we have all the tools necessary to use the wireless adapter. Then modify /etc/network/interfaces by adding the following lines to the end of the file:
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-mode Managed
wireless-essid <SSID>
wireless-key <KEY>
Make sure to replace <SSID> and <KEY> with the SSID and wep-key for your wireless access point.
Plug in the USB adapter to see if it all works. Finally, shutdown and reboot to make sure the adapter is loaded properly in the boot sequence.
We have compiled and packaged a recent cvs version of the at76c503a driver for use with the kernels that we have made available in our public Debian repository. These versions now support a pseudo-monitor mode that allow the wireless adapter to be used with tools such as kismet.
We have the original DWL650 card which has a triangular antenna and is based on the Prism2 chipset. Newer DWL650 cards (rectangular antenna, same model number, different chipsets) will not work the same way. Installing this was fairly automatic once PCMCIA was working, since the prism2 chipset is well supported by the standard kernel driver modules.
This card was detected as eth1, not wlan0, so the entry to add to /etc/network/interfaces is:
iface eth1 inet dhcp
wireless-mode Managed
wireless-essid <SSID>
wireless-key <KEY>
Make sure to replace <SSID> and <KEY> with the SSID and wep-key for your wireless access point.
NOTE: The Hostap drivers are now part of the default Linux kernel as of version 2.6.14. For older kernel versions, one is required to download, compile, and install the additional kernel modules in order to have this functionality.
Although support for wireless cards based on prism chipsets are built into the standard Linux kernel, one may still wish to install the hostap drivers from http://hostap.epitest.fi in order to have access to advanced capabilities. The hostap drivers provide for a monitor mode that is required by applications such as kismet, a host ap mode that allows the wireless card to operate as an access point, and an implementation of WPA.
The hostap drivers are separated into four parts, hostap-driver, hostap-utils, hotapd, and wpa-supplicant. These are downloaded separately and can be compiled and installed in a similar way as the at76c503a drivers. We have compiled and packaged the hostap drivers for use with the older kernels that we have made available in our public Debian repository.
The hostap drivers will detect the wireless card as wlan0, not eth0 or eth1, so all entries in /etc/network/interfaces and elsewhere will have to be modified accordingly.
We have an old Belkin F5D6020 adapter, which is based on the Prism2 chipset as well. Unfortunately, the firmware on this card was too old to work with any of the available Linux drivers. After a little digging, we were able to upgrade the firmware on this card using information from this site. After the firmware upgrade, the hostap drivers installed flawlessly.
On a portable that can connected to different APs with different characteristics depending on where we are, it would be useful for the wireless network configuration to be able to adjust its settings dynamically. This article from arstechnica reviews a method to set up the network connection for this purpose. Unfortunately, we did not have much luck configuring guessnet for use with our DLink wireless adapter, as guessnet keeps complaining that our adapter did not support some features that it required.
We ended up writing our own script to provide this functionality. With our home-brewed script, we can set up our wireless adapter to automatically sense if we are at home, at work, or at an open wifi hotspot by adding the following to /etc/network/interfaces:
mapping wlan0
script detect_network
map test_wireless home <HOME-SSID> <HOME-KEY> <HOME-AP-MAC>
map test_wireless work <WORK-SSID> <WORK-KEY> <WORK-AP-MAC>
map test_none open
iface home inet dhcp
wireless-mode Managed
wireless-essid <HOME-SSID>
wireless-key <HOME-KEY>
iface work inet dhcp
wireless-mode Managed
wireless-essid <WORK-SSID>
wireless-key <WORK-KEY>
iface open inet dhcp
wireless-mode Managed
wireless-essid any
wireless-key off
The detect_network script can be found in the alyznettools package in our public Debian repository.
Kismet is a very useful tool that can monitor the 802.11 wireless space to sniff and detect wireless network activity. Kismet works with any card and driver combination that supports the raw monitoring mode, including the at76c503a and hostap drivers.
Installing kismet in Debian is very simple: Issue the command "apt-get install kismet", then modify the "source=" line in the /etc/kismet/kismet.conf file to tell the system about the installed wireless adapter and drivers.
For the hostap drivers:
source=hostap,wlan0,prism2source
For the at76c503a drivers:
source=orinoco,wlan0,prism2source
To run kismet, su to root, then issue the command "kismet" to start up the monitor. Watch the screen as all wireless networks in your area are detected and displayed. Commands are simple one character keystrokes. Important ones to remember are "h" for help and "Q" to quit. Logs of the kismet session are stored in /var/log/kismet for further analysis.
The official Debian repositories do not have packages that contain any of the JDKs or JREs from Sun, as Sun's Java license is too restrictive to be considered as free software. However, they do contain a package named java-package that allows users to painlessly create their own packages in order to install Java on a Debian system. A typical set of steps to accomplish this would be:
Update: The latest Java is now available as packages in the official repositories. Install sun-java5-jdk or sun-java5-jre, depending on whether you want all the development bits. Also, install sun-java5-plugin to add java applet support for your browser(s).
Installing on this particular notebook posed many challenges. Unlike most desktops, neither a standard live Knoppix CD nor a standard live Mepis CD, both of which are Debian based, would boot up properly on this machine as of 4/27/2004. Fortunately, Todd Lisonbee has a webpage titled Installing Linux on a Compaq Presario 2100 Laptop that contains lots of information and prior experience that was very helpful, even though they were for linux distributions other than Debian.
At bootup, press F2 to get into the BIOS settings. From there, disable the "Legacy USB support". This helps avoid the "dead keyboard" issue that occurs under many flavors of Linux.
Before attempting to repartition the hard drive, the NTFS partition that is taking up the entire drive must be properly prepared. If the drive has had a fair amount of use, the disk should be defragmented using the system tools in order to pack the used portion of the disk to the beginning of the partition. Then any errors on the drive (there are errors by default in the factory install) must be corrected by executing "chkdsk /f" from a command prompt, then rebooting into Windows XP.
The actual repartition can be done using a recent version of QtParted that handles the resizing of NTFS partitions. A convenient source of this is the SystemRescueCD. After booting up the latest version 0.2.15 of this CD, execute "run_qtparted" to start up the partition manager. Alternatively, QtParted is on the Knoppix 3.7 CD. Be sure to issue the command "knoppix26" at the boot prompt in order for Knoppix to boot up properly. After booting up, run QtParted from the system menu. Inside QtParted, select the hard drive (/dev/hda) and resize the Windows XP partition to make room for the Debian installation. We resized it down to 16Gb, leaving about 21Gb free for Linux.
This is the same as the Initial Debian Installation for desktops. We used the latest available version of the Debian-Installer, which was version rc2 at the time of the install.
The basic Debian installation hangs while trying to load PCMCIA. To correct this, boot up in "recovery mode" and edit the /etc/pcmcia/config.opts file to be as follows:
include memory 0x80000000-0x80000fff, memory 0xffeff000-0xffefffff include memory 0xfbeff000-0xffefefff, memory 0x000d7000-0x000d7fff include port 0xfd00-0xfdff, port 0xfc00-0xfcff, port 0xff40-0xff7f exclude irq 1 exclude irq 2 exclude irq 3 exclude irq 4 exclude irq 6 exclude irq 8 exclude irq 9 exclude irq 10 exclude irq 11 exclude irq 12 exclude irq 13 exclude irq 14 exclude irq 15
This configuration file was copied directly from here, which was derived from here.
Installing the 2.6.5 kernel on this notebook is very similar to adding 2.6.5 kernel support for standard desktops as described above. There is only one additional step, which is to add two options to the initial loading of the kernel in order to load up ACPI properly. We do this by adding the options "nolapic noacpi" to the kernel boot line for the 2.6.5 kernel. Edit /boot/grub/menu.lst in the section that begins with "## ## Start Default Options ##", being careful to follow the instructions in the comments. Update: starting with version 2.6.6, the "noacpi" option is no longer necessary, so that we can also add a line for the general 2.6 kernels to only have the extra "nolapic" option. The edited boot section of our /boot/grub/menu.lst looks like this:
# kopt=root=/dev/hda1 ro # kopt_2_6=root=/dev/hda1 ro nolapic # kopt_2_6_5=root=/dev/hda1 ro nolapic noacpi
This works well with the vesa driver and at a maximum of 1024x768 resolution at 24 bits. Look here for detailed information and examples of a XF86Config-4 file.
The built-in Synaptics Touchpad works out of the box with the default mouse drivers. However, the default "tap-to-click" feature is very annoying as it makes it very difficult to avoid unintended mouse clicks while moving the pointer via the touchpad. In order to turn it off, we need to access the advance options in the synaptics device and set the MaxTapTime option to 0.
The synaptics driver for XFree86 can be found in the xfree86-driver-synaptics package (install with "apt-get install xfree86-driver-synaptics"). After installation, follow the instructions in /usr/share/doc/xfree86-driver-synaptic/README.Debian, then add the option "MaxTapTime" "0" to the synaptics device section.
The KDE KLaptop application works to monitor the battery status as long as a recent 2.6 kernel is in use. Install the "acpid" and "kdeutils" packages to make sure the necessary software is in place, then use the KDE Control Center to change the Power Control settings and to display the battery monitor in the system tray.
We were not successful at installing a driver that would allow access to the built-in M5457 AC-Link Winmodem. If you wish to give it a try, the information found here may help. Please drop us a note if you can get this working.
We downloaded various LiveCDs and tried to boot up the Compaq Notebook with them to see how well they worked.
This old notebook is a Pentium 133 with 48MB RAM and a 1.5Gb hard drive. Installing on this particular notebook was fairly straight forward using version rc1 of the Debian-Installer. There are only a few notes worth mentioning.
Since the hard drive was only 1.5Gb in size, it was important not to allow the Debian-Installer to install the standard desktop, which takes up around 1.4Gb all by itself. Instead, we manually used apt-get afterwards to install x-window-system, xfce, and mozilla-firefox in order to get a light, but functional GUI. We also installed links2, for those occasions where mozilla-firefox loads up too slowly for our tastes.
In order to get the PCMCIA drivers to work, the PCMCIA mode in the system BIOS must be set to "PCIC Compatible". If set to "Cardbus/16-bit", Linux will identify all of our PCMCIA cards as unsupported external memory cards. To get into the system BIOS, hold down the ESC while turning on the computer. After a few seconds, it will output "Check system. Then press [F1] key." Pressing F1 will let you change the BIOS settings.
After getting the PCMCIA system to work, our generic ethernet adapter was auto detected and worked with the standard kernel. However, our DLink DWL650 wireless card was autodetected, but the orinoco_cs module failed to load properly. Apparently, this card only works in cardbus mode, which we are no longer using. Fortunately, our old Belkin F5D6020 adapter with the upgraded firmware worked fine. We were even able to install and run kismet, allowing the 225CDS to function as a 802.11b packet sniffer.
Revision History