"Linux Gazette...making Linux just a little more fun!"


PLIP: Laplink Cable Install of Debian 2.1

By Bill Bennet


This installs linux via the parallel port

     Have you got a machine that is ready for linux but it has no CDROM drive? Is it also missing a modem or a network card? If you have a running linux box (with CDROM drive) available to you, then you can easily install linux via the good old laplink cable that plugs into the parallel port. Even old neglected machines come with a parallel port somewhere, so this method will guarantee that you can walk into any installing situation and be ready to roll.

Debian 2.1 can do this thing

     Just about all linux distributions can do this little PLIP console connection. There is a lot of good information available for you as well, but if it is only for RedHat, then as a Debian user you may feel left out. Even worse, too many times an article will assume that you know what you are doing.

     Heck, I do not know what I am doing, but I got this PLIP thing to install Debian 2.1 because I needed a good peer to peer network game player that fits on a small hard disk. Good old Debian has the small purposeful ".deb" packages that you can put in one at a time to make a very small yet powerful server. This article fires up Debian 2.1 and installs a PLIP peer to peer network system with X Windows so we can play netmaze head to head versus a small, bloodthirsty nephew or niece.

     The target system is a "Frankenstein"; a 486/DX66 with no CDROM, no modem, no network card, 16 MB RAM, a 1.44 MB floppy and two tiny hard disks, 110 and 170 megabytes small.

We begin at the running linux box that will serve us our CD through the laplink cable.

Server for the PLIP

We need to login as root and edit these files:


Scripting is the mojo for linux

     Those wacky HOWTO writers are always letting you copy their hard work by giving you a little script to run on your machine.

We need to create this little executable script:


#!/bin/sh
killall -HUP /usr/sbin/rpc.mountd
killall -HUP /usr/sbin/rpc.nfsd
echo re-exported file systems

     Fire up mcedit (it comes with Midnight Commander. You do have it, yes?). Go to the NFS-HOWTO and block out the exportfs script with the F3 toggle and then F9 copy it to the ~/.cedit/cooledit.clip file. Exit with F10.

     Then type mcedit your-new-file-name. It will give you a nice blank page to F9 insert the ~/.cedit/cooledit.clip file. Edit it in your personal way and F2 save it, or F9 save it as your-new-script-command-name.

     Then type chmod 755 your-new-file-name to make it executable. Copy it to /usr/sbin just for fun, but also to make it live in the path.

     For easy mnemonics and to honour the author, we should call it exportfs. Done.

     Huh? What does it do? It exports the currently mountable NFS directories in case you make a change.

/etc/init.d/network

We simply need to tell the machine about the plip1 device and who it connects with via pointopoint networking.


#! /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=192.168.1.5
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
GATEWAY=
#ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
#route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
ifconfig plip1 CHGUY pointopoint Salma up
route add -net ${NETWORK} netmask ${NETMASK} dev plip1

/etc/networks

The networks your machine knows about:


loopback 127.0.0.0
localnet 192.168.1.0

/etc/hosts

Well? Who is on this network anyway?


127.0.0.1	localhost
192.168.1.5	CHGUY.chguy.net	    CHGUY
192.168.1.3     Salma.chguy.net     Salma

/etc/hosts.deny

Kind of like being doorman at 54, eh?


ALL: PARANOID: DENY

/etc/hosts.allow

Salma gets in every time.


ALL: 192.168.1.3: ALLOW

/etc/exports

The NFS server will only give out the directories in the exports file.


/cdrom          *.chguy.net

/etc/fstab

This will let ordinary users mount the CDROM drive, which is not a problem at a home LAN (Local Area Network. Yes, that is right, your linux CD gives you a replacement for NT).


# (file system) (mount point) (type)   (options)     (dump) (pass)
/dev/cdrom      /cdrom        iso9660  users,exec,ro   0      0

Turn it on

Time to turn on PLIP on this CD server machine:


ifconfig plip1 CHGUY pointopoint Salma up
route add Salma dev plip1

All is ready for the installation.

Client for the PLIP

     The target for the installation is the client of your server. However, this is PLIP peer to peer networking, so both of the machines act as a server. For this installation we will refer to the target machine as the client, code named Salma.

Make two install diskettes

     Back at the server, mount the B1 CD (B2 for a laptop) and make your two installation floppies.

Simply cd deep into the CD:


cd /debian/dists/slink/main/disks-i386/current
dd if=resc1440.bin of=/dev/fd0
dd if=drv1440.bin of=/dev/fd0

Salma Laptop

     The resc1440.bin is the generic PC booter; resc1440tecra.bin is made for laptops.

     Place your floppy in the drive and power up Salma for the installation.

She boots your machine

     You get a nice menu of jobs with the Debian installer. Please read all of your options and stay loose!

     The Debian installation will go through the usual motions of assigning mount points for "/" (root), "/swap", and your custom placements.

     Now it is time to "Install Operating System Kernel and Modules" and that is how we will enable PLIP on Salma.

     After the kernel is ready to PLIP we can install the base system, which is a nice little ten MB file that fits on seven floppies. Yes, that is right, you can just make seven more floppies and get it on, no need to use PLIP.

     We are here to play netmaze and make a peer to peer network, so read on.

From the floppy

     The installer will ask you how you are going to install the kernel and modules, and even though you are going to use the CD in a minute, you must tell it you are going to install from a floppy.

     In almost every case you will be selecting /dev/fd0: it is the first floppy drive.

     Then it will ask for the resc1440.bin diskette so that you can make a live file system to work from. It booted, so it is already in the drive.

Kernel Modules

You have landed on Community Chest: FOLLOW INSTRUCTIONS ON TOP CARD. Your card says a driver is a kernel module. You no longer will ask for drivers. You will now ask for kernel modules. Do not pass GO.

     When the resc1440.bin diskette is done loading, the installer will ask you to place the Drivers floppy in the drive. It is the drv1440.bin diskette.

Configure for PLIP

     Now the installer wants to jump ahead to Make Linux Bootable Directly From Hard Disk. This is a confounder and we need a volunteer to fix it.

     You need to go down the menu and select "Configure Device Driver Modules". You need your set of modules to be installed in your kernel so that you can network to the CD server.

The set of modules

     There is a basic set of modules needed for your machine. It varies from user to user of course, and the following list is only a suggestion.

    Group     Module

     When you install the modules and the installer gives you a new screen for parameters, you can usually just press Enter to go ahead.

     The plip module will already have the io port address and irq of the parallel port assigned to it, so just press Enter at the parameters page.

Configure the Network

     The installer wants to make linux bootable again, but ignore it and select "Configure the Network".

     It wants the host name of your system, so type in Salma to match the examples in this article.

     Now it wants to know if you are on a network, so answer yes. The domain name is "chguy.net", just like in the examples.

The IP address

     The IP address can be the default (automatic) numbers thrown up on the screen. These are the numbers for a Class C network, the type you have at home.

Your IP address, according to the examples, is 192.168.1.3 for your hostname of Salma.

     The rest of the numbers are automatic and good ones to use for your network. We have used them for the example and it saves you a lot of typing and checking.

Netmask = 255.255.255.0

IP Broadcast address = 192.168.1.255

Gateway = whatever... If you have a modem on the other machine, then make a gateway. Or a Dell, or a Netwinder, your choice.

     Normally from home you will be making a gateway to the internet through your ISP.

Domain Name Service = your ISP nameserver. Here at home, there is no modem on the two PLIP machines, so I have each machine look at its local address and also on the other nameserver.

     So, for the example, all we put in the nameserver places are the two IP addresses of the two PLIP machines.

     We tell the installer that "Another system will be the DNS server".

Nameserver = 127.0.0.1   192.168.1.5

Execute a Shell

     A LeftAlt-F2 will light up a new console for you. A LeftAlt-F3 will show the error messages from your plip attempts. You could also just select "Execute a shell" from that wacky menu.

     At the prompt you can immediately type in the ifconfig command to see what is running.

     Again with the ifconfig, you set up PLIP on Salma with this:


ifconfig plip1 192.168.1.3 pointopoint 192.168.1.5 up

     Wait, you are not set up yet. You better set a route to the CD server machine.


route add 192.168.1.5 dev plip1

Install the Base System

     The menu wants to make linux bootable again. Please select "Install the Base System".

Choose Network Interface

     Now we can select "plip: Parallel-line IP" from the menu of interfaces.

     Yikes! The friendly installer now tells us that it will not create a complete PLIP configuration.

     The installer does not know that you just did it with the ifconfig and route commands. Maybe we can get another volunteer to set up the script to see this step.

     Now we are asked to select the installation medium. Yes, it is "nfs: NFS (network filesystem)".

     The installer will ask you for the address of the server and the directory where the debian archive lives.

"push de button and make it go"

     Type in the IP address of the CD server with a colon and the NFS export directory of the mounted CDROM. The screen prompt says "Choose Debian NFS filesystem":


192.168.1.5:/cdrom/debian

We are going live to chguy.net

     On your screen is a little window called "Choose Debian archive path". It only shows up when you are connected and online with the CD server machine. The installer is asking you for the location of the Debian archive directory in the mounted NFS filesystem.

     The answer is /debian. Always is.

Reference reading and links:

BootPrompt-HOWTO - required reading for all linuxians

PLIP-mini-HOWTO - you need the kernel configuration tips and troubleshooter

Kernel-HOWTO - you might need to make a custom kernel with a PLIP module

NFS-HOWTO - you absolutely need the exportfs script and this HOWTO

The Installation Guide for Debian 2.1 - good basic stuff here

"Loadlin.exe Installer", LG#34 - step by step for booting from a logical drive

linux on CD

     Your CHGUY Debian 2.1 CD set is labeled B1, B2, S1 and S2. The B1 CD (#1 of 4) is the installer for a regular desktop machine. The B2 CD (#2 of 4) is slightly tweaked for installing Debian 2.1 on your laptop machine. For installing via dselect, either one can go in the CDROM drive. Those wacky hackers are ready for anything.

X Windows is compact

     When you install the Standard Server package it only fills up 50 megabytes on your hard disk. Add in 32 megabytes for a swap partition and you have only used 80 megabytes from a small, old hard disk. That will leave you enough room for the xbase ".debs" plus your video-card-specific xserver and the rest of the XFree86 window system.

     Both 486s have Apache webserver, anonymous FTP, the TrueType fontserver, full networking, full use of the video card, blazing fast ping times on the PLIP cable (5.2 milliseconds) plus my choice of hot window managers like AfterStep and the icewm.

     Total installed ".deb" space taken up on either machine is 127 megabytes; including sharp little network games like Freeciv, netmaze and crossfire. Who needs bloated systems? Certainly not the linuxians.

New PLIP commands

You can make this into an executable script called plipon with:


chmod 755 plipon

This is the new command plipon:


#!  /bin/sh
ifconfig plip1 CHGUY pointopoint Salma up
route add Salma dev plip1

The above script runs on the CD server CHGUY. Reverse it for Salma.

The new plipoff command:

#! /bin/sh
ifconfig plip1 down

     You can copy it to /usr/sbin just for fun and so that it lives in the path.

Bloodthirsty Midgets

     My six years old nephew Brady "the Mighty Naturta" and his almost-twin cousin Jesse "the NO-baby" absolutely love to play netmaze. It installs in seconds through the laplink cable and it plays for hours. The package is called netmaze and all you do is run the server on one machine and the netmaze client on both. You can even add a few robots to chase you down. The players you see are smiley face spheres. Heaps of fun!

Three primary and one extended

     Please use GNU/linux fdisk to make your new primary partition for "/" (root). Too many of you are too excited to get going and you place linux on an extended partition. Just a reminder, the PC design allows you to get up to four primary partitions per hard disk drive, or three primary and one extended (which you can load up with lots of logical partitions). Do NOT use DOS fdisk if you have just one hard disk. DOS fdisk is disabled so that it will only make one primary partition if you only have one hard disk.

Laplink vs USB

     Get this: A recent advertisement for USB home networking between two machines was crowing over the fact that all you do is plug it in and you can enjoy full networking of two machines. It was "only" $85.00 for your set of newfangled doodads. *Limit of twelve feet of cable.

     I began to think that this was madness! You can get a laplink cable and hook up your two machines for full network connection; plus it is probably a "free" cable that was paid for a long time ago. *Limit of fifty feet, unless you begin to pick up radio signals.

     You plug the laplink cable into the parallel port of each machine; yes, the same place where your printer should go. Your laptop can use this PLIP method to share files with your desktop at work and at home. Plus it is hard-boiled, rock-solid networking through a cable; completely under your control. Methinks this USB thing was just a ploy to sell new machines.


made with mcedit on an i486
running Debian 2.1 Linux 2.0.36
No systems were frozen or crashed during the testing of these procedures.
All references to Salma Hayek are purely lascivious.


Copyright © 1999, Bill Bennet
Published in Issue 43 of Linux Gazette, July 1999


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next