From owner-freebsd-current Fri Mar 30 9:57:14 2001 Delivered-To: freebsd-current@freebsd.org Received: from milquetoast.cs.mcgill.ca (milquetoast.CS.McGill.CA [132.206.2.5]) by hub.freebsd.org (Postfix) with ESMTP id 30B6837B71B for ; Fri, 30 Mar 2001 09:57:06 -0800 (PST) (envelope-from mat@milquetoast.cs.mcgill.ca) Received: (from mat@localhost) by milquetoast.cs.mcgill.ca (8.9.3/8.9.3) id MAA20375; Fri, 30 Mar 2001 12:57:01 -0500 (EST) Date: Fri, 30 Mar 2001 12:57:01 -0500 From: Mathew KANNER To: Falco Krepel Cc: freebsd-current@FreeBSD.ORG Subject: Re: new rc.diskless{1,2} files Message-ID: <20010330125701.C17585@cs.mcgill.ca> References: <3AC4C496.60861EB6@fokus.gmd.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: Falco Krepel's message [new rc.diskless{1,2} files] as of Fri, Mar 30, 2001 at 07:38:30PM +0200 Organization: I speak for myself, operating in Montreal, CANADA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mar 30, Falco Krepel wrote: > I have implemented good ideas from Mike Smith in my > rc.diskless{1,2} files and make some other changes: Hi, I don't have access to hardware to test diskless but have a few suggestions from looking at proposal. BOOTP probably isn't how most people are going to do it, instead they will be using PXE, perhaps we should retire the reference to BOOTP in the following. > # > # /etc/rc.diskless1 - general BOOTP startup > # > # BOOTP has mounted / for us. Assume a read-only mount. We must then > # - figure out our IP by querying the interface > # - fill /conf/etc (writable) with files from /etc, and then update > # per-machine files from /conf/*/ where * is the IP of the host, > # the IP of the subnet, "default", or nothing. > # - mount /conf/etc over /etc so we can see the new files. > # > # WARNING: i thing you should not change /etc/rc or strange things could ^^^^^^^^ > md_device=`mdconfig -a -t malloc -s $1` > chkerr $? "configuring md device" > disklabel -rw $md_device auto > chkerr $? "labelling md device" > md_filesystem=/dev/$md_device"c" > newfs $md_filesystem 2>&1 >/dev/null > chkerr $? "making md device filesystem" > mount $md_filesystem $2 Barring a change in newfs or mount, it would be nice if it could tunefs to enable softupdates. > bootp_ifc="" > bootp_ipa="" > bootp_ipbca="" > iflist=`ifconfig -l` > for i in ${iflist} ; do > set `ifconfig ${i}` > while [ $# -ge 1 ] ; do > if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then > bootp_ifc=${i} ; bootp_ipa=${2} ; shift > fi > if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ] ; then > bootp_ipbca=$2; shift > fi > shift > done > if [ "${bootp_ifc}" != "" ] ; then > break > fi > done > echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}" IIRC, PXE sets a kernel env. with this info. Maybe we should try to grab that first and then fall back to the above. > [...] My final thought is that I remember having to stick a chkprintcap -d somewhere to make it a happy workstation. --Mat -- Mathew Kanner Sys Admin at large Obtuse quote: He [not me] understands: "This field of perception is void of perception of man." -- The Quintessence of Buddhism To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message