How do you cram a modern Linux OS onto an old Laptop?
My laptop dilemma started when my son happened upon a bargain laptop, and
gave it to me as a gift.
It's an old Dell Latitude XPi, dating back to the Windows 95 era. For
its time it was quite an item, sporting over 3 gigabytes of disk, 80 megabytes
of memory, and a blinding 166 megahertz processor speed.
As it was given to me, it had been updated with a 15 megabyte disk. More even than
the bios entirely understands (though Linux does understand it).
None-the-less, I thought that given the enormous scalability of the Linux
operating system, I could make something useful of the aging laptop if I could
only get Linux installed.
Happily, I was able to do it, in fact this article was created on the fully
configured laptop. But the journey had a few bumps in it.
I had to do a lot of digging through documentation files and web pages, as
well do considerable experimenting before I finally got to the finished
product. My web digging convinced me that I'm not the only one around who
wanted to do such a thing, and not the only one that struggled with it.
So I decided to document my trials and tribulations in the hope that many of
the snags are common ones, and the solutions may be helpful to someone
Was it worth it?
Happily, for me at least, the answer is an emphatic yes.
My system now is a very functional laptop running Debian Etch. That makes it a multi-tasking
(even potentially multi-user) computer with full wireless networking
Because it has a 16 bit Cardbus interface, it can be extended to support USB
2.0 by simply plugging in a card.
By carefully selecting from the over 50 X-windows managers available in
Linux, I was able to find a couple that give high functionality without chewing
up too much of the laptop's limited resources.
In addition to Linux, the laptop can boot directly to a Freedos partition and be up and running in
seconds. I installed dosemu, and simply edited the
/etc/dosemu/dosemu.conf file to have the $_hdimage parameter
point to the freedos partition. With that I can also have access to Freedos
from within Linux as well as boot directly to it.
Where to begin?
If you're up to the challenge, you can try the steps I did to install Debian.
I chose to do the install over the network because I have a high speed
connection, and the Debian Etch is something like 11 CD's. If I choose to
install via CD I'd have to download all of them (or purchase them from a
vendor). But by doing the install over the network, only the basic system
packages needed to be downloaded. Others could be added later as I needed them.
Here's the steps to install Debian Etch on an old laptop:
Get the network install cdrom iso from debian.org|
Burn the iso onto a cdrom
Or, if you can't boot from a cdrom:
Connect laptop network card to network
Download the Debian network install floppy images|
Copy the floppy images to floppy (use dd if in Linux)
Boot from boot.img floppy or cdrom, do the install
The installer, either from floppy or cdrom, will probe to find the network card, and
if successful get you connected. If you don't have DHCP available, you have the option
to manually configure the network during the install.
Once the installation is complete, you may want to modify the package
installer configuration to allow you access to packages not made available by
The package installer configuration is in the file /etc/apt/sources.list. The first
non-commented out line of that file probably starts out looking something like this:
deb http://ftp.us.debian.org/debian/ etch main|
For some of the things you'll probably want (and need) to install, you need
to add the non-free and contrib parameters to that line, then
tell the package manager to do an update.
deb http://ftp.us.debian.org/debian/ etch contrib non-free main|
I happen to manually use apt-get, so to update and included knowledge
of the new package libraries, I issued a sudo apt-get update command. If you
prefer to use either the deselect or aptitude package manager, just
select update before doing any package installations or deletions.
Snags? I had a few
Snag 1: detecting the network card
The network connection is the first hurdle. I suggest using a non-wireless
connection for the install. If you have to purchase a network card for you
laptop, be sure to check the Linux Supported
Network Cards site for some good alternatives.
I had on hand 2 non-wireless network cards (a 3com and an old Linksys), and 2
wireless cards (a Linksys and a Belkin).
My old Dell laptop has a cdrom, but cannot boot from it. So I copied 4 install
floppy images to floppy:
Using these install floppies, I found that neither of the wireless network cards were
recognized by the install system.
However, the non-wireless Linksys (model EC2T) was detected by the install,
and the game was on.
For maintenance and update issues, I'd suggest that during your install, you select
to have at least 3 partitions on your disk:
A / partition, at least 2 gigabytes|
A /home partition, at least 1 gigabyte
Any other partitions you need. I made one for Freedos
A swap partition, at least a few hundred megabytes
Incidentally, the modern installs default to either gnome or KDE for
the desktop. Both of these are nice -- on newer machines.
But for an old system like my old Dell, these modern desktop managers are
You can save a couple of gigabytes of disk space on the root partition by
selecting NOT to install a desktop (you'll get a chance to select some install
options, including desktop)
After install, the installer sets up the package manager to be able to download
from the net any other packages you might desire.
You can install the x-window-system later, and it will give the support you need for
one of the more modest window managers.
To install x-windows after the fact:
sudo apt-get install x-windows-system
After that, pick and install a low requirement window manager, and you're in business.
Snag 2: DMA problems on boot
Once my system was completely installed, I found that booting was slow.
Once Linux got to the point of mounting disks, it hiccuped repeatedly and paused
for several seconds each time. This was a DMA problem with the laptop.
From what I've seen on the web, this is a common problem with old laptops. I
had the same problem on an old Hinote laptop. On the old Hinote, I was using an
earlier Debian distribution, and I was able to put a parameter in the boot
loader to turn off DMA. Problem solved.
But alas, the Etch version of Debian has a bug, and I was unable to turn off DMA
in the boot loader. It's a documented problem.
The ugly solution was to download the kernel source for the kernel version I was using,
turn off the CONFIG_IDEDMA_PCI_AUTO, then build a new kernel. I happened to have
the same Debian Etch distribution on a much faster desktop, so I actually built the
new kernel there.
I followed the instructions found here and created a custom, nodma
kernel as a deb file that I could then use dpkg to install on the
If building a kernel is beyond your desired level of involvement, you might
try downloading this Debian
Etch nodma kernel that I made for my own old laptop. Since it's a pretty
basic system, it might work on your Etch install also. Go through the install
of Etch described above, then if you get the halting boot situation, try
downloading this deb file and install it as follows:
sudo dpkg -i linux-image-2.6.18_custom.1.0_i386.deb|
The downloadable kernel is basically the same as the install kernel except
that dma is turned off. This got me around the glitch that prevented grub
from turning off dma with a parameter switch.
The dkpg install updated grub for me, but I had to add the irqpoll
parameter to the boot line for my new kernel, then reinstall grub with:
sudo grub-install /dev/hda|
Now the new kernel boots without excessive delay and works well.
Snag 3: wireless support
You can avoid the problem I had next by purchasing a wireless network card that's
supported better by Debian. As for me, I had a Belkin F5D7010 network card.
The auto-boot procedure didn't recognize it. It needed some support from the Debian
The driver I needed was bcm43xx. That is included in the Etch distro. But
that driver needed some vendor support. By installing a package called
bcm43xx-fwcutter I was able to get the utility and other support needed by the
So -- it should have worked. Right?
Well, it didn't. When I installed the bcm43xx driver with sudo modprobe bcm43xx,
I could not configure the network card.
It turns out that the install of the bcm43xx-fwcutter package unpacked some necessary
files, but into the wrong place. To fix that I did the following:
The unpacked files were in /usr/lib/firmware|
I moved them to /usr/lib/hotplug/firmware
With that adjustment, I was able to setup my wireless with the following script:
sudo ifconfig eth1 22.214.171.124 (use you're desired address)
sudo iwconfig eth1 essid netname (use you're wireless net name)
sudo iwconfig eth1 key 521.... (a 128 bit hex key)
sudo iwconfig eth1 rate auto
sudo route add default gw 126.96.36.199 (use your gateway address)
Now running the script brings up the network and I'm on the air.
If you pick a more compatible card, you can probably avoid some of this hassle.
Snag 4: Adding a Freedos partition
I wanted to install Freedos onto my laptop disk as a bootable partition so I could
choose to boot to Freedos instead of Linux. Mind you, Linux is working great on
my laptop, but it does take a couple of minutes to boot.
For little tasks, quick access to an operating system would be nice, I thought. And
Freedos is quite well populated with useful utilities, including the vim and
emacs editors I use in Linux.
So in my Linux install setup, I set aside a 1 gigabyte partition for Freedos
use. Unfortunately, I choose to make it my last partition. I copied my desktop
install of Freedos to this partition, and setup grub to boot the partition.
It didn't work. Since the bios didn't entirely understand my disk, grub couldn't get
to the partition that had Freedos on it.
But there was a nifty way out, and I offer it here for those foolish enough to have
a disk bigger than their bios completely supports.
I was able to boot Linux and use dosemu to get to my Freedos install. From
there I used the sys a: command to make a bootable floppy. I copied my
fdconfig.sys file to the floppy and adjusted the floppy autoexec.bat to change
directory to c: and jump to my c: autoexec.bat file.
Then I exited Freedos (dosemu), and used the Linux dd command to make a floppy
image. I then copied it and memdisk to /boot as follows:
dd if=/dev/fd0 of=freedosboot.img|
sudo apt-get install syslinux (needed to get memdisk)
sudo cp /usr/lib/syslinux/memdisk /boot
sudo cp freedosboot.img /boot
Finally, I modified my grub boot to use the freedosboot.img (which is
reachable on the first part of the disk) instead of trying to directly boot to
the unreachable (according to the stupid bios) Freedos partition of the disk. I
added the following section to my /boot/grub/menu.lst file:
Then I re-installed the grub boot loader with: sudo grub-install /dev/hda.
Now I can select Freedos at boot and be up and running in seconds instead of a couple
With dosemu, I can run the same install of Freedos from within Linux. I can also
simply mount the Freedos partition from within Linux to have access to whatever I
was working on in Freedos.
For an old laptop, I can guarantee you that you don't want to use one of the hefty
window managers like gnome or KDE.
There are a number of light weight window managers that will do the job efficiently,
frankly outperforming even the old Windows 95 that the computer was designed for.
A number of excellent ones are included in the Debian distribution. Here's a
partial list of lightweight managers you might consider:
|aewm||A minimalist window manager for X11|
|blackbox||A window manager for X11|
|enlightment||The enlightment manager for X11|
|evilwm||A minimalist window manager for X11|
|fluxbox||Highly configurable and low resource X11 Window manager|
|flwm||Fast Light Window Manager|
|icewm||Wonderful Win95-OS/2-Motif-like window manager|
|ion2||Keyboard-friendly window manager with tiled windows (v2)|
|lwm||Lightweight window manager|
|metacity||A lightweight GTK2 based Window Manager|
|nawm||Non-windowmanager with windowmanager functionality|
|pekwm||Fast & Light Window Manager|
|pwm||Lightweight window manager with frames|
|ratpoison||Keyboard-only window manager|
|sapphire||A minimal but configurable X11R6 window manager|
|sawfish||A window manager for X11|
|tinywm||Tiny window manager|
|twm||Tab window manager|
|windowlab||Small and simple Amiga-like window manager|
|wm2||Small, unconfigurable window manager|
|xfe||Lightweight file manager for X11|
Again, these are only the lightweight managers, there are many more managers that
require more resource. But these are ones that will work well on old equipment in the
166 Mhz range of speed.
I haven't tried them all, I admit. I've worked with blackbox, fluxbox,
enlightment, icewm, ratpoison, wmii, and dwm.
My top choices on the minimal resources of my old laptop are ratpoison and dwm. Both are ultra
lightweight, approximately the same size. With dwm I have multiple work spaces
(called tags), and 3 display modes. There's the Monocle mode where one window
takes the entire screen, the tile mode where windows cover the screen in tiles,
and the float mode where one can move, resize, and overlap windows. In dwm's
tile mode, tiles are automatically created as tasks are ran, with one tile
always occupying an entire column and having an adjustable width. All other
windows are in evenly sized tiles in the non-master column. One can alternately
select which window occupies the master tile.
With ratpoison I have
two display modes, the monocle mode, and the tile mode. By using an additional
perl-script utility named rpws, I have multiple work spaces (called
groups). Though setting up tiles in ratpoison is done manually, it is possible
to save tile arrangements on disk and recall them. Each work space can have its
own tile arrangement, and when I switch to a new work space, the tile
arrangement for that screen are restored. Check out my review for more details
While ratpoison and dwm are very lightweight and fast window managers that
play well in my aging laptop, they still let me launch any window application
that I wish. Of course, some of those applications themselves are a bit much
for my old equipment, but ratpoison and dwm perform marvelously.
I leave it to you to check out the features of the the window managers on
the list, and I'm sure with all the choices you'll find something that works
well for you.
Don't you just love all the choices Linux provides?
One final note on window managers. On my old laptop, even the minimalist ratpoison
manager came up with only a 640x480 screen resolution. Reading the manual, I found that
my old Dell can only do 800x400 at best. Simply changing the color depth in
/etc/X11/xorg.conf from 24 bit to 16 bit gave me the maximum 800x400 resolution
that my laptop is capable of.
Some Small Applications For My Old Laptop
I had to hunt a bit to find suitable applications for my old laptop, but
buried in the massive Debian Linux archives were many choices. I'll list a few
of my favorites here, in case you also need some lightweight utilities.
For editing text, I use vim and gvim. I know, you've probably
heard that all the key commands for vim are pretty arcane. But if you take the
time to learn a few, you'll find that not only can you do about anything a much
larger editor can do, you'll likely be able to do many things larger editors
cannot even touch.
For example, in vim you can split the screen and edit two documents at once,
cutting and pasting between the documents. For that matter, you can split the
screen as many times as you wish and work on several documents at once. You can
cut or copy text into named buffers (names are the letters of the alphabet).
That gives you a lot of buffers. The text in the buffers can then be moved or
pasted anywhere in any opened document. The buffers retain their contents, and
vim can be configured so that the buffers even have their contents the next
time you run vim.
Vim can record command sequences. In fact, as with buffers, you can have
many recorded key sequences. Vim can retain the recorded key commands so that
the next time you run vim, the command sequences are still available.
If you need to make a formatted document, one of the lightest duty ways to
do that is with Ted, an rtf editor. Up
through Debian Etch, Ted was included in the distribution, but now you need to
go to the source.
For a light web browser, Dillo works
well. It does a pretty good job of rendering pages and has ssl support, but
a text (default) and graphics (-g option) mode. Links2 also has ssl support,
mouse, links2 is controllable by either the mouse or the keyboard.
For spreadsheets, there are a number of choices, including oleo, Microcalc, slsc, and sc, to name but a few. Oleo and
slsc have apparently been dropped from the Debian distributions starting with
Lenny, but sc is still one of their packages. I use sc for my laptop
spreadsheet. In fact, I use it on my desktop as well. It is very fast to load,
and has a good number of range, time, financial, and math functions that make
it a very capable spreadsheet.
I've even found that the yorick matrix
language even runs well on my little laptop. I do most of my programming either
with yorick for my math and data graphics work, or perl for general
A Network Way To Borrow Some Power On Your Old Linux Box
Don't forget that Linux uses a client-server design on all window based programs.
That means that if you have more than one Linux computer in your network, you can be on one
(the client), and run applications on another (the server).
In designing this webpage for example, I have one of my ratpoison windows logged onto
my bigger, more powerful desktop. From that window I run iceweasel to check out the layout
of the page I'm building. Though iceweasel won't run will at all on my laptop, the laptop
can do very will just handling the client end of iceweasel as it runs on a more powerful
With a touch of a couple of keys, I can jump back and forth from my local window where
I edit the page with vim, and the iceweasel window running on my desktop.
If you wish to use your old laptop as a client in this way, you need to make a change
to file /etc/X11/xinit/xserverrc. Drop off the -nolisten tcp arguments on
the exec /usr/bin/X11/X -dpi line. Then reboot.
Before logging onto a Linux server on your network, give it access to your laptop
x-windows system. On the laptop, use the xhost command: xhost + servername, substituting
your server computer's name in place of servername. (You'll need to redo the
xhost command when you reboot).
Now when you login to your server from your laptop, you'll be able to launch x-window
programs on the server, with the laptop displaying the client portion (it feels like you're
running them on the laptop, only with good performance).
By making considered decisions on what products you run on your old laptop
and what ones you run (as client) on a more powerful server, you'll have a very
powerful and usable system that lets you do whatever you imagine from the
comfort of your favorite easy chair.
My Debian Etch install on the old Dell laptop finally became a bit dated.
I decided to follow my own experience and install Debian Lenny on my laptop
using much the same procedure.
I was confronted with two seemingly insurmountable snags:
The Lenny Install Floppies and CDROM didn't have drivers for any of my
My old laptop CD was on its last legs, and couldn't reliably install
from a big stack of CDs.
But -- I found a solution!!!
Read my Puppy Linux
review and see how I was able to get the latest Puppy Linux onto my old