Hitting the Road with Linux

Have you been thinking of running Linux on that new laptop? Find out some important things that you should know before you start installing.


It is often said that Linux has won the battle on the server and now must work to win over the millions of desktops currently running other operating systems (usually Microsoft Windows). But many users don’t have traditional desktop computers anymore. In many businesses it is common to be given a laptop and a docking station. Laptops are generally more expensive than comparable desktops, but the cost is offset by the flexibility and mobility they provide.

Unfortunately, running Linux on a laptop is rarely as easy as on a desktop. Laptops are more likely to have unusual (and unsupported) hardware, limited battery life, smaller displays and hard disks, and a variety of communications and network interfaces.

There is already a wealth of information online to assist you in smoothly running Linux on your favorite laptop, but the information is often scattered and difficult to track down. In this article, we’ll look at some solutions to a variety of laptop related problems. Along the way, we’ll point out online resources that are invaluable for laptop users.

Getting a Helping Hand

If you’re either struggling with a Linux installation or just don’t have the knowledge or confidence to do it yourself, help may be just around the corner. In most cities, you can find a local Linux User Group (LUG) full of knowledgeable users who can help. Most LUGs hold regular meetings where members discuss a variety of topics and software related to Linux. Between their meetings, members help each other out on LUG mailing lists.

Several times a year, many LUGs also will run local InstallFests. At an InstallFest, you simply show up with your computer and an open mind. A volunteer will help you install and configure a modern version of Linux, often explaining the process along the way and answering any questions you might have.

LUGs form a great local support network that can continue to offer assistance months or years after your first Linux installation.

To find a LUG near you, check the Linux User Groups list hosted by linux.org (http://www.linux.org/groups).

Before You Buy

If you haven’t bought a laptop yet, you’re ahead of the game. You have the chance to do some research and find out which laptops are most likely to run Linux with the least hassle. And without any research, you’d likely find that almost any Linux distribution will install on nearly any laptop. But you’d end up spending a lot of time in a process of trial and error. If you’re already a power user, you’ll probably be able to get by simply using the information that comes with the distribution you choose and the various HOWTOs online. If you’re fairly new to Linux, however, your best choices are to either buy a laptop that comes with Linux pre-installed or find one that works well with Linux.

The first place that you should check out is the Linux on Laptops Web site (http://www.linux-laptop.net). It is a directory maintained by Kenneth Harker that contains information about Linux compatibility for literally thousands of laptop models from more than 80 manufacturers. The information, provided by users who have successfully installed Linux on their own laptops, is often incredibly detailed. Many times you’ll even find downloadable scripts and configuration files.

If you end up purchasing a laptop that is not listed on Kenneth’s site, please do the Linux community a favor and contribute any information you gather that would be helpful to anyone else looking to use Linux on the same laptop model; even something as simple as “modem doesn’t work, everything else does!” is helpful. Like Open Source in general, the site isn’t valuable if its users never contribute their own expertise to it.

Having visited Kenneth’s site, you should also check the Web site provided by the laptop manufacturer. Some vendors provide good Linux support online, while others do not. If nothing else, you can often find the technical specs for your laptop on their site. This information is very valuable when it comes time to check hardware compatibility and perform the actual Linux installation.

Speaking of hardware compatibility, one of the most useful sites for checking what components and peripherals may or may not work is Red Hat — specifically their Linux Hardware Compatibility Lists (http://www.redhat.com/support/hardware). These are fairly comprehensive lists of desktop, server, and laptop models, as well as the various components they contain: sound cards, mice, keyboards, network cards, modems, disk drives, and so on.

Don’t plan on installing Red Hat? That’s not a problem. Check the lists anyway. The vast majority of the information is true for Linux in general and not at all specific to Red Hat. They just happen to have done a very good job of collecting and organizing the information.

If you don’t find all the information that you need in Red Hat’s lists, it’s also worth your time to check out SuSE’s Linux Component DataBase (http://hardwaredb.suse.de/index.php?LANG=en_UK). The CDB has a searchable interface, making it easy to locate information based on vendor, device, or category.

Pre-Installed Operating Systems

The vast majority of laptops come with an operating system pre-installed, usually some version of Windows. If you can spare the disk space, it’s a very good idea to leave the original operating system installed even if you plan to convert to Linux entirely. Why? Sometimes the old operating system is the only way to get the current firmware for PCMCIA cards or a BIOS update. And sometimes the pre-installed operating system is the only way to get necessary information about the laptop’s pre-configured hardware.

You can use the parted disk-partitioning tool (often included on your favorite distribution’s setup disk) to make room for Linux partitions on your laptop’s hard disk. Also, if you’re interested in using Advanced Power Management’s Suspend-to-Disk function (discussed later), you’ll need to use lphdisk to create the necessary partition.

Once installed, Linux and other operating systems can live happily together on the same hard disk. Most distributions use lilo, the standard Linux bootloader, to boot different operating systems. If you have a high-end laptop with enough RAM, you might consider using VMware (http://www.vmware.com) or Win4Lin (http://www.win4lin.com) to run different systems at the same time.

If you find that you’re never using that legacy operating system after some time, you can always reformat the partition it lives on and give the extra space to Linux.

Installation Methods

You can install any reasonably new Linux distribution using a variety of methods: CD-ROM, over the Internet using HTTP, a nearby computer using NFS, or from a partition on your hard drive where you’ve copied the necessary files.

On most laptops the easiest and most common way to install Linux is by using a bootable CD-ROM. However, some smaller laptops either don’t have a CD-ROM drive, or the CD-ROM drive is external and needs to be plugged in before the system boots. Of course, you need to make sure that your laptop is capable of booting from a CD-ROM and that it is configured to do so. If you’re in doubt, check the instruction manual for your laptop.

If a CD-ROM-based installation isn’t an option and you happen to have a lot of network bandwidth, a network-based installation may be the easiest option. Each distribution’s network-based installation procedure is different, so be sure to check the documentation before you get started.

If your CD-ROM drive just doesn’t understand bootable CDs, you’ll need to make one or more boot floppies using the DOS-based loadlin program, which is included on most Linux CDs. loadlin reads a raw disk image from the CD and copies it to a floppy disk, thus enabling you to produce Linux floppies without already having Linux installed.

Once you’ve made the necessary boot disks, you can boot a basic Linux kernel from floppy, get access to your CD-ROM drive, and continue the installation from there. The whole process is automated and very seamless.

If you’re not lucky enough to have a laptop on which you can use the CD-ROM and floppy drives at the same time (common on sub-notebooks), there is still hope! You’ll need to copy the necessary disk images from the CD-ROM to your hard disk and use loadlin to “boot” the floppy images directly from your existing DOS/Windows operating system.

Of course, you may find yourself in an unusual situation where the guidelines above do not apply. Or maybe you’re unsure of the best way to get your installation started. In either case, it’s often easy to find a helping hand locally. See Getting a Helping Hand, pg. 29.

Common Problems

Having read our advice so far, you’re probably wondering what sort of problems are common with laptops. How bad could it really be? And why?

In a nutshell, the problem is that laptop manufacturers still use proprietary hardware and often only supply the necessary drivers for Windows. This leaves you out in the cold if you’d like to try any other operating system (Linux, FreeBSD, etc.). More often than not, the problem spots are audio, built-in modems, and occasionally video. Furthermore, the ultra-small computers often referred to as sub-notebooks often lack any built-in floppy or CD/DVD-ROM drive, making installation more challenging.

So let’s briefly look at the types of problems you might see with various components and what sort of options are available.

Sound and Audio

A very large percentage of all the reported problems with laptop installs deal with sound. The Linux kernel already supports quite a number of audio chipsets “out of the box,” but many laptop vendors have a habit of selecting the most obscure and unsupported chips for their systems.

What can you do? Several things, actually. First, check if your distribution contains the sndconfig program. sndconfig provides an easy-to-use interface for detecting your sound chipset and automatically configures the right driver(s). If you’re lucky, your sound hardware may be supported but simply not configured properly, and sndconfig may well fix it for you.

If that doesn’t help, the next thing to do is check the Advanced Linux Sound Architecture (ALSA) project (http://www.alsa-project.org). The ALSA project has produced a very well supported, alternative sound system for Linux. You may have to recompile your kernel to make use of ALSA’s drivers, but the one-time hassle of doing so really is worth it if it makes your laptop play those MP3s you just can’t live without.


When it comes to video, there are far fewer problems with modern laptops. Virtually all video chipsets will work with Linux and XFree86. However, if your video chipset is not one that XFree86 has a driver for, you will need to run it in SVGA-compatibility mode rather than accelerated mode.

Will it really matter to you? That depends. If you’re using Linux for video-intensive applications (including heavy Web surfing), you’ll probably notice. But if you’re mainly running emacs or vi to edit code which you then compile and test, it probably won’t make a bit of difference.

To find out if you’ll have accelerated video, check the hardware specs for you laptop and get the exact model number of the chip (e.g. NeoMagic NM2070). Then visit the XFree86 Web site and check the Driver Status page (http://www.xfree86.org/current/Status.html). You’ll quickly be able to determine if there’s native support for your video hardware in the latest XFree86.


As with sound hardware, modems are often trouble spots for laptop users. It’s common practice for laptop manufactures to use so-called Winmodems, which were designed to work only with Microsoft Windows. In some cases, the sound system and the “modem” even share the same chips.

A recently developed driver (available in binary form) will transform many of these into “Linmodems” (http://www.linmodems.org), which work with Linux. However, using it also requires that you rebuild your kernel.

If your laptop’s modem isn’t Linux-friendly, and the Linmodem driver can’t help, you can always purchase a “real” PCMCIA modem.


When it comes to storage, laptops have a lot in common with desktops and servers. You’re not likely to encounter any problems with the hard disk, CD-ROM, or DVD-ROM in your notebook. However, if you’re trying to use an external drive of some sort (often the case for CD/DVD-ROMs on sub-notebooks), things can get interesting.

Some external drives appear no different to the operating system from those that are built-in because they’re connected to the same bus. Some less common drives, however, require a PCMCIA adaptor card that may or may not be supported by Linux. If this is the case, you’ll probably have found out during the installation process.


A Network Interface Card (NIC) is the most common add-on card for a laptop. And there are quite a number of networking options available: Ethernet, Ethernet/modem combo, token ring, 802.11b wireless, and even FDDI (fiber).

Some notebooks have a built-in NIC that may work well with Linux out of the box. Many manufacturers have taken a cue from the desktop/server world and standardized using on-board NICs, which are compatible with the Intel EtherExpress Pro series of NICs. If you’re lucky enough to have such a notebook, your Linux distribution likely automatically detected the card and offered to configure it for you. Send a note to the manufacturer thanking them for using standardized and well-supported hardware in your notebook!

The rest of us, however, have to worry about whether or not the PCMCIA card we buy is going to be supported in Linux. The good news is that most PCMCIA NICs are already well supported. Before you buy one, check one of the lists we mentioned earlier, such as the Red Hat Hardware Compatibility List. It’s very important to get exact model numbers, because manufacturers will often market several very different cards under the same name (and in very similar looking packaging). The only visible difference may be that one is a model 500 and the other is a 650.

If you’ve purchased a card that ought to work but doesn’t seem to, there are a few things you can do to get it working. See the Putting the ‘Work’ in Network sidebar, pg. 30.

Many wireless networking cards also work very well with Linux. But it pays to check before you buy one. One of the best sources for information about wireless networking support is the Linux WLan project home page (http://www.linux-wlan.com), run by Absolute Value Systems. There you will be able to determine which cards have the best drivers available and which, if any, features of the card don’t work well under Linux yet.

Power Consumption

Laptops, of course, have limited battery life. So staying in control of your power consumption means that you can work longer on that upcoming trip. Getting control in the first place involves having the right software installed, the right options built into your kernel, and knowing how to use the software.

When dealing with power management, the first place to start is with Advanced Power Management (APM), which is an industry standard specification for managing the power of a PC. The Linux kernel supports APM; however, many distributions ship with a kernel with APM disabled, so be sure your kernel supports it. You may have been asked about APM or laptops during the install, but it really depends on the distribution you selected.

An easy way to check is to try running the following:

$ ls /proc/apm

If you get an error message like:

ls: /proc/apm: No such file or directory

then you’ll have to recompile your kernel and be sure that you enable APM support. Otherwise, you can move on to looking at the APM-related commands.

To really take advantage of APM, you need to install a package called apmd. It provides, among other things, some command-line utilities for directly controlling the APM facilities of your laptop. For example, the command for suspending your laptop would be:

$ apm –suspend

If you wanted to see how much battery life you had left, you could execute:

$ apm
AC on-line, battery charging: 100%

The apmd package also provides the apmd daemon, which can be configured to execute arbitrary shell commands when APM events are triggered (such as plugging in power, running low on power, etc.). These scripts often live in the /etc/ apm/event.d directory, in case you’d like to peruse or even customize them.

Again, most distributions do come with an apmd package, but if you happen to need the source, the home page for this project is http://www.worldvisions.ca/~apenwarr/apmd/.

As it turns out, APM is an aging standard and is being succeeded by the Advanced Configuration and Power Interface (ACPI). It extends APM by providing an interface to power management features that exist in newer laptops (and computers in general). For example, newer computers offer the ability to throttle your CPU speed (in order to save power) and the ability to check the temperature of your CPU. This kind of functionality was not widely available when the APM standard was drafted; now that it is, ACPI can take advantage of it.

ACPI support in the Linux kernel is relatively young and still undergoing active development. It’s less likely that your distribution has the software you need to take advantage of ACPI, so visit the ACPI4Linux home page at http://phobos.fs.tum.de/acpi to learn more about the current state of affairs. For now, ACPI support is mainly for those of us who want to live on the bleeding edge.

Another easy way to cut down your power consumption is to minimize your disk activity. A good way to do this is to use noflushd, a daemon that spins down disks that have not been read from after a configurable amount of time. It then prevents disk writes from spinning them back up by caching the data in memory.

If your distribution doesn’t contain noflushd, you can find the source code, FAQ, and other useful information on the project at http://noflushd.sourceforge.net/.

Takin’ It to the Streets

While there’s no way for a single article to cover all the unique issues related to running Linux on a laptop, this should give you a rough idea of the sorts of problems you might run into. The bottom line is that today’s Linux distributions give you all the tools you need to make Linux a “road warrior” that can stack up against any other OS out there. And if you ever find yourself at a dead end, don’t despair. Just check out one of the many Web resource sites we’ve talked about and you’re likely to find whatever you need. Odds are that someone has traveled this road before you.


The Linux Mobile Guide: http://www.mobilix.org

Linux on Laptops: http://www.linux-laptop.net

Red Hat Hardware Compatibility Lists: http://www.redhat.com/support/hardware

SuSE’s Linux Component Database: http://hardwaredb.suse.de/index.php?LANG=en_UK

Find Nearby Linux User Group (LUG): http://www.linux.org/groups

The Advanced Linux Sound Architecture (ALSA) Project: http://www.alsa-project.org

XFree86 Driver Status: http://www.xfree86.org/current/Status.html

Linux WLan — Wireless Networking Drivers: http://www.linux-wlan.com

Putting the “Work” in Network

What can you do if an Ethernet card doesn’t work out of the box?

1. As root, issue the command cardctl ident with the card inserted in the slot. If you have two cards, you’ll see output for two cards, like this:

Socket 0:
product info: “Special Card “, ” Network PC CARD”, “Version 01.02″, ”
manfid: 0×0001, 0×0002
function: 6 (network)
Socket 1:
product info: “Dell”, “DVD Player”, “DVD to Go”, “REV 0″
manfid: 0x01d8, 0×1000
function: 5 (video)

In this case, Socket 0 has the new card that isn’t working.

2. Note the function of the card, in this case, 6(network). Check your /etc/pcmcia/config file for appropriate drivers by issuing the command grepnetwork/etc/pcmcia/config. You’ll see output like this:

class “network” module “3c589_cs”
class “network” module “axnet_cs”
class “network” module “ibmtr_cs”
class “network” module “nmclan_cs”
class “network” module “net/8390″, “pcnet_cs”
class “network” module “smc91c92_cs”
class “network” module “wavelan_cs”
class “network” module “wvlan_cs”
class “network” module “fmvj18x_cs”
class “network” module “netwave_cs”
class “network” module “xirc2ps_cs”
class “network” module “3c574_cs”
class “network” module “cb_enabler”, “3c575_cb”
class “network” module “cb_enabler”, “tulip_cb”
class “network” module “cb_enabler”, “epic_cb”
class “network” module “cb_enabler”, “eepro100_cb”
class “network” module “ray_cs”
class “network” module “airo”, “airo_cs”

If two drivers are listed on the same line, the second one is the one you want. Note that in the case of network drivers, the “_cs” suffix means Card Services (16-bit), while “_cb” means CardBus (32-bit). The pcnet_ csdriver is a generic driver that works with a variety of cards, though sometimes with limited functionality.

3. Using your favorite text editor, edit the file /etc/pcmcia/config.opts by appending information as follows:

(a) Add a line card “My New Card Information”. What goes between the quotations marks is up to you.

(b) Copy and paste the product info: line, changing “product info” to version and removing the colon.

(c) Add a line <bind “xxx”>, replacing xxx with the appropriate driver. For example:

card “My New Card Information”
version “Special Card “, ” Network PC CARD”, “Version 01.02″, ”
bind “pcnet_cs”

4. Send cardmgr a signal to tell it you changed the configuration: killall -HUP cardmgr. You don’t need to reboot.

5. Issue the command dmesg, which will tell you whether you have succeeded. If a new device (such as eth0) is registered, the card is ready to use.

Werner Heuser runs the MobiliX Web site (http://mobilix.org) and is a Debian/GNU Linux maintainer. He can be reached at wehe@mobilix.org.

Comments are closed.