Open Source OS on a Laptop

Table of Contents:

To the main page.

Introduction

I've tried running FreeBSD and Linux on and off on my home machines over the years. Being a programmer and not a network administrator, I've always found it difficult to get them to install. I have a Sony PCG-F540 (500 MHz CPU, 64MB RAM, 6GB hard drive) that I've been updating with Windows as Windows versions change. It just didn't have what it takes to run Windows XP, so I thought I might try to get an Open Source operating system up and running. I had heard that running on older systems is one of the areas where certain Open Source operating systems excels. This chronicles some of my efforts.

Before You Try a Free OS

I've used Unix and Linux at work, so I was familiar with the operating systems. However, even with this familiarity, I still made several assumptions as to what a Linux system could do for me based on articles I'd read. Not all of my assumptions were correct. Before switching to any Open Source operating system, examine any assumptions you've made about what it can do and find out if it really can or you may end up wishing you'd never made the switch. I am listing my assumptions here, to help you get started on your own search as to whether a free operating system is right for your machine.

My main reasons for wanting to switch to an Open Source operating system were to keep an up-to-date operating system on my laptop and to be able to test my own cross-platform software (which I wrote) on a Posix compatible machine. Both are valid reasons for switching. However, if you're assuming you'll be able to run certain types of applications the same way you did before on an older operating system, don't switch before you verify what really can be done with your computer's resources. Otherwise, you may end up very disappointed with your new operating system.

Distributions that Worked

I am currently running FreeBSD Release 7.2 on my laptop. The Open Source distributions I've tested and been able to successfully install on my Sony PCG-F540 (with just 64 MB of RAM) were:

The Linux distributions I tried were all based on the Slackware distribution. Note that Slackware after version 12.1, and, so far, any of its variants based on a later distribution are unable to start up the installation media in 64 MB RAM. Another Linux option might be to try the Debian alternative installation CD. It's supposed to work better on low memory systems than the standard installation media which will not boot in 64 MB. However, I've read that Debian can perform even worse on low resource hardware than Slackware and Slackware had problems with any intensive X applications.

Despite FreeDOS being at 1.0, it had several files that were out of date. If you're going to try it, make sure to get the latest kernel and driver files. Try JemmEx in place of himemx and emm386. Be sure to download the latest version of DOSUSB driver if you want any kind of USB support. I had been considering FreeDOS as the best option for a low resource machine in case all else fails. However, I find it far more unstable than Linux or FreeBSD. There is some Open Source development, especially with respect to the FreeDOS and djgpp projects, but not a lot beyond that. Most drivers that don't come standard with FreeDOS (such as sound support) are usually legacy DOS drivers. I got the impression most people were using FreeDOS for embedded systems or running legacy applications. Since my interest is mainly in Open Source software, not legacy applications (which run fine in emulators), I began to feel like FreeDOS might not be the best fit after all. As far as running Open Source applications, you can get very similar performance by running FreeDOS or Linux without X. Development of command line and curses based Open Source applications appears to be more prevalent on Linux (and FreeBSD) than on FreeDOS, so you have more software choices. Plus, you can run some programs in X if they're low resource one

FreeBSD claimed to have a minimum requirement for RAM of around 24 MB. That gives me some room in case this requirement grows in the future, but it seemed to be pretty stable over several previous versions. I feel like I've come full circle. The Open Source operating system I'd originally wanted to run years ago was FreeBSD and now that's what I'm using. I like they're licensing scheme which is friendly to both Open Source and closed source developers.

Picking a Distribution

Several people recommended their favorite Linux distributions to me both before and after the switch. As a matter of fact, when I requested information on how to find applications that work well on older machines, I was bombarded with suggestions to try someone's favorite distribution, rather than suggestions for which programs to run. As I already mentioned, be sure, whatever distribution you select, that you have the minimum required resources. You may also want to look into what programs are already available on the distribution. If it doesn't have the programs you use most (on the install CD or archived somewhere on the Internet), be prepared to compile from source (assuming you have source). Even if you meet the minimum requirements for a distribution, don't expect every distribution's install disk to work properly with your system. You may have to try another distribution with a different installation procedure. You may have preferences for certain software or philosophies used by a distribution. For instance, you may like a specific package manager or other features that are only available on a particular distribution and possibly some of the variants based on it. You may prefer one licensing scheme over another.

The first distribution I was successful in getting to work on my laptop was recommended by Carol from my local Linux Users Groups. Thanks to her for suggesting it. She'd already had experience and some success running DeLi Linux on an older machine. Of the three Linux distributions I tried, DeLi Linux is the most geared to older machines. It runs older versions of some software which are less resource hungry. Absolute Linux is a very well put together distribution which is nicely designed. Of the three, Vector Linux seemed to work best on my machine once I turned off any programs running in the background. However, their community support leaves a lot to be desired. While I've e-mailed some very helpful people on their forum, a few wrotten apples can spoil the bunch. I found their community online overall to be the most uncomfortable of any I've encountered so far while trying various versions of Linux. Their help and documentation leave a lot to be desired.

All three Linux distributions installed fine on my laptop. However, with DeLi Linux, I had to configure my monitor (X Windows) settings, sound card and USB port settings by hand to get my devices working properly. I want to thank all the other Sony laptop Linux users who've blazed the trail and documented information on how they set up their systems. Without that information, I'd never be able to even guess at some of the required settings needed. With Absolute Linux and Vector Linux Light, the installation set up the monitor, sound card and USB connections automatically on its own. There was an issue with the touchpad in Vector Linux. The double click function would not operate properly. The solution I came up with is listed below with the xorg.conf file information, but the touchpad never seemed to work as well on Vector Linux as some other versions of Linux. FreeBSD installation was very much like DeLi Linux. You have to configure everything yourself. This time I was armed with xorg.conf files from the 3 Linux distributions I tried. The FreeBSD handbook covered others issues such as sound and drive setup and the setup for the latter was very simlar to DeLi Linux but with different device names. However, even with 3 examples of how to set up my xorg.conf file, I still spent a day trying to figure out how to set it up on FreeBSD.

The second big difference between the distributions is that DeLi Linux uses uclibc instead of the standard C library glibc used by most other versions of Linux. This is to save space and reduce code bloat. However, that means you have to download a program specifically compiled for DeLi Linux or rebuild from source (if available) or find a program from another version of Linux using uclibc that happens to work okay. With Absolute Linux, you can use the programs that were built for the operating system or most Slackware packages. Vector Linux Light also has a repository and can use some of the Slackware packages, but from what I read, may not be as compatible at running general Slackware packages from a repository as Absolute Linux. You need to check that packages from a Slackware repository are compiled for a compatible Slackware distribution version and with compatible libraries. There's more to choose from with Absolute or Vector Linux if you don't want to build everything from source code. With all three operating systems, I found programs I built that would work on one and not on the other. Figure out what applications you absolutely have to have and make sure they work first. DeLi Linux takes up less space on my hard drive and leaves more space for my own applications than Absolute Linux or Vector Light Linux. Sound on Absolute and Vector Linux is done by default with ALSA drivers while sound on DeLi uses OSS as the default. On my machine, ALSA gives a better quality sound than OSS. With DeLi Linux, I was only able to connect one device at a time to a particular USB port. If I wanted to change the flash drive I connected, I had to reboot the system first before I could successfully mount the drive. With Absolute Linux, I've been able to swap flash drives all I wanted without having to reboot first. Vector Linux offers vl-hot (aka vxmount) in place of HAL for automounting USB drives. This is a really nice feature that works well on low resource systems. The program should work on other Linux distributions, but, as far as I know, Vector Linux is the only version of Linux that has made this a part of their official distribution. Other distributions may offer similar options such as usbmount. FreeBSD has a program called automounter that does a similar job. Check out the information about hotswapping peripherals on my Lightweight Open Source System Software page for more information on this topic. One last difference I noticed was in how the machine turned off. In Linux, to turn off the machine properly, as a root user, type shutdown -h now and the system will shut down. You can also add the option to shutdown to the windows manager menu if it's not already there. With DeLi Linux, I need to power off the machine by hand after it shut down. With Absolute Linux and Vector Linux Light, the machine powers off by itself. With FreeBSD, use shutdown -p now to power off the machine automatically.

Installation

Installing from CD

With all the distributions mentioned above, I downloaded the distributions and burned them to CD (or DVD) on my Windows machine. I used Plextor Tools that came with my CD Burner, but if you need a freeware application, check out Imgburn. I followed the instructions at the distributions' web sites and when I was done, I had working versions of Linux, FreeDOS and FreeBSD I could access them from the command line. With FreeDOS, don't ask to see what splash screens to choose from on startup or you're lock up your system and have to reinstall again. Reactos boots straight into a GUI; no issues with setting up X servers to get a GUI working. For the Linux systems, I didn't do any fancy drive reformatting during the install. I just left the two partitions sized as they were and changed the settings from FAT to Linux and Linux swap. With DeLi Linux, I used ext2 file system for the Linux drive and with Absolute and Vector I ended up using reiserFS. For Reactos and FreeDOS, I needed to go back to my Windows disk and reformat my drive for FAT32. FreeBSD describes how to set up your disks in their manual and I just followed the suggestions.

X Windows

Here's where the hard part comes in. I've been able to get this far with FreeBSD and Linux before on various home computers over the years, but as soon as I have to start the X Windows server, I'd be stuck. With DeLi Linux, I needed to create the X Windows configuration file by hand, because it didn't automatically generate a working one for me on install. With Absolute Linux and Vector Linux Light, it was able to configure X Windows automatically for me. With FreeBSD, I had to download the neomagic xf86-video-neomagic and xf86-input-synaptics drivers before I ran Xorg -config xorg.conf.new to create a sample xorg.conf. I still ended up having to edit by hand to get it to work properly. The latest version of the Xorg support (which the other distributions I tried weren't using) includes HAL by default. I turned off automatic addition of keyboard and mouse using HAL to get it to recognize what I had. It complains that it's not using the synaptics driver, but when I try another mouse driver, I lose functionality, so it looks like it's using it after all. Also, when I leave mouse support with moused on during start up, the touchpad doesn't work as well, so I had to turn it off. It took about a day of trial and error. I don't think it's optimal, so if anyone has further suggestions for improvement, please let me know.

To get a light window manager running, you may have to install the package and edit your .xinitrc. With DeLi Linux 0.7.2, I had my choice which windows manager I wanted in the delisetup program during install including Fluxbox. I also had the choice of which X Windows server to use and chose X.Org (a more standard server) over the tiny X server during installation. In Absolute Linux 12.1 Final, I had to change the windows manager by copying the default xinitrc file created for Fluxbox that was in the /etc directory to my local directory (\root if you're running from root) as .xinitrc. You may want to back up the current .xinitrc file before doing so. Once the X Windows files are in place and working, you can type startx at the command prompt.

Here's my original Xorg.conf file that I created to run on DeLi Linux. The Xorg version was 7.0. Here's my FreeBSD Xorg.conf file. The FreeBSD version is for Xorg 7.4. They're specifically for the PCG-F540. The file needs to go in the /etc/X11 directory or on FreeBSD in the /usr/local/etc/X11 directory. The settings I am using are probably not at all optimized, so if anyone knows of a better alternative, please let me know.

If double click isn't working as you want it to with a touchpad (which happened to me with Vector Linux), there is a solution. After spending a lot of time trying to change Xorg.conf settings, I discovered the problem was with the .Xdefaults file. I did need to make sure that Xorg.conf was using the synaptics driver instead of a standard mouse driver for the touchpad. However, the key change for me was to add the following to the .Xdefaults file:

*.MultiClickTime: 500
*.multiClickTime: 500

USB Connections

The next hardware setup to get working is the USB drive. I wanted to sneaker net files over to the machine. Without USB, it would be an incredible nuisance for me to do so and not worth the effort to try to get things up and running on the system. When I tried Reactos, any files I had to move over had to be moved by CD or CD-RW.

For DeLi Linux, the distribution's message boards had some very good support for how to get USB running. I followed some of the suggestions and with a bit more trial and error, USB was working. I edited the rc.modules file in the /etc directory. I added:

/sbin/modprobe usbcore
/sbin/modprobe usb-uhci
/sbin/modprobe usb-storage
/sbin/modprobe scsc_mod
/sbin/modprobe sd_mod

I also edited fstab in /etc to set up my drives so I could mount them more easily. Now I can type mount /mnt/usb to use my USB drive. Type umount /mnt/usb when you're done with the USB drive.

Note that if you're working with certain types of drives such as USB on Linux, you want to use the default setting of async rather than sync. Using sync causes data to be written to the drive immediately. Using async allows for lazy writing, so everything might be written just before the drive is unmounted. If sync is engaged for drives with a limited number of write cycles such as USB drives, all the extra writing to keep files in sync could speed up usage of the drive and leave you with a spent drive in much less time than it would ordinarily take to wear out the drive. FreeBSD doesn't appear to have that issue. They list sync as the option of preference to use with the msdosfs format in their help files and there doesn't appear to be an async keyword.

On Absolute Linux, plug and play for devices like USB flash drives and CD players is already working. If you plug in a USB drive or insert a CD, it will automatically add the device and you'll be able to see it and mount or unmount it from a file manager. To help speed up the machine, it might be worth turning off the plug and play system options though as they're running as processes in the background constantly. Then you could add the devices to your /etc/fstab file and use mount and umount as above to access them. Turn off services or background processes (daemons, servers, etc.) on Absolute Linux by doing a cd to the /etc/rc.d directory and changing the permissions of the appropriate files. You can chmod to 644 to remove executable permission and turn a service off.

Vector Linux gives you the choice of using HAL or vl-hot (aka vxmount) for plug and play devices. So far, I've been very happy with the vl-hot program. It takes less resources than HAL and is great for low memory machines. When I plug in a flash drive, I find it's automatically available at /mnt/vl-hot/sda/vol1 even if I'm working from the command line. The command vlh-umount unmounts all plug and play drives so you can remove your USB device safely. I've used the mount command and then done a manual umount on the appropriate device as well. It seems to work fine, but I'm not sure if that's proper procedure with vl-hot and could find no documentation to elaborate. CDs and DVDs are not automatically found by vl-hot. You'll need to mount and unmount those yourself when you use them.

I noticed the USB drive's light stays on. According to some articles on the web, that's normal with Linux and FreeBSD since power is still going to the drive. I typically take my USB drive out after I shutdown and power off the system. However, you can remove it as soon as you unmount it properly.

My /etc/fstab file on DeLi Linux looked like this:

/dev/hda1       /       ext2       defaults  1  1
/dev/hda5       /swap     swap       defaults  0  0
/dev/cdroms/cdrom0   /mnt/cdrom  iso9660  ro,user,noauto,unhide
/dev/sda1  /mnt/usb  vfat rw,users,noexec,nosuid,noauto,async,gid=100  0  0
none             /dev/pts  devpts     gid=5,mode=620  0   0
none             /proc    proc        defaults   0   0

For FreeBSD, the /etc/fstab file looks like this:

/dev/ad0s1b		none		swap	sw		0	0
/dev/ad0s1a		/		ufs	rw		1	1
/dev/acd0		/cdrom		cd9660	ro,noauto	0	0
/dev/da0s1		/mnt/media	msdosfs	rw,noauto,sync	0	0

On Absolute Linux and Vector Linux Light, don't add a device to /etc/fstab if you want it to be hotswappable. However, if you're going to turn off those services, you might want to look into updating your /etc/fstab in a similar fashion then.

On FreeDOS, you add a line to fdconfig.sys indicating what start options you want to run the USB driver with:

2?DEVICE=C:\USBDISK.SYS 

Once booted, just run DOSUSB to access the drive. You'll probably need to reboot if you want to change the USB drive to another one.

Audio

The next step was to get sound up and running. What good is a multimedia computer with no sound? With Absolute Linux, sound worked after installation. I didn't have to do a thing. For DeLi Linux, I had to check the message boards again and the web sites listing Sony laptop installs. DeLi Linux uses OSS for its sound. Most Sony laptop owners use ALSA because there's a driver available for the Sony laptop's sound card with ALSA. According to the Internet, OSS has one but the developers want you to pay for it. I decided to try the Soundblaster driver and see how well my card could emulate it. It couldn't. After trying some other settings for Sony laptops I found on the web, I luckily found a combination that worked on my machine. So, on DeLi Linux, editing /etc/modules.conf, I added two lines:

alias sound-slot-0 ymfpci
alias sound-service-0-0 ymfpci

I could hear sound and xmms and timidity could play music. On the Linux distributions, you can turn up the sound using the aumix program or another mixer program. You'll probably need to, at least the first time you try to play anything. My impression is that the Linux ALSA driver seems to sound better on this system than OSS.

On FreeDOS, luckily there's a legacy DOS driver for the Yamaha DS-XG. (Be sure to use the original, not the patched version of the drivers.) Many sound cards are not supported on FreeDOS. With a little setup, you can actually hear sound from your speakers. In the setup program, change IRQMODE to S-IRQ. I also experimented with changing the IRQ from 5 to 7 in setup, to get some audio programs to run without hanging. Most music programs expect your soundcard to be Sound Blaster compatible and this sound card isn't. However, you can run programs like Timidity for DOS (an older version of Timidity) with Freepats GUS patches or mpxplay and get music or audio on your FreeDOS system.

On FreeBSD, I added the following to /boot/loader.conf:

snd_ds1_load="YES" 

Other Hardware

I still need to check if I can get the modem working. I did find a driver for the laptop's Conexant modem. However, it's proprietary. If it doesn't come with source code, it won't work on an operating system like DeLi Linux or probably FreeBSD. If I get any further with this, I'll post the results. An external WiFi connection's probably a better idea, but I'm not sure what hardware would be most compatible, both with the machine itself and the operating system.

I also want to try some other devices through the USB connection. I have a HP printer/scanner, a Plextor DVD writer, an ATSC TV tuner and a 3 1/2 floppy with memory card access that all work with USB and might be worth trying out with the machine.

Application Installation and Sharing

Packages on Slackware based systems (including DeLi Linux and Absolute Linux) are usually in a format that uses tar and gzip (called tarballs). Vector Linux Light uses tarballs and also .tlz files. The .tlz files apply LZMA compression on a tar file since the LZMA compression is supposed to perform better than other schemes such as gzip. If you have executables built for your system, you can run installpkg on a Slackware based distribution with the name of the tarball package file and it will automatically install the program on your computer. Running pkgtool on these systems lets you manage which programs are installed and uninstall them. If you want to create your own packages, you can supply a temporary directory when you run ./configure or you can run the usual ./configure and make. With the latter approach, when you reach make install, use a command such as make install DESTDIR=temp instead. You'll need to make sure the temp directory you're pointing to is already created. If you add an install directory under temp and a slack-desc file in that directory in the standard slack-desc file format, you'll be able to keep a description with your tarball package. To create the tarball, run makepkg filename.tgz in your temp directory. There are some standard naming conventions for the filename, but just about anything will work if you're making them just for yourself. If the name in slack-desc matches appropriately with the tarball file name, the description will be visible when you install using installpkg. It's an extra step to create a tarball to install software, but it can help you keep up with what programs and libraries are on your machine. If you don't have the Slackware pkgtool system or want a faster approach, try spkg. It's a C program written to function similar to the Slackware pkgtool scripts and can install, reinstall or remove packages on a variety of systems. I've been using it on Linux, Windows and FreeBSD. It's a simple way to keep track of what files, libraries and versions you have installed and to automatically uninstall them.

Instead of doing all the packing commands by hand, some Slackware based distributions automate the process using a SlackBuild file which is a shell file containing the commands you'd usually do by hand to create a package. Vector Linux includes a Perl utility that creates the SlackBuild script automatically based on a template. All you have to do is fill in some of the blanks and run it. To get the dependencies needed for the slack-required file, the script calls another Perl program called requiredbuilder. With these two Perl scripts, you can create your own SlackBuild files fairly easily. Then, if you have to rebuild a package on a new Linux distribution that includes the makepkg tools or when a new version of your Linux distribution comes out, all you need to do is run the SlackBuild script for that package.

Everyone seems to rave about the FreeBSD ports system. There are tons of packages available. However, I'm finding the system most frustrating and prefer the Slackware method. I even resorted to getting spkg working. The ports system seems to be good for users with the following characteristics, they don't necessarily want to have to know how to build an application and they have decent Internet access. Unfortunately, I don't fit those qualifications. I want to know what libraries and settings go into building an application and to patch the source code if needed. There are some options for selecting which libraries a port builds with, but only if the port designer puts them in. They may not be the options you're looking for. Most of the ports and packages I tried were built with a lot more dependencies than I wanted on my low resource machine. It's a major nuisance if you don't have Internet connection. You have to keep going back for some missing requirement or rebuild yourself and make sure it knows what not to include this time. Ports are also very fussy as to what version of a library you have installed. If you want to use FreeBSD's package management tools, you need to use FreeBSD's make and create Makefiles and other support files in the ports format. These files may have been designed to automate the process for the end user, but not for the developer. To create them properly, I'd have to build my software at least once, just to know what needs to go into those files. Then, build it at least once again to check that the files worked. On a slow, low resource machine, building large libraries or applications twice isn't always a worthwhile option. If someone knows a good way to automate the process, please let me know. In the meantime, I've resorted to spkg and build scripts when FreeBSD make fails or a package I want doesn't exist.

I'm currently working on my simplified, cross-platform package creation solution. I'll put up more information on my patches page when I make it publicly available. It provides a way to automate the creation and maintenance of cross-platform build scripts that work with bash and some standard gnu utility programs. I'm finding this technique to be a much easier way to build applications (in a cross-platform manner) on most systems.

It's nicest if your distribution has all the software you want already built. Without that option, I find I'm building a lot of applications myself. Since it takes time and effort, it would be great to have a place to share some of these programs such as a repository. Some Linux distributions will have places for users to share programs they've built and others will not. Some are restrictive on what can be shared through their repository. FreeBSD seems very friendly about accepting new ports from users. Reactos and FreeDOS users didn't seem to have much interest in sharing Open Source applications. It's just one more factor you may want to keep in mind when choosing a distribution. I'd love to find some general repository for sharing programs though. There are some very good Open Source project hosting sites like Sourceforge for development of Open Source programs. There are also some good freeware and shareware sites for downloading executables only. It would be nice to have something to fill the gap for sharing executables (and their source, of course) built for a particular Open Source distribution or for Windows. If anyone runs across such a project, please let me know. It's usually much easier to share if you can just install the executable instead of having to compile and build from source (and possibly patch), especially for new users who don't want to learn programming just to run some good programs.

To more information on applications.

To the main page.

 

Validate XHTML



The information on these pages is copyrighted by the author with all rights reserved. Reproduction of anything without the author's permission is in violation of copyright laws.
All original material is copyrighted:
(c) Copyright 2008 by Laura Michaels
All Rights Reserved
Last Update: 20120531