<!doctype linuxdoc system>
<article>

<!-- Title information -->

<title>Linux Install From PPA-Zip drive mini-HOWTO
<Author>by Kevin Snively, <tt><htmlurl url="mailto:k.snively@seaslug.org"
name="k.snively@seaslug.org"></tt>
<date>v01.04, 29 April 1998
<abstract>
This document describes how to install Linux from a parallel port zip 
drive using the Slackware Linux distribution.
</abstract>

<toc>
 
<sect>Prelude

<sect1>Intro:

<p>
The following method has been written for use with the Slackware 
Linux distribution. It assumes some familiarity with it's 
installation. The installer will also need access to a working Linux 
system of any distribution.  It also assumes the destination system 
has 4 to 6 megs ram.  More powerful systems can use this method also 
but you will probably be able to find a faster easier way.  It is not 
intended to be used by first time installers or by people new to Linux. 
Only issues specific to the use of a zip drive as source media will be 
covered here.
 
<sect1>Background:

<p> 
I have an OLD 486/20 slc with a 120 meg hd, 4 megs ram and a 2400 
baud modem that I wanted to run Linux on. It has no cdrom drive or 
pcmcia connectivity, and will never see a network card (parallel port 
style). There is nothing left that can be upgraded on this unit. 

Linux has been at the cutting edge from the start but also breathes 
new life into some older 386 and 486 hardware.  The documentation 
says "386 with 2 megs ram no math coprocessor" but try to find a 
distribution that will do it today.  Slackware can be placed on a 4 
meg machine with some work and a prayer. The following system greatly 
reduces the work.  Prayer always helps, even with the best of systems.
 
I've  used the following system with 3 other laptops, and one 386 
desktop machine. The lamest being a 386 with 4 megs ram &amp 60 meg HD 
no math coprocessor.  While this system works well I'd like to be able 
to do similar tricks with Debian, RedHat, Caldera Lite, and some of 
the other popular distributions offering more choice to Linux users I 
help this way. 


<sect1>Advantages:

<p>
Installing from cdrom or Ethernet are the methods of choice when 
available.  In cases where floppy disk install appears to be the only 
choice a parallel port zip drive offers numerous advantages.  These 
include better speed than a floppy disk, and fewer disk changes. In 
addition on systems with minimal ram "6 megs. or less" the ability to 
install a swap file on the root disk uncomplicates the install greatly 
by freeing you from the need to creat one on the hard disk before 
running setup. When installing Slackware the swap file allows 
installers to choose the <bf>color.gz</bf> root disk or <bf>text.gz
</bf>. The <bf>color.gz</bf> is not recommended for floppy based 
installs on machines with such limited resources. With a zip disk you 
may also produce an emergency boot disk during the initial install, by 
freeing the first floppy drive. Something not possible during a normal 
floppy based install on systems of this type.

<sect1>Material:

<p> 
This method has been used with Slackware Ver's. 3.1, through 3.4 
A full Slackware install requires 2 zip disk's not counting source 
packages if they are desired. You will need one parallel port zip 
drive &amp cables, and a 1.44 meg boot disk. Pencil and paper are 
optional for making a few notes during install.

At least two systems are required to use this install method. The 
first (host) system is used to prepare the installation media and 
must contain a working Linux system. The second will be the target 
system. Once the media has been prepared it can be used to install to 
as many target systems as you like.  I work from cdrom but you can 
down load your distribution from the Internet if you have a fast 
enough connection.  For me this is not practical.
 
 
<sect1>Conventions:
 
<p>
<tscreen><verb>
let (floppy)    represent the path to and directory you 
                mount your 1.44 meg floppy disk on.

let    (zip)    represent the path to and directory you 
                mount your zip disk on.

let  (cdrom)    represent the path to and directory you 
                mount your cdrom on.

let (verx.x)    represent the distribution version you
                are installing.
</verb></tscreen>

If you down load your disk images please let (cdrom)/slakware the path 
and directory to those images.  My parallel port zip drive shows up on 
my system as
<tscreen><verb>

        /dev/sda4

</verb></tscreen>
I've never seen it come up as any thing else unless I run fdisk on it 
and change the partition table, creating more than one partition on 
the disk. Then I always get corrupt disk error messages when I try to 
use it. You may however mark the partition type 83 Linux etc... if 
you wish with out trouble.  You also need to know the device names of 
your cdrom and 1.44 meg floppy drives. Mine are
<tscreen><verb>

       /dev/hdc     cdrom
       /dev/fd0     1.44 meg floppy
     
</verb></tscreen>
I'll use my device names, you use yours ;-|)
 
About Slackware and slakware (note the missing c in slakware). 
Slackware is the name of the overall distribution and slakware is the 
name of the directory where Patrick Volkerding places the stable "not 
experimental or developmental" packages for installation. Whenever 
I'm writing about slakware I'm writing about the directory.

<sect1>Other reading:
<p> 
<tt><htmlurl url="http://sunsite.unc.edu/LDP/LDP/gs/gs.html" 
name="Linux Installation and Getting Started"></tt> by Matt Welsh
 
If you are having trouble accessing your zip drive please see the 
Linux <tt><htmlurl
url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/ZIP-Drive"
name="ZIP drive mini-HOWTO"></tt> by Grant Guenther

When you have completed your install I can not recommend strongly 
enough that you work through the <tt><htmlurl
url="http://sunsite.unc.edu/LDP/HOWTO/mini/Small-Memory.html" 
name="Small-Memory mini-HOWTO"></tt> by Todd Burgess


<sect2>Slackware
<p>
I also recommend the LOWMEM.TXT document from the Slackware 
documentation on your cdrom or Slackware ftp site. This document 
discribes a system that eleminates many of the difficulties discribed 
in that document.

 
<sect>Slackware
<p>

<sect1>Making the first zip disk.
<p>

1)    Attach zip drive to host system, insert blank zip disk 
into the drive and boot the system to Linux
 
2)    Login. You probably need to login as root or the user you log in 
as will need to be able to write file systems, mount and unmount disks 
etc....
 
3)    Install an ext2fs file system on the zip disk.
with the command:
<tscreen><verb>
         /sbin/mke2fs -b 1024 /dev/sda4
 
</verb></tscreen>
4)    Mount the zip disk with:
<tscreen><verb>
         mount /dev/sda4 /(zip)
 
</verb></tscreen>
5)    Insert your cdrom into its drive and mount it:
<tscreen><verb>
         mount /dev/hdc /(cdrom)
 
</verb></tscreen>
6)    Make a directory to install the slakware disk
images in:
<tscreen><verb>
         mkdir /(zip)/slakware
 
</verb></tscreen>
7)    Make a writable ( non zip disk ) temporary directory on your 
main disk to work in. May I suggest:
<tscreen><verb>
         mkdir /root/slakware/(verx.x)
 
</verb></tscreen>
8)<label id="In-8">    Copy the root disk image to the above named 
directory:
<tscreen><verb>
         cp /(cdrom)/rootdsks/text.gz /root/slakware/(verx.x)/
 
</verb></tscreen>
9)    Change directories to the one the root disk image
was copied to and decompress it with the commands:
<tscreen><verb>
         cd /root/slakware/(verx.x)
         gunzip text.gz

</verb></tscreen>
10)   Install a 1.44 meg floppy with a dos or ext2fs file
system on it in its drive and copy the root disk image to 
it this time with the dd command:
<tscreen><verb>
         dd if=text of=/dev/fd0
 
</verb></tscreen>
11)   Mount the 1.44 meg floppy with the command:
<tscreen><verb>
         mount /dev/fd0 /(floppy)
 
</verb></tscreen>
12)   Copy the root disk image to the zip disk:
<tscreen><verb>
         cp -dpR /(floppy)/* /(zip)/

</verb></tscreen>
13)   In order to ease the install process later we will want 
to create a swap file on the zip disk of about 8 megs. with:
<tscreen><verb>
         dd if=/dev/zero of=/(zip)/swap bs=1024 count=8208

</verb></tscreen>
14)    Initialize the swap file with: 
<tscreen><verb>
         /sbin/mkswap /(zip)/swap 8208

</verb></tscreen>
15)    Next with your favorite text editor you will need to edit the 
file   <bf>/(zip)/etc/rc</bf>   and after the line <bf>/bin/mount 
-av -t nonfs</bf> insert a new line 
<tscreen><verb>
         /sbin/swapon /swap

</verb></tscreen>
16)   Copy the disk images to the zip disk:
<tscreen><verb>
         cp -r /(cdrom)/slakware/[a-ty]* /(zip)/slakware/ &
</verb></tscreen>
include the square brackets [a-ty]* exactly as shown above. the & sign 
at the end of the line will make this command execute in the 
background.  It takes about 20 min to complete. Use this time for some 
coffee and reading more HOWTO's.

17)  External zip drives have two lights--mine are green and yellow; 
the internal drives appear to have only one. When my zip disk has 
finished receiving information the yellow light goes out and I'm 
left with just the green power light. on internal drives the single 
"status?" light will go out.

It is now time to prepare the floppy and zip disks for removal from 
their drives by unmounting them:
<tscreen><verb>
         cd
	 umount /dev/fd0
	 umount /dev/sda4

</verb></tscreen>

18)  Life will be easier later if we check the root disk's file system 
before we try to use it with the command:
<tscreen><verb>
         /sbin/e2fsck -f /dev/sda4

</verb></tscreen>
 
When disk activity ends if there are no errors you may remove the zip 
disk from the drive and label it Slackware Root disk. I also include 
the version number in pencil.

<sect1>Making the second zip disk.
<p>
If the X window system is to be installed or you will be needing one 
of the other prebuilt kernels it is now time to build the 2nd. zip 
disk.

 
x1)  Insert disk 2 in the zip drive. I like to write an ext2fs file 
system on this disk also, but if it has a M$ Dos file system that 
will work also. I use the up arrow key on my keyboard to recall 
previously used commands from my history file because I'm a bit lazy, 
but if you want to retype the command repeat instructions 3), 4), and 
6) above.  

x2)  Copy the X11R6 "X Window" packages to zip
<tscreen><verb>
         cp -r /(cdrom)/slakware/x* /(zip)/slakware/ &

</verb></tscreen>
again in the background. This will take about 1/2 as long as step 9) 
did.  If your system was slow then it will be again. More coffee and 
HOWTO reading.

 
x3)  There is also room on this disk for the custom kernels directory. 
It is classy to install one that meets the system's needs as closely 
as possible to go with the one needed to access the zip drive.  Make 
this kernel the system default. So now we will make a directory for 
that and then copy the information to it:
<tscreen><verb>

         mkdir /(zip)/kernels
         cp -r /(cdrom)/kernels/* /(zip)/kernels/ &

</verb></tscreen>
This will take another 10 or 15 min. Dispose of the used coffee? Read 
more Linux Documentation?
 
x4)  When disk activity is at an end unmount the disk and run fsck on 
it:
<tscreen><verb>
         umount /dev/sda4
         /sbin/e2fsck -f /dev/sda4

</verb></tscreen>
x5)  When e2fsck is done with the disk and the command prompt returns 
to the screen eject the disk and label it.

<sect1>Making the boot floppy.<label id="boot">
<p> 
b1)  I now make a 1.44 meg boot disk. Use the 
<bf>/(cdrom)/bootdsks.144/iomega.s</bf> image. Install a new 1.44 meg 
floppy disk in the proper drive. The command to make the disk is:
<tscreen><verb>
         dd if=/(cdrom)/bootdsks.144/iomega.s of=/dev/fd0

</verb></tscreen>

b2)  Check the file systems of the boot disk:
<tscreen><verb>
         /sbin/e2fsck -f /dev/fd0

</verb></tscreen>
When disk activity ends if there are no errors you may remove all your 
disks, write protect your boot floppy and label it including version 
number. 


<sect>The install:
<p>
After connecting everything up to the target machine and putting the 
zip disk in place I boot the machine with the appropriate boot disk.
Before logging in it is a good idea to use the scroll back feature 
built into Linux and check to see all your hardware was detected 
properly. To do this hold the shift key and use the page up and page 
down keys as appropriate. Getting a login prompt at all usually means 
the boot time errors were not too bad.

<sect1>Round 1.
<p>
Slackware will present some instructions. Please read them Carefully. 
Login as root and fdisk root and swap partitions on the target drive 
if needed. Reboot the machine if you ran fdisk and <bf>Carefully</bf> 
reread the instructions on the screen if there are any, then login as 
root.

Even on machines with only 4 megs. of ram you will not need to create 
a swap partition until prompted to do so in the setup program. We 
already have swap running on the zip disk. Run the Slackware setup 
program:
<tscreen><verb>
          setup
</verb></tscreen>
CAREFULLY read and follow the instructions the menus provide.
The first thing setup will want to do is create and initialize 
your swap partition on your hard drive this is ok despite the
dire warnings and will not affect the swap file on the zip drive.

You do not want to allow /dev/sda4 to be automatically mounted
and when questions come up about this in the menus. Do not
add it unless this zip drive is dedicated to the target machine
full time.
 
When you get the menu that asks where the source of the installation
media is select item number 4. "Install from a premounted directory".
The next screen will ask for its name, it is /slakware.

I recommend installing only the "a" disk set at this time. It
will crash the install if the person selecting packages gets
greedy and fills the disk before lilo is written and the kernel
is installed. During basic install I install the kernel from the 
boot disk only. There are relatively few choices to be made from here
and the Slackware documentation from the cdrom or your ftp site
will do you much better than I can from here.
 
Leave the zip drive and disk in place after the initial install
is complete.  Remove the floppy when prompted to do so and reboot.
If all is right in the world Bill, er, your friend/customer will 
have a working Linux system come up. 

<sect1>Round 2.
<p>
After rebooting the system login as root and mount the zip disk again:
<tscreen><verb>
          mount /dev/sda4 /mnt
 
</verb></tscreen>
Check available drive space:
<tscreen><verb>
          df
 
</verb></tscreen>
Run setup again from your new system:
<tscreen><verb>
          setup
 
</verb></tscreen>
Choose "s" SOURCE from the menu and press the enter key.
Select item number 4. "Install from a premounted directory" and press 
the enter key again.
 
Enter the directory name. This time use:
<tscreen><verb>
          /mnt/slakware
 
</verb></tscreen>
Choose the packages you want or need. All are available except those 
which start with "x". When you're finished installing packages from 
this disk exit setup and run:
<tscreen><verb>
          umount /dev/sda4

</verb></tscreen>

You may now remove the disk and if X will be installed insert the 2nd 
zip disk and work through setup again this time only packages beginning
with X will be available. If you will be installing a custom kernel 
from the prebuilt kernels you may also do this while the 2nd. zip disk 
is installed.

<sect1>Library Trouble
<p>
Some times I have trouble with the links for the libraries either on 
the root zip disk or on the final destination machine. There are two 
possible fixes for this.

Fix 1) If the system boots to a command prompt and you can login as 
root in single user mode try the command:
<tscreen><verb>
          ldconfig

</verb></tscreen>
If things are not broken so badly that this command will not run then 
reboot and watch for library related errors. If there are none your 
in business.

Fix 2) If <bf>ldconfig</bf> can not repair things you will need to 
re master the root floppy disk and recopy the files from it as in 
instruction <ref id="In-8" name="8)"> through 12) or reinstall Linux 
to the destination system as appropriate.

<sect>Thank you
<p>
This mini-HOWTO brought to you by the letters G. N. and U. and the 
Linux documentation project.

Special thanks to Dr. Randolph Bentson whose devotion to Linux 
inspired me to give something back to the people who gave us the 
<bf>ONE TRUE OPERATING SYSTEM.</bf>
<tscreen><verb>
    I hope this helps someone.
 
    Sincerely
 
    Kevin Snively
    P.O. Box 1013
    Everett Wa. 98206-1013
    USA

</verb></tscreen>
 
<tt>
<htmlurl url="mailto:k.snively@seaslug.org"name="k.snively@seaslug.org">
</tt>
<tscreen><verb>
    root@aldrovanda
</verb></tscreen>
</article>
