home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / bsd / 11771 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  4.3 KB

  1. Path: sparky!uunet!munnari.oz.au!goanna!escargot!minyos.xx.rmit.OZ.AU!s902113
  2. From: s902113@minyos.xx.rmit.OZ.AU (Luke Mewburn)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: [386BSD] Install w/ only 41 Meg?
  5. Keywords: 386bsd, solution
  6. Message-ID: <1jth23INNf68@escargot.xx.rmit.OZ.AU>
  7. Date: 24 Jan 93 07:38:43 GMT
  8. References: <1631@hcshh.hcs.de> <1993Jan22.214017.7007@Princeton.EDU>
  9. Organization: RMIT Computer Centre
  10. Lines: 128
  11. NNTP-Posting-Host: minyos.xx.rmit.oz.au
  12.  
  13. bkc@ernie.Princeton.EDU (Bruce Caruthers) writes:
  14.  
  15.  
  16. >    Hi.  Now that I've finally figured out how to get my system to
  17. >boot from the hard drive for 386bsd, and I have the binary distribution
  18. >on disk (I take it that the mread utility doesn't handle 720K disks in
  19. >a 1.44 drive too well?  I had to transfer them all to 1.2 disks, since
  20. >I only had four unused 1.44's), I am trying to extract it.
  21. >    I thought I had read somewhere, either on the net or in the
  22. >docs I printed out (can't find it now), that I could install on a 40 Meg
  23. >partition.  After having twenty minutes of errors from extract about
  24. >"device full" followed by a reboot after a message which flashed past
  25. >my screen in a blur before the reboot (as with just about every error
  26. >message I have noticed), I figure it just ain't so.
  27. >    Is there any way to do partial extracts at a time?  (Since it
  28. >checks the files first, it won't let me do just some at a time)  Is
  29. >there perhaps some way to manually extract the stuff from the
  30. >bin01.[0-5][0-9] files?  (The docs say it is a form of cpio compressed
  31. >format, so can I use cpio to do so, one or a few files at a time?)
  32.  
  33. >    Slowly getting frustrated (and $aving up for the larger
  34. >additional drive),
  35. >                -bkc
  36.  
  37.  
  38. Here is a script I wrote to extract the src dist, but should be able
  39. to extract the bindist AS LONG AS cpio/sh/expr/zcat, etc exist on the
  40. boot floppy, AND you are extracting from the other floppy drive (cause
  41. the script needs to run commands from somewhere :)
  42.  
  43. You'll have to change some of the parameters in it.
  44.  
  45. Try it out, and mail back any comments.
  46.  
  47. NOTE: the following commands need to be on the boot volume:
  48.     sh, cd, rm, mcopy, cat, zcat, cpio, tee, expr
  49.  
  50.  
  51. --- cut here --- file: unix/386bsd/dl/zextr
  52. #!/bin/sh
  53. #
  54. # zextr    - extracts files from 386bsd distributions without need for
  55. #      temporary storage space
  56. #
  57. # Copyright (C) 1993, Luke Mewburn (zak@rmit.edu.au)
  58. #
  59. # You are free to distribute/modify under the conditions of the
  60. # GNU license version 2 (or later).
  61. #
  62. # Version: 1.2 (930124)
  63. #
  64. # Needs the following commands:
  65. #    sh, cd, rm, mcopy, cat, zcat, cpio, tee, expr
  66. #
  67. # To use:
  68. #    - change the settings as described below
  69. #    - copy all the files in ascending order to floppies
  70. #    - insert first disk, and run script.
  71. #    - when both the floppy and HD lights are out (i.e, the
  72. #      machine appears to do nothing for a few seconds), swap
  73. #      disks, and press return.
  74. #
  75. # -----------
  76. #
  77. # Set:
  78. #  NUMPERDISK    # of files per disk        (eg. 5 / 1.2MB, 6 / 1.44MB )
  79. #  PREFIX    prefix of the distrubtion    (eg, src01)
  80. #  NUMFILES    # of files in distrubtion    (eg, 57)
  81. #  CPIOCMD    cmd to use with cpio (with -iv)    (eg, t to list, adm to extract)
  82. #  DRIVE    drive to mcopy from        (eg, a)
  83. #  DESTDIR    where to extract to        (eg, /mnt for bin, / for src)
  84. #  LOGFILE    where output is to be tee-ed to    (eg, /var/tmp/extractlog)
  85. #
  86. # -----------
  87. #
  88.  
  89. NUMPERDISK=6
  90. PREFIX=bin01
  91. NUMFILES=57
  92. #CPIOCMD=adm
  93. CPIOCMD=t
  94. DRIVE=a
  95. DESTDIR=/mnt
  96. LOGFILE=${DESTDIR}/${PREFIX}_zextr_log
  97.  
  98.  
  99. #
  100. # the core code follows
  101. #
  102.  
  103. NPDminus1=`expr $NUMPERDISK - 1`
  104. cd $DESTDIR
  105.  
  106. num=0
  107. while [ $num -ne $NUMFILES ];
  108. do
  109.     if [ $num -lt 10 ]; then
  110.     i=${PREFIX}.0$num
  111.     else
  112.     i=${PREFIX}.$num
  113.     fi
  114.     rm -f $i
  115.     mcopy -n ${DRIVE}:$i . >/dev/null
  116.     if [ $? -ne 0 ]; then
  117.     echo 1>&2 Mcopy died on file $i, exitting.
  118.     exit 10;
  119.     fi
  120.     cat $i
  121.     if [ `expr $num % $NUMPERDISK` -eq $NPDminus1 ]; then
  122.     read next > /dev/null
  123.     fi
  124.     rm -f $i
  125.     num=`expr $num + 1`
  126. done | zcat | cpio -iv$CPIOCMD #| tee -a $LOGFILE
  127. --- cut here ---
  128.  
  129.  
  130. >-- 
  131. >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  132. >bkc@Princeton.EDU   Bruce Caruthers '93   Princeton University   bkc@Sgi.COM
  133. >    "It is not death that a man should fear, but he should fear
  134. >     never beginning to live."        -- Marcus Aurelius
  135.  
  136.  
  137. --
  138.                Luke Mewburn [Zak]     zak@rmit.edu.au
  139.    "Nobody dies on the Discworld, they just become dimensionally
  140.     disadvantaged."         Terry Pratchett in alt.fan.pratchett
  141.