[comp.sys.sun] Sun-Spots Digest, v5n59

Sun-Spots-Request@RICE.EDU.UUCP (11/12/87)

SUN-SPOTS DIGEST       Wednesday, 11 November 1987     Volume 5 : Issue 59

Today's Topics:
                 Editor's remarks:  uudecode, named pipes
                        Re: GNU Emacs on the Sun-4
                            ESDI disks on Suns
        Fix for Sun 3.4 TCP problems with Symbolics LISP machines
                   Problem with vt100tool from the Net
                     Mysterious filesystem demolition
                      Another 3.4 networking problem
                        Good way to "flip a coin"?
                  Answered my own "flip a coin" question
                   How to test the end of a 1/4" tape?
                Making 2400 baud modems work on SunOS 2.x?
              Serial Line IP on Sun III/160 using SunOS 3.4?
                     Adding CDC SMD drives to Sun-3?
                              ICON previewer
                    yet another yet another news icon

----------------------------------------------------------------------

Date:    Wed, 11 Nov 87 15:47:34 CST
From:    William LeFebvre <phil@rice.edu>
Subject: Editor's remarks:  uudecode, named pipes

This message concerns two different remarks that I made in recent digests.

Regarding uudecode and the permissions of the current directory:  someone
pointed out to me that world write permisssion is usually not sufficient.
You almost certainly need group write permission.  In my remark, I was
trying to be succinct without being misleading.  Oh well.  These are the
steps you really need to take:  obtain and remember the permissions on the
current directory (i.e. with "ls -ld ."), do "chmod go+w .", do the
uudecode, then set the permissions of the directory back to whatever they
were.

Regarding named pipes:  SunOS 3.2 does have System V FIFO files.  They
just aren't documented in any obvious manner.  A FIFO file is basically a
named pipe.  It can be created by anyone with a call to "mknod":
`mknod("foo", S_IFIFO | 0666, 0);'.  See mknod(2) for more details.  You
can also use the program "/etc/mknod" to create the file (even if you are
not the super-user---see mknod(8)).  For fun, try the following series of
commands:

    % /etc/mknod foo p
    % cat /etc/termcap >foo &
    % more foo

				William LeFebvre

------------------------------

Date:    2 Nov 87 20:49:02 GMT
From:    janssen@milano.UUCP
Subject: Re: GNU Emacs on the Sun-4

I've built gnu-emacs (18.46) for our new Sun-4, using crt0.c code
from eb@kent-state.UUCP (Eric Benson):

	asm(".seg \"text\"");
	asm(".global __start");
	asm("__start:");
	asm("mov	0, %fp");
	asm("ld	[%sp + 64], %o0");
	asm("add	%sp, 68, %o1");
	asm("sll	%o0, 2,	%o2");
	asm("add	%o2, 4,	%o2");
	asm("add	%o1, %o2, %o2");
	asm("sethi	%hi(_environ), %o3");
	asm("st	%o2, [%o3+%lo(_environ)]");
	asm("andn	%sp, 7,	%sp");
	asm("call	_main");
	asm("sub	%sp, 24, %sp");
	asm("call	_exit");
	asm("nop");
	asm("call	__exit");
	asm("nop");

It builds, and runs, but when find-file is called, crashes with a
segmentation violation.  I find that egetenv("HOME") returns a 0, rather
than a string, and the error occurs in strlen'ing the NULL.  I suspect
that _environ is not being set correctly.  Can you help?

Thanks for any tips.

Bill

Bill Janssen, MCC Software Technology Program
ARPA:  janssen@sw.mcc.com
UUCP:  {seismo,harvard,gatech,pyramid}!ut-sally!im4u!milano!janssen

------------------------------

Date:    1 Nov 87 05:21:29 GMT
From:    sundc!potomac!jtn@uunet.uu.net (John T. Nelson)
Subject: ESDI disks on Suns

> 2. I'd like to buy another 140Mb disk for my sun. Is Sun the only source
> for this? Can I just buy another ESDI disk and stuff it in the box? Does
> anyone else make SCSI disks for the sun (ps: I know that SCSI is not a
> standard, assume I've written a SCSI driver or two).

You can buy ESDI SCSI interface disks from Highland Digital in Mt View CA.
They have 155 meg ESDI / SCSI Ren-3 CDC disks for about $2500 and 350 meg
Ren-4 disks for about $5000.  The Ren-4's are a problem because the Sun
formater doesn't recognize them.  Highland says that they will supply a
program that will format these disks.

We recently purchased a Sun III/60 with two Ren-3's daisy chained onto the
60.  The Ren-3's performance is comperable to that of the Fujitsu Eagle
drives.  Highland is a VAR of Sun equipment.

Hope this helps.

------------------------------

Date:    1 Nov 87 22:19:46 GMT
From:    sundc!potomac!jtn@uunet.uu.net (John T. Nelson)
Subject: Fix for Sun 3.4 TCP problems with Symbolics LISP machines

Thanks to Bill Nesheim from Thinking Machines for the fix to our TCP
problems.  Briefly, when trying to converse between our Suns running 3.4
and Symbolics LISP machines, one of the machines would open a TCP
connection but leave it hanging open without transfering data.

The fix:  Symbolics LISP machines do not recognize trailers on ethernet.
You must use ifconfig ie0 arp -trailers to get it to work.

------------------------------

Date:    Mon, 2 Nov 87 12:09 EDT
From:    CROUCH%M_REA%sdr.slb.com@relay.cs.net
Subject: Problem with vt100tool from the Net

Hi,
I have pulled the net source 'vt100tool' from the CSNET info-server and
tried to install it on our Sun. I followed the installation instructions
carefully but unfortuanately I got the following error when I tried a make

------
cc -g   -o vt100tool vt100tool.c libdir/nlibsuntool.a -lsunwindow -lpixrect
Undefined:
_ttysw_setboldstyle
_ttysel_clear
_ttysw_handle_itimer
_ttysw_pty_input
_ttysw_consume_output
_ttysw_pty_output
*** Error code 1

Stop.
------

Has any one else copied this software and had problems or even had
success.  Failing that does any one know what I am doing wrong.

All answers gratefully appreciated.

Thanks & Regards

Sean Crouch,
Computer Operations,
Fairchild Semiconductor Ltd.,
Reading,
England.

Email: crouch%m_rea@sdr.slb.com
OR     crouch%m_rea%sdr.slb.com@relay.cs.net
SInet: M_REA::CROUCH

------------------------------

Date:    Tue, 3 Nov 87 13:08:42 EST
From:    Tony Movshon <movshon@acf8.nyu.edu>
Subject: Mysterious filesystem demolition

Forgive the length of this message, but I'd like to be as complete as
possible in describing my difficulty, and my machine is nonstandard ...

I have a Sun 3/50 (SunOS 3.2) with a shoebox fitted with two disk drives
and no tape. The disk controller is an Adaptec. Drive 0 is a Maxtor
XT-2190 (150 Mbytes formatted), and drive 1 is a CDC 94155/86 (70 Mbytes
formatted). Both drives were formatted and partitioned locally. The
Maxtor is partitioned thus:
	sd0a	7+ Mbytes	("/")
	sd0b	20+ Mbytes	(swap)
	sd0g	60+ Mbytes	("/usr")
	sd0h	60+ Mbytes	("/usr/vnl")
The CDC is partitioned thus:
	sd1a	7+ Mbytes	(not used)
	sd1b	16 Mbytes	(swap)
	sd1g	43 Mbytes	("/usr2")
The machine both mounts and exports several NFS filesystems, and is
connected to a heterogeneous local network including 8 other Suns, 3
VAXes, and some AT&T 3B2s.

I have an occasional problem in which the /dev/sd0g partition (/usr)
gets completely trashed. The system crashes, and of course nothing
helpful remains in /usr/adm/messages because /usr/adm has disappeared.
The subsequent fsck on /dev/sd0g fails. Doing an fsck by hand, the first
two super-blocks of the filesystem show up as unusable (fsck reports
"bad magic number").  Using fsck -b 4144 (the third superblock) elicits
the response "CG 0:  BAD MAGIC NUMBER", then a whole host of errors from
inode 1 on up, then finally the message "ROOT INODE UNALLOCATED, CANNOT
CONTINUE". The whole pattern repeats very precisely whenever the problem
occurs, and it's now happened four times. I have tried various things
which have *not* made the problem go away, including:

 - Reformatting the Maxtor disk with interleaves of 1 and 2
 - Repartitioning the Maxtor disk so that the first cylinder of sd0g is
   in a different location
 - Running without the CDC disk or without the extra swap partition on
   the CDC disk
 - Upgrading from release 3.2PILOT to release 3.2

I had thought that the upgrade had solved the problem, because the
system ran flawlessly for nearly a month, but then -- poof -- it
happened again. The problem does not seem to be provoked by especially
heavy use -- in fact it typically occurs late at night when no one is
logged in. Any help or advice would be appreciated. And before anyone
asks, no, I haven't reported the problem to Sun because:

 - We have no software maintenance support
 - We have a nonstandard hardware configuration, including disks not
   purchased from Sun and an "unsupported" shoebox setup.

					Thanks in advance,
                                        Tony Movshon

Internet:  movshon@nyu.nyu.edu or tony@xp.psych.nyu.edu
Usenet:    {ihnp4|allegra}!cmcl2!xp!tony or movshon@cmcl2.uucp
US Mail:   Department of Psychology, NYU
           6 Washington Place
           New York, NY 10003
Phone:     (212) 998-7880

------------------------------

Date:    Tue, 27 Oct 87 23:57:42 EST
From:    Root <root%suny-sb.csnet@relay.cs.net>
Subject: Another 3.4 networking problem

I suppose I was a bit incredulous at all the reports of network bugs in
SunOS 3.4, until I tripped over them myself.

First, caveat emptor to Mt Xinu users - their 4.3 port suffers the same
broken ICMP mask reply as does Berkeley 4.3 and Wollongong.  The fix is
simple, but frankly I'm feeling a bit burned by Mt Xinu - after all, the
big bucks they get for their software would lead one to believe they
actually track bug fixes..

My second problem is that I would like to use two different subnet masks,
yet the SunOS 3.4 software doesn't seem to allow it.  Here is what I want
to do (4.3 allows this):

	ifconfig ec0 129.49.2.2 netmask 0xfffff800 ... and so on
	ifconfig ie0 129.49.89.65 netmask 0xffffff00 ... and so on

The hitch is that the mask for BOTH controllers (actually all controllers)
gets set to the netmask specified by whichever ifconfig runs last.  This
leads one to believe that for some reason, the network folks at Sun
deviated from Berkeleys if design of one controller/one netmask, etc.  So,
following this hypothesis, I did the following:

	nm /vmunix | fgrep subnet

	and got: (among other things)

	0f072380  D  _subnet_mask

Which when examined using adb on an active kernel, was set to the subnet
mask.  This seems to indicate that Sun (blast them) designed their low
level stuff so that only ONE subnet mask is allowed per system.

(Flame on)

It seems to me that the Sun network group should try, as a whole, to be a
little less free in deciding what parts of the 4.3 network code to drop
into their kernel.  I should like to see a complete port of the 4.3
network code, and not some half a**ed merge of new and old.

(Flame off)

Ahem.  Now before I run off and remedy the aforementioned problem, has
anyone else run into and fixed this?  Does SunOS > 3.4 fix said bug?  Has
anyone dropped the entire Berkeley 4.3 network code into a 3.4 kernel?  

					Thanks in advance, 

					Rick Spanbauer
					SUNY/Stony Brook

------------------------------

Date:    Mon, 2 Nov 87 17:10:04 PST
From:    ultra!wayne@ames.arpa (Wayne Hathaway)
Subject: Good way to "flip a coin"?

I have a driver for SunOS 3.3 in which I would like to "flip a coin."  By
this, I mean I would like a quick way to make a more-or-less evenly
balanced two-valued random number test.  One obvious way to do this would
be to test some suitable bit in some rapidly-changing location, such as a
real-time clock cell or something like an interrupt counter.

Unfortunately, we do not have source.  Could some kind soul please
recommend a variable name and bit location I could look at?  Hopefully
something that is not going to go away in SunOS 4.0 or such ...

Any assistance would as always be muchly appreciated!   Thnx.

Wayne Hathaway                  ultra!wayne@Ames.ARPA
Ultra Network Technologies
2140 Bering drive               with a domain server:
San Jose, CA 95131                 wayne@Ultra.COM
408-922-0100

------------------------------

Date:    Tue, 3 Nov 87 07:35:41 PST
From:    ultra!wayne@ames.arpa (Wayne Hathaway)
Subject: Answered my own "flip a coin" question

Regarding my search for a rapidly-changing bit which can be used to "flip
a coin" in a device driver, I may have answered my own question about as
well as it can be; please comment.

Looking through header files, I settled on the kernel variable "time", in
particular the long "time.tv_usec" looking at the bit which is the
rightmost 1 bit in "tick".  Presumably this bit toggles HZ times per
second (50 on my Sun), so that's reasonably changing.

Other ideas are of course welcome.

Wayne Hathaway                  ultra!wayne@Ames.ARPA
Ultra Network Technologies
2140 Bering drive               with a domain server:
San Jose, CA 95131                 wayne@Ultra.COM
408-922-0100

------------------------------

Date:    Mon, 2 Nov 87 18:07:44 CST
From:    Dominique Petitpierre <petitp%cui.unige.ch@relay.cs.net>
Subject: How to test the end of a 1/4" tape?

How is it possible to test for the "end of tape" (ie after the last end of
file mark) on a 1/4" tape?  The only way I've found, is to try to write
something (with, for example, 'mt -f /dev/nrst0 eof') at the current
position, and check for an error message (which means that you are not at
the end).  It's not very nice since each time it is found, something is
written at the end of the tape. And, furthermore, it is always possible to
write something at the beginning of the tape, thus the test might erase
information.  So, since the driver knows when it has reached the last
file, how can the user know without modifying the tape?

I came to that problem, trying to write a small 'table of content' shell
script that would give a rough idea on the information stored on a 1/4"
tape (physical format (QIC 11,QIC 24), number and size of files, logical
format (tar,cpio,etc)).  If it matters, the workstation is a 3/50, with
sun OS release 3.2 and we use the 'st' 1/4" tape driver (st(4),
/dev/nrst[08]).

Mr. Dominique Petitpierre
ISSCO, University of Geneva
54 route des Acacias	    
CH-1227 GENEVA (Switzerland)
Tel: 0041/22/20 93 33 extension 2117  
ean, BITNET, EARN, MHS, X.400: petitp@cui.unige.ch
uucp: mcvax!cernvax!cui!petitp , petitp@cui.uucp
JANET: petitp%cui.unige.ch@cs.ucl.ac.uk
csnet, ARPA: petitp%cui.unige.ch@csnet-relay.csnet

------------------------------

Date:    Mon, 2 Nov 87 11:03:32 PST
From:    <nsc!parns!harker@sun.com>
Subject: Making 2400 baud modems work on SunOS 2.x?

I have recently purchased a Desktalk II 2400 baud modem and was having
problems with making it work under SunOS 2.4.  It would work fine when
connected directly to a terminal, but would fail when I attached it to my
Sun.  I had edited my /etc/remote file adding lines for a 2400 baud modem:
	UNIX-2400:\
		:el=^D^U^C^S^Q^O@:du:at=at:ie=#$%:oe=^D:br#2400:tc=dialers:
	VMS-2400|TOPS20-2400:\
		:el=^Z^U^C^S^Q^O:du:at=at:ie=$@:oe=^Z:br#2400:tc=dialers:
adding a line to my /etc/gettytab file for a 2400 baud modem:
	0|d2400|Dial-2400:nx=d1200:fd#1:sp#2400:
and adding a line to my /etc/ttys file to set the tty line up for 2400 baud:
	10ttyd0
But my new modem would not work.  It would dial the number, I could hear
the two modem tones, and then the modem would go quiet signaling that the
modems has synchronized.  But then tip would give me a "called failed"
message.  This had me very confused until I saw this message about
problems with Suns and 2400 baud modems in the comp.unix.ultrix news group.

> From: tim@okra.UUCP (Tim Wood)
> Subject: Re: Problems with Tip on Ultrix 2.0
>
> One bug I found with SunUNIX 'tip', possibly still existing, was that
> it wouldn't communicate with Hayes-compatible 2400-baud (USR Courier).
> The Courier had a default status code set that was different from
> the Hayes 1200 one, so when it made a 2400-baud connect, it returned
> a status code which tip couldn't recognize.  Fix was/is to MANUALLY
> enter the following whenever the modem is powered up (what you type
> is preceded by a tab or prompt:
>
>   blorp% tip cua0
>   connected
> 	ATX0	< this is not echoed >
>   0
>   ~.
>   disconnecting...[EOT]
>   blorp% 
>
> ATX0 selects the ordinary 1200 status codes.

Since I have done this I have been able to use my modem under SunOS 2.0.
As a note this problem does not occur under SunOS 3.4.

I am very happy with my Desktalk II modem.  For a $200 modem it is quite
nice, but ugly.  I am having some problems with line noise, but this might
only be a problem with my phone lines which I think go through our company
phone switcher, although our phone department swears it is a AT&T phone line.

Desktalk II 2400, $199, USA Flex (800) 872-3539 Features:  Hayes clone, 5
year warranty, help screen, 11 LEDs, plastic case, 30 day money back
guarantee.

I hope this information is useful.

Robert Harker, All around good guy.
harker@parns.nsc.com
{sun,decwrl,hplabs}!nsc!parns!harker

------------------------------

Date:    2 Nov 87 19:29:36 GMT
From:    Yorick Phoenix <mcvax!kbsc!yorick@uunet.uu.net>
Subject: Serial Line IP on Sun III/160 using SunOS 3.4?

I have in the past run the Serial Line Tcp-IP on my Sun III/160.  This was
added using patches to my Object Only Sun 3.0 and 3.2 Kernel from mark@mimsy.

However, I have now upgraded to 3.4 [at last] and upon using the same set of
patches I have discovered that an attempt to use slattach results in a great
big hang.

Is there anybody out there who has a set of patches to get Slip to work under
3.4 on an Object Only Kernel.

	Thanks,
	Yorick

yorick@kbsc.UUCP
..mcvax!ukc!{idec,hrc63}!kbsc!yorick

The Knowledge-Based Systems Center
58 Northside, Clapham Common
LONDON   SW4 9RZ   England
Voice: +44 1 350 1622

------------------------------

Date:    Tue, 3 Nov 87 08:34:16 PST
From:    calius@composite.stanford.edu (Emilio Calius)
Subject: Adding CDC SMD drives to Sun-3?

Help! If you have had some experience in hooking up CDC drives to a Sun, a
bunch of novices would very much like to have your advice.

CDC is now offering a new version of their 9720-515 (515 Mb un- formatted)
8 inch SMD drive at a very attractive price. ($4300 @ Kierulf Electronics
in Sunnyvale, CA) We would like to add one to our Sun-3/160, presently
configured with 1 Xylogics 450 (NOT 451) controller and 1 Fujitsu M2322
130 Mb drive.

What do we have to watch out for when installing it & formatting with
"diag" (assuming we get the heads/cylinders geometry from CDC) ?  Will
this drive work with our Xy-450 controller? What about the cabling
(daisy-chain or radial) ? Any warnings/words of caution/great peals of
laughter? Etc, etc..

Thank you. We really need to make a decision soon.

Emilio P. Calius
Structures & Composites Lab -- "We make it, you crash [in] it"
Aeronautics & Astronautics
Stanford University

------------------------------

Date:    Wed, 14 Oct 87 16:23:18 edt
From:    decvax!genrad!jpn@ucbvax.berkeley.edu (John P. Nelson)
Subject: ICON previewer

The following is a handy little program to display all these ICONS being
submitted to SUN-SPOTS.  I am donating this to the public domain.

/* dsplyicon.c	 6-Jan-86 17:01 jpn Author
 *
 * Program to write an icon image on top of the current window
 *  Useful for displaying icons without the overhead of starting
 *   up an "icontool".  Also displays icons with odd sizes ("icontool"
 *    will only handle 64 x 64
 *
 * Compile: cc -o dsplyicon dsplyicon.c -lsuntool -lsunwindow -lpixrect
 */

[[ The remainder of the source has been placed in the archives as
"sun-source/dsplyicon.c".  It can be retrieved via anonymous FTP from the
host "titan.rice.edu" or via the archive server.  For more information
about the archive server, send a mail message containing the word "help"
to the address "archive-server@rice.edu".  -wnl ]]

------------------------------

Date:    Tue 27 Oct 87 14:42:08-PST
From:    Alan R. Katz <KATZ@venera.isi.edu>
Subject: yet another yet another news icon

Here is another rn News icon (which I like better):

/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
 */
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	0x03FF,0xFFFF,0xFFFF,0xFF80,0x0000,0x0000,0x0000,0x0080,
	0x0FFF,0xFFFF,0xFFFF,0xFE80,0x0000,0x0000,0x0000,0x0280,
	0x3FFF,0xFFFF,0xFFFF,0xFA80,0x2000,0x0000,0x0000,0x0A80,
	0x2000,0x0000,0x0000,0x0A80,0x2000,0x0000,0x0000,0x0A80,
	0x2001,0x13E8,0x2700,0x0A80,0x2001,0x9208,0x2880,0x0A80,
	0x2001,0x9208,0x2800,0x0A80,0x2001,0x5209,0x2400,0x0A80,
	0x2001,0x53C5,0x4300,0x0A80,0x2001,0x3205,0x4080,0x0A80,
	0x2001,0x3205,0x4880,0x0A80,0x2001,0x1202,0x8880,0x0A80,
	0x2001,0x13E2,0x8700,0x0A80,0x2000,0x0000,0x0000,0x0A80,
	0x2000,0x0000,0x0000,0x0A80,0x2222,0x21FF,0xF000,0x0A80,
	0x2444,0x4000,0x01FF,0xEA80,0x2111,0x11FF,0xF000,0x0A80,
	0x2088,0x8000,0x01FF,0xEA80,0x2222,0x21FF,0xF000,0x0A80,
	0x2444,0x4000,0x01FF,0xEA80,0x2111,0x11FF,0xF000,0x0A80,
	0x2088,0x8000,0x01FF,0xEA80,0x2222,0x21FF,0xF000,0x0A80,
	0x2444,0x4000,0x01FF,0xEA80,0x2111,0x11FF,0xF000,0x0A80,
	0x2000,0x0000,0x01FF,0xEA80,0x23FF,0xC1FF,0xF000,0x0A00,
	0x2000,0x0000,0x01FF,0xEA00,0x2000,0x0000,0x0000,0x0800,
	0x3FFF,0xFFFF,0xFFFF,0xF800,0x0000,0x0000,0x0000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0162,0xC000,0x0000,
	0x0000,0x0193,0x2000,0x0000,0x0000,0x0102,0x2000,0x0000,
	0x0000,0x0102,0x2000,0x0000,0x0000,0x0102,0x2000,0x0000,
	0x0000,0x0102,0x2000,0x0000,0x0000,0x0102,0x2000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000

[[ In the archives as "sun-icons/ark-news.icon". --wnl ]]


------------------------------

End of SUN-Spots Digest
***********************