Sun-Spots-Request@RICE.EDU (William LeFebvre) (02/26/88)
SUN-SPOTS DIGEST Thursday, 25 February 1988 Volume 6 : Issue 21 Today's Topics: Re: Setting up diskless clients without using Setup (2) Re: Mapping bad blocks to file names Re: Overlapping partitions Re: Two monitors on one Sun Re: lpd printing to a TCP terminal server attached printer (2) Re: calentool Re: vt100 emulator a few bugs found in SunOS 4-3.2 uucp throughput SCSI bus 3/50 shoebox DC power ratings? Disk Setup on Server? Where to put swap partition for clients running CLisp? Send contributions to: sun-spots@rice.edu Send subscription add/delete requests to: sun-spots-request@rice.edu Bitnet readers can subscribe directly with the CMS command: TELL LISTSERV AT RICE SUBSCRIBE SUNSPOTS My Full Name Recent backissues are stored on "titan.rice.edu". For volume X, issue Y, "get sun-spots/vXnY". They are also accessible through the archive server: mail the word "help" to "archive-server@rice.edu". ---------------------------------------------------------------------- Date: Tue, 16 Feb 88 16:06:17 PST From: rusty%velveeta.Berkeley.EDU@berkeley.edu (rusty wright) Subject: Re: Setting up diskless clients without using Setup (1) > From: Steve Schlaifer x4-3171 <steve@mahendo.jpl.nasa.gov> > The hard part was figuring out what goes in the partitions and how to go > about providing /tmp, /usr/spool/... etc. directories for the client. I just use dump piped to restore; for example I typically used ndl0 to make up partitions for new clients: % client_mkfs /dev/rndl9 (a shell script with the right mkfs nos.) % mount -v /dev/ndl9 /clients/ndl9 % cd /clients/ndl9 % dump 0f - /dev/rndl0 | restore rf - % umount -v /dev/ndl9 % fsck /dev/rndl9 % mount -v /dev/ndl9 /clients/ndl9 Now fix /etc/rc.boot, clean out /usr/adm, etc. I also avoid a lot of configuration malarkey by maximizing the number of symbolic links; for example, /etc/{printcap,gettytab,resolv.conf} /.rhosts, /.cshrc, etc. are all symbolic links to files in /usr/local/{etc,root,...}. For the stuff that has to be on the client's root I have master copies in /usr/local and just cp -p them to the client. For me the hard part is figuring out what numbers to put in /etc/nd.local; arithmetic was never my forte. ------------------------------ Date: Tue, 16 Feb 88 20:17:21 EST From: cognos!todds@zorac.arpa (Todd Sandor) Subject: Re: Setting up diskless clients without using Setup (2) We had to add a new disk drive and four new 3/50's to the configuration of a 3/160(2 disks), 3/180 (1 disk) and 18 workstations(3/50). Were adding drive to 3/180 and were setting up 10 WS on the 3/160 and 12 on the 3/180. In our situation we were also expanding the size of our user parti- tions (extra disk) as well as increasing the swap space size of each of the 3/50 WS from 16M to 20M, thus locations of all partitions except servers root, swap and the ndl0 root partitions were changing. Phoned Sun in Calif. and they said they don't support or recommend trying what I was going to do but that I should use setup. Yea, right! We didn't, and everything worked out fine and finished much faster than if we would have used setup. Have outlined basic steps below, have left out some of our details as steps to take would depend on exactly what has to be done at a particular site. Just included steps necessary if added new disk-less clients. Remember to PLAN things out before hand, and go over plans at least once. Steps 1) Backup everything, use dump level 0, even dump off a least one of your current nd partitions as will it be used to reload your nd root partitions later. 2) Next step is to recreate your new pub partition, this is the trick which saves the time. Due to fact that booting up single user requires mounting of /pub, must have pub all the time. The trick is to shutdown system and boot up with stand/diag (>b stand/diag). Then you re-write a temperary disk label so can create the new pub partition. Can do this as long as new pub will not overlap your old pub, you should be able to plan it so it doesn't. Leave size of pub parti- tion same size. After use partition and then label commands in diag then halt it and reboot unix up single user. This temp. label will contain same root,swap,pub as before, addi- tion of new pub partition. During this procedure you will be destroying the old partition where the new pub is going. After up single user you: # Create new /pub from current one # newpub is xy0h /etc/newfs -v /dev/rxy0h cd / mkdir pubnew /etc/mount /dev/xy0h /pubnew cd /pub tar cfv - . | (cd /pubnew; tar xfp -) /etc/umount /pubnew cd / rmdir pubnew At this point shutdown the system and boot stand/diag again, this time rewriting label so xy0f (pub) describes the new pub, and change xy0h to zeroes. To be safe you can re-boot single-user again, to make sure comes up ok with the new pub partition. 3) Next you try to re-create any partition you can in a similar manner to above, thus allowing disk to disk parti- tion recreations rather that tape to disk restores. In our situtation we were able to recreate /usr and a user parti- tion. Again basic step is to re-write the label so both old and new partitions do not overlap then bring up system single-user then use similar (obviously different partitions and dir names) commands to those show above. 4) You re-create all the disk partitions and restore all partitions (via tape when have to) in single-user mode, no need to go multi-user (and you couldn't anyway for a majori- ty of the steps). 5) Next thing to do before you bring system up multi-user is to recreate the nd partitions from the level 0 dump tape that was created before you started everything. Create file called ndcreate with following: ---cut-here--------------------------------------- #!/bin/csh cd / echo "making /dev/ndl$1 as $2" # NOTE: this mkfs changes based on root partition size # and type of disk drive you are using (PLAN AHEAD) /etc/mkfs /dev/ndl$1 16560 46 20 8192 1024 /mount /dev/ndl$1 /mnt cd /mnt restore rvbf 126 /dev/rmt8 cd /mnt/etc ed rc.boot <<EOF /originalhostname/s//$2/ w q EOF cd / umount /mnt --cut-here------------------------------------------- Where originalhostname is name of WS that was used for dumping. Then simply create ndall file with ndcreate 0 host0 ndcreate 1 host1 ndcreate 2 host2 ------------------------------ Date: Mon, 15 Feb 88 19:04:55 PST From: parlier@jpl-devvax.jpl.nasa.gov (Randy Parlier) Subject: Re: Mapping bad blocks to file names Another way to get the file name would be to use the icheck -b option to find the inode # and then use 'find' with the '-inum' option. Randy Parlier ------------------------------ Date: 16 Feb 88 16:48:42 GMT From: Jeff Glass <jjg%linus@mitre-bedford.arpa> Subject: Re: Overlapping partitions I use the following script to check /etc/nd.local for overlapping partitions. I was going to submit it after I had hacked it some more (have it check for gaps between partitions, for example) but it appears that now is the time to post it. It ignores comments and other extraneous lines (e.g., "son"). It expects one argument, the name of the file to check (usually /etc/nd.local). It handles nd partitions (e.g., /dev/ndl0 and /dev/ndl1) on more than one hard partition (e.g., /dev/xy1c and /dev/xy2c). For each hard partition, it prints out the nd partitions that overlap. It does not check if you have overlapping hard partitions. nd partitions are printed as "hostname unitnumber" (e.g., "daffy 0" is daffy's root partition). At the end, it prints the number of errors found. # to unbundle, sh this file. # files: /guru/jjg/bin/check_nd echo 'check_nd_gap' /bin/sed -e 's/^X//' > 'check_nd' << 'End of /guru/jjg/tmp/check_nd' X#! /bin/csh -fb X# X# jjg Tue Feb 16 17:46:36 EST 1988 X# X# check_nd [-g] [file1 ...] X# X# checks files in /etc/nd.local format, looking for nd partitions which X# overlap, and optionally, which have gaps between them. X# X# file1 can be a pathname or "-" for stdin. If there are no arguments, X# check_nd reads from stdin. X# X# check_nd prints the set of errors it finds, and at the end prints out X# a summary of the errors. X# X X# look for options. Xif ( " $1" == " -g" ) then X set flag_g = 1 X shift Xelse X set flag_g = 0 Xendif X X# if no arguments, read stdin. Xif ( $#argv == 0 ) set argv = ( - ) X Xforeach i ( $argv:q ) X cat $i:q | \ X grep '^[ ]*user[ ]' | \ X sort +3 -4 +4n -5 +5n -6 | \ X awk '\ X $4 != last_fsys { \ X last_part = "the beginning of " $4 \ X last_end = 0 \ X last_fsys = $4 \ X } \ X $6 > 0 { \ X part = $2 " " $3 \ X begin = $5 \ X end = $5 + $6 \ X if ( begin == last_end ) { \ X } else if ( begin < last_end ) { \ X printf "There is an overlap between \"%s\" and \"%s\".\n", last_part, part \ X errs_overlap++ \ X } else if ( flag_g > 0 ) { \ X printf "There is a gap between \"%s\" and \"%s\".\n", last_part, part \ X errs_gap++ \ X } \ X last_end = end \ X last_part = part \ X } \ X END { \ X printf "Errors: " \ X if ( errs_overlap == 1 ) \ X printf "%d overlap", errs_overlap \ X else if ( errs_overlap > 1 ) \ X printf "%d overlaps", errs_overlap \ X if ( errs_overlap > 0 && errs_gap > 0 ) \ X printf ", " \ X if ( errs_gap == 1 ) \ X printf "%d gap", errs_gap \ X else if ( errs_gap > 1 ) \ X printf "%d gaps", errs_gap \ X printf ".\n" \ X }' flag_g=$flag_g - Xend End of /guru/jjg/tmp/check_nd [[ It looks very useful, perhaps even indispensable, for nd.local hackers. Thank you! I have also archived it under the name "sun-source/check_nd.shar". --wnl ]] ------------------------------ Date: Wed, 17 Feb 88 07:45:07 EST From: Chuck Musciano <chuck@trantor.harris-atd.com> Subject: Re: Two monitors on one Sun Here at Harris, we had a need to do demos for large groups who could see the Sun monitor clearly. They all couldn't crowd around one, so we made a simple Y connector to hook two heads to one video port on the back of my 3/50. We used the expensive, fully shielded 9-wire cable, and the big, solid metal connectors to provide good ground. It's a bit of a squeeze getting two cables into the single connector at the base of the Y, but our technician did a good job grounding both cables and covered the whole mess with heat-shrink tubing. The Y connector worked fine. The cable was actually a "V" connector, with each leg about 10 feet long. We saw no real image degradation at this length, but putting a 16 foot extender on one leg caused that monitor to seriously smear. The demos went well, too, because the second head did not require an operator in front of it, so people could get closer to it. Chuck Musciano Advanced Technology Department Harris Corporation (305) 727-6131 ARPA: chuck@trantor.harris-atd.com ------------------------------ Date: Wed, 17 Feb 88 08:31 EDT From: Simon Barnes +44 223 315576 <BARNES@scrvx2.sdr.slb.com> Subject: Re: lpd printing to a TCP terminal server attached printer (1) There are several ways of directing printout to a port on a TCP/IP terminal server. 1. If a filter already exists for the printer and you have source code for it, then you can modify it to open a TCP/IP connection to the terminal server and write to the TCP/IP socket instead of standard output. 2. If a filter exists but you don't have source code, you can write an auxiliary filter which opens the socket, points standard output at the socket (use dup2()) and then exec's the original filter. 3. If no filter exists, write one or use approach 2 and exec cat. Modifying lpd should never be necessary, although one hopes that Sun will get around to building in TCP/IP support some time to save everybody from having to re-invent these hacks (however entertaining they may be). Simon Barnes Cambridge UK ------------------------------ Date: Wed, 17 Feb 88 11:17:46 EST From: marantz@aramis.rutgers.edu (Roy Marantz) Subject: Re: lpd printing to a TCP terminal server attached printer (2) Eriks Rugelis asks the magical questions: > 1. How do I get lpd to speak to a raw TCP datastream? > 2. Do I have to make source mods to lpd...? > 3. Does anyone else out there have some tools/sources/hints that they > could throw our way to make this job a little easier? We are finishing debugging a hacked version of telnet which we'll use to "pipe" between a TCP stream and a unix "device". We need to use this method in order to have a full duplex "device" so a postscript printer at the far end will work. We haven't modified lpd nor any transcript software. I can't give you the source (unless you've got a source license), but you could write such a beast fairly easily from scratch. Roy -- uucp: {ames, cbosgd, harvard, moss}!aramis.rutgers.edu!marantz arpa: marantz@aramis.rutger.edu ------------------------------ Date: 17 Feb 88 13:36:46 GMT From: Sarah Metcalfe <sarahm@cognos.uucp> Subject: Re: calentool I wrote a program called Monthtool which may be what you are looking for. It was designed for monochrome Sun 3/50's. It was posted to the newsgroup comp.sources.unix and would have been archived. It is also available from me directly -- perhaps preferably as I have a new version that is quite an improvement over the old. I'm not sure what calentool does, though, so I can't say if Monthtool is a valid alternative. Judging from the mail I get, it sounds like Monthtool is fairly widely used now, and some people swear by it (plug, plug). Sarah Metcalfe decvax!utzoo!dciem!nrcaer!cognos!sarahm Cognos Incorporated P.O. Box 9707, 3755 Riverside Drive, Ottawa, Ontario, CANADA K1G 3Z4 (613) 738-1440 ------------------------------ Date: Wed, 17 Feb 88 10:13:18 EST From: ted@braggvax.arpa Subject: Re: vt100 emulator About a vt100 emulator, Edward L. Lafferty of mitre (ell@mitre.arpa) has a vt100 tool that includes keypad support, line drawing and other special characters (pi, British Pound, diamonds etc), 132 col mode, double width and height characters. I know there are versions for sun 2.X and 3.X. If you can't get with Mr. Lafferty (who I found quite helpful the time I corresponed with him) for the latest version, I guess I can put a binary up for ftp from braggvax. Ted Nolan ted@braggvax.arpa ------------------------------ Date: Wed, 17 Feb 88 00:15:35 EST From: schwartz@gondor.cs.psu.edu (Scott E. Schwartz) Subject: a few bugs found in SunOS 4-3.2 Sun4 users, here are a couple of bugs I've noticed recently in 4-3.2. First, if you attempt to use the system V version of curses, and your terminal is not in the terminfo database, curses will die with a core dump when you do initscr(). Second, nroff and troff fail in strange ways. Try: troff -rc1 /dev/null and notice that troff wants to read stdin. Try: nroff -rc1 /dev/null and notice that it dump core when you give stdin a ctrl-d. Sun has been notified of both these bugs. -- Scott Schwartz schwartz@psuvax1.cs.psu.edu ^ | Someday soon this will be a sun4, but the name will stay the same! :-) ------------------------------ Date: Tue, 16 Feb 88 10:45:47 PST From: coherent!dplatt@ames.arc.nasa.gov (Dave Platt) Subject: uucp throughput For what it's worth: on our Sun 3/280, it seems to take about 60% of the CPU to suck input from a Telebit TrailBlazer Plus, with the serial port speed set to 19200 and overall throughput about 12000 baud (e.g. 1.2k bytes/second). If we try to glom input from the 'Blazer and from a 9600-baud direct-connected neighbor (aimt), we tend to peg the CPU meter. It doesn't seem to matter much whether the 'Blazer and hardwired line are connected to the CPU-board serial ports or to the ALM-2... the CPU load didn't seem to change much when we installed the ALM-2 and moved the modem links over to there. I haven't looked at perfmon to see how much of the load is user-state and how much is system-level. Dave Platt UUCP: ...!{ames,sun,uunet}!coherent!dplatt Domain: dplatt@coherent.com Internet: coherent!dplatt@ames.arpa, ...@sun.com, ...@uunet.uu.net ------------------------------ Date: Tue, 16 Feb 88 14:26:56 PST From: malik@sun.com (Malik Shaikh) Subject: SCSI bus Learn more about scsi bus signals, espacialy four control signals, these signals put SCSI bus in one of eight phases BUS Free phase ARBITRATION phase SELECTION phase COMMAND phase \ DATA phase \ These phases are collectivelly termed STATUS phase / the information transfer phases MESSAGE phase / During building system I got message that SCSI select failed so I realized that HBA have problem in selecting device so I realized that scsi HBA is not good. ------------------------------ Date: Tue, 23 Feb 88 20:05:28 PST From: merat@uw-ftcl.ee.washington.edu (Merat Bagha) Subject: 3/50 shoebox DC power ratings? Do you know the DC power ratings of a 3/50 shoebox power supply? Specifically, I would like to know if I can attach an external disk drive which draws power from the P14 power connector which is left unattached inside the shoebox. My Fujitsu M2246E (141MB ESDI) requires: 1.8 Amps @ 12V & 1.6 Amps @ 5V (average); 4.8 Amps @ 12V (peak). Many thanks in advance! Merat Bagha Univ. of Washington, Seattle ------------------------------ Date: Tue Feb 16 18:27:06 1988 From: portal!cup.portal.com!mhyman@sun.com Subject: Disk Setup on Server? Where I work we are installing a ``pilot'' network consisting of a 3/280 server with two 580 Meg drives and 6 diskless 6/60's with 16 Mbytes of RAM each. All of us here are Sun neophytes. Our question is how would real live users recommend partitioning the disk? Is the default root size ok for the server? for the clients? How much swap space should we reserve for the server? For the clients? We would appreciate any and all advice. Please mail to: mhyman@cup.portal.com --or-- ...!sun!portal!cup.portal.com!mhyman Thanks, --Marc ------------------------------ Date: Wed, 17 Feb 88 14:40:03 est From: petsche@demon.siemens.com (Tom Petsche) Subject: Where to put swap partition for clients running CLisp? There are three people here interested in running Common Lisp on Sun 3/60s. We currently have a server with two Fujitsu M2344k SMD drives and three clients. The question is what should we do for swap devices given that Lisp is a memory hog. If the 3/60s swap to the server, will this severly degrade performance on the clients? More importantly, will this degrade the network or server performance? In short, does it make more sense to put the swap space on the server or get small (70-100 Meg) local SCSI disks for the machines running Lisp and put the swap and root partitions on these drives? Thanks. tom (petsche@siemens.com) ------------------------------ End of SUN-Spots Digest ***********************