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 <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message