Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2001 12:57:01 -0500
From:      Mathew KANNER <mat@cs.mcgill.ca>
To:        Falco Krepel <krepel@fokus.gmd.de>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: new rc.diskless{1,2} files
Message-ID:  <20010330125701.C17585@cs.mcgill.ca>
In-Reply-To: Falco Krepel's message [new rc.diskless{1,2} files] as of Fri, Mar 30, 2001 at 07:38:30PM %2B0200
References:  <3AC4C496.60861EB6@fokus.gmd.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <mat@CS.McGill.CA>  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010330125701.C17585>