Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 1996 19:47:51 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        phk@critter.tfs.com (Poul-Henning Kamp)
Cc:        hackers@freebsd.org
Subject:   Re: A question on diskless boot
Message-ID:  <199612171847.TAA05241@labinfo.iet.unipi.it>
In-Reply-To: <9207.850642949@critter.tfs.com> from "Poul-Henning Kamp" at Dec 15, 96 10:42:10 am

next in thread | previous in thread | raw e-mail | index | archive | help
> >One of our labs has a number of machines with a network card (21140
> >based, if_de driver) which is unsupported by netboot. I am looking for
> >some alternative ways to setup these machines as diskless, i.e mounting
> >root at the very least from a remote server.
...
> >I am willing to work on it, and would just like a bit of advice.
> 
> Let me tell you what I would do:
> 
> Make a kernel with a builtin MFS filesystem, just like
> the one on boot.flp.  Boot this kernel from wherever you
> want (floppy ?)

Honestly I don't like much this solution. One of the nice thing in
the move from 1.1 to 2.1 in the diskless code is that you could
use the same exact kernel for ordinary and diskless systems. I'd
like to preserve this feature as much as possible.

> Add generic code to the ethernet support in the kernel
> so that one can say
> 	ifconfig -bootp de0 > /etc/bootp.reply

In any case this (or the kernel equivalent) requires the bootp request
be sent before having an address. Now, is it reasonable to use
255.255.255.255 as the IP address until the reply has come ? I have
tried

	ifconfig ed0 255.255.255.255 alias

and it does not seem to complain. Haven't tried to use it to
communicate though... if this works, then it seems relatively
trivial (not asking for someone to do, just need a bit of advice!)
to add the following code in nfs/nfs_vfsops.c near the beginning
of nfs_mountroot():

- add a call to ifioctl(so, SIOCAIFADDR, ...) to assign an IP
  of  255.255.255.255 
- collect an IP address using bootp
- delete the  255.255.255.255 address
- call ifioctl(so, SIOCAIFADDR, ...) with the right IP
- merge in the netboot code to get the relevant info on the
  server

and then continue with the current code. This shouldn't cause a large
bloat in the kernel, since the whole netboot stuff is 8-10KB including
the driver for the card, printf and many other things.

	Luigi
-----------------------------+--------------------------------------
Luigi Rizzo                  |  Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it    |  Universita' di Pisa
tel: +39-50-568533           |  via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522           |  http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________



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