Linux Install From PP-Zip drive mini-HOWTO by Kevin Snively, k.snively@seaslug.org v01.02, 27 January 1998 This document describes how to install Linux from a parallel port zip drive. 1. Prelude 1.1. Intro: The following method written for use with the Slackware Distribution and assumes some familiarity with doing a Slackware install, and that the installer will have 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 to replace Slackware documentation or other Linux HOWTO's. Only issues specific to the use of a zip drive as source media will be covered here. 1.2. Background: 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 coprocesser" 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 & 60 meg HD no math coprocesser. While this system works well I'd like to be able to do similar tricks with Debian, RedHat, SuSe, Caldera Lite, and some of the other popular distributions offering more choice to linux users I help this way. 1.3. Advantages: 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, 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 and to use the color.gz root disk or text.gz. On systems with only 4 megs. ram color.gz does not work for floppy based install. With a zip disk install it does. It also allows for the production of a emergency boot disk on low memory systems during initial install, something not possible on low memory systems during a normal floppy based install. 1.4. Material: This method has been used with Slackware Ver. 3.1, 3.2 and 3.3. A full install requires 2 zip disk's, one parallel port zip drive & cables, a 1.44 meg boot disk, pencil and paper 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 the disk images from the Internet if you have a fast enough connection. For me this is not practical. 1.5. Conventions: 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. If you down load your disk images please let (cdrom)/slakware represent the path and directory to those images. My parallel port zip drive shows up on my system as /dev/sda4 I've never seen it come up as any thing else unless I run fdisk on it and then I always get corrupt disk error messages when I try to use the disk. You also need to know the device names of your cdrom and 1.44 meg floppy drives. Mine are /dev/hdc cdrom /dev/fd0 1.44 meg floppy 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. 1.6. Other reading: Linux Installation & Getting Started by Matt Welsh If you are having trouble accessing your zip drive please see the Linux ZIP drive mini-HOWTO By Grant Guenther I also recommend the LOWMEM.TXT document from the Slackware documentation on your cdrom or Slackware ftp sight. 2. Technique: 2.1. Making the first zip disk. 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: /sbin/mke2fs -b 1024 /dev/sda4 4) Mount the zip disk with: mount /dev/sda4 /(zip) 5) Insert your cdrom into its drive and mount it: mount /dev/hdc /(cdrom) 6) Make a directory to install the slakware disk images in: mkdir /(zip)/slakware 7) Make a writable (non cdrom, non zip disk) temporary directory on your main disk to work in. May I suggest: mkdir /root/slakware/(verx.x) 8) Copy the root disk image to the above named directory: cp /(cdrom)/rootdsks/text.gz /root/slakware/(verx.x)/ 9) Change directories to the one the root disk image was copied to and decompress it with the commands: cd /root/slakware/(verx.x) gunzip text.gz 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: dd if=text of=/dev/fd0 11) Mount the 1.44 meg floppy with the command: mount /dev/fd0 /(floppy) 12) Copy the root disk image to the zip disk: cp -dpR /(floppy)/* /(zip)/ 13) In order to ease the install process later we will want to cre­ ate a swap file on the zip disk of about 8 megs. with: dd if=/dev/zero of=/(zip)/swap bs=1024 count=8208 14) Initialize the swap file with: /sbin/mkswap /(zip)/swap 8208 15) Next with your favorite text editor you will need to edit the file /(zip)/etc/rc and after the line /bin/mount -av -t nonfs insert a new line /sbin/swapon /swap 16) Copy the disk images to the zip disk: cp -r /(cdrom)/slakware/[a-ty]* /(zip)/slakware/ & 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 back­ ground. 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: cd umount /dev/fd0 umount /dev/sda4 18) Slackware will grouse later if you don't check the filesystem on the zip disk now. Use the command /sbin/e2fsck -f /dev/sda4 If there are no errors found when the command prompt returns it is safe to press the eject buttons on the zip and 1.44 meg. floppy drives and eject the disks. Don't forget to label them for what they are with version numbers. I can't tell you how much easier this will make your life in the long run. 2.2. Making the second zip disk. 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 cp -r /(cdrom)/slakware/x* /(zip)/slakware/ & 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: mkdir /(zip)/kernels cp -r /(cdrom)/kernels/* /(zip)/kernels/ & 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 repeat unmount the disk and run fsck on it: umount /dev/sda4 /sbin/e2fsck -f /dev/sda4 x5) When e2fsck is done with the disk and the command prompt returns to the screen eject the disk and label it. 2.3. Making the boot floppy. b1) I now make a 1.44 meg boot disk using the (cdrom)/bootdsks.144/iomega.s image. Install a new 1.44 meg floppy in the proper drive. The command to use to make the disk is: dd if=/(cdrom)/bootdsks.144/iomega.s of=/dev/fd0 Once the disk has been written and the command prompt returns you may if you wish shut down the host system remove the zip drive from the host, and go trotting merrily off, installing linux out of your zip drive from Redmond to Bills house. 3. The install: 3.1. Round 1. After connecting everything up to the target machine and putting the zip disk in place I boot the boot disk and at the boot prompt pass the parameters mount root=/dev/sda4 ramdisk=0 to lilo. Carefully read the instructions on the screen, then login as root and fdisk root and swap partitions on the target drive. Reboot the machine, again passing the above parameters to lilo. Carefully reread the instructions on the screen, 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: setup 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 sight 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. 3.2. Round 2. After rebooting the system login as root amd mount the zip disk again: mount /dev/sda4 /mnt Check available drive space: df Run setup again from your new system: setup 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: /mnt/slakware 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: umount /dev/sda4 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 begining 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. 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 ONE TRUE OPERATING SYSTEM. I hope this helps someone. Sincerely Kevin Snively P.O. Box 1013 Everett Wa. 98206-1013 USA k.snively@seaslug.org root@aldrovanda