Date: Mon, 25 Jan 1999 17:04:14 +0100 (MET) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: dillon@apollo.backplane.com (Matthew Dillon) Cc: current@FreeBSD.ORG Subject: Re: beginnings of a diskless boot sequence being committed Message-ID: <199901251604.RAA27194@labinfo.iet.unipi.it> In-Reply-To: <199901251754.JAA06826@apollo.backplane.com> from "Matthew Dillon" at Jan 25, 99 09:54:12 am
next in thread | previous in thread | raw e-mail | index | archive | help
> :> '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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901251604.RAA27194>