
This file contains notes on how to set up Linux so that it can
act as a server for the network boot prom.

There are two parts to  this:

1. You must configure the server networking software so that it will
respond correctly to the booting PC's bootp requests (i.e. you
must have a bootp daemon ready to run, and a tftp daemon ready to run).

2. You must have a suitable kernel image to pass to the booting PC.


The following description pertains to patch level 10 and above kernels.
It is possible to get this working with pre-pl10 kernels, but much
more difficult.

The first thing is to set up your network software so that it will
respond to bootp requests and tftp requests. You will need to read
the manual entries for both these programs (bootpd and tftpd). Be
sure to get permissions correct for tftpd. You will probably need
your ethernet hardware address(es) for bootpd.

You will need to modify the bootptab file. This directs bootpd to reply
to the booting PC with an IP address and a file name.

For initial testing, instead of loading a kernel, you can load
a dummy program given in netboot.zoo, dummy.bin.

'Dummy.bin' simply writes a message on the booting PC's screen. This proves
that your setup is correct. 

So when you reach the nirvanic stage of being able to boot your dummy program,
you are ready to build and boot a real kernel (and achieve enlightenment).

For network booting you need to load the ramdisk at the same time as
the kernel image.

To support this, the kernel needs a patch so that it doesn't attempt
to load the ramdisk image from the boot device (e.g. floppy)

The patches should be available in the .tgz file where you got this.

Be warned:

	1. I suspect the ramdisk code is going to undergo considerable change

	2. My patches are not mainstream. The next Linux release could
	   wipe out my patches.
	   
	3. I'm not a kernel expert. The patches work for me, but I'm
	   not on firm ground here.

	4. Your kernel needs to be fairly small. These patches do *NOT*
	   support the compressed kernel image as yet.

The gory details of what the patches do is given at the end.

So you've patched and built the kernel.

Now you need a ramdisk image. You could find a convenient partition
and mkfs to the size you want, and then start copying. You could take
the ramdisk off the a1 disk from SLS. (It starts at about .... um.... look
for the minix magic number (in minix.h)).

Another alternative is to use the loop driver patches that allow a single
file to be a mountable file system. 

You then run the nethead program (in the patch kit) on the kernel image
and the ram disk. This produces (on stdout) a kernel you can net boot.
Copy this up to the directory you set up for bootpd/tftpd and Bob's
your uncle.

Now what we need are two packs like SLS, one for an X terminal, and
one for a diskless workstation. Any enthusiastic offers?

Gory details on my kernel patches:

The essence of the patches are:

	another word in bootsect.S is used to give the ram disk
	start address
	
	main.c uses this start address (if non zero) plus the ramdisk
	size instead of &end as being the start of (high) memory
	
	ramdisk.c takes a flag to say the image is preloaded. If it
	is preloaded, then it does not 'zero' it out.
	
	ll_rw_blk.c detects the ram start variable. If it is non zero,
	then 
		a. the ram disk image is considered preloaded
		b. the memory size does not need to be decreased, the
		    ramdisk is already allocated
		  
I have tested these somewhat, and they seem to work.

Regards and enjoy,
Jamie Honan

jhonan@kralizec.zeta.org.au

