From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075317506451.tru64-unix-managers.marc@archive.invalid> From: Dan Stromberg - OAC-CSG Date: Thu, 09 Feb 1995 00:46:31 +0000 To: tru64-unix-managers Subject: SUMMARY: bootp on alpha X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075317506451 Thanks go to Kenny House (house@wrksys.enet.dec.com) and Andrew Gallatin (gallatin@isds.duke.edu) for pointing out the prom variables "ewa0_inet_init" and "ewa0_protocols" - both of which need to be set to "bootp" on the alphastation, in order to get "boot ewa0" to generate a proper bootp-broadcast. In retrospect, my question "how does inetd know to listen for bootp broadcasts?" is a bit silly, now that I'm realizing that broadcasts contain source ports and destination ports. I've now got something that'll bootp into a ram disk and start executing a script (based on the RIS-provided kernel, modified slightly with the following "python" script)... #!/dcs/bin/python import sys import string # ADDRESS 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C ASCII #============================================================================== #006124CD 72 67 75 6D 65 6E 74 73 0A 23 0A 23 09 67 69 76 rguments.#.#.giv #006124DD 65 6E 3A 09 6E 69 6C 0A 23 09 64 6F 65 73 3A 09 en:.nil.#.does:. #006124ED 73 65 74 20 75 70 20 74 68 65 20 53 41 53 20 65 set up the SAS e #006124FD 6E 76 69 72 6F 6E 6D 65 6E 74 20 73 6F 20 74 68 nvironment so th #0061250D 61 74 20 69 6E 73 74 61 6C 6C 2E 6F 73 66 20 63 at install.osf c #0061251D 61 6E 0A 23 09 09 72 75 6E 2E 20 52 75 6E 73 20 an.#..run. Runs def main(): # suck in the entire kernel file = open('vmunix.keep','r') vmunix_old = file.read() file.close() print 'kernel is read' # find a position somewhere within the /.profile, that's built-into the # kernel. Raise an exception if it's not locatable pos=string.index(vmunix_old,"# @(#)$RCSfile: .profile,v") print 'magic string located' # what do we want to do? to_do = \ "set -x\n" + \ "mount -u /\n" + \ "eval `/gethost`\n" + \ "echo '128.200.34.23 autoinst.acs.uci.edu' > /etc/hosts\n" + \ "routed -q\n" + \ "mount xxx.xxx.xxx.xxx:/pathname/OSF-1-3.0 /kit\n" + \ "/kit/install\n" + \ "/bin/sh\n" + \ "exit 0\n" length = len(to_do) vmunix_new = vmunix_old[0:pos] vmunix_new = vmunix_new + to_do vmunix_new = vmunix_new + vmunix_old[pos+length:] print 'commands entered' # verify that the kernel's length hasn't changed if len(vmunix_old) <> len(vmunix_new): print 'length of kernel changed - that is bad',\ len(vmunix_new),len(vmunix_old) sys.exit(1) # write out the changed kernel file = open('vmunix','w') file.write(vmunix_new) file.close() print 'kernel written' sys.exit(0) main()