Software development techniques behind the magic user interface

Multi-Touch Developer Journal

Subscribe to Multi-Touch Developer Journal: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get Multi-Touch Developer Journal: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Multi-Touch Authors: Ben Bradley, Qamar Qrsh, Suresh Sambandam, Jayaram Krishnaswamy, Kevin Benedict

Article

How to Install Debian over a Network

Part 7 in our series 'How to create a Linux-based network of computers for peanuts'

(LinuxWorld) -- I compared network and system administration to cooking in Part 6, "How to install Red Hat over a network" and, in this installment, individual Debian X terminals are on the menu. First, let's tidy the kitchen and clean the stovetop -- because some more readers have reported that their Red Hat preparations boiled over! (All right, I promise -- no more kitchen references. For a while. Maybe.)

 

The department of "Not quite errata and not quite Murphy's Law"

Several readers reported their X terminal machines will boot to a gray screen and nothing else -- the GUI login window of their remote application server never appears anywhere except on the application server's local console. Most of these readers are running Red Hat on their application servers and configured the machines to boot to runlevel 5, the networked, multi-user, graphical runlevel by editing /etc/inittab. (See Part 3 for details.)

In Part 6, we discussed GNOME-Lokkit, a personal firewall configuration that stymied several users of Red Hat 7.1. If not properly configured, the firewall will cause this problem by blocking the ports used by XDMCP on the application server and X11 on an X terminal. However, these new problems cropped up after they disabled this personal firewall, or opened the proper ports, and still experienced no joy. Some readers are using other distributions and release numbers that don't even include GNOME-Lokkit.

As it happens, most weren't running XDM, even though some assumed they were. For an application server to accept connections from X terminal workstations, it must run a display manager. That's what XDM is, an X Display Manager. However, XDM isn't the only graphical display manager, and for newbies, this can cause some confusion.

GDM (GNOME Display Manager) is also commonly installed and used. If the application server is configured to boot to a graphical run level in /etc/inittab, instead of specifically starting XDM from /etc/rc.d/rc.local (refer to Part 3 of this series), there is a good chance that you are actually running GDM instead of XDM -- particularly if you installed Red Hat and selected GNOME as the desktop environment.

That's okay -- GDM will work -- but there is typically an additional item to edit, otherwise your X terminal workstations will not display anything but a gray screen. Most installations of GDM prohibit remote connections out-of-the-box: perhaps reflecting today's reality that most Linux desktops are configured as standalone workstations or as part of a network that relies on NFS.

Our application server defies that conventional view of how Linux should be used, so you need to find the GDM configuration file and "tell" it to abide by the rules you set up for XDMCP (Part 3). If GDM is the display manager of choice on your application server, it must agree to manage remote X sessions. Use the whereis command to locate gdm.conf on your application server:

 

whereis gdm.conf

The return of this command will probably report /etc/gdm.conf.

Open gdm.conf with a text editor and scroll down until you see a couple of lines that look something like this:

 

[xdmcp]
Enable=0

Change the second line to read:

 

Enable=1

 

("0" means "False" and "1" means "True" in the configuration file.)

Save your changes to gdm.conf. The easiest way to get things running is to now reboot the application server. As soon as the gdm.conf file is re-read, GDM will follow the rules you set up for XDMCP and your X terminals should be able to grab a GDM login window from your application server.

 

Installing Debian via the Internet

Debian has a reputation for being difficult to install. Relax. The basic installation and configuration work will be time consuming. I don't believe you will encounter anything that you will consider difficult. Remember, this is Cheap and Easy Linux server centrism!

Part of Debian's difficult reputation may stem from the wide selection of installation methods made available to us by Debian's developers. That isn't bad, that's a Good Thing. All these choices may appear confusing, but they make it possible to use Debian on the widest possible range of hardware, and to obtain Debian at no cost easily under most circumstances.

You just can't beat a deal like that!

Rather than discuss Debian's mission and philosophy -- it's all at Debian's Web site, and is well worth a read. We will devote space instead to a more in-depth, detailed description of a Debian installation than we did with Slackware and Red Hat. By walking though this together, we will dispel Debian's fierce reputation -- and reveal it for what it is: A good, solid, easy-to-use distribution that doesn't break down under the weight of automation.

 

Which Debian?

Debian provides three different releases that it updates continuously: Stable, Testing and Unstable. Stable, code named Potato, provides just what we are looking for in a production environment -- stability and reliability. Testing and Unstable are, as their names imply, much nearer the bleeding edge. We'll leave them to developers and experimenters.

Debian releases are kept up to date by Debian's development process. Potato has evolved since it's initial release. The latest update, 2.2.4r, was announced in November, 2001.

Testing and Unstable are development releases. As soon as Testing is deemed ready for production use, it will replace Potato as the stable release -- and you can upgrade your systems to that new release without having to reinstall Linux, by using Debian's apt utility. They mean it when they say that you only install Debian once for the life of the machine.

 

Defining the task...

We will be installing Debian on the same Pentium 75 used to install Red Hat 7.1 in Part 6. (It sits at the end of my desk at the office, and it's handy!) I recommend you review Part 3, Part 4, Part 5, and Part 6 of this series before you begin.

This machine is on a LAN of X terminals and an application server -- with a separate machine configured as a firewall/router/Internet gateway. We ignored the gateway during our earlier installations of Slackware and Red Hat on X terminal machines. This time, the gateway is essential, because an http connection must be established from the X terminal under construction to Debian's server. If your LAN isn't configured this way, FreeSCO might be the Cheap and Easy solution for you.

Here is an overview of the 10-step process we use to create a Debian X terminal:

 

  1. Determine the model of NIC in your machine.
  2. Download a boot image, a root image and modules from Debian's site to your application server.
  3. Put these downloaded files on six floppy diskettes.
  4. Use these floppies to boot the machine slated for Debian installation and to load necessary device driver modules for your hardware.
  5. Direct the X terminal to Debian's site to download and install a minimal base Linux system on it's hard drive.
  6. Configure the base Linux system so that the machine will boot and run.
  7. Configure Debian's package management tool (apt) to access Debian's vast array of software via the Internet.
  8. Select the software you want installed.
  9. Watch while apt fetches and installs the software.
  10. Configure the machine as an X terminal per Part 4 of this series.

Let's get to work.

 

Debian step 1. Preinstallation information

Gather information about your machine. It won't surprise you that I once again suggest the Slackware net.i boot disk to determine the model, io and irq values of your NIC. Review Part 5 and Part 6 for information on obtaining and using the Slackware net.i boot disk as a diagnostic tool. Not essential at this time, but also handy to have, are the specs for your video adapter and monitor. If the machine is intended to be used as an X terminal, you may want to install the mouse at this time. (Debian now includes an option to configure the X server during installation).

 

Debian step 2. Download the install images

At your application server, or other Linux machine with an Internet connection, download the necessary installation images. Disk images for 3.5 inch floppy diskettes can be found in the current/images directory at Debian's site.

The files we need are:

 

  • rescue.bin...the boot image.
  • root.bin...the root image loaded after booting the installer.
  • driver-1.bin
  • driver-2.bin
  • driver-3.bin
  • driver-4.bin... four disks with the drivers required to use everything from your network card to the vfat file system.

While these files download, be productive and format six floppies in preparation for the installation.

 

Debian step 3. Create the install floppies

Once these files are downloaded, as root, use the old standby dd utility to create the files on the six freshly formatted diskettes we will use for installation.:

dd if=rescue.bin of=/dev/fd0

As always, wait until the lamp on the floppy drive is extinguished and you are returned to the command prompt before removing and labeling each of the six floppies in it's turn.

 

Debian step 4. Begin the installation

Prepare to boot the Debian installer. At the machine you will configure with Debian, place the rescue.bin floppy in the first (or only) floppy drive and turn on the power. You may need to enter the BIOS setup utility of this computer to set the floppy drive as the first boot device.

You are presented with a screen providing a brief description of the Debian installation, a warning that you should backup data on the hard drive, and a boot prompt. Go ahead: Press ENTER. There's nothing we want to save on this machine!

rescue.bin loads, the process pauses, and you read: "VFS: Insert root floppy to be loaded into RAM disk and press ENTER."

So, remove rescue.bin from the first floppy drive, insert root.bin, and press ENTER. See, Debian isn't hard to install. How tough is this?

After root.bin loads, the installer presents the "Release Notes Screen" for your reading pleasure. Take your time and read it. It isn't just self-serving propaganda like a certain proprietary OS vendor sprinkles throughout its installation. Press ENTER to continue when you are ready to move on.

Debian now starts a ncurses-based installation menu that will guide you through the remaining initial stages of installation. This menu will provide you prioritized choices of action throughout the process. At the top: NEXT and below that are two likely ALTERNATES. You can also access all the other actions listed below these by scrolling down to them.

 

NEXT : Configure the keyboard
ALTERNATE1  : Preload essential modules from a floppy
ALTERNATE : Partition a hard disk

Make sure your keyboard configuration is correct and when returned to the menu, select "Partition a hard disk." Debian uses cfdisk as the default disk partitioning tool and it provides a more user friendly interface than the old standby fdisk while providing more choice of partition types than tools like Disk Druid.

Create two primary partitions with cfdisk -- one ext2 Linux partition for "/" and a swap partition just as we did in Part 5 and Part 6 of this series. Make certain "/" ends below cylinder 1024 so LILO can boot the machine and use the cfdisk menu to set that partition as bootable. Don't forget to change the second partition's type to swap (type 82).

After you save the disk partitioning scheme, the installer will ask you to initialize the swap partition and to mount the ext2 partition as "/" (the "root" partition). Accept these, but don't bother to accept the offer to make the partitions compatible with earlier 2.0 series kernels. As an X terminal, this is a specialized production machine and we will use a more modern kernel.

Next up, the installer will suggest that you "Install operating system kernel and modules." Good idea -- the machine won't work without them. Even though we are planning to install Debian via the Internet, at this early stage we must select floppies as the "Medium you will use to install..."

You will be asked to place the Rescue Floppy in the drive, so remove boot.bin and put rescue.bin in for the second time and hit ENTER.

After a short time you will be asked for the driver disks you created. Starting with driver-1.bin, load the four device driver diskettes you created earlier. After these four are loaded, you will be returned to the main menu and:

 

NEXT : Configure device driver modules.

Accept that choice, but decline to load additional modules from another source when asked.

Another screen appears that defines modules as "loadable device drivers," and a menu to select from various categories of modules. The choices are:

 

block   Disks and disk-like devices
cdrom  Device drivers for CD-ROM
fs      Drivers that allow many different filesystems to be accessed
IPV4   Internet Protocol drivers
IPV6   Internet Protocol version 6 drivers
misc    Drivers that don't fit in the other categories
net     Drivers for network interface cards and network protocols
SCSI   Drivers for SCSI controller cards and classes of SCSI device
USB
video   Drivers for Video4Linux

Our needs are simple for this X terminal machine and we ignore most of these categories. We don't need any block devices -- we don't have a CD-ROM. It isn't a router or gateway and we don't need IPV4 or IPV6. If we have something unusual like a Logitech Bus Mouse, we might open "misc," but my machine has a PS/2 mouse, so I ignore misc. No SCSI, no USB, no Video4Linux.

That leaves:

 

fs   Drivers that allow many different filesystems to be accessed

and

 

net  Drivers for network interface cards and network protocols.

We may do some experimenting with this machine beyond it's role as an X terminal, and we want to cover our bases now, without having to compile a custom kernel later, so under fs, we select:

  • binfmt_aout (kernel support of A,OUT binaries)
  • binfmt_misc (kernel support for misc binaries)
  • nfs (NFS filesystem support)
  • nfsd (NFS server support)
  • vfat (vfat file system support)

After these modules are loaded, we return to the menu and select the next category: net.

I select and load the appropriate driver for my NIC, as determined before hand, and just in case I decide to redeploy this machine as something other than an X terminal, I also select ppp. Individual modules don't require much in the way of machine resources, so a few extras won't hurt anything unless we are dealing with something like an 80386 with 6 megabytes RAM and a 100-megabyte hard drive.

Exit by selecting Done with...and return to previous menu

 

Debian step 5. Preparing to download the operating system from the Internet

After completing device driver configuration and returned the main installation screen, we are presented with:

 

NEXT : Configure the Network

(Hey, we are almost there! And see, it hasn't been difficult at all, just time consuming.)

You will be asked for a hostname, and following our plan, this might be Xterm5. The installer warns you not to "append [the] domain," at this time (conference.table, remember?).

When asked about DHCP or bootp, politely decline. We don't need them in our Network for Peanuts.

Since this is Xterm5, following the plan we have followed since Part 3 of this series, we enter 192.168.1.24 as this machine's IP address. The netmask will be the conventional 255.255.255.0.

Unlike our earlier X terminal installations, this machine must be able to reach the Internet to download it's operating system, so when asked for a gateway address, we enter the address we assigned to our separate gateway router -- in this network -- 192.168.1.1.

The installer asks for a domain name -- we humor it and enter:

 

conference.table

The DNS (Domain Name Service) entry may be your gateway machine (if it operates as a caching DNS server), your ISP's name server address, or some other machine. If you don't remember what to enter here, go to your application server, login and take a look at /etc/resolv.conf to determine a DNS server address that works for you. (Your application server does have Internet access through the default gateway/router doesn't it?)

You are returned to the main menu and FINALLY, we get to the real meat of this process:

 

NEXT : Install the base system

YES! You are presented with a choice of:

 

/dev/fdo : First floppy drive
/dev/fd1 : Second floppy drive
mounted : Already mounted file system
NFS : Network file system
Network : Retrieve from network

The last choice is the one we want, so select "retrieve from network," and hit ENTER.

A screen reports:

Going to download the following files over a HTTP connection: base2_2.tgz. It sits there, waiting patiently for you to press ENTER to continue. What are you waiting for? Press ENTER and let the magic begin!

But it doesn't. Instead, another screen appears and demands:

Please provide the URL from which to download the installation files. If you have a proxy server, fill that out as well; otherwise, leave it set to 'none.'

What the #$&!??? We have no clue...fortunately, Debian provides default values for the URL, port 8080 and proxy server as none. Tab down to OK and press ENTER.

Yet another screen appears to report that it is, Installing from network, and to provide an ongoing progress report. Once you are assured that your machine has indeed connected to Debian's server, you may as well go relax for an hour or two unless you have a very fast connection. Go drink a beer, walk around the block. If, like me, you live near a river, take an hour or two for a fishing break. It's November, and in the Pacific Northwest, the annual return of Steelhead is well under way. A 32-inch Steelhead taken on a fly rod will help clear your mind of computer cobwebs and put you in the proper frame of mind to continue with the Debian installation...

But, no matter what you choose to do during your break, we are done with Step 5 of installation and there is nothing more to see here until the base system finishes downloading.

 

Debian step 6. Configuration of the base system

After break, you return to a blank screen. No problem, just a screen saver...hit a key and the familiar menu appears with:

NEXT : Configure the base system

That's what we need to do, so accept that choice to proceed.

The first item will be selection of your time zone. You know where you are -- if you don't -- you didn't take enough time for your break following Step 5 -- or you drank too much beer! Deal with it!

The next task is to make ..."Linux bootable directly from the hard disk..." The best choice is usually to: "Install LILO in the MBR," (the Master Boot Record of your hard drive).

Then you will be asked to create a boot floppy. You may as well do this, although the rescue.bin floppy will work in a pinch. Just grab another floppy diskette and follow the prompts. Very conventional stuff, and not difficult.

You are returned to the main installation menu and:

NEXT : Reboot the system

Remove and label the boot floppy you just made and let the machine reboot. If the reboot doesn't happen, check the machine's BIOS to make certain that the hard drive is set as a boot device. If that fails, fall back upon the boot floppy for now.

Upon reboot, you are asked whether or not you want md5 passwords. Select yes and yes at the following screen asking if you want shadow passwords. We don't use NIS (Network Information System) in our Cheap and Easy network, so the warnings don't apply to us.

Set a root password, and if you intend to remotely administer this X terminal via telnet, you can also set up an ordinary user account, perhaps with a user name of admin at the next screen. It is no big deal, and you can safely skip the ordinary user account for now, and perhaps you should, if you want to add admin later without a /home directory.

Most machines used as X terminals obviously don't utilize PCMCIA packages, so in this case, we accept the offer to remove them by selecting yes.

We don't want to use a PPP connection to install the system -- we will reach the Internet by way of our gateway machine -- and we respond by selecting no.

 

Debian step 7. Apt configuration

Debian's package management tool (apt) will finish the installation for us and we need to tell it how. The first detail is to "Choose the access method apt should use..." and the choices presented are:

 

cdrom
http
ftp
filesystem
edit sources list by hand

Well, http got us where we are now, so let's stick with that. Select http and use the tab key to select OK.

You will then be asked if you want to use "non-U.S. software." Why not? We don't know what we may need in the future, so select yes.

The same goes for non-free, and contrib. Why limit our choices? Select yes for both.

Next, you need to select a country for a Debian mirror site accompanied by some advice that the best and fastest mirror for you may not be in your country. Can't help you there, but the only real consideration is the length of time it takes to install over a circuitous route from the Debian site (or mirror site) to your location. It isn't a major concern in most cases. Since I'm in the United States and selected http earlier (as the access method), I select http.us.debian.org.

Following that, since in the network we are building we don't have a proxy server, we leave the http proxy entry blank.

The pretty ncurses screen disappears again, and in text mode you read:

"Testing apt sources...
0% [Connecting to http.us.debian.org]

Away it goes to see if you provided it good information.

 

Debian step 8. Software selection

You will be prompted to add another "apt source." No, thank you, and we select no

.

The installer asks, "How do you want to choose additional packages to install?" It presents you with two choices: Simple and advanced. Since we eschew all things that are not Cheap and Easy, we select simple. Duh.

A screen with an extraordinary number of packages appears to frighten and intimidate us. Boldly, we scroll down to one package: X Window System Core, and select it with the space bar. All other entries remain unselected as we tab down to Finish and press ENTER.

One more choice appears -- X Window System Configuration. You may safely skip this step if you like, and configure X later, after installation, as part of your own X terminal configuration. In my situation, Debian reliably autoprobes my built-in S3 video adapter, so I enter a short and easy to manage series of screens that request information about:

 

  • Mouse Protocol Mine is a PS/2
  • Mouse Device /dev/psaux on this machine
  • Keyboard I have a "US/Standard" keyboard
  • Monitor. horizontal I select 1024 X 760 @ 60Hz and 800 X 600 @ 72 Hz
  • Monitor, vertical Mine will work with 50~100 Hz
  • Identification I just leave the default as "my monitor"
  • VRAM Debian correctly found 1024K, so I accept it's finding
  • Identification Defaults to "my video card" and that's okay by me
  • Clockchip line Most cards need none, and mine is no exception
  • Run X -probeonly No, No, Ten Thousand Times, No

I accept 8 bpp (256 colors) and set my default startup resolution at 800 X 600, and agree that /etc/X11/XF86Config is the appropriate location for the configuration file. Who am I to argue with Debian?

 

Debian step 9. The moment we have been waiting for...

Sit back and relax while Debian's apt downloads and installs software. The ncurses screen disappears one last time and in text mode, apt reports that it needs (in our case) ...to get 13.2MB of archives. After unpacking 33.3MB will be used. Do you want to continue? [Y/n]

Of course! Yes! Press y.

apt goes to work and reports that it is connecting to Debian's server -- in this example -- http.us.debian.org -- and as soon as it connects, it provides an ongoing progress report.

For now, our work is done. Leave it to apt and Debian to handle everything for a while. Turn off the lights, put on your coat, and go home. Tomorrow is another day, Part 8 is the next installment, and we will take up the final configuration of Debian when we return. Chances are, you won't need any additional help other than a review of Part 4, Part 5, and Part 6 of this series. For those who do, never fear, the 10th, and final, step of Debian installation will be covered (in less excruciating detail).

Also in Part 8, we will get to an unusual alternative use for this Debian machine that can enhance any office LAN whether you run X terminals or not -- even if you don't use Linux for any other purpose. We will explore the power of apt to add packages as we need them, and I think that if you have been avoiding Debian because you thought it would be "too difficult," you will begin to appreciate what you have been missing.

More Stories By Colin Mattoon

When not buried under his real job in commercial two-way radio system design and sales, Colin Mattoon is a part-time Linux system administrator at Northwest Communications in Lewiston, ID.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.