Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 1996 04:50:32 -0400 (EDT)
From:      Dmitry Kohmanyuk <dk@dog.farm.org>
To:        freebsd-hackers@freebsd.org
Subject:   lp booting: first cut
Message-ID:  <199607230850.EAA03102@dog.farm.org>

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


hi folks,

I have finally managed to ping(1) my little DTR-1 notebook
booted diskless over printer cable.

I attach patches for files in /sys/i386/boot/netboot/ directory:

lp.c	new file, all of printer port booting code
main.c	little changes for lp.c (point-to-point interface and fake ARP)
Makefile addition of lp.com target

The problem when booting over point-to-point link is that you cannot
reach your gateway unless it is the other end of interface.  Since
bootp does not have a way to specify that, I have decided on the following
convention (or hack): the subnet mask of all ones (0xffffffff) means
p2p link, and the gateway means the peer address.   Also, a fake MAC
address is necessary to fool the bootp server.  A copy of my /etc/bootptab:

# /etc/bootptab - bootpd(8) config file

.default:\
	:hn:td=/r/boot:\
	:ds=ns:

# lpip magic: ha,gw,sm,vm(for sm)
cat:tc=.default:ha=000000.002a00:vm=rfc1084:\
	:gw=193.124.48.197:sm=255.255.255.255:

the vm= is necessary for sm= to work (took me another hour to figure out),
and the ha= is just a magic address for printer interface.  2a is 42 decimal.
I cannot see a method to boot 2 boxes from one machine this way. ;-(

I have found that the kernel (and lp.c's) parameters like
-DLPMAXSPIN1=50000 -DLPMAXSPIN2=5000   
are proven to be critical in getting the thing to work.

I am running 2.2-960501-SNAP now (installed from a snapshot CD).
I have ftp'ed netboot/ from ftp.freebsd.org today and found very
little changes, which I have merged with my patches, so I should go clean.

my host box (dog.farm.org) is 486-DX80, 16M RAM, and the client machine is
DTR-1, a Cyrix 486SLC (8 or 25MHz selectable), with 6Megs of RAM.  
I found that 8 MHz gives me more network bandwidth - I cannot understand why.

unfortunately, the kernel cannot proceed to single-user (all it
says is `NFS SWAP:' and `NFS ROOT:' lines).  I am trying to figure what's
wrong now. Previously, I had error 65 (no route to host) in nfs/nfs_vfsops.c, 
but I have fixed that by adding explicit gateway.

Please test these changes, as I am not sure what caused my client box
stop booting - maybe it is just some cyrix/APM/other weirdness.
I am running kernel with only sc0, ed0, sio0, sio1, lpt0, pca0, fdc0, npx0
compiled in, and tried to disable (-c) everything but sc0, lpt0 and npx0.
I have not enabled any of CYRIX cache kernel options. I am using standard
FPU emulator.

thank you,
Dmitry.

the patches (23K, mostly just new lp.c) are available at:
ftp://ftp.freebsd.org/pub/FreeBSD/incoming/netboot-lp-1.0-patch

please note that changes to main.c include some debugging printf's
which can be safely removed, and changes to CFLAGS in Makefile should
be reviewed.



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