From owner-freebsd-current Mon Jan 25 10:16:02 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA18510 for freebsd-current-outgoing; Mon, 25 Jan 1999 10:16:02 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id KAA18431 for ; Mon, 25 Jan 1999 10:15:55 -0800 (PST) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id RAA27194; Mon, 25 Jan 1999 17:04:14 +0100 From: Luigi Rizzo Message-Id: <199901251604.RAA27194@labinfo.iet.unipi.it> Subject: Re: beginnings of a diskless boot sequence being committed To: dillon@apollo.backplane.com (Matthew Dillon) Date: Mon, 25 Jan 1999 17:04:14 +0100 (MET) Cc: current@FreeBSD.ORG In-Reply-To: <199901251754.JAA06826@apollo.backplane.com> from "Matthew Dillon" at Jan 25, 99 09:54:12 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > :> 'kern.conf_dir' which the kernel initially sets to nothing. > : > :ok, i can only suggest that if you replace the sysctl kern.conf_dir > :variable with a shell variable as i did, you can achieve a more ... > That's what I had originally, but extracting the machine's IP > address is not trivial, and I didn't want to stick: > > bootp_ifc=`route -n get default | fgrep interface | awk '{ print $2; }'` > bootp_ipa=`ifconfig $bootp_ifc | fgrep inet | head -1 | awk '{ print $2; }'` I think it is much easier than that. The kernel BOOTP support sets the machine's hostname, so you can do something like if [ "`hostname`" = "" ] then # regular non-bootp sequence mount -u -o rw / ... mount -a -t nonfs else . /etc/rc.diskless fi if you want, save the `hostname` before executing rc.network to remember if you started as diskless or not. > :I haven't seen how you suggest to build&populate the MFS filesystems -- ... > There isn't much to build. Most of the MFS filesystems start out > empty. ok here we use a different approach. For simplicity I am using a single MFS system with all the things you put in /var, and including /var/dev and /var/etc (with /dev -> /var/dev and /etc -> /var/etc on the diskless machine). cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO . EMAIL: luigi@iet.unipi.it . Dip. di Ing. dell'Informazione HTTP://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) -----------------------------------+------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message