Putting Linux on ZIP disk using ppa ZIP Drive Mini-Howto      
v0.2, December 5, 1996                       
by John Wiggins <jwiggins@comp.uark.edu>             

Slackware 2.2 section courtesy of
Michael Littlejohn <mike@mesa7.mesa.colorado.edu>

[------- Index -------]

     0. Disclaimer

     1. Introduction
        1.1. Conventions
        1.2. Updates
        1.3. Related documents

     2. Setting up the ZIP disk (Common for both distributions.)
        2.1. Partitioning ZIP disk
        2.2. Formating and mounting ZIP disk
        2.3. Creating the boot disk
             2.3.1. Configuring and making the kernel
             2.3.2. Getting the kernel to a floppy
             2.3.3. Setting the root and swap devices on the boot floppy

     3. RedHat 4.0.1 installation
        3.1. Personal setup
        3.2. Package installation
             3.2.1. What packages to get
             3.2.2. How to install the packages with rpm
        3.3. Problems after installation of packages
             3.3.1. /etc/ld.so.cache
             3.3.2. pamconfig
             3.3.3. Setting things back

     4. Slackware 2.2 installation
        4.1. Requirements
        4.2. Installation
        4.3. What to install

     5. Modifying /etc/fstab (Common for both distributions.)

-----------------------------------

0. Disclaimer

      This document is only useful for those with the printer port
      version of a ZIP drive who wish to have either a portable or
      backup Linux system on a ZIP disk.

      This document assumes the following:
         * You already have Linux installed and running; this document is
           not for a first time install of Linux.  
         * You have ppa support in your current kernel or if module, the ppa
           module has been loaded.
         * The mount point for the ZIP disk is the /iomega directory.

1. Introduction

       This document is divided into three sections each describing how to
       install a Linux system on a 100MB ZIP disk using a ppa ZIP drive.
       The first section describes how to set up the ZIP disk and is common
       to both distribution installations.  The second and third sections
       describe how to install RedHat 4.0.1 and Slackware 2.2 distributions,
       respectively, onto the ZIP disk.

1.1. Conventions

       ==> Indicates the following text are commands.

1.2. Updates

       For any updates, please check: 
       http://comp.uark.edu/~jwiggins/linuxZIP/

1.3. Related documents

         * Installation-HOWTO
         * SCSI-HOWTO
         * ZIP-Drive (mini-HOWTO)

2. Setting up the ZIP disk (Common for both distributions.)

2.1. Partitioning ZIP disk

       First, I ran fdisk:
         ==> fdisk /dev/sda
       Here is a snap of the partition table I have setup:

        Disk /dev/sda: 64 heads, 32 sectors, 96 cylinders
        Units = cylinders of 2048 * 512 bytes

           Device Boot   Begin    Start      End   Blocks   Id  System
        /dev/sda1            1        1       81    82928   83  Linux native
        /dev/sda2           82       82       96    15360   82  Linux swap

       I decided to use a swap partition since I wanted to be able to use
       this with any machine.

2.2. Formating and mounting the ZIP disk

       After running fdisk, format the new partition:
         ==> mke2fs -c /dev/sda1
       Then, create the swap partition:
         ==> mkswap -c 15360 /dev/sda2
       Last, you'll need to mount the ZIP disk:
         ==> mount /dev/sda1 /iomega -t ext2

2.3. Creating the boot disk

       Since the ppa version of the ZIP drive isn't a true SCSI device, it
       isn't a bootable device and, therefore, requires a boot disk.

2.3.1. Configuring and making the kernel

       First, you'll need to configure and make a kernel that has ppa 
       support enabled and not as a loadable module.  In order to get
       to the ppa option, select SCSI support:
         SCSI support (CONFIG_SCSI) [Y/m/n/?]
       Plus, SCSI disk support:
         SCSI disk support (CONFIG_BLK_DEV_SD) [Y/m/n/?]
       And finally, under the SCSI low-level drivers, is the ppa support:
         IOMEGA Parallel Port ZIP drive SCSI support (CONFIG_SCSI_PPA) [Y/m/n/?]
       Again, be sure not to include ppa as a module, but rather in the kernel.
       Thus far, the ppa driver will not allow the passive port of the ZIP
       drive to be used for a printer, so you may want to say no to
       parallel printer support:
         Parallel printer support (CONFIG_PRINTER) [N/y/m/?]
       NOTE: For more information concerning the ppa driver, please refer
       to the ZIP-Drive mini-HOWTO.
       Once the kernel is configured, make the kernel:
         ==> make dep;make clean;make zImage
       The new kernel should be found in arch/i386/boot/zImage.

2.3.2. Getting the kernel to a floppy

       Copy the newly made kernel to a floppy disk:
         ==> cp arch/i386/boot/zImage /dev/fd0
       or
         ==> cat arch/i386/boot/zImage > /dev/fd0
       Yes, there are many ways to copy the kernel to a floppy, but the
       last way, my favorite, is a little more encryptic.  Try not to
       forget the > unless you like viewing binary files :)

2.3.3. Setting the root and swap devices on the boot floppy

       Once the kernel is on the floppy, you need to set the root device to
       the ZIP disk:
         ==> rdev /dev/fd0 /dev/sda1
       I'm not sure if the next option is needed, but I did it none the less.
       To set the swap:
         ==> rdev -s /dev/fd0 /dev/sda2

3. RedHat 4.0.1 installation

3.1. Personal setup

       For my installation, I have and used:
         * kernel 2.0.25
         * Iomega ppa disk drive
         * RedHat 4.0.1

3.2. Package installation

3.2.1. What packages to get

       I found what packages to install by browsing a file I had found on
       one of RedHat's mirrors.  This file can be found on any mirror at
       redhat/redhat-4.0/i386/RedHat/base/comps

       Here's a listing of what packages I installed:
         pamconfig-0.50-5               setup-1.5-1
         MAKEDEV-2.2-5                  filesystem-1.2-1
         etcskel-1.1-1                  adduser-1.2-1
         cpio-2.4.2-3                   dev-2.3-1
         rootfiles-1.3-1                redhat-release-4.0-1
         libc-5.3.12-8                  ld.so-1.7.14-4
         zlib-1.0.4-1                   gdbm-1.7.3-8
         ncurses-1.9.9e-2               modules-2.0.0-4
         kbd-0.91-8                     db-1.85-10
         termcap-9.12.6-5               slang-0.99.33-1
         statserial-1.1-7               mailcap-1.0-3
         libtermcap-2.0.8-2             readline-2.0-10
         libgr-2.0.9-4                  libg++-2.7.1.4-4
         libelf-0.5.2-4                 tmpwatch-1.1-1
         newt-0.6-1                     cracklib-dicts-2.5-1
         pam-0.50-17                    crontabs-1.3-1
         less-321-3                     zip-2.1-1
         tar-1.11.8-8                   unzip-5.12-5
         ed-0.2-5                       gzip-1.2.4-5
         grep-2.0-4                     bash-1.14.7-1
         mingetty-0.9.4-1               initscripts-2.73-1
         rpm-2.2.5-1                    zoneinfo-96i-3
         util-linux-2.5-26              losetup-2.5l-1
         info-3.7-5                     e2fsprogs-1.04-8
         diffutils-2.7-5                hdparm-3.1-1
         sed-2.05-6                     SysVinit-2.64-2
         quota-1.51-3                   which-1.0-5
         vixie-cron-3.0.1-9             mount-2.5l-1
         textutils-1.19-2               passwd-0.50-2
         gawk-3.0.0-5                   sysklogd-1.3-9
         file-3.20-3                    groff-1.10-6
         vim-4.2-5                      fileutils-3.13-2
         bdflush-1.5-5                  ncompress-4.2.4-6
         at-2.9b-2                      ash-0.2-5
         fwhois-1.00-5                  procps-1.01-7
         psmisc-11-4                    sh-utils-1.12-9
         procinfo-0.9-1                 stat-1.5-5
         time-1.7-1                     gdb-4.16-5
         kbdconfig-1.3-1                findutils-4.1-9
         timeconfig-1.4-1               shadow-utils-960530-6
         perl-5.003-4

3.2.2. How to install the packages with rpm

       With rpm, use the --root option to specify the mounted directory as
       the root for installation.  I had discovered that many packages
       were failing to install because of preinstall or postinstall scripts
       that weren't executing correctly due to the different root directory,
       thus, use the --noscripts option:
         ==> rpm --root /iomega -i --noscripts PACKAGE.i386.rpm

3.3. Finished with package installation

       Once the last package has been installed, there are two slight
       problems that the pre/post installation scripts were to fix but
       couldn't.  Without LILO (never could get it to work on the floppy)
       getting into single user mode is done via editing the
       /iomega/etc/inittab.  Change the following lines:
       From--> id:3:initdefault:
       To----> id:1:initdefault:
       and then, reboot the new system.

3.3.1. /etc/ld.so.cache

       If you tried booting, you'd get two error messages, the first will be
       the absence of /etc/ld.so.cache file.  Once booted as single user
       mode, run ldconfig to create the cache file:
         ==> ldconfig

3.3.2. pamconfig

       Yet another annoyance, for those who tried booting in multiuser mode, 
       is that no matter what login you try, you won't be able to logon as 
       any user.  To fix this, run the following command while still in
       single user mode:
         ==> rpm --qf '%{POSTIN}' $(rpm -q --whatrequires pamconfig) | sh -x

3.3.3. Setting things back

       Now that those two things are taken care of, re-edit the file
       /etc/inittab once more, so the system will boot in multiuser mode.

4. Slackware 2.2 installation

4.1. Requirements

        * ZIP Disk and Drive (obviously)
        * Kernel with ZIP support
        * ZIP Howto (recommended)
        * 1.44" HD formated floppy
        * 1 to 2 hours of time

4.2. Installation

       Okay, now comes the fun part:  Figuring out what files need to be
       on the system disk, and what packages that you want (and can fit)
       on your ZIP drive.

       I decided that the easiest way to get started was install Slackware 
       directly to the ZIP drive.  I decided on this approach mostly because
       Slackware is a smaller distribution then Red Hat, and it would be easier
       to trim out what I didn't want.  That and the fact that I am using the
       Slackware distribution anyway made it an obvious choice.

       Installing Slackware onto the ZIP disk is easy, as root run the setup
       program, and choose /iomega as the install to partition, set the 
       install from partition to where the Slackware sources are (cdrom,
       harddrive, etc), select install and follow the prompts.  

4.3. What to install

       The hardest part is deciding what to add, and what not to add.
       Obviously, you'll need the 'A' series (Which is about 8 megs),
       the rest is up to you.

       I managed to trim down the Slackware release to a respectable
       installation of 70 megs, which included gcc/g++, perl, X11R6
       (NOT ALL OF IT!), sendmail, online docs (Minus all the development
       man pages, but including all the howto's), and an assortment of
       other goodies, while leaving about 10 megs free for user files. YMMV

5. Modifying /etc/fstab (Common for both distributions.)

       The last thing that needs to be done before rebooting is to change the
       fstab on the soon to be root partion.  Edit the /iomega/etc/fstab file
       to look have the following as a minimum:

       /dev/sda1      /         ext2        defaults   1   1
       /dev/sda2      none      swap        sw
       none           /proc     proc        defaults   1   1

       Save the file, and reboot with the freshly made boot floppy and enjoy!

       (Special thanks to Mike for reminding me about this very important 
       and crucial step. - John)