home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / ROOTDSKS.12 / TTY12 / bin / setup.tty < prev    next >
Encoding:
Text File  |  1995-02-28  |  50.6 KB  |  1,603 lines

  1. #!/bin/sh
  2. #
  3. # Copyright 1993,1994 Patrick Volkerding, Moorhead, Minnesota USA
  4. # All rights reserved.
  5. #
  6. # Redistribution and use of this script, with or without modification, is 
  7. # permitted provided that the following conditions are met:
  8. #
  9. # 1. Redistributions of this script must retain the above copyright
  10. #    notice, this list of conditions and the following disclaimer.
  11. #
  12. #  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  13. #  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
  14. #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
  15. #  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
  16. #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  17. #  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  18. #  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
  19. #  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
  20. #  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
  21. #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. #
  23. # As always, bug reports, suggestions, etc: volkerdi@mhd1.moorhead.msus.edu
  24. # or bf703@cleveland.freenet.edu, or (if you absolutely must) (218) 233-4349.
  25. # T_PX = target prefix, T_MT = target mounted
  26. print_list() {
  27. cat << EOF
  28.       A   - Base Linux system
  29.       AP  - Various applications that do not need X
  30.       D   - Program Development (C, C++, Kernel source, Lisp, Perl, etc.)
  31.       E   - GNU Emacs
  32.       F   - FAQ lists
  33.       I   - Info pages.
  34.       IV  - Interviews: libraries, include files, Doc and Idraw apps for X
  35.       N   - Networking (TCP/IP, UUCP, Mail)
  36.       OOP - Object Oriented Programming (GNU Smalltalk)
  37.       Q   - Extra kernels with special drivers (needed for non-SCSI CD)
  38.       T   - TeX
  39.       TCL - Tcl/Tk/TclX, Tcl language, and Tk toolkit for developing X apps
  40.       X   - XFree-86 Base X Window System
  41.       XAP - X Windows Applications
  42.       XD  - XFree-86 X11 server development system
  43.       XV  - XView (OpenLook [virtual] Window Manager, apps)
  44.       Y   - Games (that do not require X)
  45. EOF
  46. }
  47. # 'probe()' borrowed from LILO QuickInst.
  48. probe()
  49. {
  50.  [ ! -z "`dd if=$1 bs=1 count=1 2>/dev/null | tr '\0' x`" ]
  51.  return
  52. }
  53. T_MT="n"
  54. ADDSOFT="n"
  55. if [ ! -L /usr/man ]; then # detect a *real* Linux system (are man pages there?)
  56.  T_PX="/"
  57.  ADDSOFT="a"
  58.  T_MT="y"
  59. else
  60.  T_PX="/mnt"
  61. fi
  62. if [ "$1" = "-target_mounted" -o "$2" = "-target_mounted" ]; then # the target partitions have been manually mounted
  63.  T_MT="y"
  64. fi
  65. if [ "$1" = "-ibm" -o "$2" = "-ibm" ]; then # Valuepoint
  66.  VP="true"
  67. else
  68.  VP="false"
  69. fi
  70. if [ "y" = "$T_MT" ]; then # target partitions have been manually mounted
  71.  if mount | fgrep /var/adm/mount 1> /dev/null 2> /dev/null ; then
  72.   umount /var/adm/mount
  73.  fi
  74.  if [ "$T_PX" = "/mnt" ]; then
  75.   cat << EOF
  76. You have used the '-target_mounted' flag. In order to proceed, you must
  77. have formatted all of your Linux partitions with mke2fs or mkxfs and
  78. mounted all of them beneath /mnt. You should also use mkswap on your swap
  79. swap partitions and use 'swapon' to activate them.
  80.  
  81. When run in this mode, 'setup' does not automatically create an /etc/fstab
  82. for you. When the installation completes, you must create an /etc/fstab
  83. before you reboot. (if you're not just adding software, in which case you
  84. already have an /etc/fstab)
  85.  
  86. Since your real /etc directory is mounted under /mnt, you'll want to
  87. say 'vi /mnt/etc/fstab' and not 'vi /etc/fstab', of course.
  88. EOF
  89.  fi
  90. else
  91.  if [ -d /mnt/etc -o -d /mnt/lost+found ]; then # nothing should be on /mnt here!
  92.   umount -a 1> /dev/null 2> /dev/null
  93.   mount /proc /proc -t proc
  94.  fi
  95. fi
  96. rm -f /var/adm/mount 2> /dev/null
  97. rmdir /var/adm/mount 2> /dev/null
  98. mkdir /var/adm/mount 2> /dev/null
  99. rm -f /fsta*
  100. SWAP_IN_USE="false"
  101. REFORM="a"
  102. echo
  103. echo "Welcome to Slackware Linux Setup (v. 2.2.0-tty)"
  104. while [ 0 ]; do 
  105.  if [ "$T_PX" = "/" ]; then # skip keyboard config if on HD.
  106.   echo
  107.   break;
  108.  fi
  109.  while [ 0 ]; do
  110.   cat << EOF
  111.  
  112. Linux supports many different keyboard configurations. If you are not
  113. using a US keyboard, you will probably want to remap your keyboard.
  114.  
  115. Would you like to remap your keyboard?
  116.  
  117. 1 - yes
  118. 2 - no
  119.  
  120. EOF
  121.   echo -n "Your choice (1/2)? "
  122.   read REPLY;
  123.   if [ "$REPLY" = "1" -o "$REPLY" = "2" ]; then
  124.    break;
  125.   fi
  126.  done
  127.  if [ "$REPLY" = "1" ]; then
  128.   echo
  129.   echo "Please select one of the following keyboard maps:"
  130.   echo
  131.   COUNT="1"
  132.   for mapname in /usr/lib/kbd/keytables/*gz; do
  133.    THISMAP="$COUNT -- `basename $mapname`                              "
  134.    THISMAP="`echo "$THISMAP" | cut -b1-38`"
  135.    FUN_RESULT="`expr $COUNT % 2`"
  136.    if [ "$FUN_RESULT" = "1" ]; then
  137.     echo -n "$THISMAP"
  138.    else
  139.     echo "$THISMAP"
  140.    fi
  141.    COUNT=`expr $COUNT + 1`
  142.   done
  143.   echo
  144.   echo
  145.   echo -n "Which keyboard map would you like (1 - `expr $COUNT - 1`)? "
  146.   read MAPNUM;
  147.   COUNT="1"
  148.   MAPNAME="garbage" # and then we look for the real one
  149.   for mapname in /usr/lib/kbd/keytables/*gz; do
  150.    if [ "$COUNT" = "$MAPNUM" ]; then
  151.     MAPNAME=`basename $mapname`
  152.    fi
  153.    COUNT=`expr $COUNT + 1`
  154.   done
  155.   if [ ! -r /usr/lib/kbd/keytables/$MAPNAME ]; then 
  156.    cat << EOF
  157.  
  158.  Hey you! Follow the rules!
  159.  Going back...
  160. EOF
  161.    continue;
  162.   else
  163.    rm -rf /tmp/keymap
  164.    mkdir /tmp/keymap
  165.    rm -f /usr/lib/kbd/keytables/keytemp/* 
  166.    cp /usr/lib/kbd/keytables/$MAPNAME /tmp/keymap
  167.    gzip -d /tmp/keymap/*.gz
  168.    FULLNAME=`ls /tmp/keymap/*.map`
  169.    SHORTNAME=`basename $FULLNAME`
  170.    echo
  171.    echo "Installing keyboard map '$SHORTNAME'..."
  172.    echo
  173.    loadkeys $FULLNAME
  174.    cat << EOF
  175. OK, the new map is now installed. You may now test it by typing
  176. anything you want. To quit testing the keyboard, enter [y] on a
  177. line by itself to accept the map and go on, or [n] on a line by
  178. itself to reject the current keyboard map and select a new one.
  179.  
  180. EOF
  181.    while [ 0 ]; do
  182.     echo -n "test keyboard, or [n], or [y] => "
  183.     read REPLY;
  184.     if [ "$REPLY" = "n" -o "$REPLY" = "y" ]; then
  185.      break;
  186.     fi
  187.    done
  188.    if [ "$REPLY" = "y" ]; then
  189.     REMAPPING_DONE="true"
  190.     break;
  191.    else
  192.     continue;
  193.    fi
  194.   fi # if map is readable
  195.  else
  196.   # No remapping done
  197.   break;
  198.  fi
  199. done
  200. if [ "y" = "$T_MT" -a "$T_PX" = "/mnt" ]; then
  201.  while [ 0 ]; do
  202.   echo
  203.   echo "Are you installing Linux from scratch, or adding software to an existing"
  204.   echo "system? "
  205.   echo
  206.   echo -n "[I]nstall from scratch, or [a]dd? "
  207.   read ADDSOFT;
  208.   if [ "$ADDSOFT" = "a" -o "$ADDSOFT" = "i" ]; then
  209.    break;
  210.   fi
  211.  done
  212. fi
  213. PARTLIST="`fdisk -l | fgrep "Linux native"`"
  214. if [ "y" = "$T_MT" ]; then
  215.  PARTLIST="BOGUS" # A wonderful example of unstructured programming
  216. fi
  217. if [ ! "$PARTLIST" = "" ]; then
  218.  if [ ! "$PARTLIST" = "BOGUS" ]; then
  219.   SWAPLIST="`fdisk -l | fgrep "Linux swap"`" 
  220.   if [ "$SWAPLIST" = "" ]; then
  221.    echo 
  222.    echo "You have not created a swap partition with Linux fdisk."
  223.    echo -n "Do you want to continue without a swapfile ([y]es, [n]o)? "
  224.    read REPLY;
  225.    if [ "$REPLY" = "n" -o "$REPLY" = "N" ]; then
  226.     echo 
  227.     echo "Create a swapfile with Linux fdisk, and then run setup again."
  228.     echo 
  229.     exit;
  230.    fi
  231.   else
  232.    echo  
  233.    if [ "`echo "$SWAPLIST" | sed -n '2 p'`" = "" ]; then
  234.     echo "Slackware Setup has detected a swap partition:"
  235.     echo "`echo "$SWAPLIST" | sed -n '1 p'`"
  236.     echo 
  237.     echo -n "Do you wish to install this partition as your swapspace ([y]es, [n]o)? "
  238.    else
  239.     echo "Slackware Setup has detected the following swap partitions:"
  240.     echo "$SWAPLIST" 
  241.     echo
  242.     echo -n "Do you wish to install these as your swap partitions ([y]es, [n]o)? "
  243.    fi
  244.    read REPLY;
  245.    if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then
  246.     cat << EOF
  247.  
  248. IMPORTANT NOTE: If you have already made any of your swap partitions
  249. active (using the swapon command), then you should not allow setup to
  250. use mkswap on your swap partitions, because it may corrupt memory pages
  251. that are currently swapped out. Instead, you will have to make sure that
  252. your swap partitions have been prepared (with mkswap) before they will
  253. work. You might want to do this to any inactive swap partitions before
  254. you reboot.
  255.  
  256. EOF
  257.     echo -n "Do you want setup to use mkswap on your swap partitions ([y]es, [n]o)? "  
  258.     read USE_SWAP;
  259.     echo
  260.     rm -f /fstab.swap
  261.     rm -f $T_PX/fstab
  262.     CURRENT_SWAP="1" 
  263.     while [ ! "`echo "$SWAPLIST" | sed -n "$CURRENT_SWAP p"`" = "" ]; do 
  264.      echo "Setting up swapspace..."
  265.      SWAP_SIZE="`fdisk -l | fgrep "Linux swap" | sed -n "$CURRENT_SWAP p" | cut -b38-45`"
  266.      SWAP_PART="`fdisk -l | fgrep "Linux swap" | sed -n "$CURRENT_SWAP p" | cut -b1-10`"
  267.      if [ "$USE_SWAP" = "Y" -o "$USE_SWAP" = "y" ]; then 
  268.       mkswap $SWAP_PART $SWAP_SIZE
  269.      fi
  270.      swapon $SWAP_PART
  271.      echo "Adding this line to /etc/fstab:"
  272.      SWAP_IN_USE="`echo "$SWAP_PART       swap        swap        defaults   1   1"`"
  273.      echo "$SWAP_IN_USE"
  274.      echo "$SWAP_IN_USE" >> /fstab.swap
  275.      echo "Swapspace configured."
  276.      CURRENT_SWAP="`expr $CURRENT_SWAP + 1`"
  277.     done
  278.    fi
  279.   fi  
  280.   echo 
  281.   if [ ! "`echo "$PARTLIST" | sed -n '2 p'`" = "" ]; then # more than one:
  282.    echo "The following partitions on your machine are available for Linux:"
  283.    ONLY_ONE="false"
  284.   else
  285.    echo "The following partition is available for Linux:"
  286.    ONLY_ONE="true"
  287.   fi
  288.   echo 
  289.   echo "   Device Boot  Begin   Start     End  Blocks   Id  System"
  290.   fdisk -l | fgrep "Linux native"
  291.   while [ 0 ]; do 
  292.    if [ "$ONLY_ONE" = "false" ]; then
  293.     echo
  294.     echo -n "Which device would you like to use for your root Linux partition? "
  295.     read ROOT_DEVICE;
  296.    else
  297.     ROOT_DEVICE="`echo "$PARTLIST" | cut -b1-10`"
  298.    fi
  299.    echo 
  300.    if [ ! -b $ROOT_DEVICE ]; then
  301.     echo "Invalid device. Try again. Use a format such as:"
  302.     echo "/dev/hda3 or whatever the device name is."
  303.     continue;
  304.    fi
  305.    if fdisk -l | fgrep "Linux native" | fgrep $ROOT_DEVICE 1> /dev/null 2> /dev/null ; then
  306.     ROOT_SIZE="`fdisk -l | fgrep "$ROOT_DEVICE" | cut -b38-45`"
  307.     cat << EOF
  308. If this is the root partition of an existing Linux system, you
  309. may add more software to the existing system, or you may
  310. reformat the partition and install from scratch.
  311.  
  312. EOF
  313.     echo -n "Would you like to [a]dd more software, or [i]nstall from scratch? "
  314.     read ADDSOFT;
  315.     while [ 0 ]; do
  316.      cat << EOF
  317.  
  318. There are two main filesystem types that are used for Linux. These are
  319. the xiafs filesystem, and the second extended filesystem (ext2).
  320. If you are adding software to a system that has already been installed,
  321. you must enter the filesystem type it currently uses. If you're installing
  322. to a new system, you can try either filesystem type.
  323.  
  324. Which of these two filesystems to use is one of those things that some
  325. Linux users like to argue about needlessly. Both are good filesystems, and
  326. it's hard to say whether either one has a significant speed or reliability
  327. advantage. Ext2 does have one nice feature that xiafs doesn't have yet -
  328. as an ext2 partition is unmounted, a clean bit is written to it. When the
  329. machine is rebooted, checking is skipped for any partitions that have the
  330. clean bit on them. For this reason, ext2 systems boot faster than xiafs
  331. systems, unless you disable the automatic filesystem checking in /etc/rc.d/rc.S.
  332. If you use xiafs for your root partition, you'll see some warnings when you
  333. shut the system down. These are harmless and can be ignored.
  334.  
  335. What filesystem do you have (or do you plan to use) on your root
  336. EOF
  337.      echo -n "partition ($ROOT_DEVICE), [e]xt2fs or [x]iafs? "
  338.      read ROOT_SYS_TYPE; 
  339.      if [ "$ROOT_SYS_TYPE" = "e" ]; then
  340.       ROOT_SYS_TYPE="ext2"
  341.       break;
  342.      elif [ "$ROOT_SYS_TYPE" = "x" ]; then
  343.       ROOT_SYS_TYPE="xiafs"
  344.       break;
  345.      fi
  346.     done
  347.     while [ 0 ]; do
  348.      if [ "$ADDSOFT" = "a" ]; then
  349.       echo
  350.       echo "Software will be added to your system without reformatting your"
  351.       echo "partitions. "
  352.       echo
  353.       echo "Mounting your root partition..."
  354.       mount -t $ROOT_SYS_TYPE $ROOT_DEVICE /mnt
  355.       if [ ! -r $T_PX/etc/fstab ]; then
  356.        echo
  357.        echo "Either you have specified the wrong filesystem type, or there"
  358.        echo "is no Linux system currently installed on the partition."
  359.        echo  
  360.        echo "Sorry, but you'll have to try again." 
  361.        exit;
  362.       fi
  363.       echo "Scanning your /etc/fstab..."
  364.       echo
  365.       index="0"
  366.       while [ 0 ]; do
  367.               index="`expr $index + 1`"
  368.        THISLINE="`cat $T_PX/etc/fstab | tr "[\011]" "[\040]" | sed -n "$index p"`"
  369.               BLANKCHECK="`echo $THISLINE | sed 's/ //g'`"
  370.               if [ "$BLANKCHECK" = "" ]; then
  371.                       break;
  372.               fi
  373.               if echo "$THISLINE" | fgrep ext2 1> /dev/null 2> /dev/null ; then
  374.                       ADD_TYPE="ext2"
  375.        elif echo "$THISLINE" | fgrep xiafs 1> /dev/null 2> /dev/null ; then
  376.         ADD_TYPE="xiafs"
  377.               else
  378.                       continue;
  379.               fi
  380.        NEWPART="`echo "$THISLINE" | cut -b1-10`"
  381.        THISLINE="`echo "$THISLINE" | cut -b11-`"
  382.        while [ 0 ]; do
  383.         FIRST="`echo "$THISLINE" | cut -b1`"
  384.         if [ "$FIRST" = "/" ]; then
  385.          break;
  386.         fi
  387.         THISLINE="`echo "$THISLINE" | cut -b2-`"
  388.        done
  389.        SECOND="`echo "$THISLINE" | cut -b2`" 
  390.        if [ "$SECOND" = " " ]; then
  391.         # We don't want to remount the / partition
  392.         continue;
  393.        fi
  394.        end_of_line="1"
  395.        while [ 0 ]; do
  396.         end_of_line="`expr $end_of_line + 1`"
  397.         if [ "`echo "$THISLINE" | cut -b$end_of_line`" = " " -o "`echo "$THISLINE" | cut -b$end_of_line`" = "" -o "`echo "$THISLINE" | cut -b$end_of_line`" = "fucking tab character" ]; then
  398.          # Found it!
  399.                 end_of_line="`expr $end_of_line - 1`"
  400.          break;
  401.         fi
  402.        done
  403.        MNTDIR="`echo "$THISLINE" | cut -b1-$end_of_line`"
  404.        echo "Mounting $NEWPART under $T_PX$MNTDIR as type $ADD_TYPE..."
  405.        mount -t $ADD_TYPE $NEWPART $T_PX$MNTDIR
  406.       done
  407.       break;
  408.      else
  409.       cat << EOF
  410.  
  411. Since you've chosen to install Linux from scratch, we want to be
  412. sure you know how to proceed, and we also want to give you one last
  413. chance to change your mind. When using this option, you must install
  414. to a blank partition. If you have not already formatted it manually
  415. then you must format it when prompted.
  416.  
  417. Enter [i] again to install from scratch, or [a] to add
  418. software to your existing system.
  419.  
  420. EOF
  421.       echo -n "Install fresh, or add software to your current system? ([i]nstall, [a]dd)? "
  422.       read REFORM;
  423.       if [ "$REFORM" = "i" ]; then
  424.        echo
  425.        echo "If this partition has not been formatted, you should format it."
  426.        echo
  427.        break;
  428.       else
  429.        ADDSOFT="a"
  430.       fi
  431.      fi           
  432.     done
  433.     if [ ! "$ADDSOFT" = "a" ]; then
  434.      echo -n "Would you like to format this partition ([y]es, [n]o, [c]heck sectors too)? "
  435.      read DOFORMAT;
  436.      echo
  437.      if [ "$DOFORMAT" = "Y" -o "$DOFORMAT" = "y" -o "$DOFORMAT" = "c" ]; then
  438.       echo "Attempting to unmount $ROOT_DEVICE..."
  439.       umount $ROOT_DEVICE 
  440.       if [ "$ROOT_SYS_TYPE" = "ext2" ]; then
  441.        cat << EOF
  442.  
  443. Ext2fs defaults to one inode per 4096 bytes of drive space. If you're going to
  444. have many small files on your drive, you may need more inodes (one is used for
  445. each file entry). You can change the density to one inode per 2048 bytes, or
  446. even per 1024 bytes.
  447.  
  448. EOF
  449.        echo "Enter '2048' or '1024', or just hit enter to accept the"
  450.        echo -n "default of 4096: "
  451.        read DENSITY;
  452.        echo
  453.        if [ ! "$DENSITY" = "2048" -a ! "$DENSITY" = "1024" ]; then
  454.         DENSITY=4096
  455.        fi
  456.       fi
  457.       echo "Formatting $ROOT_DEVICE ($ROOT_SIZE blocks) as type $ROOT_SYS_TYPE..."
  458.       if [ "$ROOT_SYS_TYPE" = "ext2" ]; then
  459.        if [ "$DOFORMAT" = "c" ]; then
  460.         mke2fs -c -i $DENSITY $ROOT_DEVICE $ROOT_SIZE
  461.        else
  462.         mke2fs -i $DENSITY $ROOT_DEVICE $ROOT_SIZE
  463.        fi
  464.       else
  465.        if [ "$DOFORMAT" = "c" ]; then
  466.         mkxfs -c $ROOT_DEVICE $ROOT_SIZE
  467.        else
  468.         mkxfs $ROOT_DEVICE $ROOT_SIZE
  469.        fi
  470.       fi
  471.       echo "Done formatting device $ROOT_DEVICE."
  472.      fi
  473.      echo "Mounting your new root partition:"
  474.      mount -t $ROOT_SYS_TYPE $ROOT_DEVICE $T_PX 1> /dev/null 2> /dev/null
  475.      if [ ! -d $T_PX/tmp ]; then
  476.       mkdir $T_PX/tmp
  477.       chmod 1777 $T_PX/tmp
  478.      fi
  479.      echo "Root partition mounted."
  480.      if [ ! "$SWAP_IN_USE" = "false" ]; then
  481.       cat /fstab.swap >> $T_PX/fstab
  482.      fi
  483.      echo "$ROOT_DEVICE       /        $ROOT_SYS_TYPE        defaults   1   1" >> $T_PX/fstab 
  484.      break;
  485.     fi
  486.    else # device not tagged Linux native
  487.     echo "The partition you have selected is not tagged as Linux"
  488.     echo "native. Either select a new partition, or tag the selected"
  489.     echo "one with Linux fdisk." 
  490.     continue;
  491.    fi
  492.    break;
  493.   done # mounting the target root partition
  494.   if [ ! "$ADDSOFT" = "a" ]; then
  495.    # Now, if the user wants to mount some other partitions for /usr or
  496.    # /usr/X11 or whatever (/tmp, you name it), Here's where we do that
  497.    echo 
  498.    if [ ! "`echo "$PARTLIST" | sed -n '2 p'`" = "" ]; then
  499.     cat << EOF
  500. You seem to have more than one partition tagged as Linux native.
  501. You may use these to distribute your Linux system across more than
  502. one partition. Currently, you have $ROOT_DEVICE mounted as your /
  503. partition. You might want to mount large directories such as /usr
  504. or /usr/X11 or seperate partitions. You should not try to mount
  505. /etc or /bin on their own partitions since they contain utilities
  506. needed to bring the system up and mount partitions.
  507.  
  508. Would you like to use some of the other Linux partitions
  509. EOF
  510.     echo -n "to mount some of your directories ([y]es, [n]o)? "
  511.     read MOUNTMORE;
  512.     if [ "$MOUNTMORE" = "y" -o "$MOUNTMORE" = "Y" ]; then
  513.      while [ 0 ]; do
  514.       echo 
  515.       echo "These are your Linux partitions:"
  516.       echo "$PARTLIST" 
  517.       echo 
  518.       echo "These partitions are already in use:"
  519.       mount | fgrep mnt
  520.       echo 
  521.       echo "Please enter the partition you would like to use, or"
  522.       echo -n "type <q> to quit adding new partitions: " 
  523.       read NEXT_PARTITION;
  524.       if [ "$NEXT_PARTITION" = "q" ]; then
  525.        break;
  526.       fi
  527.       if [ ! -b $NEXT_PARTITION ]; then
  528.        echo
  529.        echo "Invalid device. Try again. Use a format such as:"
  530.        echo "/dev/hda3 or whatever the device name is."
  531.        continue;
  532.       else
  533.        if fdisk -l | fgrep "Linux native" | fgrep $NEXT_PARTITION 1> /dev/null 2> /dev/null ; then
  534.         NEXT_SIZE="`fdisk -l | fgrep "$NEXT_PARTITION" | cut -b38-45`"
  535.         while [ 0 ]; do
  536.          echo 
  537.          echo -n "What type of filesystem would you like to use ([e]xt2fs, [x]iafs)? " 
  538.          read NEXT_SYS_TYPE;
  539.          if [ "$NEXT_SYS_TYPE" = "x" ]; then
  540.           NEXT_SYS_TYPE="xiafs"
  541.           break;
  542.          elif [ "$NEXT_SYS_TYPE" = "e" ]; then
  543.           NEXT_SYS_TYPE="ext2"
  544.           break;
  545.          fi
  546.         done
  547.         echo
  548.         echo -n "Would you like to format this partition ([y]es, [n]o, [c]heck sectors too)? "
  549.         read DOFORMAT;
  550.         if [ "$DOFORMAT" = "Y" -o "$DOFORMAT" = "y" -o "$DOFORMAT" = "c" ]; then
  551.          if [ "$NEXT_SYS_TYPE" = "ext2" ]; then
  552.           cat << EOF
  553.  
  554. Ext2fs defaults to one inode per 4096 bytes of drive space. If you're going to
  555. have many small files on your drive, you may need more inodes (one is used for
  556. each file entry). You can change the density to one inode per 2048 bytes, or
  557. even per 1024 bytes.
  558.  
  559. EOF
  560.           echo "Enter '2048' or '1024', or just hit enter to accept the"
  561.           echo -n "default of 4096: "
  562.           read DENSITY;
  563.           echo
  564.           if [ ! "$DENSITY" = "2048" -a ! "$DENSITY" = "1024" ]; then
  565.            DENSITY=4096
  566.           fi
  567.          fi
  568.          echo "Formatting $NEXT_PARTITION ($NEXT_SIZE blocks) as Linux $NEXT_SYS_TYPE..."
  569.          if [ "$NEXT_SYS_TYPE" = "ext2" ]; then
  570.           if [ "$DOFORMAT" = "c" ]; then
  571.            mke2fs -c -i $DENSITY $NEXT_PARTITION $NEXT_SIZE
  572.           else
  573.            mke2fs -i $DENSITY $NEXT_PARTITION $NEXT_SIZE
  574.           fi
  575.          else
  576.           if [ "$DOFORMAT" = "c" ]; then
  577.            mkxfs -c $NEXT_PARTITION $NEXT_SIZE
  578.           else
  579.            mkxfs $NEXT_PARTITION $NEXT_SIZE
  580.           fi
  581.          fi
  582.          echo "Done formatting device $NEXT_PARTITION."
  583.         fi
  584.         echo 
  585.         echo "Now this new partition must be mounted somewhere in your new"
  586.         echo "directory tree. For example, if you want to put it under /usr/X11,"
  587.         echo "then respond: /usr/X11"
  588.         echo 
  589.         echo -n "Where would you like to mount $NEXT_PARTITION? "
  590.         read NEW_DIRECTORY;
  591.         echo "Mounting device $NEXT_PARTITION under $NEW_DIRECTORY on your root device:"
  592.         mkdir -p /mnt$NEW_DIRECTORY
  593.         chmod 755 /mnt$NEW_DIRECTORY
  594.         mount -t $NEXT_SYS_TYPE $NEXT_PARTITION /mnt$NEW_DIRECTORY 1> /dev/null 2> /dev/null
  595.         echo "Partition $NEXT_PARTITION mounted."
  596.         echo "$NEXT_PARTITION        $NEW_DIRECTORY        $NEXT_SYS_TYPE        defaults   1   1" >> /mnt/fstab 
  597.         echo 
  598.         echo -n "Would you like to mount some more additional partitions ([y]es, [n]o)? "
  599.         read REPLY;
  600.         if [ "$REPLY" = "n" -o "$REPLY" = "N" ]; then
  601.          break;
  602.         fi
  603.        else # device not tagged Linux native
  604.         echo "The partition you have selected is not tagged as Linux"
  605.         echo "native. Either select a new partition, or tag the selected"
  606.         echo "one with Linux fdisk." 
  607.         continue;
  608.        fi
  609.       fi
  610.      done # mounting additional partitions
  611.      echo
  612.     fi
  613.    else
  614.     echo "Installing all software on $ROOT_DEVICE."
  615.     echo 
  616.    fi # end of target partition setup
  617.    # Add DOS partitions.
  618.    DOSLIST="`fdisk -l | fgrep "DOS"`"
  619.    HPFSLIST="`fdisk -l | fgrep "HPFS"`"
  620.    if [ ! "$HPFSLIST" = "" ]; then
  621.     DOSLIST="`echo -e "$DOSLIST\n$HPFSLIST"`"
  622.    fi
  623.    if [ ! "$DOSLIST" = "" ]; then # there are DOS or OS/2 partitions:
  624.     cat << EOF
  625. DOS AND OS/2 PARTITION SETUP
  626.  
  627. The following DOS FAT or OS/2 HPFS partitions were found:
  628.  
  629. $DOSLIST
  630.  
  631. Would you like to set up some of these partitions to be visible
  632. EOF
  633.     echo -n "from Linux ([y]es, [n]o)? "
  634.     read ADDDOS;
  635.     if [ "$ADDDOS" = "y" -o "$ADDDOS" = "Y" ]; then
  636.      while [ 0 ]; do
  637.       USED_DOS_PARTITIONS="`cat /mnt/fstab | fgrep msdos`"
  638.       USED_HPFS_PARTITIONS="`cat /mnt/fstab | fgrep hpfs`"
  639.       if [ ! "$USED_HPFS_PARTITIONS" = "" ]; then
  640.        USED_DOS_PARTITIONS="`echo -e "$USED_DOS_PARTITIONS\n$USED_HPFS_PARTITIONS"`"
  641.       fi
  642.       if [ ! "$USED_DOS_PARTITIONS" = "" ]; then
  643.        echo
  644.        echo "These DOS or OS/2 partitions have already been added"
  645.        echo "to your /etc/fstab:"
  646.        echo "$USED_DOS_PARTITIONS"
  647.       fi
  648.       echo 
  649.       echo "These DOS or OS/2 partitions are available to mount:"
  650.       echo "$DOSLIST" 
  651.       echo 
  652.       echo "Please enter the partition you would like to access from Linux, or"
  653.       echo -n "type <q> to quit adding new partitions: " 
  654.       read NEXT_PARTITION;
  655.       echo 
  656.       if [ "$NEXT_PARTITION" = "q" ]; then
  657.        break;
  658.       fi
  659.       if [ ! -b $NEXT_PARTITION ]; then
  660.        echo "Invalid device. Try again. Use a format such as:"
  661.        echo "/dev/hda3 or whatever the device name is."
  662.        continue;
  663.       else
  664.        if echo "$DOSLIST" | fgrep $NEXT_PARTITION 1> /dev/null 2> /dev/null ; then
  665.         # Here we should test to be sure the partition has not been used
  666.         if fgrep $NEXT_PARTITION /mnt/fstab 1> /dev/null 2> /dev/null ; then
  667.          # We have already added this partition.
  668.          echo "Sorry, you have already added the partition $NEXT_DEVICE to the"
  669.          echo "list of devices that are mounted at boot time. Either choose a"
  670.          echo "partition you have not yet used, or [q]uit to go on."
  671.          continue;
  672.         fi
  673.         echo "Now this new partition must be mounted somewhere in your directory"
  674.         echo "tree. Please enter the directory under which you would like to put"
  675.         echo "it. for instance, you might want to reply /dosc, /dosd, or something"
  676.         echo "like that."
  677.         echo
  678.         echo -n "Where would you like to mount $NEXT_PARTITION? "
  679.         read NEW_DIR;
  680.     if [ ! "`echo $NEW_DIR | cut -b1`" = "/" ]; then
  681.          NEW_DIR="/$NEW_DIR"
  682.         fi
  683.         echo 
  684.         echo "Creating mount point directory..."
  685.         mkdir -p /mnt$NEW_DIR
  686.         echo "Setting directory permissions..."
  687.         chmod 755 /mnt$NEW_DIR
  688.         if fdisk -l | fgrep "DOS" | fgrep $NEXT_PARTITION 1> /dev/null 2> /dev/null ; then
  689.          echo "Adding DOS partition to /etc/fstab..."
  690.          echo "$NEXT_PARTITION        $NEW_DIR        msdos        defaults   1   1" >> /mnt/fstab 
  691.         else
  692.          echo "Adding HPFS partition (read only) to /etc/fstab..."
  693.          echo "$NEXT_PARTITION        $NEW_DIR        hpfs         ro" >> /mnt/fstab 
  694.         fi
  695.         echo "Done adding partition $NEXT_PARTITION."
  696.        else # device not tagged as DOS
  697.         echo "The partition you have selected is not tagged as a DOS or OS/2"
  698.         echo "partition, please try again."
  699.         continue;
  700.        fi
  701.       fi
  702.      done # mounting DOS/HPFS partitions
  703.     fi
  704.    fi
  705.   fi # ! just adding stuff
  706.  fi # PARTLIST != BOGUS (for T_MT)
  707.  DISTRIBUTION_SOURCE="/var/adm/mount"
  708.  SOURCE_DEVICE="/dev/fd0"
  709.  if [ "$T_PX" = "/" ]; then
  710.   echo -n "Would you like to install more software ([y]es, [n]o)? "
  711.   read INSFT;
  712.  fi
  713.  if [ "$INSFT" = "y" -o ! "$T_PX" = "/" ]; then
  714.   cat << EOF
  715.  
  716. SOURCE MEDIA SELECTION
  717.  
  718. 1 -- Install from a hard drive partition.
  719. 2 -- Install from floppy disks.
  720. 3 -- Install via NFS.
  721. 4 -- Install from a pre-mounted directory.
  722. 5 -- Install from CD-ROM.
  723.  
  724. EOF
  725.   echo -n "From which source will you be installing Linux (1/2/3/4/5)? "
  726.   read SOURCE_MEDIA;
  727.   echo 
  728.   if [ "$SOURCE_MEDIA" = "1" ]; then
  729.    cat << EOF
  730. INSTALLING FROM HARD DISK
  731.  
  732. In order to install directly from the hard disk you must have a partition with
  733. a directory containing the Slackware distribution such that each disk other than
  734. the boot disk is contained in a subdirectory. For example, if the distribution 
  735. is in /stuff/slack, then you have to have directories named /stuff/slack/a1, 
  736. /stuff/slack/a2, and so on each containing the files that would be on that disk.
  737. You may install from DOS, HPFS, or Linux partitions.
  738.  
  739. EOF
  740.    while [ 0 ]; do
  741.     echo "Please enter the partition where the Slackware sources can be"
  742.     echo -n "found, or [p] to see a partition list: "
  743.     read SLACK_DEVICE;
  744.     echo 
  745.     if [ "$SLACK_DEVICE" = "p" -o "$SLACK_DEVICE" = "P" ]; then
  746.      echo "Here are your partitions:"
  747.      echo
  748.      fdisk -l | fgrep "/dev"
  749.      echo
  750.      continue;
  751.     fi
  752.     break;
  753.    done
  754.    cat << EOF
  755. Now we need to know what directory on this partition the Slackware sources
  756. can be found in. In the example above, this would be: /stuff/slack
  757.  
  758. NOTE: You must give the directory name relative to the top of the partition.
  759. So, for example, if you're going to mount this partition under /usr, don't
  760. include the '/usr' at the beginning of the pathname.
  761.  
  762. EOF
  763.    echo -n "What directory are the Slackware sources in? "
  764.    read SLACK_SOURCE_LOCATION;
  765.    echo
  766.    if mount | fgrep $SLACK_DEVICE 1> /dev/null 2> /dev/null ; then
  767.     # This partition is already mounted, so we will have to
  768.     # tweak things funny.
  769.     rm -f /var/adm/mount 2> /dev/null
  770.     rmdir /var/adm/mount 2> /dev/null
  771.     PREFIX="`mount | fgrep $SLACK_DEVICE`"
  772.     PREFIX="`echo "$PREFIX" | cut -b14-`"
  773.     end_of_line="1"
  774.     while [ 0 ]; do
  775.      end_of_line="`expr $end_of_line + 1`"
  776.      if [ "`echo "$PREFIX" | cut -b$end_of_line`" = " " ]; then  # Found it!
  777.       end_of_line="`expr $end_of_line - 1`"
  778.       break;
  779.      fi
  780.     done
  781.     PREFIX="`echo "$PREFIX" | cut -b1-$end_of_line`"
  782.     ln -sf $PREFIX /var/adm/mount 
  783.    else
  784.     while [ 0 ]; do
  785.      cat << EOF
  786. What type of filesystem does your Slackware source partition contain?
  787.  
  788. 1 - FAT (MS-DOS, DR-DOS, OS/2)
  789. 2 - Linux Second Extended Filesystem
  790. 3 - Linux Xiafs
  791. 4 - Linux MINIX
  792. 5 - OS/2 HPFS
  793.  
  794. EOF
  795.      echo -n "Filesystem (1,2,3,4,5)? "
  796.      read FILESYS;
  797.      if [ "$FILESYS" = "1" ]; then 
  798.       SLACK_FS_TYPE="msdos"
  799.       break;
  800.      elif [ "$FILESYS" = "2" ]; then 
  801.       SLACK_FS_TYPE="ext2"
  802.       break;
  803.      elif [ "$FILESYS" = "3" ]; then 
  804.       SLACK_FS_TYPE="xiafs"
  805.       break;
  806.      elif [ "$FILESYS" = "4" ]; then 
  807.       SLACK_FS_TYPE="minix"
  808.       break;
  809.      elif [ "$FILESYS" = "5" ]; then 
  810.       SLACK_FS_TYPE="hpfs"
  811.       break;
  812.      fi
  813.     done
  814.     if [ "$FILESYS" = "5" ]; then
  815.      mount -o ro -t $SLACK_FS_TYPE $SLACK_DEVICE /var/adm/mount
  816.     else
  817.      mount -t $SLACK_FS_TYPE $SLACK_DEVICE /var/adm/mount
  818.     fi
  819.     if [ ! $? = 0 ]; then # there was a mount error
  820.      cat << EOF
  821.  
  822. There was a problem mounting your partition. Would you like to:
  823.  
  824. 1 -- Abort 'setup'.
  825. 2 -- Ignore the error and continue.
  826.  
  827. EOF
  828.      echo -n "Which (1/2)? "
  829.      read DOWHAT;
  830.      if [ $DOWHAT = 1 ]; then
  831.       echo
  832.       echo "Aborting..."
  833.       exit;
  834.      fi
  835.      echo
  836.     fi # mount error
  837.    fi
  838.    echo 
  839.    if [ -d /var/adm/mount/$SLACK_SOURCE_LOCATION ]; then
  840.     DISTRIBUTION_SOURCE=/var/adm/mount/$SLACK_SOURCE_LOCATION
  841.    else
  842.     cat << EOF
  843.  
  844. Sorry, but the directory $SLACK_SOURCE_LOCATION does not exist
  845. on partition $SLACK_DEVICE.
  846.  
  847. Aborting installation...
  848.  
  849. EOF
  850.     exit
  851.    fi
  852.    SOURCE_MOUNTED="-source_mounted"
  853.   elif [ "$SOURCE_MEDIA" = "4" ]; then
  854.    cat << EOF
  855.  
  856. OK, we will install from a directory that is currently mounted. This can be
  857. mounted normally or through NFS. You need to specify the name of the directory
  858. that contains the subdirectories for each source disk.
  859.  
  860. EOF
  861.    echo -n "Which directory would you like to install from? "
  862.    read SOURCEDIR;
  863.    rm -f /var/adm/mount 2> /dev/null
  864.    rmdir /var/adm/mount 2> /dev/null
  865.    ln -sf $SOURCEDIR /var/adm/mount
  866.    if [ -d $SOURCEDIR ]; then
  867.     DISTRIBUTION_SOURCE=/var/adm/mount
  868.    else
  869.     cat << EOF
  870.  
  871. Sorry - the directory you specified is not valid. Please check the directory
  872. and try again.
  873.  
  874. Aborting installation...
  875.  
  876. EOF
  877.     exit 1;
  878.    fi
  879.    SOURCE_MOUNTED="-source_mounted"
  880.   elif [ "$SOURCE_MEDIA" = "2" ]; then
  881.    cat << EOF
  882.  
  883. The base Slackware series (A) can be installed from 1.2M or 1.44M media. 
  884. Most of the other disks will not fit on 1.2M media, but can be downloaded
  885. to your hard drive and installed from there later.
  886.  
  887. 1 - /dev/fd0H1440 (1.44M drive a:)
  888. 2 - /dev/fd1H1440 (1.44M drive b:)
  889. 3 - /dev/fd0h1200 (1.2M drive a:)
  890. 4 - /dev/fd1h1200 (1.2M drive b:)
  891. EOF
  892.    while [ 0 ]; do
  893.     echo
  894.     echo -n "Which drive would you like to install from (1/2/3/4)? "
  895.     read WHICH_DRIVE;
  896.     echo
  897.     if [ "$WHICH_DRIVE" = "1" ]; then
  898.      SOURCE_DEVICE="/dev/fd0H1440"
  899.      break;
  900.     elif [ "$WHICH_DRIVE" = "2" ]; then
  901.      SOURCE_DEVICE="/dev/fd1H1440"
  902.      break;
  903.     elif [ "$WHICH_DRIVE" = "3" ]; then
  904.      SOURCE_DEVICE="/dev/fd0h1200"
  905.      break;
  906.     elif [ "$WHICH_DRIVE" = "4" ]; then
  907.      SOURCE_DEVICE="/dev/fd1h1200"
  908.      break;
  909.     fi
  910.    done 
  911.   elif [ "$SOURCE_MEDIA" = "3" ]; then
  912.    cat << EOF
  913.  
  914. NFS INSTALLATION
  915.  
  916. We need to know a few things before going on...
  917.  
  918. EOF
  919.    if [ "$T_PX" = "/" ]; then
  920.     echo "You're running off the hard drive filesystem. Is this machine"
  921.     echo "currently running on the network you plan to install from? If"
  922.     echo "so, we won't try to reconfigure your ethernet card."
  923.     echo 
  924.     echo -n "Are you up-and-running on the network ([y]es, [n]o)? "
  925.     read UPNRUN;
  926.     echo
  927.    fi
  928.    if [ ! "$UPNRUN" = "y" ]; then
  929.     cat << EOF
  930. You will need to enter the IP address you wish to
  931. assign to this machine. Example: 111.112.113.114
  932.  
  933. EOF
  934.     echo -n "What is your IP address? "
  935.     read LOCAL_IPADDR;
  936.     cat << EOF
  937.  
  938. Now we need to know your netmask.
  939. Typically this will be 255.255.255.0
  940.  
  941. EOF
  942.     echo -n "What is your netmask? "
  943.     read LOCAL_NETMASK;
  944. #    cat << EOF
  945. #
  946. #Typically your broadcast address will be the same as
  947. #your IP address with 255 replacing the final value.
  948. #Example: 111.112.113.255
  949. #
  950. #EOF
  951. #    echo -n "What is your broadcast address? "
  952. #    read LOCAL_BROADCAST;
  953. #    cat << EOF
  954. #
  955. #Now we need your network address.
  956. #
  957. #Your network address will usually be the same as your IP
  958. #address, with the last value replaced by 0.
  959. #For example: 111.112.113.0
  960. #
  961. #EOF
  962. #    echo -n "What is your network address? "
  963. #    read LOCAL_NETWORK;
  964. LOCAL_BROADCAST=`ipmask $LOCAL_NETMASK $LOCAL_IPADDR | cut -f 1 -d ' '`
  965. LOCAL_NETWORK=`ipmask $LOCAL_NETMASK $LOCAL_IPADDR | cut -f 2 -d ' '`
  966.     echo 
  967.     echo -n "Do you have a gateway (y/n)? "
  968.     read HAVE_GATEWAY;
  969.     echo 
  970.     if [ "$HAVE_GATEWAY" = "y" ]; then
  971.      echo 
  972.      echo -n "What is your gateway address? "
  973.      read LOCAL_GATEWAY;  
  974.     fi
  975.    fi # ! UPNRUN
  976.    cat << EOF
  977.  
  978. Good! We're all set on the local end, but now we need to know
  979. where to find the software packages to install. First, we need
  980. the IP address of the machine where the Slackware sources are
  981. stored.
  982.  
  983. EOF
  984.    if [ "$UPNRUN" = "y" ]; then
  985.     cat << EOF
  986. Since you're already running on the network, you should be able to use the
  987. hostname instead of an IP address if you wish.
  988.  
  989. EOF
  990.    fi
  991.    echo -n "What is the IP address of your NFS server? "
  992.    read REMOTE_IPADDR;
  993.    if [ ! "$UPNRUN" = "y" ]; then
  994.     cat << EOF
  995.  
  996. Slackware can configure either an INTERNAL ethernet card, or an
  997. EXTERNAL D-Link adaptor.
  998.  
  999. EOF
  1000.     echo -n "Which type of ethernet device do you have ([i]nternal, [e]xternal)? "
  1001.     read ENET_DEVICE;
  1002.     if [ "$ENET_DEVICE" = "e" -o "$ENET_DEVICE" = "E" ]; then
  1003.      ENET_DEVICE="dl0"
  1004.     else
  1005.      ENET_DEVICE="eth0" 
  1006.     fi
  1007.    fi # ! UPNRUN
  1008.    cat << EOF
  1009.  
  1010. There must be a directory on the server with the Slackware sources for 
  1011. each disk in subdirectories beneath it.
  1012.  
  1013. The installation script needs to know the name of the directory
  1014. on your server that contains the disk subdirectories. For example,
  1015. if your A3 disk is found at /slackware/a3, then you would
  1016. respond: /slackware
  1017.  
  1018. EOF
  1019.    echo -n "What is the Slackware source directory? "
  1020.    read REMOTE_PATH;
  1021.    echo 
  1022.    if [ ! "$UPNRUN" = "y" ]; then
  1023.     echo "Configuring ethernet card..."
  1024.     ifconfig $ENET_DEVICE $LOCAL_IPADDR netmask $LOCAL_NETMASK broadcast $LOCAL_BROADCAST
  1025.     route add -net $LOCAL_NETWORK netmask $LOCAL_NETMASK
  1026.     if [ "$HAVE_GATEWAY" = "y" ]; then
  1027.      echo "Configuring your gateway..."
  1028.      route add default gw $LOCAL_GATEWAY metric 1
  1029.     fi
  1030.    fi
  1031.    echo "Mounting NFS..."
  1032.    mount -t nfs $REMOTE_IPADDR:$REMOTE_PATH /var/adm/mount
  1033.    SOURCE_MOUNTED="-source_mounted"
  1034.    DISTRIBUTION_SOURCE="/var/adm/mount"
  1035.    echo
  1036.   elif [ "$SOURCE_MEDIA" = "5" ]; then
  1037.    cat << EOF
  1038. INSTALLING FROM SLACKWARE CD-ROM
  1039.  
  1040. What type of CD-ROM drive do you have?
  1041.  
  1042. 1 -- SCSI [ /dev/scd0 or /dev/scd1 ]
  1043. 2 -- Sony CDU31A [ /dev/sonycd ]
  1044. 3 -- Sony 535 [ /dev/cdu535 ]
  1045. 4 -- Mitsumi  [ /dev/mcd ]
  1046. 5 -- Sound Blaster Pro (Panasonic) [ /dev/sbpcd ]
  1047. 6 -- Aztech/Orchid/Okano/Wearnes with interface card [ /dev/aztcd ]
  1048. 7 -- Most IDE/ATAPI CD-ROM drives
  1049.  
  1050. EOF
  1051.    while [ 0 ]; do
  1052.     echo -n "CD-ROM type (1/2/3/4/5/6/7)? "
  1053.     read CD_ROM_TYPE;
  1054.     echo
  1055.     if [ "$CD_ROM_TYPE" = "1" ]; then
  1056.      cat << EOF
  1057. Which SCSI CD-ROM are you using? If you're not sure, select scd0.
  1058.  
  1059. 1 -- /dev/scd0
  1060. 2 -- /dev/scd1
  1061.  
  1062. EOF
  1063.      echo -n "Which SCSI CD-ROM (1/2)? "
  1064.      read WHICH_SCSI_CD;
  1065.      echo
  1066.      if [ "$WHICH_SCSI_CD" = "1" ]; then
  1067.       CD_DEVICE="/dev/scd0"
  1068.       break;
  1069.      else
  1070.       CD_DEVICE="/dev/scd1"
  1071.       break;
  1072.      fi
  1073.     elif [ "$CD_ROM_TYPE" = "2" ]; then
  1074.      CD_DEVICE="/dev/sonycd"
  1075.      break;
  1076.     elif [ "$CD_ROM_TYPE" = "3" ]; then
  1077.      CD_DEVICE="/dev/cdu535"
  1078.      break;
  1079.     elif [ "$CD_ROM_TYPE" = "4" ]; then
  1080.      CD_DEVICE="/dev/mcd"
  1081.      break;
  1082.     elif [ "$CD_ROM_TYPE" = "5" ]; then
  1083.      CD_DEVICE="/dev/sbpcd"
  1084.      break;
  1085.     elif [ "$CD_ROM_TYPE" = "6" ]; then
  1086.      CD_DEVICE="/dev/aztcd"
  1087.      break;
  1088.     elif [ "$CD_ROM_TYPE" = "7" ]; then
  1089.      echo "SELECT IDE DEVICE"
  1090.      echo
  1091.      echo "Enter the device name that represents your IDE CD-ROM drive."
  1092.      echo "This will probably be one of these (in the order of most to least"
  1093.      echo "likely):  /dev/hdb /dev/hd1a /dev/hdc /dev/hd1b /dev/hdd /dev/hd1c"
  1094.      echo "          /dev/hd1d /dev/hda"
  1095.      echo
  1096.      echo -n "Enter device name: "
  1097.      read CD_DEVICE;
  1098.      echo
  1099.     fi
  1100.    done
  1101.    # Write out the /etc/fstab line:
  1102.    echo "$CD_DEVICE    /cdrom    iso9660    ro   1   1" > /tmp/SeTcdfstab
  1103.    cat << EOF
  1104. CHOOSE YOUR INSTALLATION METHOD
  1105.  
  1106. With Slackware, you can run most of the system from the CD-ROM
  1107. if you're short of drive space or if you just want to test Linux without
  1108. going through a complete installation.
  1109.  
  1110. slakware   Normal installation to hard drive
  1111. link2cd    Link all files to the CD (upgradable)
  1112. slaktest   Link /usr->/cdrom/usr (test)
  1113.  
  1114. EOF
  1115.    echo -n "Which type of installation do you want (slakware, link2cd, slaktest)? "
  1116.    read SLACK_SOURCE_LOCATION;
  1117.    echo
  1118.    if [ -r /tmp/CDdebug ]; then # we here @ Slackware labs are debuggin' a CD.
  1119.     echo "Source location: $SLACK_SOURCE_LOCATION"
  1120.     echo "Mount command would be:"
  1121.     echo "mount -o ro -t iso9660 $CD_DEVICE /var/adm/mount"
  1122.     echo "This line put in /tmp/SeTcdfstab:"
  1123.     echo "$CD_DEVICE    /cdrom    iso9660    ro"
  1124.     echo
  1125.     echo "Fix it up, Tex, and then type 'exit' to snap back to reality."
  1126.     echo
  1127.     /bin/sh
  1128.    else
  1129.     while [ 0 ]; do
  1130.      mount -o ro -t iso9660 $CD_DEVICE /var/adm/mount
  1131.      if [ ! $? = 0 ]; then
  1132.       cat << EOF
  1133.  
  1134. There was an error attempting to mount the CD-ROM device. Would you like to:
  1135.  
  1136. 1 -- Abort the installation
  1137. 2 -- Attempt to mount the CD-ROM device again
  1138. 3 -- Ignore the error and continue.
  1139.  
  1140. EOF
  1141.       echo -n "Which (1/2/3)? "     
  1142.       read DOWHAT;
  1143.       echo
  1144.       if [ $DOWHAT = 1 ]; then
  1145.        exit;
  1146.       elif [ $DOWHAT = 3 ]; then
  1147.        break;
  1148.       fi
  1149.      else
  1150.       break;
  1151.      fi
  1152.     done
  1153.    fi # debug ?
  1154.    # since we've mounted successfully, let's refresh the link:
  1155.    if [ ! -d $T_PX/dev ]; then
  1156.     mkdir $T_PX/dev
  1157.     chown root.root $T_PX/dev
  1158.     chmod 755 $T_PX/dev
  1159.    fi
  1160.    ( cd $T_PX/dev ; ln -sf $CD_DEVICE cdrom )
  1161.    DISTRIBUTION_SOURCE=/var/adm/mount/$SLACK_SOURCE_LOCATION
  1162.    SOURCE_MOUNTED="-source_mounted"
  1163.   fi # remote sources are now mounted, if they needed to be
  1164.   cat << EOF
  1165.  
  1166. SERIES SELECTION:
  1167. These disk sets (and possibly more) are available:
  1168. EOF
  1169.   print_list;
  1170.   cat << EOF
  1171. You may specify any combination of disk sets at the prompt which follows. For 
  1172. example - to install the base system, the base X window system, and the Tcl 
  1173. toolkit, you would enter: a x tcl  
  1174. EOF
  1175.   echo -n "Which disk sets do you want to install? "
  1176.   read INSTSETS;
  1177.   INSTT="`echo "$INSTSETS" | sed 's/ /#/g'`"
  1178.   INSTT="`echo "$INSTT" | sed 's/,/#/g'`"
  1179.   INSTT="`echo "$INSTT" | sed 's/;/#/g'`"
  1180.   SERIES="-sets #`echo $INSTT`#"
  1181.   cat << EOF
  1182.  
  1183. SOFTWARE INSTALLATION
  1184.  
  1185. Next, software packages are going to be transfered on to your hard drive.
  1186. If this is your first time installing Linux, you should probably use
  1187. PROMPT mode. This will follow a defaults file on the first disk of each
  1188. series you install that will ensure that required packages are installed
  1189. automatically. You will be prompted for the installation of other packages.
  1190.  
  1191. These defaults are user definable -- you may set any package to be added
  1192. or skipped automatically by editing your choices into a file called TAGFILE
  1193. that will be found on the first disk of each series. There will also be a
  1194. copy of the original tagfile called TAGFILE.ORG available in case you want
  1195. to restore the default settings. The tagfile contains all the instructions
  1196. needed to completely automate your installation.
  1197.  
  1198. NOTE: Software may be added to your system after the initial installation.
  1199. A copy of setup will be placed in your /sbin directory. Just type 'setup' to
  1200. add software to your system. Another script, PKGTOOL, may be used to add
  1201. software packages from the current directory, or to cleanly remove packages
  1202. that you want uninstalled.
  1203.  
  1204. If you don't use PROMPT mode, the install program will just go ahead and
  1205. install everything from the disk sets you have selected.
  1206.  
  1207. EOF
  1208.   echo -n "Do you want to use PROMPT mode (y/n)? "
  1209.   read REPLY;
  1210.   echo 
  1211.   if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then
  1212.    IGNORE_TAGFILES=""
  1213.    cat << EOF
  1214. PROMPT mode selected.
  1215.  
  1216. Using prompting defaults found in tagfiles along the way.
  1217.  
  1218. EOF
  1219.    echo "Would you like to use a special tagfile extension?"
  1220.    echo
  1221.    echo "You can specify an extension consisting of a '.' followed by any "
  1222.    echo "combination of 3 characters other than 'tgz'. For instance, I specify"
  1223.    echo "'.pat', and then whenever any tagfiles called 'tagfile.pat' are found"
  1224.    echo "during the installation they are used instead of the default 'tagfile'"
  1225.    echo "files. If the install program does not find tagfiles with the custom"
  1226.    echo "extension, it will use the default tagfiles."
  1227.    echo
  1228.    echo "Enter your custom tagfile extension (including the leading '.'), or just"
  1229.    echo -n "press ENTER to continue without a custom extension. ==>"
  1230.    read CUSTOM_EXT;
  1231.    echo "$CUSTOM_EXT" > /tmp/custom
  1232.   else
  1233.    IGNORE_TAGFILES="-ignore_tagfiles"
  1234.    cat << EOF
  1235. PROMPT mode not selected.
  1236.  
  1237. Installing all the packages on the selected disk sets.
  1238. EOF
  1239.   fi
  1240.   if [ "$DISTRIBUTION_SOURCE" != "" ]; then
  1241.    pkgtool.tty $SOURCE_MOUNTED $IGNORE_TAGFILES -source_device $SOURCE_DEVICE -source_dir $DISTRIBUTION_SOURCE -target_dir $T_PX $SERIES
  1242.   else
  1243.    pkgtool.tty $SOURCE_MOUNTED $IGNORE_TAGFILES -source_device $SOURCE_DEVICE -target_dir $T_PX $SERIES
  1244.   fi
  1245.   if [ ! "$ADDSOFT" = "a" ]; then 
  1246.    if [ -r /tmp/SeTcdfstab ]; then
  1247.     cat /tmp/SeTcdfstab >> $T_PX/fstab
  1248.     mkdir -p $T_PX/cdrom
  1249.    fi
  1250.    echo "none        /proc        proc        defaults   1   1" >> $T_PX/fstab
  1251.    echo " " >> $T_PX/fstab
  1252.   fi
  1253.  fi # adding software from / ?
  1254.  # Make 'ROOTDEV' file so /etc/rc.d/rc.S knows which partition to remount
  1255.  # Note - this isn't used anymore, but I guess it doesn't hurt to keep it.
  1256. # if [ ! -r $T_PX/etc/rc.d/ROOTDEV ]; then
  1257. #  echo "$ROOT_DEVICE" > $T_PX/etc/rc.d/ROOTDEV
  1258. #  chmod 644 $T_PX/etc/rc.d/ROOTDEV
  1259. # fi
  1260.  if [ "$T_PX" = "/" -o "$ADDSOFT" = "a" ]; then
  1261.   cat << EOF
  1262.  
  1263. EXTRA CONFIGURATION
  1264.  
  1265. If you wish, you may now go through the options to reconfigure your
  1266. hardware, make a bootdisk, and install LILO.
  1267.  
  1268. If you've installed a new kernel image, you should go through these
  1269. steps again. Otherwise, it's up to you.
  1270.  
  1271. EOF
  1272.   echo -n "Reconfigure ([y]es, [n]o)? "
  1273.   read RECON;
  1274.   echo
  1275.   if [ "$RECON" = "y" ]; then
  1276.    ADDSOFT="n"
  1277.   else
  1278.    ADDSOFT="a"
  1279.   fi
  1280.  fi
  1281.  if [ ! "$ADDSOFT" = "a" ]; then
  1282.   if [ ! -r $T_PX/etc/fstab ]; then
  1283.    mv $T_PX/fstab $T_PX/etc/fstab
  1284.    chmod 644 $T_PX/etc/fstab
  1285.   fi
  1286.   echo
  1287.   echo "It is recommended that you make a boot disk."
  1288.   echo -n "Would you like to do this ([y]es, [n]o)? "
  1289.   read MAKE_BOOT;
  1290.   if [ "$MAKE_BOOT" = "y" ]; then # we can make a boot disk since the boot drive is free
  1291.    cat << EOF
  1292.  
  1293. BOOT DISK CREATION
  1294.  
  1295. Now put a formatted floppy in your boot drive.
  1296. This will be made into your Linux boot disk. Use this to
  1297. boot Linux until LILO has been configured to boot from
  1298. the hard drive.
  1299.  
  1300. Any data on the target disk will be destroyed.
  1301. EOF
  1302.    echo -n "Insert the disk and press [return], or [s] if you want to skip this step: "
  1303.    read REPLY;
  1304.    echo
  1305.    if [ ! "$REPLY" = "s" ]; then
  1306.     echo "Creating boot disk..."
  1307.     if [ -r $T_PX/vmlinuz ]; then
  1308.      KERNEL='/vmlinuz'
  1309.     else
  1310.      KERNEL='/zImage'
  1311.     fi
  1312.     echo "  - writing kernel to disk: (dd if=$T_PX$KERNEL of=/dev/fd0)"
  1313.     dd if=$T_PX$KERNEL of=/dev/fd0
  1314.     echo "Configuring boot disk..."
  1315.     echo -n "  - boot device: "
  1316.     rdev /dev/fd0 $ROOT_DEVICE
  1317.     echo "(rdev /dev/fd0 $ROOT_DEVICE)"
  1318.     echo -n "  - video mode: "
  1319.     rdev -v /dev/fd0 -1
  1320.     echo "(rdev -v /dev/fd0 -1)"
  1321.     echo -n "  - mount root read-only: "
  1322.     echo "(rdev -R /dev/fd0 1)"
  1323.     rdev -R /dev/fd0 1
  1324.     sync
  1325.     echo "Boot disk created."
  1326.    else
  1327.     echo "Boot disk creation skipped."
  1328.     echo "You better install LILO, or you'll have a hard time booting."
  1329.    fi
  1330.    echo 
  1331.   fi
  1332.   echo
  1333.   echo "MODEM/MOUSE CONFIGURATION"
  1334.   while [ 0 ]; do
  1335.    cat << EOF
  1336.  
  1337. Modem Setup:
  1338.  
  1339. A link in /dev will be created from your callout device (cua0, cua1,
  1340. cua2, cua3) to /dev/modem. You can change this link later if you put
  1341. your modem on a different port.
  1342.  
  1343. EOF
  1344.    echo -n "Would you like to set up your modem ([y]es, [n]o)? "
  1345.    read REPLY;
  1346.    if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then
  1347.     cat << EOF
  1348.  
  1349. These are the standard serial I/O devices:
  1350.  
  1351. 0 -- /dev/ttyS0 (or com1: under DOS)
  1352. 1 -- /dev/ttyS1 (or com2: under DOS)
  1353. 2 -- /dev/ttyS2 (or com3: under DOS)
  1354. 3 -- /dev/ttyS3 (or com4: under DOS)
  1355.  
  1356. EOF
  1357.     echo -n "Which device is your modem attached to (0, 1, 2, 3)? "
  1358.     read MODEM_DEVICE;
  1359.     if [ "$MODEM_DEVICE" = "0" ]; then
  1360.      (cd $T_PX/dev; ln -sf cua0 modem)
  1361.      break;
  1362.     elif [ "$MODEM_DEVICE" = "1" ]; then
  1363.      (cd $T_PX/dev; ln -sf cua1 modem)
  1364.      break;
  1365.     elif [ "$MODEM_DEVICE" = "2" ]; then
  1366.      (cd $T_PX/dev; ln -sf cua2 modem)
  1367.      break;
  1368.     elif [ "$MODEM_DEVICE" = "3" ]; then
  1369.      (cd $T_PX/dev; ln -sf cua3 modem)
  1370.      break;
  1371.     else
  1372.      echo "Not a valid device. Please hit [enter] to try again, or [q]"
  1373.      echo -n "to skip modem configuration."
  1374.      read REPLY;
  1375.      if [ "$REPLY" = "q" ]; then
  1376.       break;
  1377.      fi
  1378.      echo
  1379.     fi
  1380.    else
  1381.     break;
  1382.    fi
  1383.   done
  1384.   while [ 0 ]; do
  1385.    cat << EOF
  1386.  
  1387. Mouse Setup:
  1388.  
  1389. A link will be created in /dev from your mouse device to /dev/mouse.
  1390. You can change this link later if you switch to a different type of
  1391. mouse.
  1392.  
  1393. EOF
  1394.    MTYPE="none"
  1395.    echo -n "Would you like to set up your mouse ([y]es, [n]o)? "
  1396.    read REPLY;
  1397.    if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then
  1398.     cat << EOF
  1399.  
  1400. These types are supported:
  1401.  
  1402. 1 -- Microsoft compatible serial mouse.
  1403. 2 -- QuickPort or PS/2 style mouse. (Auxiliary port).
  1404. 3 -- Logitech Bus Mouse
  1405. 4 -- ATI XL Bus Mouse
  1406. 5 -- Microsoft Bus Mouse
  1407. 6 -- Mouse Systems serial mouse
  1408.  
  1409. EOF
  1410.     echo -n "Which type of mouse do you have (1, 2, 3, 4, 5, 6) ? "
  1411.     read MOUSE_TYPE;
  1412.     if [ "$MOUSE_TYPE" = "1" -o "$MOUSE_TYPE" = "6" ]; then
  1413.      cat << EOF
  1414.  
  1415. These are the standard serial I/O devices:
  1416.  
  1417. 0 -- /dev/ttyS0 (or com1: under DOS)
  1418. 1 -- /dev/ttyS1 (or com2: under DOS)
  1419. 2 -- /dev/ttyS2 (or com3: under DOS)
  1420. 3 -- /dev/ttyS3 (or com4: under DOS)
  1421.  
  1422. EOF
  1423.      echo -n "Which device is your mouse attached to (0, 1, 2, 3)? "
  1424.      read MOUSE_DEVICE;
  1425.      if [ "$MOUSE_TYPE" = "1" ]; then
  1426.       MTYPE="ms"
  1427.      else
  1428.       MTYPE="msc"
  1429.      fi
  1430.      if [ "$MOUSE_DEVICE" = "0" ]; then
  1431.       (cd $T_PX/dev; ln -sf cua0 mouse)
  1432.       break;
  1433.      elif [ "$MOUSE_DEVICE" = "1" ]; then
  1434.       (cd $T_PX/dev; ln -sf cua1 mouse)
  1435.       break;
  1436.      elif [ "$MOUSE_DEVICE" = "2" ]; then
  1437.       (cd $T_PX/dev; ln -sf cua2 mouse)
  1438.       break;
  1439.      elif [ "$MOUSE_DEVICE" = "3" ]; then
  1440.       (cd $T_PX/dev; ln -sf cua3 mouse)
  1441.       break;
  1442.      fi
  1443.     elif [ "$MOUSE_TYPE" = "2" ]; then
  1444.      (cd $T_PX/dev; ln -sf psaux mouse)
  1445.      MTYPE="ps2"
  1446.      break;
  1447.     elif [ "$MOUSE_TYPE" = "3" ]; then
  1448.      (cd $T_PX/dev; ln -sf logibm mouse)
  1449.      MTYPE="logi"
  1450.      break;
  1451.     elif [ "$MOUSE_TYPE" = "4" ]; then
  1452.      (cd $T_PX/dev; ln -sf atibm mouse)
  1453.      MTYPE="bm"
  1454.      break;
  1455.     elif [ "$MOUSE_TYPE" = "5" ]; then
  1456.      (cd $T_PX/dev; ln -sf inportbm mouse)
  1457.      MTYPE="bm"
  1458.      break;
  1459.     else
  1460.      echo "Incorrect mouse selection. Please try again."
  1461.     fi
  1462.     echo
  1463.    else
  1464.     break;
  1465.    fi
  1466.   done
  1467.   export MTYPE
  1468.   ( cd $T_PX ; chmod 755 ./ )
  1469.   ( cd $T_PX ; chmod 755 ./var )
  1470.   if [ ! -d $T_PX/proc ]; then
  1471.    mkdir $T_PX/proc
  1472.    chown root.root $T_PX/proc
  1473.   fi
  1474. #  if [ ! -r $T_PX/sbin/setup ]; then
  1475. #   cp /bin/setup.tty $T_PX/sbin
  1476. #   cp /bin/pkgtool.tty $T_PX/sbin
  1477. #   ( cd $T_PX/sbin ; ln -sf setup.tty setup ; ln -sf pkgtool.tty pkgtool )
  1478. #  fi
  1479.   if [ ! -d $T_PX/var/spool/uucp ]; then
  1480.    mkdir -p $T_PX/var/spool/uucp
  1481.   fi
  1482.   if [ ! -d $T_PX/var/spool/mail ]; then
  1483.    mkdir -p $T_PX/var/spool/mail
  1484.    chmod 755 $T_PX/var/spool
  1485.    chown root.mail $T_PX/var/spool/mail
  1486.    chmod 775 $T_PX/var/spool/mail
  1487.   fi 
  1488.  
  1489.   # Post installation and setup scripts added by packages.
  1490.   if [ -d $T_PX/var/adm/setup ]; then
  1491.    if [ "$T_PX" = "/" ]; then
  1492.     ROOT_DEVICE="`mount | fgrep "on / " | cut -b-10`"
  1493.    fi
  1494.    for INSTALL_SCRIPTS in $T_PX/var/adm/setup/setup.*
  1495.    do
  1496.     SCRIPT=`basename $INSTALL_SCRIPTS`
  1497.     # Here, we call each script in /var/adm/setup. Two arguments are provided:
  1498.     # 1 -- the target prefix (normally /, but /mnt from the bootdisk)
  1499.     # 2 -- the name of the root device.
  1500.     ( cd $T_PX ; sh var/adm/setup/$SCRIPT $T_PX $ROOT_DEVICE )
  1501.     if echo $SCRIPT | fgrep onlyonce 1> /dev/null 2> /dev/null; then # only run after first install
  1502.      if [ ! -d $T_PX/var/adm/setup/install ]; then
  1503.       mkdir $T_PX/var/adm/setup/install
  1504.      fi
  1505.      mv $INSTALL_SCRIPTS $T_PX/var/adm/setup/install
  1506.     fi
  1507.    done
  1508.   fi
  1509.  
  1510.  fi # ! just adding stuff
  1511.  rm -f $T_PX/tagfile
  1512.  if [ "$REMAPPING_DONE" = "true" ]; then
  1513.   if [ -r $T_PX/usr/lib/kbd/keytables/$SHORTNAME ]; then
  1514.    if fgrep $SHORTNAME $T_PX/etc/rc.d/rc.local 1> /dev/null 2> /dev/null ; then
  1515.     echo > /dev/null
  1516.    else
  1517.     echo "echo 'Loading keyboard map \"$SHORTNAME\"...'" >> $T_PX/etc/rc.d/rc.local
  1518.     echo "/usr/bin/loadkeys /usr/lib/kbd/keytables/$SHORTNAME" >> $T_PX/etc/rc.d/rc.local
  1519.    fi
  1520.   else
  1521.    cat << EOF
  1522. You loaded a custom keyboard map ($SHORTNAME), but didn't
  1523. install the keytable package. Rather than tell you you're
  1524. just out of luck, I suppose I'll install a minimal keymap
  1525. system for you. :^)
  1526. EOF
  1527.    mkdir -p $T_PX/usr/lib/kbd/keytables
  1528.    chmod 755 $T_PX/usr/lib/kbd/keytables
  1529.    cp /tmp/keymap/* $T_PX/usr/lib/kbd/keytables
  1530.    cp /bin/loadkeys /mnt/usr/bin
  1531.    echo "echo 'Loading keyboard map \"$SHORTNAME\"...'" >> $T_PX/etc/rc.d/rc.local
  1532.    echo "/usr/bin/loadkeys /usr/lib/kbd/keytables/$SHORTNAME" >> $T_PX/etc/rc.d/rc.local
  1533.   fi
  1534.  fi 
  1535.  sync
  1536.  if [ "$T_PX" = "/" ]; then
  1537.   echo "Installation of additional software is now complete."
  1538.  else
  1539.   echo "Linux installation is complete. "
  1540.  fi
  1541.  if [ "$T_PX" = "/mnt" ]; then
  1542.   echo 
  1543.   echo "You may now reboot your computer by pressing control+alt+delete."
  1544.   echo 
  1545.  fi
  1546.  if [ "$T_PX" = "/mnt" ]; then
  1547.   echo "If you installed LILO, remove the boot disk from your computer "
  1548.   echo "before rebooting. "
  1549.  fi
  1550.  if [ "y" = "$T_MT" ]; then
  1551.   if [ ! "$ADDSOFT" = "a" ]; then
  1552.    echo
  1553.    echo "Don't forget to create your /etc/fstab if you don't have one!"
  1554.    echo "(vi $T_PX/etc/fstab)"
  1555.    echo
  1556.   fi
  1557.  fi
  1558.  echo 
  1559. else
  1560.  cat << EOF
  1561. You have not yet designated any disk partitions as Linux native.
  1562.  
  1563. If you are planning to use OS/2 Boot Manager, make your Linux
  1564. partitions with OS/2 fdisk, reboot this disk, and then use Linux
  1565. fdisk to tag the partitions as type 83 (Linux native).
  1566.  
  1567. Linux fdisk will select a default device when called without
  1568. arguments, and from there it is menu driven. If you don't want
  1569. to partition the default device, then call fdisk with the device
  1570. you want as the argument, like this:
  1571.  
  1572. fdisk /dev/hdb
  1573.  
  1574. If you are not using the OS/2 Boot Manager, then you may use Linux
  1575. fdisk to create partitions for Linux. Other than the exception for
  1576. the OS/2 Boot Manager, you are usually better off creating partitions
  1577. for a given OS using a partitioning tool native to that OS. In other
  1578. words, you probably shouldn't try to make your DOS or other non-Linux
  1579. partitions with the Linux fdisk.
  1580.  
  1581. Please make one or more partitions for Linux, and try setup again.
  1582. If you haven't already, you might want to also make a swap partition
  1583. while you're in fdisk. 8 megabytes would be a good starting size for
  1584. a single user system. Linux swap is tagged as type 82.
  1585. EOF
  1586.  exit;
  1587. fi
  1588. if mount | fgrep /var/adm/mount 1> /dev/null 2> /dev/null ; then
  1589.  umount /var/adm/mount 
  1590. fi
  1591. rm -f /var/adm/mount 2> /dev/null
  1592. rmdir /var/adm/mount 2> /dev/null
  1593. mkdir /var/adm/mount 2> /dev/null
  1594. chmod 755 /var/adm/mount
  1595. if [ -r /tagfile ]; then
  1596.  rm -f /tagfile
  1597. fi
  1598. chmod 755 $T_PX
  1599. chmod 1777 $T_PX/tmp
  1600. rm -f /tmp/custom
  1601. # end slackware setup script
  1602.