Subsections


Post-installation tasks

We were not able to automate the Linux installer completely. When you reboot the system, you have to configure some things manually. This section documents things you have to do to complete the computer's configuration.

Log in

To configure the system you will need to be the root user. The initial password for this account is “fai”. You will want to change it once the rest of the configuration is done. See Section 5.6 to see how to do this.


Configure X-Windows

During the installation process you chose an X-server to match the video card in the system.

At this point, you want to configure the X-server so that graphical mode will work. First, you need to gather information about your computer. Next, you will need to configure the X-server using dpkg-reconfigure . Finally, you have to test the configuration out.

Information you want

In order to do this, you will want the following information:

dpkg-reconfigure

Once you have as much useful system information as you can find, type

dpkg-reconfigure xserver

where xserver is the xserver you are using (in lower case). For example, if we had selected XSERVER-FOO, we would type

dpkg-reconfigure xserver-foo

This will unleash a storm of configuration screens. Fortunately, you will be able to use the default settings for all screens except the following:

Keyboard:
You will have the option of entering a keyboard type. The default will be labelled “us104”. This corresponds to a keyboard with extra “Windows” keys. A regular keyboard without these keys is “us101”.

In fact, it does not seem to make much difference which keyboard type you use.

Resolutions:
This screen will ask which screen resolutions you want to support. Most video cards we see support at most 800x600, and many support only 640x480 resolution. Try unchecking all resolutions except 800x600 and 640x480.

The up and down arrow keys move through the list. The space bar toggles selections. Press $\langle\textnormal{Tab}\rangle$ to select Ok option and move on.

Color depth:
This screen will suggest using a color depth of 24 bits, which corresponds to “millions of colours” in Windows. Many video cards don't support this depth. A colour depth of 8 (256 colors) works for any VGA card, and better cards work with a color depth of 15 or 16.

Monitors:
If you have the vertical and horizontal refresh rates, choose the “Advanced” configuration and enter in these numbers. Otherwise, use the “Simple” configuration option and follow instructions.

Mouse device:
This screen presents a cryptic list of /dev files, and expects you to know which of these files is connected to your mouse. This is easier than it looks:

Mouse protocol:
This is one of the most frustrating steps in the installation process. You are presented with a list of mouse protocols, and you have to choose the right one.

Most mouse manufacturers hide the fact that mice speak to computers in different ways. Windows hides this fact as well. In the end, you have to experiment. The following guidelines might help:

For more mouse-y fun, see the Mouse-HOWTO.

(where is the mouse HOWTO?? -P.)

Testing the configuration

Once you have finished configuring the X-server, it is time to test the configuration out. At a command prompt, type

startx

You will see a whack of messages flash by. Then one of the following things will happen:

The keystroke $\langle\textnormal{ctrl}\rangle$+ $\langle\textnormal{alt}\rangle$+ $\langle\textnormal{backspace}\rangle$ is your best friend when configuring X-Windows. This keystroke gets you out of graphical mode and back to your command prompt.

If your configuration was incorrect, you have to repeat the configuration process by using dpkg-reconfigure again. Note that the configuration program will remember your previous selections and offer them as defaults if you re-reconfigure the X-server.

Configuring X-Windows in Debian is frustrating and time-consuming. Fear not! It gets easier and faster with practice.

If you are using the 3.6 versions of XFree86, you may want to trap the output of the X-Server. To do this, type

startx >& /tmp/x.out

and look at the file /tmp/x.out . For version 4 of XFree86 and higher, a log of the X-server output is kept at

/var/log/ (finish me! -P.)

Enable and configure GDM

GDM stands for “GNOME Display Manager”. For a long time we thought the name was misleading and that GDM did not require GNOME to run. We were wrong - GDM costs several dozen megabytes of extra libraries to run. However, it is the only login manager we know of that permits easy automated graphical logins.

The Debian bootup process is divided into runlevels. Runlevel 0 is run when halting the computer. Runlevel 1 is for single-user (administrator) mode. Runlevels 2-5 are user-level runlevels. By default they are identical. Runlevel 6 is used when rebooting the computer. You can learn more about runlevels by looking at the Debian FAQ, located in the directory:

/usr/doc/debian/FAQ/

Ordinarily, GDM program runs when the system is booted into runlevels 2-5. Its job is to start X-Windows on bootup and manage a graphical login screen. It is also capable of automatically logging in some user account on bootup.

Re-enable GDM

The installer disables GDM during installation by removing symbolic links from the runlevel directories. Allowing GDM to run before X-Windows has been configured properly causes a lot of frustration - if X-Windows is not working correctly, it can be nearly impossible to log in and fix things.

Before re-enabling GDM, it is a good idea to get X-Windows working.

To re-enable GDM, become the root user and type

update-rc.d gdm defaults 99

GDM will then run the next time the computer is rebooted.


The AUTOLOGIN class

In the class selection dialog (documented in Section 4.3.1) there is an option labelled AUTOLOGIN. If this option is selected, the installer will create an account named linuxuser , and configure GDM to log in this account upon bootup.

Selecting this class makes a lot of sense for users who do not want to bother remembering a username and password, so long as they can live with a single account for the whole system.

Configure GDM to log in an account automatically

The user may have specified that he or she wants an account to be logged in automatically upon startup. If you did not choose the AUTOLOGIN class (or if the user wants a different account logged in) you can configure this behaviour in GDM:

  1. At the GDM login screen, you can choose the System $\to$ Configure menu item.

  2. gdmconfig will prompt you for the root password. Enter it.

  3. You will see a configuration menu. On the left there is a sidebar with selections Basic, Expert, and System. Select Basic.

  4. In the right window you will see a row of tabs. Select Automatic login.

  5. In the Timed login section, click the “Login a user automatically after a specified number of seconds” option. In Timed Login enter the login name of the account to log in. Setting the Seconds before login box to 15 seconds is a good idea so that other users (such as the root user) have an opportunity to log in manually.

  6. Click Apply, then Restart after logout.

  7. Click Ok, and you are done.

(PICTURES -P.)

You can also run the GDM configuration program when logged in. Start X-Windows, log in, and then run the gdmconfig program.

Create user accounts

Some users will want several accounts created on their systems. This makes sense when several different people will be using the system. In such cases, you will want a list of logins and names of the people associated with those logins.

Say we want to create the following account:

LOGIN NAME FULL NAME
daveb Dave Bright

To create this account, type the following at the command line:

adduser

The system will copy all the configuration files, and prompt you for a password and real name. It will also prompt you for a “Room Number”, “Work Phone”, “Home Phone”, and “Other”. You do not need to fill any of these in.

Often it is best to let the users to type in passwords for their own accounts if possible. That way you will not need to see the passwords they have chosen.

If you want to create an account with no password (for example, an account that will be logged in using gdm), then type

adduser -disabled-password

Currently we do not force users to choose sensible passwords. This may change in the future.

Reboot and test

Now it is time to test the system out. At the command prompt, type

shutdown -r now

This will reboot the system. At the end of the boot process the system should enter graphical mode. If you configured GDM to log in an account automatically, the account should log in. Otherwise, you should see the GDM login screen. Try logging in with a user account if you can. Otherwise, log in as the root user.


Change the root password

If you logged in under a user account, the first thing you will have to do is become the root user. Click the computer icon on the taskbar to open a terminal window. Then type

su

and enter the current root password. The command prompt should have a hash mark (#) at the end.

Next, you want to change the root password. Typing

passwd

will allow you to do this.

Once you have changed the root password, open up another terminal window, and type

su

again. Then log in as the root user using the new password. This allows you to make sure that the change took effect properly.

Once you have changed the root password, you will want to write this password down on the “Your System's Configuration” page.

Sensible passwords and security

First, a lecture: The root account is really powerful. It provides open access to the entire Linux system. Using the root account people can do all sorts of destructive things, such as deleting the contents of the hard drive, or snooping around wherever they want.

Security is a big concern for systems that will be accessing the Internet - especially for systems that connect to the Internet using DSL or cable modems. In such cases it is really important to choose good root passwords - a weak root password defeats any other security on a system. (refer to SECURITY HOWTO -P.)

Why is this important? For one thing, a cracker that breaks into systems connected to the Internet can use those computers to launch Denial of Service attacks. Put simply, a Denial of Service attack is a way of taking lots of computers and using them to clog up a site on the Internet, crashing the target computers or slowing them down immensely.

How do you choose a good password? The passwd(1) manual page provides some hints. Type

man passwd

and scroll down to the section labelled “Hints for user passwords”. Other things to try include:

Automatic password generation

You can use the apg command to generate relatively-secure passwords. To do this, log onto the server and type

apg -M SN

This will generate a few passwords which you can use for the root account and/or user accounts. The passwords are designed to be pronounceable, and a suggested pronounciation follows each password.

The apg program has other options as well, which you might want to investigate. See the apg manual page for more information.


Set up printers

In version 0.5 of the WCLP project, we switched our printing system from pdq to lprng . It turns out that lprng performs much better on the low-end computers we refurbish.

To set up lprng we use a graphical installation program called lprngtool . To control printers, users can use the program printop, which they can access as the Printer Tool in the IceWM “start” menu.

You can use lprngtool to set up a printer as follows:

  1. In graphical mode, become the root user and type

    lprngtool

  2. You will get a message stating that the /etc/printcap file has been modified. This is fine.

  3. You will get a message that A SMB client does not appear to be installed . Select Ignore and the message will go away.

  4. Select Add

  5. Select locally attached printer

  6. You will be presented with a window of configuration options. Leave all options at their defaults except the Input filter option. Select that.

  7. Yet another window will appear. Select the printer's model from the list. For dot matrix printers, the Epson dot-matrix printer drivers almost always work - select 9 pin or 24 pin as required. Many other common printers are supported.

    Unfortunately, we are not really certain how to add new printers to the standard lprngtool database, so if your printer is not listed you may be out of luck. On the other hand, many printers can emulate a more common printer (for example, many PCL laser printers emulate HP Laserjets). If you can figure out which printers are similar to yours, you may be in luck. The website

    http://www.linuxprinting.org

    may be of some help. Alternatively, search for the model name of the printer and the word “linux”.

  8. You may want to select the Send EOF at end of job to eject page, especially for dot matrix and bubblejet printers.

  9. Select OK then Modify . Then select File $\to$ Restart lprng

  10. Once you have restarted the daemon, click on the new printer definition and select Tests $\to$ Print Postscript test page. If this fails try printing an ASCII test page - this page contains useful diagnostic information you can use to fix the print filter options.

  11. Once you are happy, exit the program, log in as a regular user, and verify that you can print. You should be able to print from any application, such as abiword or opera .

    The print job should come out relatively quickly. If everything seems to hang, you probably want to use printop to see whether the job has been sent to the printer, and where lprng is getting stuck.

If you encounter weird situations with printers, please let us know so that we can document those situations in an Appendix.


Set up a sound card

Some users request that we set up sound cards with their systems. In this case, you need to set up that card. In Linux, sound card configuration is a royal pain. However, with a little luck and a lot of patience it can be done.

In order to get a sound card working, you need to set up the following things:

  1. A working sound card supported under Linux.

  2. A way for Linux to recognise the card's settings. This may mean setting up jumpers, or you may have to use the isapnp tools.

  3. Low-level sound card drivers. Two classes of drivers are available: OSS/Lite drivers and ALSA drivers. We prefer ALSA drivers, but there are advantages to both driver systems.

  4. User permissions so that regular users can use sound facilities.

  5. Programs to use the sound card, such as CD-ROM players, MIDI and MP3 programs.

In the following sections we explain each of these steps in more detail.

Getting a working sound card

Before installing a sound card, you should check that it is supported under Linux. Ways to do this include:


Setting up resources using isapnptools

Like any other hardware, sound cards need to use resources in order to work properly. Unlike other hardware, Linux does not do a great job of automatically allocating or recognising sound card resources automatically. In order to make your sound card work, you may have to explicitly set the IRQ, IO ports, and DMA channels for your sound card.

If your sound card is an ISA card with jumpers, you should set the card so that it uses a free IRQ and IO port address.

If your sound card is an ISA Plug-and-play card, you may have to use isapnp and pnpdump to set the card's resources. The easy way to do this is to type the following:

pnpdump -c > /etc/isapnp.conf

isapnp /etc/isapnp.conf

What is happening? First, the pnpdump utility is detecting all plug-and-play cards on the system, and attempting to automatically generate a configuration file that will Just Work. Then the isapnp utility tries to use that file to set the resources on the card and let Linux know that the card exists.

If you are lucky, isapnp will print out messages that indicate the sound card configured properly:

(Include these messages here.. -P.)

If you are not lucky, the program will indicate an error. In this case, you will have to edit the /etc/isapnp.conf manually. First, regenerate the file:

pnpdump > /etc/isapnp.conf

Next, edit the file:

nano /etc/isapnp.conf

Basically, this involves reading the comments and following the instructions to uncomment (remove the hash marks from) certain lines. It is not hard, but you have to be aware of the structure of the file: each card is broken down into one or more logical devices. There are usually about four logical devices in a sound card. Each logical device consists of a block starting with the line LD and ending with ACT Y. In between there are a bunch of INT, IO, and DMA lines that are commented out with a hash mark.

For each LD line, you want to uncomment one INT line, one IO port line, and one DMA line. Then you have to uncomment the (ACT Y) line at the bottom of each LD section.

Here is an example:

#
# Logical device id CMI0003
#     Device supports vendor reserved register @ 0x39
#     Device supports vendor reserved register @ 0x3a
#     Device supports vendor reserved register @ 0x3c
#     Device supports vendor reserved register @ 0x3e
#     Device supports vendor reserved register @ 0x3f
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be
# changed if required
# Don't forget to uncomment the activate (ACT Y) when happy
 
(CONFIGURE CMI8329/67109120 (LD 3

This specifies logical device LD 3. Following this are several possible configurations:

 
#     Start dependent functions: priority preferred
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0530
#             Maximum IO base address 0x0530
#             IO base alignment 1 bytes
#             *** Bad resource data: Base alignment 0 - changed to 1
#             Number of IO addresses required: 8
    (IO 0 (SIZE 8) (BASE 0x0530))
#       IRQ 11.
#             High true, edge sensitive interrupt (by default)
    (INT 0 (IRQ 11 (MODE +E)))
#       First DMA channel 0.
#             8 bit DMA only
#             Logical device is not a bus master
#             DMA may execute in count by byte mode
#             DMA may not execute in count by word mode
#             DMA channel speed in compatible mode
    (DMA 0 (CHANNEL 0))

This configuration uses an IO address of 0x0530, an IRQ of 11 and DMA channel 0. This configuration option is selected, because the lines beginning with IO, INT, and DMA are uncommented. Note that you want to uncomment lines in the same block - don't mix and match between configuration blocks.

Finally, you have to uncomment the following line for each logical device:

#     End dependent functions
 (NAME "CMI8329/67109120[3]{AD-CHIPS Audio Adapter}")
# (ACT Y)
))

In this example, (ACT Y) is still commented, so isapnp will ignore this section. You want to make sure the (ACT Y) lines for each logical device are uncommented.

When you have edited the file, run isapnp on the configuration file:

isapnp /etc/isapnp.conf

If you are lucky, each logical device will be recognised, and appropriate status messages will print on the screen.

If this does not work, you have to re-edit the file, re-comment some of the lines you uncommented, uncomment some new lines, and try again.

When you have a working configuration, write down the resources you have used.

For hints on how to determine which IRQs and IO ports are free, see the “Determine resource usage” section in the isapnp FAQ. To access this FAQ, type the following:

cd /usr/share/doc/isapnptools/

zcat isapnpfaq.txt.gz | less

Low level drivers: ALSA vs. OSS/Lite

Crazy hackers have developed two popular sets of sound drivers for Linux. The OSS/Lite driver system came first. This system supports a lot of sound cards and is integrated into the Linux kernel. However, it is a pain to configure, and (supposedly) the sound quality is not as good as the ALSA drivers.

The ALSA project was an attempt to improve sound support under Linux. ALSA does not support as many sound cards as OSS/Lite does, but the setup is a bit easier and the quality is supposedly better. ALSA support will be integrated into the Linux kernel for the 2.6 series of kernels.

Our preference is to use the ALSA drivers whenever possible. However, the drivers you use probably do not matter all that much.

Configuring ALSA drivers

We support the ALSA drivers in the SOUND_CONFIG class. This class contains the ALSA drivers themselves, and some tools to help set up these drivers. You should select this class during the install, in the “Additional Classes” screen (see Section 4.3.1 for more information).

To set up the ALSA drivers, first configure the resources for the card, then type

alsaconf

You will first have to select your card from a list of supported cards. At this point, the configuration program should autodetect the resources you set up, and set up the drivers. Finally, the program plays a sound sample.

If any of these steps fail, you probably either chose the wrong sound card to set up, or you did not configure sound card resources properly.

Once ALSA has been set up, you can use the following programs to play sounds and control the card:

Configuring OSS/Lite drivers

We support the OSS/Lite drivers through the OSS_CONFIG class. It contains the sndconfig utility to help you configure the drivers. As OSS/Lite sound is integrated into the kernel, you do not actually need this package to configure sound support. Indeed, this package takes up several megabytes of hard drive space. However, you might find the sndconfig utility easier to use than setting up sound manually.

As with the SOUND_CONFIG class, choose this class in the “Additional Classes” setup screen.

To use the sndconfig program, type

sndconfig

You must then select the sound card, and select the resources the sound card should use. These resources should match the jumper settings or isapnp settings.

Once you have completed your selection, the program will play a sound sample for you. If you do not hear the sample, run sndconfig again and change your configuration settings.

Once you have successfully set up the card, you may want to remove the sndconfig, kudzu and hwdata Debian packages from the system. This will save a few megabytes of space. Removing these packages should be safe, but we have not checked this.

Installing sound programs

(SOUND_APP class. -P.)

Set up a modem

Modems are a pain to set up under Linux. In order to get a modem working, you need to go through the following steps:

  1. If the computer's BIOS supports Plug-and-Play, then you may want to disable PnP support for the modem and its resources.

  2. If the modem is internal, you may have to set jumpers on it.

  3. You must physically install the modem (which should be straightforward).

  4. If the modem does not have jumpers, you must set up /etc/isapnp.conf to configure the modem.

  5. You must get Linux to recognise the serial port the modem is using. This involves editing the file /etc/setserial.conf

  6. You must configure software to recognise the modem and dial out to the user's ISP. Currently, we use wvdial or pppconfig for this.

  7. You might consider setting up a graphical dialer program to make life easy for the user. Our current favorite is gkdial . Another option is to try diald, which sets up PPP connections on demand.

In the following sections, we will go through modem setup in some detail. Modems are tricky beasts, however, and these instructions certainly don't cover every case you will run into. To learn more about setting up modems, you will want to read the Modem-HOWTO . You can look at this HOWTO by typing

zcat /usr/share/doc/HOWTO/en-txt/Modem-HOWTO.gz | less

on the server.

In this section we focus on setting up internal modems. Setting up external modems is similar, but easier - you can usually plug in the modem into a free COM port, then configure dialer and ISP information directly.


Information you need

Before you start, you need some information:

Fiddling with PnP BIOS settings

The BIOS in many Pentium-class systems natively supports the Plug and Play specification. Unfortunately, the support is often not that good for ISA devices. When configuring modems, this causes great headaches. Linux and the BIOS fight for control of the PnP devices, and Linux ends up losing.

Our solution to this problem is to disable PnP configuration for the modem. With Award BIOS sets you do this indirectly: you tell the BIOS to reserve certain IRQs for “Legasy ISA” cards. Here is how we set the BIOS:

  1. Figure out the resources you want the modem to use. This may require configuring /etc/isapnp.conf to set the PnP jumpers.

  2. Reboot the computer and get into the BIOS.

  3. Find the BIOS section that controls Plug-and-Play devices and select that menu option.

  4. On Award BIOS systems, you can set each IRQ to one of two options: ISA or PCI PnP or Legacy ISA . Set the IRQ for the modem to Legacy ISA .

    (Check these menu messages -P.)

  5. Save the configuration and exit.

If you are lucky, this will free up the IRQ you want, so that isapnp can allocate the resource to the modem properly.

Setting modem jumpers

Older modems may not use the Plug-and-Play protocol. On these modems you will have to set up the modem manually. You will need to know what the jumper settings mean. Often the legend is printed somewhere on the modem, but sometimes this means logging onto the Internet and finding specifications.

Once you have figured out what the jumpers do, you will want to set the following jumpers:

Set the jumpers to values you think are free. Be prepared, however, to take out the modem and try again.


Using setserial

At first, we thought we needed to edit the /etc/serial.conf file to tell Linux the serial port the modem was using. Apparently, this is not the case: editing serial.conf appears to have no effect on making the modem work properly. What is important is to set the IO address the modem uses to an IO address corresponding to the serial port you want to use.

According to the Modem-HOWTO you do need to modify /etc/serial.conf if you change the IRQ or IO address of the modem to something non-standard. We have not verified this, however.

Near the top of the /etc/serial.conf file, you will find the following lines:

These are the standard COM1 through COM4 devices
#
#/dev/ttyS0 uart 16450 port 0x3F8 irq 4
#/dev/ttyS1 uart 16450 port 0x2F8 irq 3
#/dev/ttyS2 uart 16450 port 0x3E8 irq 4
#/dev/ttyS3 uart 16450 port 0x2E8 irq 3

The file /etc/serial.conf does not really configure anything. Supposedly, it registers serial ports, but we have not seen evidence that editing the file makes any difference. However, we don't understand modems well yet, so, editing /etc/serial.conf might yet turn out to be important.

In order to register a serial port, you have to know how you configured your modem. You need to know the IRQ, the COM port the modem is using and (if using /etc/isapnp.conf) the IO port associated with that COM port. Then go through the following steps:

  1. Edit the /etc/serial.conf file:

    nano /etc/serial.conf

  2. Find the line corresponding to the COM port that you want to use. COM1 is /dev/ttyS0, and COM4 is /dev/ttyS3.

    Note that /etc/isapnp.conf will tell you the serial port to use if you used isapnp to configure the card. Look at the BASE address used by the card. For example, if your isapnp.conf file had the following uncommented block:

    #       Start dependent functions: priority acceptable
    #       Logical device decodes 16 bit IO address lines
    #             Minimum IO base address 0x02e8
    #             Maximum IO base address 0x02e8
    #             IO base alignment 8 bytes
    #             Number of IO addresses required: 8
      (IO 0 (SIZE 8) (BASE 0x02e8) (CHECK))
    #       IRQ 3.
    #             High true, edge sensitive interrupt (by default)
      (INT 0 (IRQ 3 (MODE +E)))
    

    then you would know that the card was using IRQ 3, and /dev/ttyS3, since this serial port corresponds to IO address 0x02e8 .

  3. Copy the line and paste it. In nano, $\langle\textnormal{ctrl}\rangle$-k copies a line and $\langle\textnormal{ctrl}\rangle$-u pastes the line(s) you copied most recently.

  4. Uncomment one copy of the line by removing the hash mark at the front of the line.

  5. Now edit the line. The “irq” should be set to the IRQ. If you matched the IO port to the appropriate serial port, you should not need to change the “port” line.

  6. Save the file.

  7. Restart the setserial program. If you are lucky, this should register the port. To restart the program, type

    /etc/init.d/setserial restart

If all worked well, you should see some lines similar to the following on bootup:

 
Loading the saved-state of the serial devices... 
/dev/ttyS0 at 0x03f8 (irq = 4) is a 16450
/dev/ttyS1 at 0x02f8 (irq = 3) is a 16450

Using isapnptools (revisited)

Most new modems use the Plug-and-Play specification. Instead of setting hardware jumpers manually, the jumpers on PnP boards are registers that can be set using software.

Some modems have jumpers that allow you to choose whether to use Plug-and-Play or not. Disabling Plug-and-Play and setting jumpers manually can sometimes make your life easier, but it does not always work. If you have other Plug-and-Play cards in the computer, it might be less work to set jumpers manually, because you will have to fiddle with the /etc/isapnp.conf file less.

See Section 5.8.2 for information on how to use the pnpdump program to set Plug-and-Play jumpers.

The tricky part here is to co-ordinate IO addresses in /etc/isapnp.conf with the IO addresses of the serial port you want to use.

You can see standard IO addresses for the serial ports by looking at the /etc/serial.conf file. Here is the relevant part of the file again:

These are the standard COM1 through COM4 devices
#
#/dev/ttyS0 uart 16450 port 0x3F8 irq 4
#/dev/ttyS1 uart 16450 port 0x2F8 irq 3
#/dev/ttyS2 uart 16450 port 0x3E8 irq 4
#/dev/ttyS3 uart 16450 port 0x2E8 irq 3

From this snippet we can see some important things:

When editing /etc/isapnp.conf, you need to set the IO address the modem uses to an IO address corresponding to one of these serial ports.

In the following example, the IO address the card uses is 0x02e8, which corresponds to /dev/ttyS3.

#       Start dependent functions: priority acceptable
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x02e8
#             Maximum IO base address 0x02e8
#             IO base alignment 8 bytes
#             Number of IO addresses required: 8
  (IO 0 (SIZE 8) (BASE 0x02e8) (CHECK))
#       IRQ 3.
#             High true, edge sensitive interrupt (by default)
    (INT 0 (IRQ 3 (MODE +E)))

Using wvdialconf to test modem detection

The wvdialconf program can quickly determine whether Linux can see the modem. Type

wvdialconf /tmp/wvdial.conf

A successful modem detection will produce output similar to this:

ttyS1<*1>: ATQ0 V1 E1 -- OK
ttyS1<*1>: ATQ0 V1 E1 Z -- OK
ttyS1<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyS1<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyS1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyS1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyS1<*1>: Modem Identifier: ATI -- 33600
ttyS1<*1>: Speed 4800: AT -- OK
ttyS1<*1>: Speed 9600: AT -- OK
ttyS1<*1>: Speed 19200: AT -- OK
ttyS1<*1>: Speed 38400: AT -- OK
ttyS1<*1>: Speed 57600: AT -- OK
ttyS1<*1>: Speed 115200: AT -- OK
ttyS1<*1>: Max speed is 115200; that should be safe.
ttyS1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

If Linux does not see your modem, you will get output like this for each detected serial port:

ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 4800 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 4800 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 19200 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 19200 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.

Once Linux detects your modem properly, you are ready to configure a dialer.

Setting up a dialer

A dialer is the program that actually dials your modem to connect to the outside world. It will negotiation with an ISP, and start the PPP daemon so that the user can start surfing the Internet.

To set up ISP information, you actually want to configure two dialers: pppconfig and gkdial . The first actually sets the dialing information. The second dialer is graphical, and uses the information set by pppconfig to dial out.

Another possibility is to use the wvdial program to dial out, but wvdial does not work in every situation, and it does not play well with gkdial .

Here is how to use pppconfig

  1. Start the program:

    pppconfig

  2. Choose Create a connection

  3. Leave the account name as provider

  4. Select the default options for everything except the DNS (which should be Dynamic DNS and the connection protocol (which should be PAP) .

  5. If you have ISP information for your customer, then you can enter that information when prompted for the username, password and phone number fields. Otherwise we may have a test ISP account you can use (but you will have to undo that ISP information once you have finished testing the modem).

  6. When you have finished setting the account, select Finish to save the configuration. If you do not do this you will lose everything and have to start over.

To dial the modem out, first disable the network card connection if it is active. To do this, type:

ifdown eth0

Then connect the computer to a phone line and type

pon

The modem should dial and authenticate with the ISP. To verify that the connection is up, type

ifconfig

You should see an entry for interface ppp0 .

You can also test the connection by connecting to an Internet site, or pinging another host. For example, to ping Google you could type:

ping www.google.com

Then type $\langle\textnormal{ctrl}\rangle$-C to quit ping. If all goes well you will see messages similar to:

PING www.google.com (216.239.33.101): 56 data bytes
64 bytes from 216.239.33.101: icmp_seq=0 ttl=40 time=141.4 ms
64 bytes from 216.239.33.101: icmp_seq=1 ttl=40 time=138.8 ms
64 bytes from 216.239.33.101: icmp_seq=2 ttl=40 time=153.8 ms

Otherwise you will see nothing, and you will have to debug the problem. (how? -P.)

Once you have verified the connection works, end the connection by typing

poff

Once you have a working connection, you need to go through a few more steps to make the dialer work conveniently with gkdial and to eliminate traces of the test account if you used one:

It is nice if your user has ISP information handy when setting up the modem. Then you can configure the modem once and not have to remove any evidence. If the user does not have ISP information on hand they will either have to run pppconfig themselves to enter the ISP information (which is bad) or they will have to bring in their computer so you can enter this information (which is inconvenient).

If you are having problems getting the modem to connect with the user's ISP, refer to Appendix A.4 to see whether somebody has already run into your problem.

Note that in order to use a dialer program as a user, the user has to be a member of a privileged group. The two groups we have seen are “dip” and “dialout” . Currently, the installer is configured so that all default user accounts (and any subsequent accounts created with the adduser command) will be automatically added to these groups. See Section 8.1.9 for more information.

To see which groups a user belongs to, type

groups username

where username is the name of the user. To add a group called groupname to a user named username, type

adduser username groupname

Deal with the network card and configuration

What you do at this point depends on whether you are supposed to keep the network card in the computer or not. Sometimes this decision will be made for you - you will be told to take the network card out, or customers will want to buy network cards with their systems.

Advantages of keeping the network card installed include:

Disadvantages of keeping the network card in the computer include:

If you want to keep the network card, you should make sure that it continues to work:

  1. Check the file /etc/modules . The network card module should be listed in it. (It is not auto, if you are wondering.)

    If there is no network card module, you have to find out what module should be inserted, and then you need to insert an appropriate line by editing /etc/modules as the root user.

    For help in discovering which network card driver to use, see Section A.3.1 .

  2. If the user knows the network settings he or she needs (gateway, IP address, DNS servers and netmask) you will want to edit the following configuration files:

    If the user does not know the new network information, it is best to leave all these configuration files as is.

  3. At some point, reboot the machine and verify that the network card is detected. You can see this by typing

    ifconfig

If you do not want to keep the network card, you need to make sure that Linux does not try to detect the network card on bootup:

  1. Edit /etc/modules . Comment the network card driver with a hash mark (“#”).

  2. Edit /etc/network/modules . Comment out the line

    auto eth0

    with a hash mark.

If you do not go through the above steps, the computer will probably still work - but it will complain that it cannot find the network card.

Finishing up

At this point, the system should be working and ready to be used and loved. Now all you need to do is prepare the user for his or her purchase:

2004-04-13