Howto: Build a functional Lowarch system

Edit: Unfortunately, the images originally included in this post are gone, because of hosting problems in late 2009. My apologies.

I spent two or three days recompiling a lot of software in Lowarch for the ugly little laptop, and I took copious notes throughout. I’m going to preserve them here for my own reference, and perhaps to assist anyone else who wants to get the best possible performance out of an excellent, albeit expired, distro.

The final system uses …

A couple of things I didn’t bother doing, but might in the future: I never recompiled a kernel — I stayed at 2.6.18, which was more than enough for me. I can’t predict your hardware needs, but if for some reason you want a later kernel, you’ll have to solve that yourself.

I also didn’t need any specific drivers aside from what Lowarch installed naturally. (It’s true, I did update my Silicon Motion driver to 1.5.1, but in retrospect, it did nothing impressive for me. 😐 ) And I never bothered updating things like GTK2 or other heavy, complicated interrelated packages. There was simply too much that required recompiling in sequence to mess with them.

But for the most part, most of the software I did recompile worked great. I’m not really very fussy about programs; I have a few I like and they’re generally very straightforward. I usually shoot for a simple Openbox setup, with a file manager, a browser, a text editor and a few GTK additives. I would expect that if you too can resist the need for heavy, complex software, you shouldn’t have too many problems either. πŸ˜‰

I didn’t install sudo on this machine, preferring to do all my compiling and setting up from a root tty, and testing and calibration from a user-level X session. Usually I do install sudo, but I knew I was going to be running a lot of root-level commands, and I thought it easier to keep the action separated.

First, I installed a base system, using a very simple partition scheme with a separate /boot and /home, all in ext2 with the noatime flag enabled. I make a point of screening each machine for the modules it needs and pruning out the stuff I don’t want or need — I do that because I’m convinced that autoloading the serial port, parallel port and other modules takes longer than giving it the ones I want, for the hardware I use. That’s up to you though.

Then — and this is terribly important — I changed the CFLAGS for this machine so the software I compiled would be tuned specific to its architecture. Going by the flags listed in the Gentoo wiki, which is my favorite of any Linux wiki, I set these variables in /etc/makepkg.conf …

CHOST="i586-pc-linux-gnu"
CFLAGS="-march=k6-2 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

Lowarch sets those flags to i486, which is acceptable, but so long as we’re recompiling, we might as well get specific.

Next, I dislike the Arch bash prompt; I really like to see the path of the current working directory, even if it does creep across the screen, the deeper I get into directories. This is generally what I use in .bashrc

PS1='\u@\h: \w$ '

I also made some core system changes. I only have Arch on this machine, so I set Grub to boot after 2 seconds. I also set it to automatically spawn the X environment, with the inittab settings described in the Arch wiki.

I have some other tweaks for Arch that I have listed elsewhere on this blog; if you filter through the Arch pages you’ll find most of them. I won’t list them here, although I might collate them all into a newer post, since there are some minor changes. πŸ˜‰ They do, however, apply to Lowarch, and really some of them were tested and written when Lowarch was still active and current. So they’re perfect for it.

I had some preliminary settings that I needed to modify. I installed xorg with the newer, scantier series of packages, like this. …

pacman -S xorg-server xorg-xinit xf86-input-{mouse,keyboard} xf86-video-siliconmotion xorg-fonts-75dpi

Then X self-configuration.

X -configure

Then a few tweaks to the xorg.conf.new file that are needed to make this machine work.

nano -w xorg.conf.new

First, I use a battered USB ball mouse to navigate, so I changed the mouse address to /dev/input/mice. The protocol I set to “auto”, and the driver I set to “mouse”.

This laptop uses the jp106 keyboard, but X won’t configure itself to use that, so I have to add it manually with this line

Option "XkbLayout" "jp"
Option "XkbRules" "xorg"
Option "XkbLayout" "jp,jp"
Option "XkbVariant" "106"

under the input device section for the keyboard.

Next, and for no really good reasons, I commented out some of the X server modules that were enabled by default. I have no real rationale for this other than this video card is exceedingly primitive, and it takes long enough to get these things going without additional modules it doesn’t support. So …

  • xtrap
  • dbe
  • dri
  • record

all went the way of the dodo. I left the font modules — freetype and type1 — and extmod, since removing extmod occasionally spawned a “shape extension error” in stdout. It never caused a crash, but I figured an error message is an error message, and since I could trace it back to extmod … well, you get the picture.

The Silicon Motion driver in the Lowarch repos worked fine for me, but I had to mangle the sync settings to get it to show a resolution other than 848×640 (which was really weird). In the end, these were what worked for me under the “Monitor” section. …

DisplaySize 346 260
HorizSync 31.5 - 48.5
VertRefresh 40.0 - 70.0

I recompiled the 1.5.1 driver off the Freedesktop.org site. It didn’t give me any issues when I was building it, but I really couldn’t see much difference between 1.5.1 and 1.4.1 from the repos. I suppose that’s both the pro and the con of using a 10-year-old video card — it works great, but there are no surprises left. 😐

After all that, I moved the xorg.conf file to its proper home.

mv xorg.conf.new /etc/X11/xorg.conf

Next I downloaded the source code for Openbox 3.4.4 and ObConf 2.0.2 from the Openbox site. These will also compile with the dependencies in the Lowarch repos. If you have trouble building them, try installing the old version of Openbox first, then removing it, then compiling the new one with the dependencies still installed. It’s kind of a dirty step, but it works. Use the --prefix=/usr option for both.

Building ObConf needed pkgconfig, gtk2 and libglade from the Lowarch repos.

To install ObMenu, which I consider a critical part of any Openbox system, you’ll need to install pygtk from the Lowarch repos. It’s a recent enough version to keep ObMenu happy, which hasn’t been updated in a very long time anyway. Perhaps someone should tackle that. 😐 Anyhow, ObMenu is written in Python, so installation is just decompressing and then

python setup.py install

from the obmenu folder.

I recompiled rxvt-unicode next, mostly because it can handle xft fonts, where xterm and the others don’t ever seem nearly as pretty to me. I used the --enable-mousewheel and --enable-xft options, as well as the --prefix=/usr, when I ran ./configure.

I also installed the ttf-dejavu font out of the repositories, which has always been more than enough for me. There are a few others there, and you could probably add whatever fonts you wanted. That’s minor.

Next I added EmelFM2, which compiles without a ./configure command (you just run make), but you might want to find a way to modify that. It leaves the executable in a weird spot, and if you want to be able to run it without the path from a command line, you need to either add the emelfm2 location to your PATH variable, or tamper with the Makefile, I think.

I prefer the rezlooks-engine (and Rezlooks-clear theme), which is installable off the gnome-look.org site and will build without any major dependencies.

For switching themes, I find gtk-chtheme to be much more palatable than that awful gtk-theme-switch. gtk-chtheme will compile with no issues, needing only the --prefix=/usr flag.

For Leafpad 0.8.12, I compiled it with the --prefix=/usr option and the --disable-print flag. I don’t have a printer and don’t really want one, so that’s just something I can do without. This version is preferable to the Leafpad that is in the Lowarch repos because of the search-and-replace bug that hung around in Leafpad for so long. The newest versions have fixed that … I think. πŸ™„

The Tango icon set was a little more complex. First, you’ll need to install the perlxml and imagemagick packages from the repos, then download the new icon-naming-utils program (the one in the repos won’t do the trick). That will compile with the --prefix=/usr flag, and then you can go back to compiling the icon theme. I added the --prefix=/usr and --enable-png-creation flags because I like the PNG icons too sometimes; it will lengthen the compile time, but that’s okay with me.

As additional packages, I included alsa-utils and alsa-lib, as well as as a few other things. For an e-mail client, the 2.2.6 version of Sylpheed still in the Lowarch repos was sufficient.

NetSurf was my browser, and while I was originally rather skeptical about my success with compiling it, I just piggybacked off the PKGBUILD in the AUR, and it worked great.

First I installed the libmng, curl, libglade and lcms packages from the Lowarch repo. Then I downloaded and compiled re2c manually (it needed no dependencies), and commented it out as a makedepends in the PKGBUILD for NetSurf. I also had to comment out the md5sum check because one or two of the subsidiary scripts had been updated.

But after that, I used makepkg with NetSurf, and the resulting package installed without any problems. NetSurf is very sparse and not exactly what I would call a full-fledged browser, but it definitely got the job done.

For a download “manager,” I compiled axel from source, and it also built without any problems. I actually used the PKGBUILD from AUR on this one too, although I really didn’t need to.

Other than that, I set the desktop background with xsetroot, like this

xsetroot -solid "#3465a4"

And handle everything else — USB mounting, etc. — manually. For some people that’s a pain, but it’s not that big a deal for me. πŸ˜‰

And the final results are … well, they’re what you might expect. These were early screenshots, without the proper screen dimensions or some software updates, but you should get the general idea.

I should say that this is an awful lot of work for an old computer. (Some people are probably thinking the same thing at this point. πŸ˜€ ) But the real bonus is obvious when you’re finished: The performance gap between Lowarch and other, more “complete” distros is astounding.

This machine can reach a desktop environment in under 40 seconds, whereas most other distros need almost 30 seconds longer to reach a GUI. Even a comparable Ubuntu system would need a complete and utter overhaul, from the kernel on down, to reach that kind of speed.

And it’s more than just a startup time — software starts faster, responds quicker, and generally there’s no “sluggish” feeling that usually comes with old, pre-i686 hardware. This compiled system seems just as snappy as my 1Ghz running a full Arch suite.

So if you have an old K6-2 — or even better, something older than that — this might be a nice way to keep it working, and acceptably so. Perhaps one day we’ll all get lucky and someone will step forward to pick up the pieces of Lowarch. But until then, your computer — and the distro — don’t have to go unused. πŸ™‚

6 thoughts on “Howto: Build a functional Lowarch system

  1. NittanyLion

    You’ve convinced me. I have a Twinhead P88TE laptop, with a Pentium II (333MHz), 256 MB max RAM, that I’ve been trying to bring back to life from exile in at the bottom of a closet. When I obtained the Twinhead it ran Windows 98 in slow motion.

    So far, I’ve tried Damn Small Linux and Puppy. DSL had an odd quirk in that it ran with only 128 MB of RAM but refused to boot with 256 MB installed. Damn Small Linux Not! did boot with all 256 MB installed but the DSL-N distro hasn’t been upgraded in over a year. Puppy did run and not badly but I didn’t like its un-Linuxlike habits (for example, can only run as root).

    Your view that “the performance gap between Lowarch and other, more ‘complete’ distros is astounding” is what makes me want to give Lowarch a try. I’m poor enough to have to make due with the equipment I have and I’m intrigued about bringing old computer back from the dead.

    Thanks for the review, I’ll describe my Lowarch experiences here when I have some.

    Reply
  2. K.Mandla Post author

    Right on. If you run into problems, let us know. Remember that Lowarch is a year and a half out of date now, which means the software is rather old and creaky. You can update some of it manually, but it’s tough going.

    On the other hand, a Pentium II will run straight Arch, so you can get the freshest software and best speeds from that, instead of Lowarch. Give Lowarch a try if you like, but Arch is current, and a vast improvement.

    Cheers and good luck!

    Reply
  3. Thinker

    I really would like to thank you for that CFLAG hint! I finally got my Arch, dual core laptop to boot from power button to usable desktop in > 20 secs using the various tips on your website.

    Reply
  4. Pingback: Banquo’s ghost: Lowarch 0.1.1 ISO and torrent « Motho ke motho ka botho

  5. Pingback: The myth of Arch Linux and the i586 « Motho ke motho ka botho

  6. Pingback: Another Arch repository for i586 « Motho ke motho ka botho

Leave a comment