home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 1: Linux / CD1.iso / doc / HOWTO / mini / Install-From-ZIP < prev    next >
Text File  |  1998-10-14  |  17KB  |  661 lines

  1.   Linux Install From PPA-Zip drive mini-HOWTO
  2.   by Kevin Snively, k.snively@seaslug.org
  3.   v01.04, 29 April 1998
  4.  
  5.   This document describes how to install Linux from a parallel port zip
  6.   drive using the Slackware Linux distribution.
  7.   ______________________________________________________________________
  8.  
  9.   Table of Contents
  10.  
  11.  
  12.   1. Prelude
  13.  
  14.      1.1 Intro:
  15.      1.2 Background:
  16.      1.3 Advantages:
  17.      1.4 Material:
  18.      1.5 Conventions:
  19.      1.6 Other reading:
  20.         1.6.1 Slackware
  21.  
  22.   2. Slackware
  23.  
  24.      2.1 Making the first zip disk.
  25.      2.2 Making the second zip disk.
  26.      2.3 Making the boot floppy.
  27.  
  28.   3. The install:
  29.  
  30.      3.1 Round 1.
  31.      3.2 Round 2.
  32.      3.3 Library Trouble
  33.  
  34.   4. Thank you
  35.  
  36.  
  37.  
  38.   ______________________________________________________________________
  39.  
  40.   1.  Prelude
  41.  
  42.   1.1.  Intro:
  43.  
  44.   The following method has been written for use with the Slackware Linux
  45.   distribution. It assumes some familiarity with it's installation. The
  46.   installer will also need access to a working Linux system of any
  47.   distribution.  It also assumes the destination system has 4 to 6 megs
  48.   ram.  More powerful systems can use this method also but you will
  49.   probably be able to find a faster easier way.  It is not intended to
  50.   be used by first time installers or by people new to Linux.  Only
  51.   issues specific to the use of a zip drive as source media will be
  52.   covered here.
  53.  
  54.  
  55.   1.2.  Background:
  56.  
  57.  
  58.   I have an OLD 486/20 slc with a 120 meg hd, 4 megs ram and a 2400 baud
  59.   modem that I wanted to run Linux on. It has no cdrom drive or pcmcia
  60.   connectivity, and will never see a network card (parallel port style).
  61.   There is nothing left that can be upgraded on this unit.
  62.  
  63.   Linux has been at the cutting edge from the start but also breathes
  64.   new life into some older 386 and 486 hardware.  The documentation says
  65.   "386 with 2 megs ram no math coprocessor" but try to find a
  66.   distribution that will do it today.  Slackware can be placed on a 4
  67.   meg machine with some work and a prayer. The following system greatly
  68.   reduces the work.  Prayer always helps, even with the best of systems.
  69.  
  70.   I've  used the following system with 3 other laptops, and one 386
  71.   desktop machine. The lamest being a 386 with 4 megs ram & 60 meg HD no
  72.   math coprocessor.  While this system works well I'd like to be able to
  73.   do similar tricks with Debian, RedHat, Caldera Lite, and some of the
  74.   other popular distributions offering more choice to Linux users I help
  75.   this way.
  76.  
  77.  
  78.  
  79.   1.3.  Advantages:
  80.  
  81.   Installing from cdrom or Ethernet are the methods of choice when
  82.   available.  In cases where floppy disk install appears to be the only
  83.   choice a parallel port zip drive offers numerous advantages.  These
  84.   include better speed than a floppy disk, and fewer disk changes. In
  85.   addition on systems with minimal ram "6 megs. or less" the ability to
  86.   install a swap file on the root disk uncomplicates the install greatly
  87.   by freeing you from the need to creat one on the hard disk before
  88.   running setup. When installing Slackware the swap file allows
  89.   installers to choose the color.gz root disk or text.gz. The color.gz
  90.   is not recommended for floppy based installs on machines with such
  91.   limited resources. With a zip disk you may also produce an emergency
  92.   boot disk during the initial install, by freeing the first floppy
  93.   drive. Something not possible during a normal floppy based install on
  94.   systems of this type.
  95.  
  96.  
  97.   1.4.  Material:
  98.  
  99.  
  100.   This method has been used with Slackware Ver's. 3.1, through 3.4 A
  101.   full Slackware install requires 2 zip disk's not counting source
  102.   packages if they are desired. You will need one parallel port zip
  103.   drive & cables, and a 1.44 meg boot disk. Pencil and paper are
  104.   optional for making a few notes during install.
  105.  
  106.   At least two systems are required to use this install method. The
  107.   first (host) system is used to prepare the installation media and must
  108.   contain a working Linux system. The second will be the target system.
  109.   Once the media has been prepared it can be used to install to as many
  110.   target systems as you like.  I work from cdrom but you can down load
  111.   your distribution from the Internet if you have a fast enough
  112.   connection.  For me this is not practical.
  113.  
  114.  
  115.  
  116.   1.5.  Conventions:
  117.  
  118.  
  119.  
  120.        let (floppy)    represent the path to and directory you
  121.                        mount your 1.44 meg floppy disk on.
  122.  
  123.        let    (zip)    represent the path to and directory you
  124.                        mount your zip disk on.
  125.  
  126.        let  (cdrom)    represent the path to and directory you
  127.                        mount your cdrom on.
  128.  
  129.        let (verx.x)    represent the distribution version you
  130.                        are installing.
  131.  
  132.  
  133.   If you down load your disk images please let (cdrom)/slakware the path
  134.   and directory to those images.  My parallel port zip drive shows up on
  135.   my system as
  136.  
  137.  
  138.  
  139.                /dev/sda4
  140.  
  141.  
  142.  
  143.  
  144.   I've never seen it come up as any thing else unless I run fdisk on it
  145.   and change the partition table, creating more than one partition on
  146.   the disk. Then I always get corrupt disk error messages when I try to
  147.   use it. You may however mark the partition type 83 Linux etc... if you
  148.   wish with out trouble.  You also need to know the device names of your
  149.   cdrom and 1.44 meg floppy drives. Mine are
  150.  
  151.  
  152.  
  153.               /dev/hdc     cdrom
  154.               /dev/fd0     1.44 meg floppy
  155.  
  156.  
  157.  
  158.  
  159.  
  160.   I'll use my device names, you use yours ;-|)
  161.  
  162.   About Slackware and slakware (note the missing c in slakware).
  163.   Slackware is the name of the overall distribution and slakware is the
  164.   name of the directory where Patrick Volkerding places the stable "not
  165.   experimental or developmental" packages for installation. Whenever I'm
  166.   writing about slakware I'm writing about the directory.
  167.  
  168.  
  169.   1.6.  Other reading:
  170.  
  171.  
  172.   Linux Installation and Getting Started by Matt Welsh
  173.  
  174.   If you are having trouble accessing your zip drive please see the
  175.   Linux ZIP drive mini-HOWTO by Grant Guenther
  176.  
  177.   When you have completed your install I can not recommend strongly
  178.   enough that you work through the Small-Memory mini-HOWTO by Todd
  179.   Burgess
  180.  
  181.  
  182.  
  183.   1.6.1.  Slackware
  184.  
  185.   I also recommend the LOWMEM.TXT document from the Slackware
  186.   documentation on your cdrom or Slackware ftp site. This document
  187.   discribes a system that eleminates many of the difficulties discribed
  188.   in that document.
  189.  
  190.  
  191.  
  192.   2.  Slackware
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.   2.1.  Making the first zip disk.
  200.  
  201.  
  202.   1)    Attach zip drive to host system, insert blank zip disk into the
  203.   drive and boot the system to Linux
  204.  
  205.   2)    Login. You probably need to login as root or the user you log in
  206.   as will need to be able to write file systems, mount and unmount disks
  207.   etc....
  208.  
  209.   3)    Install an ext2fs file system on the zip disk.  with the
  210.   command:
  211.  
  212.  
  213.                 /sbin/mke2fs -b 1024 /dev/sda4
  214.  
  215.  
  216.  
  217.  
  218.  
  219.   4)    Mount the zip disk with:
  220.  
  221.  
  222.                 mount /dev/sda4 /(zip)
  223.  
  224.  
  225.  
  226.  
  227.  
  228.   5)    Insert your cdrom into its drive and mount it:
  229.  
  230.  
  231.                 mount /dev/hdc /(cdrom)
  232.  
  233.  
  234.  
  235.  
  236.  
  237.   6)    Make a directory to install the slakware disk images in:
  238.  
  239.  
  240.                 mkdir /(zip)/slakware
  241.  
  242.  
  243.  
  244.  
  245.  
  246.   7)    Make a writable ( non zip disk ) temporary directory on your
  247.   main disk to work in. May I suggest:
  248.  
  249.  
  250.                 mkdir /root/slakware/(verx.x)
  251.  
  252.  
  253.  
  254.  
  255.  
  256.   8)    Copy the root disk image to the above named directory:
  257.  
  258.  
  259.                 cp /(cdrom)/rootdsks/text.gz /root/slakware/(verx.x)/
  260.  
  261.  
  262.  
  263.  
  264.  
  265.   9)    Change directories to the one the root disk image was copied to
  266.   and decompress it with the commands:
  267.  
  268.  
  269.                 cd /root/slakware/(verx.x)
  270.                 gunzip text.gz
  271.  
  272.  
  273.  
  274.  
  275.   10)   Install a 1.44 meg floppy with a dos or ext2fs file system on it
  276.   in its drive and copy the root disk image to it this time with the dd
  277.   command:
  278.  
  279.  
  280.                 dd if=text of=/dev/fd0
  281.  
  282.  
  283.  
  284.  
  285.  
  286.   11)   Mount the 1.44 meg floppy with the command:
  287.  
  288.  
  289.                 mount /dev/fd0 /(floppy)
  290.  
  291.  
  292.  
  293.  
  294.  
  295.   12)   Copy the root disk image to the zip disk:
  296.  
  297.  
  298.                 cp -dpR /(floppy)/* /(zip)/
  299.  
  300.  
  301.  
  302.  
  303.   13)   In order to ease the install process later we will want to cre¡
  304.   ate a swap file on the zip disk of about 8 megs. with:
  305.  
  306.  
  307.                 dd if=/dev/zero of=/(zip)/swap bs=1024 count=8208
  308.  
  309.  
  310.  
  311.  
  312.   14)    Initialize the swap file with:
  313.  
  314.  
  315.                 /sbin/mkswap /(zip)/swap 8208
  316.  
  317.  
  318.  
  319.  
  320.   15)    Next with your favorite text editor you will need to edit the
  321.   file   /(zip)/etc/rc   and after the line /bin/mount -av -t nonfs
  322.   insert a new line
  323.  
  324.  
  325.                 /sbin/swapon /swap
  326.  
  327.  
  328.  
  329.  
  330.   16)   Copy the disk images to the zip disk:
  331.                 cp -r /(cdrom)/slakware/[a-ty]* /(zip)/slakware/ &
  332.  
  333.  
  334.  
  335.  
  336.   include the square brackets [a-ty]* exactly as shown above. the & sign
  337.   at the end of the line will make this command execute in the back¡
  338.   ground.  It takes about 20 min to complete. Use this time for some
  339.   coffee and reading more HOWTO's.
  340.  
  341.   17)  External zip drives have two lights--mine are green and yellow;
  342.   the internal drives appear to have only one. When my zip disk has
  343.   finished receiving information the yellow light goes out and I'm left
  344.   with just the green power light. on internal drives the single
  345.   "status?" light will go out.
  346.  
  347.   It is now time to prepare the floppy and zip disks for removal from
  348.   their drives by unmounting them:
  349.  
  350.  
  351.                 cd
  352.                 umount /dev/fd0
  353.                 umount /dev/sda4
  354.  
  355.  
  356.  
  357.  
  358.   18)  Life will be easier later if we check the root disk's file system
  359.   before we try to use it with the command:
  360.  
  361.  
  362.                 /sbin/e2fsck -f /dev/sda4
  363.  
  364.  
  365.  
  366.  
  367.   When disk activity ends if there are no errors you may remove the zip
  368.   disk from the drive and label it Slackware Root disk. I also include
  369.   the version number in pencil.
  370.  
  371.  
  372.   2.2.  Making the second zip disk.
  373.  
  374.   If the X window system is to be installed or you will be needing one
  375.   of the other prebuilt kernels it is now time to build the 2nd. zip
  376.   disk.
  377.  
  378.  
  379.   x1)  Insert disk 2 in the zip drive. I like to write an ext2fs file
  380.   system on this disk also, but if it has a M$ Dos file system that will
  381.   work also. I use the up arrow key on my keyboard to recall previously
  382.   used commands from my history file because I'm a bit lazy, but if you
  383.   want to retype the command repeat instructions 3), 4), and 6) above.
  384.  
  385.   x2)  Copy the X11R6 "X Window" packages to zip
  386.  
  387.  
  388.                 cp -r /(cdrom)/slakware/x* /(zip)/slakware/ &
  389.  
  390.  
  391.  
  392.  
  393.   again in the background. This will take about 1/2 as long as step 9)
  394.   did.  If your system was slow then it will be again. More coffee and
  395.   HOWTO reading.
  396.  
  397.   x3)  There is also room on this disk for the custom kernels directory.
  398.   It is classy to install one that meets the system's needs as closely
  399.   as possible to go with the one needed to access the zip drive.  Make
  400.   this kernel the system default. So now we will make a directory for
  401.   that and then copy the information to it:
  402.  
  403.  
  404.  
  405.                 mkdir /(zip)/kernels
  406.                 cp -r /(cdrom)/kernels/* /(zip)/kernels/ &
  407.  
  408.  
  409.  
  410.  
  411.   This will take another 10 or 15 min. Dispose of the used coffee? Read
  412.   more Linux Documentation?
  413.  
  414.   x4)  When disk activity is at an end unmount the disk and run fsck on
  415.   it:
  416.  
  417.  
  418.                 umount /dev/sda4
  419.                 /sbin/e2fsck -f /dev/sda4
  420.  
  421.  
  422.  
  423.  
  424.   x5)  When e2fsck is done with the disk and the command prompt returns
  425.   to the screen eject the disk and label it.
  426.  
  427.  
  428.   2.3.  Making the boot floppy.
  429.  
  430.  
  431.   b1)  I now make a 1.44 meg boot disk. Use the
  432.   /(cdrom)/bootdsks.144/iomega.s image. Install a new 1.44 meg floppy
  433.   disk in the proper drive. The command to make the disk is:
  434.  
  435.  
  436.                 dd if=/(cdrom)/bootdsks.144/iomega.s of=/dev/fd0
  437.  
  438.  
  439.  
  440.  
  441.   b2)  Check the file systems of the boot disk:
  442.  
  443.  
  444.                 /sbin/e2fsck -f /dev/fd0
  445.  
  446.  
  447.  
  448.  
  449.   When disk activity ends if there are no errors you may remove all your
  450.   disks, write protect your boot floppy and label it including version
  451.   number.
  452.  
  453.  
  454.  
  455.   3.  The install:
  456.  
  457.   After connecting everything up to the target machine and putting the
  458.   zip disk in place I boot the machine with the appropriate boot disk.
  459.   Before logging in it is a good idea to use the scroll back feature
  460.   built into Linux and check to see all your hardware was detected
  461.   properly. To do this hold the shift key and use the page up and page
  462.   down keys as appropriate. Getting a login prompt at all usually means
  463.   the boot time errors were not too bad.
  464.  
  465.  
  466.   3.1.  Round 1.
  467.  
  468.   Slackware will present some instructions. Please read them Carefully.
  469.   Login as root and fdisk root and swap partitions on the target drive
  470.   if needed. Reboot the machine if you ran fdisk and Carefully reread
  471.   the instructions on the screen if there are any, then login as root.
  472.  
  473.   Even on machines with only 4 megs. of ram you will not need to create
  474.   a swap partition until prompted to do so in the setup program. We
  475.   already have swap running on the zip disk. Run the Slackware setup
  476.   program:
  477.  
  478.  
  479.                  setup
  480.  
  481.  
  482.  
  483.  
  484.   CAREFULLY read and follow the instructions the menus provide.  The
  485.   first thing setup will want to do is create and initialize your swap
  486.   partition on your hard drive this is ok despite the dire warnings and
  487.   will not affect the swap file on the zip drive.
  488.  
  489.   You do not want to allow /dev/sda4 to be automatically mounted and
  490.   when questions come up about this in the menus. Do not add it unless
  491.   this zip drive is dedicated to the target machine full time.
  492.  
  493.   When you get the menu that asks where the source of the installation
  494.   media is select item number 4. "Install from a premounted directory".
  495.   The next screen will ask for its name, it is /slakware.
  496.  
  497.   I recommend installing only the "a" disk set at this time. It will
  498.   crash the install if the person selecting packages gets greedy and
  499.   fills the disk before lilo is written and the kernel is installed.
  500.   During basic install I install the kernel from the boot disk only.
  501.   There are relatively few choices to be made from here and the
  502.   Slackware documentation from the cdrom or your ftp site will do you
  503.   much better than I can from here.
  504.  
  505.   Leave the zip drive and disk in place after the initial install is
  506.   complete.  Remove the floppy when prompted to do so and reboot.  If
  507.   all is right in the world Bill, er, your friend/customer will have a
  508.   working Linux system come up.
  509.  
  510.  
  511.   3.2.  Round 2.
  512.  
  513.   After rebooting the system login as root and mount the zip disk again:
  514.  
  515.  
  516.                  mount /dev/sda4 /mnt
  517.  
  518.  
  519.  
  520.  
  521.  
  522.   Check available drive space:
  523.  
  524.  
  525.                  df
  526.  
  527.  
  528.  
  529.   Run setup again from your new system:
  530.  
  531.  
  532.                  setup
  533.  
  534.  
  535.  
  536.  
  537.  
  538.   Choose "s" SOURCE from the menu and press the enter key.  Select item
  539.   number 4. "Install from a premounted directory" and press the enter
  540.   key again.
  541.  
  542.   Enter the directory name. This time use:
  543.  
  544.  
  545.                  /mnt/slakware
  546.  
  547.  
  548.  
  549.  
  550.  
  551.   Choose the packages you want or need. All are available except those
  552.   which start with "x". When you're finished installing packages from
  553.   this disk exit setup and run:
  554.  
  555.  
  556.                  umount /dev/sda4
  557.  
  558.  
  559.  
  560.  
  561.   You may now remove the disk and if X will be installed insert the 2nd
  562.   zip disk and work through setup again this time only packages
  563.   beginning with X will be available. If you will be installing a custom
  564.   kernel from the prebuilt kernels you may also do this while the 2nd.
  565.   zip disk is installed.
  566.  
  567.  
  568.   3.3.  Library Trouble
  569.  
  570.   Some times I have trouble with the links for the libraries either on
  571.   the root zip disk or on the final destination machine. There are two
  572.   possible fixes for this.
  573.  
  574.   Fix 1) If the system boots to a command prompt and you can login as
  575.   root in single user mode try the command:
  576.  
  577.  
  578.                  ldconfig
  579.  
  580.  
  581.  
  582.  
  583.   If things are not broken so badly that this command will not run then
  584.   reboot and watch for library related errors. If there are none your in
  585.   business.
  586.  
  587.   Fix 2) If ldconfig can not repair things you will need to re master
  588.   the root floppy disk and recopy the files from it as in instruction
  589.   ``8)'' through 12) or reinstall Linux to the destination system as
  590.   appropriate.
  591.  
  592.  
  593.  
  594.  
  595.   4.  Thank you
  596.  
  597.   This mini-HOWTO brought to you by the letters G. N. and U. and the
  598.   Linux documentation project.
  599.  
  600.   Special thanks to Dr. Randolph Bentson whose devotion to Linux
  601.   inspired me to give something back to the people who gave us the ONE
  602.   TRUE OPERATING SYSTEM.
  603.  
  604.  
  605.            I hope this helps someone.
  606.  
  607.            Sincerely
  608.  
  609.            Kevin Snively
  610.            P.O. Box 1013
  611.            Everett Wa. 98206-1013
  612.            USA
  613.  
  614.  
  615.  
  616.  
  617.   k.snively@seaslug.org
  618.  
  619.  
  620.            root@aldrovanda
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.