From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <92d86902c00a0bddee3e7a0f4e649afb@quanstro.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] a small error in /rc/bin/cpurc From: erik quanstrom Date: Sat, 3 Nov 2007 17:30:09 -0400 In-Reply-To: <10b109140711031012j6d47e8f9g3ed3fec76a2dc565@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: e85bde84-ead2-11e9-9d60-3106f5b1d025 > there is a bad order in initialization of network in /rc/bin/cpurc: > > ndb/dns -r > ip/ipconfig > > When I boot with these settings I get message: > > ndb/dns: can't read my ip address > > I suggest to swap these commands. on plan 9, ndb, not dns is generally required to resolve ip addresses. to read cpurc, one needs a connection to the fileserver, so at this point we can resolve files. if the fs is remote, this means that networking is already configured. either way, the local machine's ip address should be in /lib/ndb/local for dns to find. each plan 9 host should have an /lib/ndb/local entry along the lines of sys=kremvax ip=9.18.36.72 # required. ether=000102030405 # optional, for plan 9 dhcp. dom=kremvax.ibm.com # optional, for dns. for the standalone machines i have, i typically use the bootargs to set up networking before the root fs is mounted.this is the plan9.ini from the one machine we have at coraid that boots stand-alone, the auth server: bootfile=sdD0!9fat!9myri bootargs=il -d -g 205.185.197.254 ether /net/ether0 205.185.197.99 255.255.255.0 fs=205.185.197.100 auth=205.185.197.99 console=0 by the way, since i can't often remember ether addresses, i wrote this script to find the pxe .ini file for the named machines: #!/bin/rc rfork e for(i) for(ether in `{ndb/query -m sys $1 ether}){ pxe = /cfg/pxe/$ether if(test -e $pxe) echo $pxe } - erik