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 fb800x600, 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 fb800x600 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.

[tags]compaq, compaq presario, compaq presario 1240, dsl linux, puppy linux, arch linux, deli linux, linux, windows, windows 2k, windows 2000, windows xp, laptop, notebook, dillo, ndiswrapper, WPC54G v1.2[/tags]

This entry was posted in sysadmin notes and tagged , , . Bookmark the permalink.



23 Responses to Resurecting Compaq Presario 1240 with Damn Small Linux

  1. jambarama UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    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.

    Reply  |  Quote
  2. Luke Maciak UNITED STATES Mozilla Firefox Windows says:

    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.

    Reply  |  Quote
  3. vacri AUSTRALIA Mozilla Firefox Windows says:

    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*

    Reply  |  Quote
  4. Luke Maciak UNITED STATES Mozilla Firefox Windows says:

    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.

    Reply  |  Quote
  5. vacri AUSTRALIA Mozilla Firefox Windows says:

    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!

    Reply  |  Quote
  6. K.Mandla JAPAN Netscape Windows says:

    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.

    Reply  |  Quote
  7. Pingback: Terminally Incoherent » Blog Archive » Installing Fluxbuntu on Compaq Presario 1240 UNITED STATES WordPress

  8. griff5w UNITED STATES Mozilla Firefox Windows says:

    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.

    Reply  |  Quote
  9. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux says:

    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. :)

    Reply  |  Quote
  10. Devin LaSalle UNITED STATES Mozilla Firefox Windows says:

    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!

    Reply  |  Quote
  11. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux says:

    @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)

    :)

    Reply  |  Quote
  12. simonc50 UNITED STATES Mozilla Firefox Ubuntu Linux says:

    Hey great thread ..i got one of these lappys too but only 64mb ram..
    I tried dsl with fb800x600 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.!

    Reply  |  Quote
  13. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

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

    Reply  |  Quote
  14. Toby Newman UNITED KINGDOM Dillo says:

    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=0x220 irq=5 dma=1 dma16=0 mpu_io=0x330

    …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. :)

    Reply  |  Quote
  15. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

    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.

    Reply  |  Quote
  16. Toby Newman UNITED KINGDOM Dillo says:

    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. :)

    Reply  |  Quote
  17. Toby Newman UNITED KINGDOM Dillo says:

    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

    Reply  |  Quote
  18. Good day!

    I have a presario like this one.
    The DSL is working nice, but the wine…
    It didn’t work. So, I think I will throw this shitbook away.

    Reply  |  Quote
  19. 36zips_brick UNITED STATES Mozilla Firefox Windows says:

    i just installed DSL on my compaq presario 1240 that was sitting in a junk pile in my garage….

    it works alot better than the windows Me that i DBAN’d out of the hardrive awhile ago…

    but your blog helped me with the install. i was getting the distorted crazy colors when booting off of the DSL live cd….. had to press F2 and change boot: fb800x600 along with xfbdev option for the boot.

    but now i either need to find a wireless card that works with dinosaur box’s or a free dial-up ISP to get this thing on the net lol.

    but thanks- great post.

    Reply  |  Quote
  20. ZorkFour UNITED STATES Mozilla Firefox Ubuntu Linux says:

    To get video working for me, I use VGA=788 as a boot parameter.

    Reply  |  Quote
  21. Greg UNITED KINGDOM Internet Explorer Windows says:

    Hi, I have a compaq presario 1240 with 64mb of ram. I am trying to install some kind of linux as a project and learning curve. At present i am trying Mandriva 2007 with Icewm , it installs fine but then after install it hangs on boot ,some fault with kernel. Anyway back to the drawing board.
    Like the blog keep it up.

    Reply  |  Quote
  22. Nate UNITED STATES Mozilla Firefox Windows says:

    When I got my 1240, it had 98 installed on it, and it handled that… well, about as well as anything handles ’98, I suppose. It wasn’t a real strain on the hardware, anyway. The only major hardware problem is that, like your 1800, the battery is completely dead.

    I had tried a few micro distros of Linux, and DSL was the only one that was small enough for the machine to handle. I’m actually impressed to see the distros you’ve attempted on that thing!

    Ultimately, I ended up invoking my own personal nostalgia, and installed FreeDOS on it. It works like a charm! It’s actually quite liberating to have a machine without a GUI– or even internet, for that matter.* I turn it on, play games, mess around with FDconfig.sys and autoexec.bat, write a bit, then play some more games. It’s a nice little escape from my XP machines.

    * FreeDOS does have a single-task GUI (OpenGEM) and net support, but both are just a bit too much hassle to bother with.

    Reply  |  Quote
  23. Sarah UNITED STATES Internet Explorer Windows says:

    I decided to try installing Linux on my Compaq Presario 1240 over my Christmas vacation and over some extra snow days I had last week. First I installed a 64-MB RAM chip to bump it up to its maximum RAM and installed a larger hard drive, both leftover pieces from an old laptop of my dad’s. I tried a few different distros and finally ended up doing a minimal install of Debian and then adding components known for their lightweigtness (e.g., Openbox, idesk, fbpanel, etc.). It seems to be working pretty well so far. I haven’t been able to get sound working yet, which I’m not terribly worried about, but what I really hate is not being able to connect to the internet via my Linksys PCM100H1 PC card and over HPNA. The Ethernet part of the card works just fine when I plug it directly into the router, but it won’t work reliably with the HPNA connection. It will work for a while, but then the connection will die. A reboot will get it working again, but of course only for a while. I use an HPNA 2.0 bridge plugged into a router for the HPNA network, and I’m wondering if this might be the issue (not being HPNA 1.0 like the adapter in use). I’ve turned up little information on the web. It would be nice to find a way to solve the problem without having to buy different equipment to try. *sigh*

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>