Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 1999 11:26:35 -0700
From:      Robert Ramey <ramey@rrsd.com>
To:        "'freebsd-questions@FreeBSD.ORG'" <freebsd-questions@FreeBSD.ORG>
Cc:        "'Michael.Still@ipaustralia.gov.au'" <Michael.Still@ipaustralia.gov.au>
Subject:   diskless booting
Message-ID:  <01BEBCA2.16C0F1E0@226-146.adsl2.avtel.net>

next in thread | raw e-mail | index | archive | help
Gentlemen,

I am trying to boot FreeBSD as a diskless workstation.   I have made =
progress but so far fallen just short of success.  Before I ask for help =
I will summarize my steps and progress so far.

My server is Windows/NT with Hummingbird NFS Maestro installed.  The =
NTFS system is used.   The NT DHCP server is configured to respond to =
bootp or DHCP requests.=20

My client it FreeBSD version 3.1 .   I have built a custom kernel with =
only NFS filesystem installled and NO_SWAPPING set.  Also option DEVFS =
is set.  The intention of the system is to run a small fixed set of =
applications

I downloaded the netboot package.  This can be used to build a floppy =
disk version of the boot prom.  everything worked well once I got a new =
network card. Until it jumped to the kernel.  At that point, things =
failed because it was expecting a kernel in aout format and did not have =
the code to handle an elf kernel.

at this point I downloaded the etherboot package.  I had trouble =
building it as the port was for version 1.9 while the only distribution =
I could find was 2.0 for linux.  I managed to build the 2.0 package =
after hand inserting the changes from the port.  After a number of =
adjustments, I was able to get the prom part to function  -  off a =
floppy for now - , load the kernel, and jump to it.

Before, I finish I would like to contrast netboot and etherboot as they =
are quite different.

Netboot:
	bootp is used to find the location of the root file system and kernel
	a tcp/ip stack and nfs client code is invoked to mount the nfs root.
	the kernel is copied into ram using nfs calls
	net boot jumps into the kernel.
	netboot requires tftp AND an NFS Server and will only boot a freeBSD or =
perhaps a Linux system

Etherboot
	dhcp is used to find the location of the kernel
	loads the kernel into ram using tftp
	jumps to the kernel
	the kernel has to be specially built to use NFS as the root.  It =
doesn't load the
		kernel again.=20
	It uses bootp to figure out where the root NFS system is
	etherboot will load a "tagged image file" and jump to a special 2nd =
stage boot.  This permits one bootprom
		to load any operating system.  However, building the corresponding =
tagged image file is non-trivial.
		the etherboot package includes systems for building tagged image files =
for linux and DOS.
	etherboot needs only tftp and bootp implemented on the server to =
function.

Ideally I would like to arrive at a clean etherboot setup with the =
ability to build "tagged image files" for DOS/WIndows, Linux, and =
FreeBSD.  Currently, the etherboot I have recognizes that a boot image =
is an elf or aout kernel and boots it.   This is OK for now but I would =
like to see all OS specific data removed from the etherboot setup.

Now, my problem is the following:

I built a kernel with all known options set for diskless booting.  This =
included NFS_ROOT, NFS.  Other file systems were turned off.  I also set =
option DEVFS,  kernel tracing and DDB.  The kernel seems to get started =
fine, all the normal device probing seems to work as expected.  The =
system complained that it couldn't execute the init process.  This =
stopped in a panic.  OK, i copied the init program to the correct spot =
in the hierarchy of the NFS server file system.  This time there was no =
panic and messages indicating that pagedaemon (pid=3D2) and =
syncer(pid=3D3) were started.

Then - nothing.   The system does respond to the magic key combo to =
invoke DDB.   But I don't know enough to use this information.  Placed a =
line at the start of the etc/rc file to check that it was being invoked =
but it didn't display. I recompiled init to printf a sign-on message =
when started.  The message was not displayed.


A few asides

Setting up NFS server/TFTP/DHCP and reconciling all the securitity =
issues between FreeBSD and NT is a hellish experience.  I had to try 3 =
NFS packages and 3 TFTP packages.  The only combination which I could =
get working is NT/DHCP, Hummingbird NFS Maestro with a set of inetd =
daemons that includes TFTP.

It is a mystery to me how the device nodes get created in a totally =
diskless system.  I can't create them on a NFS mount - but that is the =
only file system that exists when the NFS Server is providing the root.

Also, I am building the kernel with option NO SWAPPING.  My target is an =
"internet appliance" rather than a general purpose workstation.  I would =
hope that a large application not require swapping for its text segments =
but rather only for its data.   If the number/data area of running =
applications is limited to a known set,   Swapping area should not be =
necessary even if the applications don't all fit.  I would hope that =
under this configuration, data areas are prohibit from swapping and text =
segments are discarded when space is requried and reloaded from the file =
system when needed.   Since 98 percent of the time the progrm is only =
usng 30% of the code - this would work great for me.

If anyone want to comment on this feel free - after all it is FreeBSD.

I'm getting desparate, any help is appreciated

Robert Ramey



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01BEBCA2.16C0F1E0>