home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / linux / 9488 < prev    next >
Encoding:
Text File  |  1992-08-31  |  6.6 KB  |  265 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!destroyer!sol.ctr.columbia.edu!news.unomaha.edu!cwis!trussell
  3. From: trussell@cwis.unomaha.edu (Tim Russell)
  4. Subject: Re: SLS Dist: What type of fs is used for the system
  5. Message-ID: <trussell.715274636@cwis>
  6. Sender: news@news.unomaha.edu (UNO Network News Server)
  7. Organization: University of Nebraska at Omaha
  8. References: <1992Aug30.230918.11363@msuinfo.cl.msu.edu>
  9. Distribution: usa
  10. Date: Mon, 31 Aug 1992 15:23:56 GMT
  11. Lines: 252
  12.  
  13. sundaram@cps.msu.edu (Divya Sundaram) writes:
  14.  
  15. >I installed the SLS distrib (quite painless once I READ the docs - good job)
  16. >and It gave me "magic match failed" message whenever I stuck a new floppy in.
  17. >OK, now in an earlier post, someone remarked that SLS tries to do 3 types
  18. >of fs nad when it fails, it is suppoed to give this magic match failed 
  19. >message. My question is, which fs are we using for Linux 0.96 (SLS)?
  20.  
  21.     Disk 2, which is asked for again during a base install, is a minix fs,
  22. the rest of the floppies are msdos.  Here's a sysinstall that I modified to
  23. work properly even though the kernel obviously isn't doing what Peter said
  24. it's supposed to.  (And neither will future kernels you compile).
  25.  
  26. #    This is a shell archive.
  27. #    Remove everything above and including the cut line.
  28. #    Then run the rest of the file through sh.
  29. #----cut here-----cut here-----cut here-----cut here----#
  30. #!/bin/sh
  31. # shar:    Shell Archiver
  32. #    Run the following text with /bin/sh to create:
  33. #    sysinstall
  34. # This archive created: Mon Aug 31 10:26:05 1992
  35. cat << \SHAR_EOF > sysinstall
  36. #
  37. # Installation of packages from floppy
  38. # requires:  tar, sed, basename, compress/zcat, mount and umount.
  39. # copywrite Softlanding Software, 1992:  Distribute and use freely.
  40.  
  41. INSTROOT=/
  42. INSTDEV=/dev/fd0
  43.  
  44. while [ 0 ]; do
  45.     if [ $# -gt 1 -a "$1" = "-instdev" ]; then
  46.         INSTDEV=$2;
  47.         shift 2;
  48.         continue;
  49.     elif [ $# -gt 1 -a "$1" = "-instroot" ]; then
  50.         INSTROOT=$2;
  51.         shift 2;
  52.         continue;
  53.     else
  54.         break;
  55.     fi
  56. done;
  57.  
  58. INSTDIR=$INSTROOT/install/installed
  59. #INSTTEST=/usr2/dist
  60. MNTDIR=/user
  61.  
  62. function MountDisk() {
  63.     declare -i MountStat
  64.     if [ "$INSTTEST" != "" ]; then
  65.         test -d $INSTTEST;
  66.         MountStat=$?
  67.         return $MountStat;
  68.     fi
  69.     if [ "$1" = "2" ]; then
  70.         FSTYPE="minix"
  71.     else
  72.         FSTYPE="msdos"
  73.     fi
  74.     for j in 1 2 3; do
  75.         echo -n "Insert disk $1 into the floppy drive then hit enter, or q to quit"
  76.         read ans;
  77.         if [ "$ans" = "q" ]; then
  78.             exit 1;
  79.         fi;
  80.         mount -t $FSTYPE $INSTDEV $MNTDIR  >& /dev/null
  81.         MountStat=$?
  82.         if [ $MountStat = 0 ]; then
  83.             return 0;
  84.         fi
  85.     done
  86.     exit 1
  87. }
  88.  
  89. function UnmountDisk() {
  90.     if [ "$INSTTEST" = "" ]; then
  91.         umount $INSTDEV > /dev/null
  92.     fi;
  93. }
  94.  
  95. function InstallPkg() {
  96.     if [ -f $1 ]; then
  97.         echo -n "installing `basename $1 .taz`..."
  98.         (cd $INSTROOT; tar -xzvf - | sed "/\/$/d" ) < $1 > $INSTDIR/`basename $1 .taz`
  99.         if [ -f /install/doinst.sh ]; then
  100.                 sh /install/doinst.sh ;
  101.             rm -rf /install/doinst.sh ;
  102.         fi
  103.         echo "done"
  104.     else
  105.         echo "$1 not found"
  106.     fi;
  107. }
  108.  
  109. function InstallDisk() {
  110.     declare -i Status;
  111.     for k in 1 2 3; do
  112.         MountDisk $1
  113.         Status=$?
  114.         if [ $Status != 0 ]; then
  115.             return 1;
  116.         fi
  117.         if [ "$INSTEST" = "" ]; then
  118.             SRCDIR=$MNTDIR
  119.         else
  120.             SRCDIR=$INSTEST/$1
  121.         fi
  122.         if [ -e $SRCDIR/disk$1 -o $1 = Disk ]; then
  123.             for FileZ in $SRCDIR/*.taz; do
  124.                 if [ $1 = Disk ]; then
  125.                     echo -n "Install $FileZ (y/n/q)?"
  126.                     read ans;
  127.                     if [ "$ans" = "Y" -o  "$ans" = "y" ]; then
  128.                         InstallPkg $FileZ;
  129.                     elif [ "$ans" = "q" -o  "$ans" = "Q" ]; then
  130.                         exit 0;
  131.                     fi
  132.                 else
  133.                         InstallPkg $FileZ;
  134.                 fi
  135.             done
  136.             UnmountDisk
  137.             return 0
  138.         else
  139.             UnmountDisk
  140.             echo -n "error: you may have inserted the wrong disk, try again (y/n)?"
  141.             read ans;
  142.             if [ "$ans" = "N" -o  "$ans" = "n" ]; then
  143.                 return 1
  144.             fi
  145.         fi;
  146.     done
  147. }
  148.  
  149. function RemovePkg() {
  150.     if [ -f $INSTDIR/$1 ]; then
  151.         (cd $INSTROOT; xargs /bin/rm -f ) < $INSTDIR/$1 
  152.         rm $INSTDIR/$1
  153.     else
  154.         echo "error: unknown package $1"
  155.     fi
  156. }
  157.  
  158. function PrintUsage() {
  159.     echo "usage: sysinstall -all                * install everything: base + X11"
  160.     echo "       sysinstall -base               * install full base: no X11"
  161.     echo "       sysinstall -mini               * install a minimal base: ~3 Meg"
  162.     echo "       sysinstall -rest               * install the rest of the base"
  163.     echo "       sysinstall -X11                * install just X11"
  164.     echo "       sysinstall -install pkg.taz    * install a specific pkg file"
  165.     echo "       sysinstall -remove pkg         * uninstall a pkg"
  166.     echo "       sysinstall -extract pkg        * collect pkg files into new pkg.taz"
  167.     echo "       sysinstall -disk               * install all pkgs on a disk"
  168.     echo "       sysinstall -disk DISKNUM       * install pkgs on disk DISKNUM"
  169.     echo "       sysinstall -mount              * mount floppy"
  170.     echo "       sysinstall -unmount            * unmount floppy"
  171.     echo "       sysinstall -instdev INSTDEV    * device to install from"
  172.     echo "       sysinstall -instroot INSTROOT  * directory to use as root"
  173. }
  174.  
  175. function InstallX11 {
  176.     for i in 11 12 13 14 15; do
  177.         InstallDisk $i;
  178.     done
  179. }
  180.  
  181. function InstallRest() {
  182.     for i in 5 6 7 8 9 10 2; do
  183.         InstallDisk $i;
  184.     done
  185. }
  186.  
  187. function InstallMini() {
  188.     for i in 3 4;  do
  189.         InstallDisk $i;
  190.     done
  191. }
  192.  
  193. function InstallBase() {
  194.     InstallMini;
  195.     InstallRest;
  196. }
  197.  
  198. function InstallAll() {
  199.     InstallBase;
  200.     InstallX11;
  201. }
  202.  
  203. function ShowInstalled() {
  204.     for i in $INSTDIR/*; do
  205.         echo "`basename $i`";
  206.     done;
  207. }
  208.  
  209. #if [ "/" != $INSTROOT ]; then
  210. #    mount $INSTROOT &> /dev/null
  211. #    MNTSTAT=$?;
  212. #    if [ $MNTSTAT != 1 ]; then
  213. #        echo "error: $INSTROOT must have a partition mounted on it.  First use:"
  214. #        echo "       mount /dev/?d?? $INSTROOT"
  215. #        echo "       For example: mount /dev/hda2 $INSTROOT"
  216. #        exit 1;
  217. #    fi
  218. #fi
  219.  
  220. if [ $# = 0 ]; then
  221.     PrintUsage;
  222. elif [ $1 = "-view" ]; then 
  223.     ShowInstalled;
  224. elif [ $1 = "-all" ]; then 
  225.     InstallAll;
  226. elif [ $1 = "-base" ]; then 
  227.     InstallBase;
  228. elif [ $1 = "-mini" ]; then 
  229.     InstallMini;
  230. elif [ $1 = "-rest" ]; then 
  231.     InstallRest;
  232. elif [ $1 = "-X11" ]; then 
  233.     InstallX11;
  234. elif [ $1 = "-remove" -a $# = 2 ]; then
  235.     RemovePkg $2
  236. elif [ $1 = "-install" -a $# = 2 ]; then
  237.     InstallPkg $2
  238. elif [ $1 = "-extract" -a $# = 2 ]; then
  239.     if [ -f $INSTDIR/$2 ]; then
  240.         (cd $INSTROOT; tar -czf - -T $INSTDIR/$2 ) > $2.taz
  241.     else
  242.         echo "$2 not found";
  243.     fi;
  244. elif [ $1 = "-disk" ]; then
  245.     if [ $# = 1 ] ; then
  246.         InstallDisk Disk
  247.     else
  248.         InstallDisk $2
  249.     fi
  250. elif [ $1 = "-mount ]; then
  251.     MountDisk;
  252. elif [ $1 = "-unmount ]; then
  253.     UnmountDisk;
  254. else
  255.     PrintUsage;
  256. fi;
  257. SHAR_EOF
  258. #    End of shell archive
  259. exit 0
  260. --
  261.     Tim Russell                 Omaha, NE              trussell@unomaha.edu
  262. One of the richest men in the world made his billions selling a toy "operating
  263. system" that is more accurately described as a glorified bootstrap loader.
  264.                                                   -- Phil Karn
  265.