Build A Linux Appliance, Part 1

Building a Linux appliance is a bigger job than one short article can cover. So you will find references to my previous TechBuilder Recipes on installing specific Linux functions. I recommend that you at least look at them before starting:

Ingredients:

To build a Linux appliance, here's the hardware and software you'll need:

The sections below will help you select your ingredients from the wide range of products now available.

id
unit-1659132512259
type
Sponsored post

Selecting a Linux Distribution

For this Recipe, I recommend that you use a free consumer distribution of Linux, such as Mandrake, Debian, SUSE or Fedora Core. They all have broadly similar performance, but somewhat different UIs and supplied software; configuration utilities are the biggest difference between distros. For most Linux distributions, you can download an ISO (an exact image of a CD that can be burned again into a disc to create a cloned copy) from LinuxISO.org.

If you're building for extremely inexperienced users, however, you might go with a distribution like Xandros. This preconfigures many of the functions discussed here on compatible hardware. You'll also have to buy either one copy per computer or a distribution license.

For this Recipe, I used Fedora Core 2 (FC2). Why? Because it works. Also, I like to avoid leading- and bleeding-edge distros. FC2 comes with the Gnome window manager by default. While there's nothing wrong with Gnome, I prefer KDE. You can download FC2 in .iso (CD/DVD image format) from Red Hat. Alternatively, Red Hat offers this list of vendors from which you can order installation CDs.

Since the OS download will be several gigabytes in total, don't do this by dialup. If you don't have access to a fast connection, either get a friend with a fast connection to download the ISOs or order the CDs.

To follow my instructions exactly, install FC2 and switch the default window manager to KDE in the course of installation. If you don't want to do this, what follows should be useful in a general way, though some of the details may change. Also, plan on a full clean installation, either on a blank hard drive or an older HD on which you intend to trash all the content.

While writing this Recipe, I discovered that Fedora Core 3 (FC3) may solve some of the problems I've solved in workarounds. These include the hot-plugging problem with xsane, which requires a plug/unplug of the scanner for the computer to recognize it. However, the biggest problem with FC2 in terms of installation--namely, the need to download and install all the multimedia due to licensing problems--is not solved in FC3. If you decide to try FC3 instead of FC2, the steps in this article should work. But since I did not test FC3, I can't guarantee it, and your mileage may vary.

Below is a brief configuration walkthrough. If it refuses to install, your most likely problem is a piece of hardware that is not working correctly. But as long as you select hardware as I describe below, you should be able to install your Linux distro without difficulty.

Linux Hardware Compatibility

Existing Computer: To perform a quick test of whether an existing computer will handle Linux, obtain a Linux "LiveCD." This is a CD-ROM that contains a copy of Linux that boots and automatically configures itself to whatever the host x86 machine is; it lets the machine run Linux applications without making any permanent changes to the computer it runs on. Just change the BIOS settings to tell the computer to boot to CD/DVD drive, and load it. If the LiveCD works, then a regular Linux installation should work, too. To download a LiveCD or to get vendor ordering information, visit Knoppix.

Next, make sure the PC hardware is compatible with the intended Linux distribution. Do this by first going to Web sites with listings of compatible components, then by choosing among them. These lists show Linux compatibility for sound and video subsystems, printers and scanners. While there should be a single compatibility list for FC2, there isn't, at least not yet. But you can find separate lists for sound and video subsystems, printers and scanners. The best bet on FC2 is to Google via your motherboard model.

Motherboards: Most current-generation motherboards or systems work properly with most Linux distros. But if you want to build around leading- or bleeding-edge hardware--such as Athlon or Intel 64-bit processors, SATA HDs, and PCI Express--check even more carefully about compatibility on an item-by-item basis.

There isn't a single hardware compatibility list for Fedora Core yet. It is best to search for compatibility by video and audio chipset. If your motherboard does not have integrated audio or video, the question moves to the chipset found on the audio or video card. For motherboards--particularly with integrated audio/video--it may be faster to simply Google on the model ID and FC2. Then look for comments by people who have actually installed it. What you want to see is: "It booted immediately with sound and video working correctly."

Sound and Video cards: Linux compatibility is discussed in terms of chipsets as well as makes and models. For video, X-Windows is the relevant part. You can find a list of video products supported by the version at the X.org Foundation.

For audio, FC2 uses the Advanced Linux Sound Architecture (ALSA) driver. Find a list of video products supported by this driver from: ALSA.

Hard drives: Any IDE drive should work with Linux. The base Linux install as performed here is about 3.8 GB. But SATA problems have been reported on some Linux user forums. While the Linux kernel supports SATA , it's a job best left to experienced Linux users.

Optical drive: Any IDE DVD or CD drive should work with Linux. A DVD burner or at least a DVD reader is preferred; that way, you can put an entire drive image on a single disk. Also, your users can use the system to watch DVD movies. These days, a DVD recorder isn't much more expensive than a DVD or even CD player. Also, consider double-sided DVD burners as an extra-cost option.

Selecting Peripherals

Printer: Pick a scanner that's supported by the Common Unix Printing System (CUPS) print utility. A list of printers recommended for use with Linux software is available from LinuxPrinting.org. The same group offers a database of printers that shows both which printers are supported by Linux and which drivers are available.

Scanner: Pick a scanner that's supported by the sane (Scanner Access Now Easy - the usual Linux scanner environment), which is part of the default install. You should do this even if you don't plan to bundle a scanner. Once you have any scanner set up in FC2, the scan utility will work with any compatible scanner a customer plugs in--as long as the user knows to unplug-replug the scanner!

To find information on which scanners are supported by sane, see this list provided by SANE.

FWIW, I use a Canon LIDE-30 and am very happy with it. However, only some Canon scanners work with Linux. Installing Linux

Now that you have all your hardware and software assembled, it's time to install your Linux distro. In the BIOS, tell the computer to boot from CD/DVD. Insert the first FC2 distribution disc. Once it loads, you'll be asked if you want to test the disc before installation. You definitely do! Do it. Next, test the other two or three discs. Do not install the Linux distro until all the discs pass the test. This is vital.

Assuming compatible hardware, and assuming your discs passed the test, the only thing you will need to do during the install process is to select certain options from the selection screens. If you only have one blank HD on the system on which you intend to install Linux, go ahead and use the hard-drive installation defaults; they're just fine. In general, if I don't tell you to do otherwise in the following, simply pick the defaults. The options I picked are as follows:

For more details, see my earlier Recipe, Teaching Linux to do Windows.

The following is a Fedora Core 2 desktop as installed, plus a few applications icons (the ones with the lower-right arrows) that I dragged-and-dropped as menu application entries off the Start Menu for convenience as described below. The Start Menu is accessed via the Red Hat icon on the bottom left. Once the installation is complete, configure the network connection for upgrades, particularly multimedia via automated installer.

To connect to the Net, go to Start > System Settings > Network. Enter the root password. This brings up the Network Configuration window. Then, from the top menu, click Help. The instructions are clear and explicit for your desired connection type (modem, Ethernet, etc.). Once you're done, a new entry will appear in the Device tab. Double click it to open. Find "allow non-root user" on the General tab. Unclick and click it. Hit OK to close it. Close Network Configuration.

Next, drag Start > System Tools > Network Device Control off the menu onto the Desktop. Drop it onto the Control Panel on the bottom of the screen.

Now click the Network icon in the control panel. Select the desired connection if there's more than one. Then hit the Activate button. Welcome to the Net! Note: You can also drag-and-drop from the Start menu to the desktop. If you do, the menu item will appear as a desktop icon.

Red Hat Network Update

The system upgrade is the first thing you'll want to do online. Go to the red circle icon in the system tray, and click it. Then use the tabbed interface to tell it you want to update everything (unless you have a specific reason not to install something specific).

Installing Fonts

Web pages and printed documents are generally more readable if they are seen in the same fonts in which they were created. That usually means the ones installed by default with Windows. You can get the Microsoft standard fonts and installation instructions by performing the following steps:

su - root
pw: [enter root password WITHOUT BRACKETS]
rpm
/etc

Below is the Control Panel you will find across the bottom of your screen with indicator lines pointing to the program icons you'll need immediately. The Control Panel here is the equivalent of the Windows Taskbar:

You can copy and paste commands from a Web page to a terminal window by clicking-and-dragging over the command to highlight it. Then put the cursor in the terminal window next to the > prompt, right-click, and select Paste from the menu.

Printer Setup

Here's how to set up a CUPS-supported printer.

If the above doesn't work, learn what to do next from this LinuxPrinting.org page.

Scanner setup

Here's how to set up a scanner under SANE:

Once this is set up, any other graphics application with a scan function should work normally with this, too.

Once you've got a software configuration you like together, burn it to DVD and supply a copy with the appliance. If you are planning to build multiple Linux appliance systems, simply clone the hard drive, then stick the cloned drive in each new identical system.

This is the first of a two-part TechBuilder Recipe. Part Two will show how to expand the Linux appliance to beef up security and back up if a CD/DVD recorder is installed. It will also show how to let users watch movies and videos, listen to music online, and use cameras and Instant Messenger software.

A. LIZARD is an Internet consultant in the San Francisco Bay Area. He has been writing for technology magazines and Web sites since 1987.