Date: Tue, 17 Dec 1996 20:51:45 +0100 From: Poul-Henning Kamp <phk@critter.tfs.com> To: Luigi Rizzo <luigi@labinfo.iet.unipi.it> Cc: hackers@freebsd.org Subject: Re: A question on diskless boot Message-ID: <16292.850852305@critter.tfs.com> In-Reply-To: Your message of "Tue, 17 Dec 1996 19:47:51 %2B0100." <199612171847.TAA05241@labinfo.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <199612171847.TAA05241@labinfo.iet.unipi.it>, Luigi Rizzo writes: >> 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. I belive that you actually use IP# 0.0.0.0 as dest IP with bootp, but the RFC will tell I'm sure. You may have to add special-case code somewhere deep in the ip stuff, but try it out and see what happens. I would prefer if the same code could be made to work with ifconfig for the non-diskless case as well. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Power and ignorance is a disgusting cocktail.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16292.850852305>