From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: LHERCAUD@bouyguestelecom.fr Newsgroups: gmane.os.tru64.managers Subject: RIS client boot problem Date: Tue, 18 Jun 2002 18:53:27 +0200 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C216E8.AABFDE80" X-Trace: main.gmane.org 1024420431 28211 127.0.0.1 (18 Jun 2002 17:13:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Jun 2002 17:13:51 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17KMYA-0007Kt-00 for ; Tue, 18 Jun 2002 19:13:50 +0200 Original-Received: (qmail 2498 invoked by uid 5); 18 Jun 2002 16:53:47 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 2490 invoked from network); 18 Jun 2002 16:53:47 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (134.167.3.119) by 0 with SMTP; 18 Jun 2002 16:53:47 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.1 #39060) with ESMTP id <0GXW00NMSUXN46@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 18 Jun 2002 12:53:47 -0400 (EDT) Original-Received: from bt1sqtl3.BPA.BOUYGUESTELECOM.FR (smtpl3.bouyguestelecom.fr [212.208.45.60]) by emroute1.cind.ornl.gov (PMDF V6.1 #39060) with ESMTP id <0GXW00K5SUXKBM@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 18 Jun 2002 12:53:45 -0400 (EDT) Original-Received: from bt1sqt2q.BPA.BOUYGUESTELECOM.FR (unverified) by bt1sqtl3.BPA.BOUYGUESTELECOM.FR (Content Technologies SMTPRS 2.0.15) with ESMTP id for ; Tue, 18 Jun 2002 18:53:36 +0200 Original-Received: from bt1sqt6b.bpa.bouyguestelecom.fr (unverified) by bt1sqt2q.BPA.BOUYGUESTELECOM.FR (Content Technologies SMTPRS 2.0.15) with ESMTP id for ; Tue, 18 Jun 2002 18:53:28 +0200 Original-Received: by bt1sqt6bh0.bpa.bouyguestelecom.fr with Internet Mail Service (5.5.2653.19) id ; Tue, 18 Jun 2002 18:53:27 +0200 Original-To: tru64-unix-managers@ornl.gov X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:608 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:608 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C216E8.AABFDE80 Content-Type: text/plain; charset="windows-1252" Tru64 Managers, I want to submit here a problem I found when trying to install Tru64 version 5.1A thru RIS. Actually, we found 2 problems both related to the reset of the ethernet controller in conjuction with the topology of the Catalysts. Symptoms: the RIS kernel booted onto the clients fails to access the root file system (from the server) thru the network. Both the RIS server and the clients are on the same subnet. It appears obvious to me that the reason for that is the RESET of the ethernet controller done inside "vmunix1" provoques the rehash of the Catalyst spaning tree for a period of time which is longer than the one hard coded within the retries attempted by the kernel. The result is the lost of ability of the booted kernel to timely access the network resulting to systematic hung or crash thus preventing the installation to continue. Inserting a HUB between the Catalyst port and the RIS client allows the reset to be "hidden" thus the installation succeeds. Of course, the additionnal HUB is not an acceptable solution and was put in place only for testing and proving reasons. I do not have access to source code but I managed to find 2 subroutines that access the ethernet using bootp, have some retry code but not sufficient to allow enough time for the Catalyst to "calm" down: ======================== boot_info() /* OLD: retrys=5 */ /* while (retrys--) { */ [bootp_info:3464, 0xfffffc000067d24c] bis zero, 0x4, s4 /* old */ [bootp_info:3467, 0xfffffc000067d250] bis zero, 0x5, s6 /* old */ /* !!! NEW: retrys=31 !!! */ [bootp_info:3464, 0xfffffc000067d24c] bis zero, 0x1e, s4 /* new */ [bootp_info:3467, 0xfffffc000067d250] bis zero, 0x1f, s6 /* new */ ======================== netboot_bootp_open() /* OLD tries 2 times */ [netboot_bootp_open:467, 0xfffffc000023ab1c] bis zero, 0x2, s5 /* old */ /* NEW tries 30 times */ [netboot_bootp_open:467, 0xfffffc000023ab1c] bis zero, 0x1e, s5 /* new */ ======================== Given that, I patched the binary Alpha code and augmented the retries which allowed for the RIS clients to boot with no problem (see above the assembler lines for the original and the patched code). Included in this mail, I attach the Patch.ksh script and the "zapb" program I used to modify the above instructions in the RIS' binary kernel. <> <> One more thing: I detected the same problem (related to the insufficient number of retries in bootp_info()) in the RIS kernel coming with Tru64 4.0F , I developped a similar fix/patch for that kernel and submitted the fix to the Compaq local support organisation. Unfortunately, it seems that the fix/patch I proposed did not make it thru to the engineering. Then, you may ask why am I still sending this mail ? Here are my 2 reasons: 1. I really think this workaround may help some people on this list fix their RIS problems. 2. I hope that someone in HP/Compaq Tru64 engineering (maybe Dr. Blinn) has a look to the fix/patch I propose then to the actual "C" code and decides to endorse the 2 minor changes regarding the retries count that allow the RIS kernel to boot despite the Catalyst spaning tree effect. This way I can hope to get a "supported" solution and obtain the satisfaction of my customer. Best regards to all of you. Lucien HERCAUD Freelance / UNIX Consulting former DEC OSF/1 Digital Support & UNIX Partner * Tel. Fixe +33 1 3945 4260 * BOUYGUES Telecom * Tel. Mobile +33 6 0944 2880 * 24 Avenue de l'Europe * Fax +33 1 3945 4322 * 78944 VELIZY Cedex * lhercaud@bouyguestelecom.fr mailto:lhercaud@mail.dotcom.fr ------_=_NextPart_000_01C216E8.AABFDE80 Content-Type: application/octet-stream; name="Patch.ksh" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Patch.ksh" #!/bin/ksh=0A= wd=3D$(pwd)=0A= if [[ ! -r ./zapb ]] ;=0A= then=0A= echo zapb is missing, please compile zapb.c with: '"cc -o zapb = zapb.c"'=0A= exit 1=0A= fi=0A= cd /=0A= grep ris.dec /etc/bootptab | tr ':' '\n' | grep bf=3D | sed 's/bf=3D//' = | while read kr=0A= do=0A= echo Found Ris Kernel: $kr=0A= if [[ -L $kr ]] && [[ -r $kr ]] ; then=0A= dr=3D$(dirname $kr)=0A= cd $dr=0A= fi=3D$(ls -l $kr | awk '{print $11}')=0A= kn=3D$(basename $fi)=0A= case $kn in=0A= vmunix*[0-9])=0A= sum $fi | read ck1 ck2 xx=0A= if [[ $ck1 =3D 18569 ]] && [[ $ck2 =3D 8716 ]]; then=0A= /bin/true=0A= else=0A= echo Ris Kernel: Original Checksum Not Match $fi=0A= exit 1=0A= fi=0A= /bin/cp -p $fi $fi.BT=0A= echo Patching: netboot_bootp_open:467=0A= echo ' "bis zero, 2, s5" =3D=3D> "bis zero, 30, s5"'=0A= $wd/zapb $fi.BT 171388 0x455ff10a47e3d40e=0A= echo Patching: bootp_info:3464=0A= echo ' "bis zero, 4, s4" =3D=3D> "bis zero, 30, s4"'=0A= echo ' "bis zero, 5, s6" =3D=3D> "bis zero, 31, s6"'=0A= $wd/zapb $fi.BT 3139788 0x47e3f40f47e3d40d=0A= sum $fi.BT | read ck1 ck2 xx=0A= if [[ $ck1 =3D 53020 ]] && [[ $ck2 =3D 8716 ]]; then=0A= /bin/rm -f $kr=0A= ln -s $fi.BT $kr=0A= echo Ris Kernel: $kr '->' $fi.BT Successfully Patched=0A= exit 0=0A= else=0A= echo Ris Kernel: $fi.BT Patch Failed Checksum Not Match=0A= exit 1=0A= fi=0A= ;;=0A= vmunix*.BT)=0A= sum $fi | read ck1 ck2 xx=0A= if [[ $ck1 =3D 53020 ]] && [[ $ck2 =3D 8716 ]]; then=0A= echo Ris Kernel: Already Patched $fi=0A= else=0A= echo Ris Kernel: Patched Checksum Not Match $fi=0A= exit 1=0A= fi=0A= ;;=0A= *)=0A= echo Ris Kernel: Illegal Name $fi=0A= exit 1=0A= esac=0A= =0A= else=0A= echo Ris Kernel: Invalid $kr=0A= exit 1=0A= fi=0A= done=0A= ------_=_NextPart_000_01C216E8.AABFDE80 Content-Type: application/octet-stream; name="zapb.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="zapb.c" #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= #define ATOF atol=0A= =0A= main(int ac, char *av[])=0A= {=0A= int fd;=0A= off_t offset,pos;=0A= unsigned long new;=0A= unsigned long old;=0A= char *endptr;=0A= =0A= fd =3D open(av[1],O_RDWR,0666);=0A= if (-1 =3D=3D fd) { perror("open"); exit(1); }=0A= offset =3D ATOF(av[2]);=0A= new =3D strtoul (av[3], &endptr, 16);=0A= if (offset !=3D (pos =3D lseek(fd,offset,SEEK_SET)))=0A= { perror("lseek"); exit(2); }=0A= if (-1 =3D=3D read(fd, &old, sizeof(long)))=0A= { perror("read"); exit(2); }=0A= printf("OLD:%lX\n",old);=0A= printf("NEW:%lX\n",new);=0A= if (offset !=3D (pos =3D lseek(fd,offset,SEEK_SET)))=0A= { perror("lseek"); exit(2); }=0A= printf("Writing: %lX instead of %lX : ", new, old);=0A= fflush(stdout);=0A= sleep(5);=0A= if (-1 =3D=3D write(fd, &new, sizeof(long)))=0A= { perror("write"); exit(2); }=0A= if (offset !=3D (pos =3D lseek(fd,offset,SEEK_SET)))=0A= { perror("lseek"); exit(2); }=0A= if (-1 =3D=3D read(fd, &old, sizeof(long)))=0A= { perror("read"); exit(2); }=0A= printf("CHK:%lX\n",old);=0A= close(fd);=0A= }=0A= ------_=_NextPart_000_01C216E8.AABFDE80--