home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / sun / admin / 6292 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  2.1 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!news2me.ebay.sun.com!seven-up.East.Sun.COM!sungy!stasys!alanya!lupe
  2. From: lupe@ukw.uucp (Lupe Christoph)
  3. Newsgroups: comp.sys.sun.admin
  4. Subject: Re: Help: How to Create extract_unbundled tape
  5. Message-ID: <1992Sep12.132908.1281@ukw.uucp>
  6. Date: 12 Sep 92 13:29:08 GMT
  7. References: <6060002@hprnd.rose.hp.com>
  8. Sender: uucp@stasys.sta.sub.org
  9. Organization: cic
  10. Lines: 86
  11.  
  12. thg@hprnd.rose.hp.com (Terry Gong) writes:
  13.  
  14. >How does one create an extract_unbundled tape?  For example, I
  15. >have a copyright file that I want to copy to the tape.  Everyting
  16. >time I used the command:
  17.  
  18. >   dd if=copyright of=/dev/rst0
  19.  
  20. >or
  21. >   dd if=copyright of=/dev/nrst0
  22.  
  23. >I get the error message:
  24.  
  25. >   dd: write: Invalid argument
  26.  
  27. >What am I doing wrong?  Does anyone have a step by step procedure to
  28. >create the tape?
  29.  
  30. 1) You have to write QIC tapes in multiples of their block size;
  31.    they are fixed block devices. In this case the block length is 512 bytes.
  32.  
  33.    The correct incantation is:
  34.  
  35.     dd if=copyright of=/dev/nrst0 bs=512 conv=sync
  36.  
  37.    The conv=sync will block up the last block to a full 512 bytes.
  38.  
  39. 2) Here is the script I'm using: (Minus the details)
  40.  
  41.  
  42. #!/bin/csh -fb
  43.  
  44. set DEVICE=TAPE
  45.  
  46. while (/$1/ =~ /-*/)
  47.     switch ($1)
  48.     case -t:
  49.         set DEVICE=TAPE
  50.         breaksw
  51.     case -f:
  52.         set DEVICE=FLOPPY
  53.         breaksw
  54.     case --:
  55.         shift
  56.         break
  57.     case \?:
  58.         goto error
  59.     endsw
  60.     shift
  61. end
  62.  
  63. if ($#argv < 1)) goto error
  64. endif
  65.  
  66. switch ($DEVICE)
  67. case FLOPPY:
  68.     echo Floppy distribution not yet implemented
  69.     exit
  70.     fdformat
  71.     tar cvbf 126 /dev/rfd0c sys usr
  72.     eject
  73.     breaksw
  74. case TAPE:
  75.     if (! { mt -f /dev/nrst0 rew } ) exit 1
  76.     dd if=Label of=/dev/nrst0
  77.     foreach d (File1 File2 File3 File4 File5)
  78.         (cd $d; tar cvbfh 126 /dev/nrst0 *)
  79.     end
  80.     mt -f /dev/nrst0 rew
  81.     breaksw
  82. default:
  83.     echo Internal Error: Unknown Medium
  84.     exit 1
  85. endsw
  86.  
  87. exit 0
  88.  
  89. error:
  90.  
  91. echo "Aufruf: $0 [-f|-t] hostid ..."
  92. exit 1
  93. -- 
  94. | ...!unido!ukw!lupe  (German EUNet, "bang")     |  Disclaimer:            |
  95. | lupe@ukw.UUCP       (German EUNet, domain)     |  As I am self-employed, |
  96. | suninfo!alanya!lupe (Sun Germany)              |  this *is* the opinion  |
  97. | Res non sunt complicanda praeter necessitatem. |  of my employer.        |
  98.