From: sysmark@helios.physics.utoronto.ca (Mark Bartelt)
Subject: update on inst problem -- weirder and weirder (LONG)
Reply-To: mark@cita.toronto.edu
Organization: University of Toronto Physics/Astronomy/CITA
Date: Tue, 7 Apr 1992 11:41:15 GMT

Last week I posted a description of a problem with installation
of the original EOE 4.0 software onto a virgin disk on an Indigo,
installing from a remote CD connected to a 4D/25.  (Dave Olson
pointed out that we shouldn't even be *using* that 4.0 CD, since
it's been superseded by 4.0.1, which is quite true.  Nevertheless,
I'd like to pursue this problem anyway, since I believe that it's
orthogonal to any questions related to release versions, and may
be symptomatic of some other problem(s).)

Here's the problem as I described it last week:

(1)  If the CD reader is directly attached to the Indigo, there
are no problems.  The installation always succeeds.

(2)  If the CD reader is attached to the 4D/25, attempts to do
the installation from the remote CD-ROM fail ...

 Unexpected EOF at distribution data for usr/lib/images/cedit.icon
 inst:  can't install usr/lib/images/cedit.icon

... and, upon exiting inst's interrupt/error menu, you're told ...

 dd: read error: I/O error
 280+0 records in
 280+0 records out

The failure point is always the same, making it unlikely that the
problems are related to network errors (which would likely exhibit
some randomness).

After I posted last week's article, it occurred to me that perhaps
I should take a look at SYSLOG on the 4D/25.  Sure enough, for each
unsuccessful attempt to install IRIX onto the Indigo from the 4D/25's
CD reader, I find the following SYSLOG message (here chopped into two
pieces for readability):

 unix: dks0d4s7 (/CDROM): Media error: Unrecovered data block read error,
	ASQ=0x6,. Block #160096 (195072).

The message is always the same, which at least is consistent with the
fact that inst on the Indigo reports the same file name each time it
fails.

Sure looks like bad media, doesn't it?  So, as a further check, I ran
the following script:

	pass=0; while true; do
		pass=`expr $pass + 1`
		echo ===== pass $pass
		find /CDROM -type f -print | while read x; do
			lsize=`ls -l $x|awk '{print $5}'`
			wsize=`wc -c $x|awk '{print $1}'`
			if test $lsize != $wsize; then
				echo "$x $lsize $wsize"
			fi
		done
	done

If the media were in fact bad, wouldn't one expect that the number
of bytes read from some file (wc -c) would differ from the value in
the inode (ls -l), and/or that a message would appear in SYSLOG when
a read error due to bad media occurred?

Well, I ran the script overnight.  It ran for fourteen hours, making
nearly eighty passes.  Any errors?  Nope.  Nada.  So I tried doing
the remote install again.  Got another "Unrecovered data block read
error".  This is simultaneously interesting and frustrating ...

Questions:

(1)  I've looked through TFM, and can't find anything that tells me
how to decode the "ASQ=0x6".  From looking at what fx tells me about
the CD's partition layout, the two block numbers seem to be relative
to the start of the partition and relative to block zero, respectively.
This allegedly-bad block is in the middle of the mounted partition, so
it's not an "attempt to read nonexistent sector" sort of problem (and,
if it were, I'd expect a different sort of error message anyway).

(2)  Besides using the above script to repeatedly read every file on
the CD, I also used dd to read the raw device (/dev/rdsk/dks0d4s7).
Again, no errors.  This being the case, has anyone got a clue as to
why nothing I do on the 4D/25 results in a "media error" situation
on the CD, whereas "media error" messages pop up like mushrooms when
some other machine on the network does a remote install?  What does
cdromd do differently (or what is it told to do by inst running on
the Indigo) that I haven't tried myself?

By the way (in case it's relevant), I'm not using the miniroot or
the 4.0 install on the Indigo.  The Indigo in question has actually
been upgraded to 4.0.1, and I'm doing ...

 rm -rf /externaldisk/somedirectory
 mkdir /externaldisk/somedirectory
 inst -f remotehost:/CDROM/dist -r /externaldisk/somedirectory

... to demonstrate the problem.  The 4D/25 is running 4.0.1 as well.

Oh, yeah, one other oddity:  Last week, I thought the failure mode
was 100% reproducible.  Nope.  The failure rate is about 90%, but
on the odd occasion, the "media error" message doesn't occur on the
4D/25 and the installation on the Indigo completes successfully.
I haven't been able to pinpoint anything that might explain what's
different between the successful attempts and the unsuccessful ones.

I guess next I'll try this whole thing with the 4.0.1 media ...

Mark Bartelt                                              416/978-5619
Canadian Institute for                           mark@cita.toronto.edu
Theoretical Astrophysics                         mark@cita.utoronto.ca

"Clothes not busy being worn are busy drying." - Dylan, on laundry day
Newsgroups: comp.sys.sgi