Resurecting Compaq Presario 1240 with Damn Small Linux

In December I got two old, broken laptops from the relatives. The older, crappier one of them was a 200 MHz Compaq Presario 1240.

Compaq Presario 1240

The machine had only 98 MB of RAM, and a crappy on-board video card. In fact, it was all kinds of funky. For example, check out the weird Targus power adapter that came with it. I have no clue if this was the original AC adapter that shipped with the laptop, or if this was bought at a later time as a replacement. I know one thing though - this thing is so big it basically takes over every wall plug or power strip you plug it into for itself:

Compaq Presario 1240 Power Supply

When I got it it had Windows XP installed, and essentially it took about an hour to boot. I tried installing Windows 2000 on it but it was still sluggish. The system was barely crawling even after I set it up to use bblean as the default shell.

The only way to actually make it usable was to either install Windows 98 (not a good idea) or some minimalistic Linux account. The machine was ancient so I basically limited myself to the distros that claim to be fast, lean and optimized for old hardware:

  1. Damn Small Linux - the 50MB live distro that can be installed on the HD
  2. Deli Linux - specifically built to run on antique hardware
  3. Puppy Linux - another minimalistic distro recommended by K. Mandla
  4. Arch Linux - also recommended, but bit more hefty in size than the other 3 pocket distros.

After doing some digging, I noticed that Deli ships without the ndiswrapper package which I needed to make my WPC54G v1.2 working. This is the same card I use on my Ubuntu rig, so I knew it would work as long as I had something that would wrap around the windows driver. So Deli, while very promising was out the window.

Since I wasn’t sure if my hardware will handle Arch will handle arch, I was torn between Puppy and DSL. I picked the later, because I had more experience with it and I could verify that the 4.0rc3 version definitely had a recent release of ndiswrapper on it.

Booting DSL posed some problems on the hardware. DSL ships with two tiny X server modes: Xvesa and Xfbdev. The default one is Xvesa which gives you access to the higher resolution modes. I set it into 800×600 (which is the lowest possible resolution in Xvesa) but no matter how many times I tried, I could not get it working. The desktop would show up, but the colors were messed up, and the image was distorted and pixelated. Ramping down color depth and resolution did not help - below 16 bit certain threshold I just couldn’t tell if it the color distortions were caused by my settings or if I still was having problems.

Xfbdev did work, and booted into a usable desktop - or rather one that you could actually look at without getting seizures or eye strain. But the resolution was still somewhat wrong - the whole bottom of the screen was cut off making the taskbar and the pager invisible. When I killed X I noticed that this was also the case for the TTY - I could not see what I was typing most of the time. The only way to get DSL to conform to my display geomentry was to run DSL in frame-buffer mode with the cheatcode fb800×600, and then pick Xfbdev as the X server. It doesn’t look very pretty, but it works.

Is this an issue with my video hardware, or is this a DSL thing? I’m guessing it’s the combination of the two. Neither Xvesa nor Xfbdev really talk to the video hardware. Xvesa uses standard BIOS VGA video modes and Xfbdev draws directly in the frame buffer. So I’m guessing that whatever Xvesa is doing is not directly supported in the POS video card that is installed on this machine. Perhaps a full X server that actually attempts to talk to the hardware would fare better here?

The installation to hard drive went smoothly. It was actually very fast, since the whole distro is only 50 MB. You literally run it, go make yourself a cup of coffee and before you come back it is long done, and asking to confirm a reboot.

Before I started I partitioned the drive with cfdisk creating a 128 swap partition as /dev/hda1 (type 82 in cfdisk) and made the rest into a type 83 (ext2) partition /dev/hda2.

Then I created swap partition on /dev/hda1:

mkswap /dev/hda1
swapon /dev/hda1

Finally, I performed the actual install using dsl-hdinstall command, and specifying /dev/hda2 as my installation drive. I choose Grub to be my bootloader and rebooted.

Note that the default entry in Grub is the Xvesa, non frame-buffered mode. So when you boot, you need to make sure you choose the fb800×600 option. The boot was pretty seamless and relatively fast. My next task was setting up wireless.

I went and downloaded the windows drivers from the linksys ftp site. I think I wrote about this before - thanks to Linksys’ brilliant versioning WPC54G v1.2 is really v1.3. Go figure. I downloaded the zip file, and transferred the lsbcmnds.inf and bcmwl5.sys files to the laptop on a USB stick.

Here is the little caveat - watch closely what I did. I copied both files to my home drive:

# ndiswrapper -i lsbcmnds.inf
Installing lsbcmnds
# ndiswrapper -l
lsbcmnds   Invalid Driver!

Apparently you need the absolute path here:

# ndiswrapper -i /home/dsl/lsbcmnds.inf

I don’t remember having to do this on Ubuntu, but go figure. Then I of course loaded the ndiswrapper driver:

ndiswrapper -m
modprobe ndiswrapper
echo ndiswrapper >> /etc/modules

Once I did that I ran iwconfig from the GUI menu. Strangely enough you can’t use ifup to bring up your wifi - for some reason it does not recognize wlan0 as a valid interface, even though it does show up when you do ifconfig. The GUI tool works though. If you specify wlan0 as your interface, and input your channel, ssid and WEP key and hit ok, all should be well.

So now I have a working DSL install. The resolution is low, and everything looks bit ugly but it is quite speedy compared to the sluggishness of Win2k. The base install with just the window manager and a single instance of rxvt running takes only around 12MB of RAM (no swap) and less than 2% of CPU time to run which is quite impressive. Of course Fifrefox will happily eat up all your remaining RAM as soon as you touch it, so it’s usually better to run the incredibly speedy Dillo to browse the web. To bad that some pages look like crap in it.

My only issue with DSL is that it is not really intended to be used this way. DSL was designed primarily to be a quick and easy live distro and you feel it at each step. Every time you reboot it, forgets certain things. For example to re-set my wifi with iwconfig every time. Other settings mysteriously reset themselves as well. Perhaps some tweaking will resolve this but it definitely does not work 100% directly “out of the box”. But hey, I guess I can’t complain. It work - and much faster than windows at that. It will probably be hard to beat the memory footprint and installed size of this distro - but the video performance could be better.

K. Mandla highly recommended Arch so I decided to try it next. Unfortunately, that did not work. Halfway through the initial boot off the CD I got a kernel panic, and a (un)helpful message that my CPU is to old. I guess Arch and Presario were never meant to be.

So my next steps are: Slax or Slax Popcorn (shipping with XFce instead of KDE). If that fails, I’ll get the smallest debian install I can find and then just build it from the ground up till I have a working system. Either that, or maybe I’ll finally try Gentoo for that “optimized for this particular machine” touch.

Related Posts:

  • Installing Slax Popcorn on Compaq Presario 1240
  • Old Laptops
  • Installing Fluxbuntu on Compaq Presario 1240
  • Ubuntulite: Problems Running Feisty on Old Hardware
  • Show me your desktop
  • Ubuntu Hardy on Compaq Presario 1240 (Living Without X)
  • Linksys WPC54G ver. 1.2 with WPA on Hardy
  • Family Tech Support
  • Linux Wireless
  • To Many Linux Distros?

  • 17 Responses to “Resurecting Compaq Presario 1240 with Damn Small Linux”

    1. Gravatar jambarama UNITED STATES Says: Reply to this comment

      Good post - hey if you want a slightly more functional browser than dillo, but without the bloat of Firefox - check out Kazehakase - it runs gecko, but it is the fastest browser I’ve ever used. It will be heavier than dillo, but it’ll at least render stuff right. I guess Opera might work too, but in either case I don’t know if DSL has packages for them, so you may have to build Kaezehakase.

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Ubuntu Linux Ubuntu Linux
    2. Gravatar Luke Maciak UNITED STATES Says: Reply to this comment

      Yeah, I actually know about it. It didn’t ship with DSL and I’m not sure if it’s available. I would probably have to build it from scratch.

      I’m going to try Slax Popcorn next and see how that runs. Slax has a relatively big and active community so there might be Kazehakase package out there.

      On a related note - I managed to boot an older version of Slax on it, but it is a bit sluggish. I killed KDE 10 minutes into the boot process. Fluxbox fared bit better, but most of the core apps are KDE based and take minutes to start.

      I’m hoping Popcorn will include some lean, non KDE apps that I could use.

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Windows Windows XP
    3. Gravatar vacri AUSTRALIA Says: Reply to this comment

      You’ve got further than me. I’ve just been given a Dell C400 (no optical drive) and bought an IBM x30 (no optical drive)

      The C400 has been completely wiped by the IT department selling it. It:
      - won’t boot from a USB optical drive
      - won’t boot from a thumb drive
      - won’t boot from a PC card
      - can’t boot from hdd (completely blank)
      - theoretically can boot from PXE, but I have no experience/setup there

      I pulled the drive and partitioned it with dos (the owner wants windows) by putting it in the other laptop I have, started copying the XP install files… and the optical drive cuts out at around 140MB for some reason. And, of course, DOS doesn’t support USB so I can’t get the XP install files there either.

      The x30 I just got for myself yesterday has Windows on it but I want linux, but won’t boot from an external cd drive, and it’s got a sodding bios password on it. Having a gander on the web tells me that I need to attack the motherboard with a soldering iron to read the bios password.

      Hooray for fighting PCs… *sigh*

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Windows Windows XP
    4. Gravatar Luke Maciak UNITED STATES Says: Reply to this comment

      In the good old days all you had to do to get rid of that pesky BIOS password was to pull out that little battery that sat on the mobo and wait few minutes. Sigh.. So much for that.

      Hmmm…. How about you just install windows while the drive is in another laptop then swap the drives again. There is a chance that windows will actually boot in low resolution mode, with a lot of b0rken drivers. Then you can just start installing appropriate drivers as needed.

      Does the x30 have a floppy drive? A lot of distros these days will provide you with a boot floppy image that you can use to bootstrap the CD installer if you can’t get the CD-ROM set to boot before HD. Floppy is usually the 1st boot device on most systems.

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Windows Windows XP
    5. Gravatar vacri AUSTRALIA Says: Reply to this comment

      Tried half-installing windows then switching back before trying the dos stuff, but had no success. Although I didn’t try fully installing windows, so maybe that’s worth a try. I’ve had mixed success in the past by installing windows to the first reboot, then pulling the drive, since it’s only supposed to be after that that the system-specific stuff gets applied. Now the annoying thing is that the optical drive lappy only has a 200MHz cpu, so installing will be s l o w. But it’s better than nothing, I guess )

      And there’s not a floppy drive on any of the laptops.

      I swear, it’s enough to make you want to not do anything on the cheap!

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Windows Windows XP
    6. Gravatar K.Mandla JAPAN Says: Reply to this comment

      Nicely done. Sorry about the bum steer on Arch. I had been using it on a 300Mhz Pentium II for the longest time (a Dell Latitude CPi A, if I remember right), and so I thought it would work for you too.

      I’m glad DSL worked though. It’s not my favorite distro, but it seems to snap into place when others don’t work.

      Posted using Netscape Netscape 6.1 on Windows Windows 98
    7. Gravatar Terminally Incoherent » Blog Archive » Installing Fluxbuntu on Compaq Presario 1240 UNITED STATES Says: Reply to this comment

      […] This post is yet another entry in the Compaq Presario 1240 saga. If you have been reading this blog for the past week or so, you know what is going on. If you are new, let me explain. Last December I “inherited” some old laptops. And by “inherited” I mean someone gave them to me saying “if you don’t want them, I’m just gonna throw them out”. One of them was the ancient, ancient Presario 1240 with 200MHz CPU and 98 MB of RAM. At first I tried to set it up with Windows and perhaps give it to a relative, but the system was just to slow, even when I set it up with bbLean as the default shell. So I decided Linux was the way to go. Over the past few days I tried several lightweight distributions including Deli Linux (which didn’t have ndiswrapper) DSL Linux, Arch Linux (which didn’t work) and Slax Popcorn. I was not entirely happy with either of those systems. […]

      Posted using WordPress WordPress 2.0.5
    8. Gravatar griff5w UNITED STATES Says: Reply to this comment

      I have a similarly old dell machine. Like you, I needed something that would run on older hardware and what I ended up using was Zenwalk. It is amazing how much faster the machine loads than Fedora or Suse on my 2.8 GHz dual-core system with 4GB Ram. Go figure. So try out Zenwalk.

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Windows Windows XP
    9. Gravatar Luke Maciak UNITED STATES Says: Reply to this comment

      I will have to try that one along with Vector. Right now I’m using Fluxbuntu which is not quite as polished as I would like it to be. )

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Ubuntu Linux Ubuntu Linux
    10. Gravatar Devin LaSalle UNITED STATES Says: Reply to this comment

      I have an Compaq 1240 also and I am wondering if a Linux distribution might run it better than Windows ME.

      I am curious, did you try to install the regular archlinux or did you try to install lowarch? If you are able to get lowarch running on the machine I would certainly be interested in hearing about that!

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.7 on Windows Windows ME
    11. Gravatar Luke Maciak UNITED STATES Says: Reply to this comment

      @Devin - I didn’t try LowArch.

      Btw, other distros I tried were

      Slax (read how it worked on the presario here)

      Fluxbuntu (it actually worked quite well)

      Ubuntu Lite (very good despite some funky Feisty related issues)

      :)

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Ubuntu Linux Ubuntu Linux
    12. Gravatar simonc50 UNITED STATES Says: Reply to this comment

      Hey great thread ..i got one of these lappys too but only 64mb ram..
      I tried dsl with fb800×600 and xfbdev ok but its maxed out in the ram crashes when i go to xterm..
      i found an old ubuntu 5.10 live cd ..hey presto it worked after about 15mins..amazing!..i have a stick of ram on the way ..so things are looking up.
      Its nice too get old harware going!..Thanks for the thread.!

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.11 on Ubuntu Linux Ubuntu Linux
    13. Gravatar Luke Maciak UNITED STATES Says: Reply to this comment

      I ended up running Fluxbuntu and Ubuntu Lite on it in the end. They were the ones that performed the best. )

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.11 on Windows Windows XP
    14. Gravatar Toby Newman UNITED KINGDOM Says: Reply to this comment

      Thank you for the xvesa tips which helped me get up and running.

      To enable sound in Damn Small Linux (DSL) on a Compaq Presario 1240 you will need to use the command:

      sudo modprobe sb io=0×220 irq=5 dma=1 dma16=0 mpu_io=0×330

      …where the values after sb correspond with the values you see in your bios.
      I now have mine installed to the HD, customised, on my LAN, and streaming web radio through the in-built JBL speakers. )

      Posted using Dillo Dillo 0.8.5
    15. Gravatar Luke Maciak UNITED STATES Says: Reply to this comment

      Thanks Toby! I actually moved on and installed several other systems on this machine after that. I briefly had it running Slax, then Fluxbuntu and now it is running Ubuntu Lite. I’m planning to mess around with it some more and install something more hard core - perhaps Crux or Gentoo at some point and see if I can get better performance. )

      Btw, how did you get into BIOS on that Compaq machine? I tried pressing just about everything on the keyboard during the bootup sequence and I couldn’t get in.

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.14 on Windows Windows XP
    16. Gravatar Toby Newman UNITED KINGDOM Says: Reply to this comment

      When I got my Presario 1240 it had a BIOS password from the previous user which stopped me booting an O/S, let alone getting into the BIOS! I dismantled it and removed the battery for 25 minutes and the password is now cleared but, whenever I reboot it, the clock returns to 00:00 in 1988. Bizarrely, other BIOS settings stick fine, so it’s not a flat battery.
      Anyway, as a result, whenever I boot, the machine spews an error (invalid clock or something) and gives me two options: F1 to continue booting, or F10 to enter BIOS.
      So, for me, F10 opens the BIOS. For you? I don’t know. )

      Posted using Dillo Dillo 0.8.5
    17. Gravatar Toby Newman UNITED KINGDOM Says: Reply to this comment

      Just noticed that your message board is modifying the modprobe string. Here it is in code brackets:
      sudo modprobe sb io=0x220 irq=5 dma=1 dma16=0 mpu_io=0x330

      Posted using Dillo Dillo 0.8.5

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <pre lang=""> <em> <i> <strike> <strong>

    [Quote selected]