Next Previous Contents

4. Stage 3. Terminal to local Linux system

This arrangement again requires a DOS machine with a speech synthesizer and a terminal emulator program. However, instead of dialing up a remote computer, it is used as a terminal to a local computer running Linux. To get to this point, you need to install Linux on a machine. You may be able to prevail on a knowledgeable friend to help you with this. However, it is also possible to install it yourself with speech feedback for almost the whole procedure.

4.1 Installing Linux

First, some background. Even the simplest Unix system requires a program called the kernel and a root file system. The kernel has all the device drivers and resource management functions. One normally thinks of a "file system" as residing on a hard disk or floppy disk, but during an installation it is usually in ram. Linux is normally installed by writing a kernel image to a floppy disk, called the "boot floppy", configuring it to reserve a section of RAM for a ramdisk, then filling that ramdisk with data from a second floppy disk, called the "root floppy". As soon as both floppies have been read in, the user can log in as "root" and complete the installation. The sighted user logs in on the "system console", that is, the computer's own keyboard and video display. However, remember that Unix has been a multiprocessing operating system from the very beginning. Even this very primitive Unix system, running out of a small ramdisk, also supports logins from a terminal connected to a serial port. This is what a blind user can use.

To connect the two computers, you can use a "null modem", a serial cable that connects ground to ground, and transmit on each end to receive on the other. The cable that comes with the DOS application LapLink will work fine. It is particularly handy, in fact, because it has both a 9 pin and a 25 pin connector on each end. If you want to check a cable or have one made, here are the required connections:

For two 9 pin connectors, connect pin 2 (receive data) to pin 3, pin 3 (transmit data) to pin 2, and pin 5 (signal ground) to pin 5.

For two 25 pin connectors, connect pin 2 (receive data) to pin 3, pin 3 (transmit data) to pin 2, and pin 7 (signal ground) to pin 7.

For a 9 pin connector (first) to a 25 pin connector (second), connect pin 2 (receive data) to pin 2 (transmit data), pin 3 (transmit data) to pin 3 (receive data), and pin 5 (signal ground) to pin 7 (signal ground).

You may have noted that I have included no connections for the "handshaking" signals. During login, the serial port is handled by the program agetty. Recent versions of this program accept a -L switch which tells it not to expect modem control signals. The version in Slackware 3.0 does, but the one on the 3.0 (and earlier) installation root disks does not. However, Pat Volkerding has assured me that the root disks in the next release of Slackware will have the updated version of agetty. It is also possible to use the earlier root disks [ Emacspeak with Earlier Slackware Releases].

Consult the documentation on your CDROM, or downloaded from an FTP site, and choose a boot disk with the proper kernel features for your hardware (IDE or SCSI, CDROM driver, etc.). I have the InfoMagic September 1996 "Developer's Resource" set of six CDROMs. Slackware 3.1 is on disk 1 of that set, mostly in the two directories slackwar and slakware. (Note the difference in spelling. You will access them in alphabetical order: first slackwar, then slakware.)

Documentation on the boot floppies is in \bootdsks.144\which.one. A copy of the DOS program for writing boot images to a floppy, rawrite.exe, is in the same directory. Assuming the CDROM is the M drive under DOS, one might use these commands to write to a floppy disk in the A drive:

        C>m:
        M>cd \bootdsks.144
        M>rawrite scsinet.s a:

Similarly, to write the "text" root disk:

        C>m:
        M>cd \rootdsks
        M>rawrite text.gz a:

If you install from floppies, you should also copy the Emacspeak package onto a floppy with a command like this:

        C>copy m:\contrib\emacspea.tgz a:

For the actual installation, proceed as follows: Use the null modem to connect the computer running DOS and equipped with speech output (which I will call the "DOS machine") to the computer into which you want to install Linux (the "Linux machine").

Boot the DOS machine, and start your terminal emulation program. Set it up for 9600 baud, no parity, eight data bits, 1 stop bit.

On the Linux machine, insert the "boot" disk and boot (power up, cntl-alt-del, or hit the reset switch). It should read the disk for five seconds or so, beep, and stop with the following text:

(Note: in the following, the large blocks of text quoted from the installation disks are preceded by "-- begin quote" and followed by "-- end quote". To skip to the end of a quote, you may search for two dashes starting in the first column. I have word wrapped some sections to limit the line lengths.)

-- begin quote
Welcome to the Slackware96 Linux (v. 3.1.0) bootkernel disk!

If you have any extra parameters to pass to the kernel, enter them at
the prompt below after one of the valid configuration names (ramdisk,
mount, drive2)

Here are some examples (and more can be found in the BOOTING file):

  ramdisk hd=cyl,hds,secs    (Where "cyl", "hds", and "secs" are the
                             number of cylinders, sectors, and heads
                             on the drive.  Most machines won't need
                             this.)

In a pinch, you can boot your system with a command like:
  mount root=/dev/hda1

On machines with low memory, you can use mount root=/dev/fd1 or mount
root=/dev/fd0 to install without a ramdisk.  See LOWMEM.TXT for
details.

If you would rather load the root/install disk from your second
floppy drive: drive2 (or even this: ramdisk root=/dev/fd1)

DON'T SWITCH ANY DISKS YET!  This prompt is just for entering extra
parameters.  If you don't need to enter any parameters, hit ENTER to
continue.

boot:
-- end quote

I have almost always been able to just hit "enter" at this point.

After your entry, the Linux machine should read the floppy for another twenty seconds or so, then boot the kernel. The first thing it prints is "Loading ramdisk...", which is somewhat misleading. In this case, "ramdisk" is actually the name of the kernel configuration.

Each device driver in the kernel displays a line or two. The particular disk I'm using (the "bare.i" bootdisk) displays more than one screen's worth. It is possible to type shift-page up to scroll the text back. On my machine, the boot messages are as follows:

-- begin quote
Loading ramdisk.....
Uncompressing Linux...done.
Now booting the kernel
Console: colour VGA+ 80x25, 1 virtual console (max 63)
Calibrating delay loop.. ok - 35.94 BogoMIPS
Memory: 23028k/24768k available (688k kernel code, 384k reserved, 
 668k data)
Swansea University Computer Society NET3.035 for Linux 2.0
NET3: Unix domain sockets 0.12 for Linux NET3.035.
Swansea University Computer Society TCP/IP for NET3.034
IP Protocols: ICMP, UDP, TCP
VFS: Diskquotas version dquot_5.6.0 initialized
Checking 386/387 coupling... Ok, fpu using exception 16 error reporting.
Checking 'hlt' instruction... Ok.
Linux version 2.0.0 (root@darkstar) (gcc version 2.7.2) #1 Mon Jun 10
21:11:56 CDT 1996
Serial driver version 4.13 with no serial options enabled
tty00 at 0x03f8 (irq = 4) is a 16550A
PS/2 auxiliary pointing device detected -- driver installed.
Ramdisk driver initialized : 16 ramdisks of 49152K size
hda: IBM-DBOA-2720, 689MB w/64KB Cache, LBA, CHS=700/32/63
ide0: at 0x1f0-0x1f7,0x3f6 on irq 14
Floppy drive(s): fd0 is 1.44M
Started kswapd v 1.4.2.2
FDC 0 is a 8272A
Partition check:
  hda: hda1 hda2 hda3
VFS: Insert root floppy disk to be loaded into ramdisk and press ENTER
-- end quote

Some messages will of course be different on a machine with different hardware. Now, insert the "text" rootdisk and press ENTER. After it is read, the following is displayed on the console:

-- begin quote
RAMDISK: Compressed image found at block 0
JAVA Binary support v1.01 for Linux 1.3.98 (C)1996 Brian A. Lantz
VFS: Mounted root (minix filesystem).
INIT: version 2.60 booting
none on /proc type proc (rw)
INIT: Entering runlevel: 4


Welcome to the Slackware Linux installation disk ,version 3.1.0-text!
### READ THE INSTRUCTIONS BELOW CAREFULLY! ###

You will need one or more partitions of type "Linux native"
prepared. It is also recommended that you create a swap partition
(type "Linux swap") prior to installation. Most users can use the
Linux "fdisk" utility to create and tag the types of all these
partitions. OS/2 Boot Manager users, however, should create their
Linux partitions with OS/2 "fdisk", add the bootable (root) partition
to the Boot Manager menu, and then use the Linux "fdisk" to tag the
partitions as type "Linux native".

If you have 4 megabytes or less of RAM, you MUST ACTIVATE a swap
partition before running setup. After making the partition with fdisk,
use:

mkswap /dev/<partition> <number of blocks> ; swapon /dev/<partition>

Once you have prepared the disk partitions for Linux, type "setup" to
begin the installation process.

You may now login as "root".

slackware login:
-- end quote

The program that prints the login prompt is called agetty. The Slackware 3.1 root disks are set up to allow logins only from the computer's own keyboard. You will have to reconfigure it to also allow logins from a serial port. This requires typing four lines on the Linux machine keyboard, with no voice feedback. If you realize you have made a mistake before hitting the carriage return, you can erase it with the backspace key. You can also discard what you have typed on a line with control-C. Here is what you type:

root
cat >>/etc/inittab
s1:45:respawn:/sbin/agetty 9600 ttyS0
control-D
init q

I will repeat that with explanations of what is going on.

First, type "root" and a single carriage return to log in (no password is needed). Next, you need to append one line to /etc/inittab. Type the following two lines:

cat >>/etc/inittab
s1:45:respawn:/sbin/agetty 9600 ttyS0

Finish each line with the "enter" key. Then type a control-D, which signals end of file to a Unix program. (Note: In the second line, the next to last character is an upper case "S". Everything else is in lower case.) This adds a line to the configuration file of the program init, to instruct it to use agetty to watch for logins on the first serial port on the Linux machine, called "COM1" under DOS, or "/dev/ttyS0" under Linux. To use the second port instead, change the last item on the above line to "ttyS1".

Then type

init q

which causes init to reread /etc/inittab. At this point the DOS machine should display the login prompt (the third of the blocks of text quoted above). On the DOS machine, type root, and finish the installation. (The next thing you should do is create and enable a swap partition.)

If you don't get the Slackware installation disk prompt, try the following:

Once you get the above prompt on the DOS machine, you may type root and a carriage return to log in, and complete the installation like any other user. Of course, you must remember to include these packages: emacs, tcl, and tclX.

The installation script will offer to prepare a boot floppy. You should do this, since it is the most foolproof way to boot Linux. You will probably also want to install lilo (which is an abbreviation for "Linux loader") and/or loadlin (which is an abbreviation for "load Linux"). The installation script can install lilo. Loadlin is a DOS program that will let you boot from DOS to Linux. Install it on a DOS partition, and copy a compressed kernel file (usually named zImage) to the same partition. While running DOS, you may boot Linux with a command like loadlin zimage root=/dev/hda3 ro/. (I have assumed here that the kernel image is in the same directory as the loadlin program. You may find it more convenient to store kernel images in subdirectories named for the kernel version.)

After the Slackware setup script finishes the main installation, it will tell you to restart by pressing cntl-alt-del. Before doing that, you should install emacspeak. It can be found with the other "contributed" software. In the InfoMagic set, it is in slackwar/contrib. Assuming you are installing Linux directly from a CDROM, the setup script will mount the CDROM under /CDROM, and you may install emacspeak with the following command:

        # installpkg /CDROM/slackwar/contrib/emacspeak.tgz

If you install from floppies, insert the floppy you made earlier and type this:

        # mount -tmsdos /dev/fd0 /floppy
        # cp /floppy/emacspea.tgz /tmp/emacspeak.tgz
        # installpkg /tmp/emacspeak.tgz

You should not install the package directly off the floppy disk, because the DOS filesystem will not allow the full filename, so the installpkg program will think the package name is "emacspea" and will store its records under that name.

If you have a DoubleTalk or LiteTalk speech synthesizer, you should also install the emacspeak-dt package.

Reboot the Linux machine with the new boot floppy, with the DOS machine still connected. You should get a login prompt on the DOS machine. Celebrate! After getting this system working, you need to learn emacs (third option) and Unix system administration.

4.2 Learning Unix System Administration

Mostly you will learn system administration as the need arises. First adding a user (yourself), then installing programs, and so forth. The exception to this is making backups, which you should learn before you need them.

Among the many programs you will need to learn are these:

adduser

Register a new user, including creating a home directory and adding an entry in /etc/passwd.

tar

Create and unpack .tar files, which are collections of files (something like .zip files). To list the contents of an archive, use tar -tf foobar.tar. For a more verbose listing, use tar -tvf foobar.tar. To unpack an archive, use tar -xf foobar.tar.

chmod

Change permissions of a file or directory.

chown

Change ownership of a file or directory.

find

Search directories recursively. For example, the command find . -name '*alpha*' -print means: search starting in the current directory (.) for a file whose name contains the string "alpha" (-name '*alpha*'), and print its path and name (-print). (With GNU find, the -print is optional.)

du

Display the amount of space occupied by files or subdirectories. For a file with "holes", this may be much less than the length of the file.

df

Display filesystem capacities, free space, and where they are mounted.

mount

Display filesystems, where they are mounted, and the mount flags.

ifconfig

Configure and check internet protocol (IP) network interfaces, including Ethernet cards, SLIP links, and PLIP links.

route

Configure and check IP network routing, after the interface is configured.

ping

Check IP network connectivity, after the interfaces and routes are configured.

ftp

Transfer files across the Internet.

Here are some programs you may want to install:

agrep

Approximate grep searches for approximate, not exact, string matches (also called "fuzzy string searches").

archie

Search Internet archives for files.

flip

Convert text files between Unix and DOS formats.

glimpse

Fuzzy string searches in large collection of files (uses agrep).

lynx

Text mode web browser.

Here are some Web pages related to Unix system administration:

General information http://www.ensta.fr/internet/unix/sys_admin/ or http://www.sai.msu.su/sysadm.html

There is a Unix system administration tutorial at http://www.iem.ac.ru/sysadm.html

UnixWorld Online Magazine Home Page http://www.wcmh.com/uworld/

Internet Essentials for UNIX System Administrators Tutorial http://www.greatcircle.com/tutorials/ieusa.html

Pointers to Unix goodies available on the Internet http://www.ensta.fr/internet/unix/

Pointers to Unix system administration "goodies" available on the Internet http://www.ensta.fr/internet/unix/sys_admin/


Next Previous Contents