From owner-freebsd-hackers Tue Jul 23 02:07:39 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA29916 for hackers-outgoing; Tue, 23 Jul 1996 02:07:39 -0700 (PDT) Received: from clipper.cs.kiev.ua (root@cs-demon-64k.cs.kiev.ua [193.124.48.251]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id CAA29906 for ; Tue, 23 Jul 1996 02:07:17 -0700 (PDT) Received: from dog by clipper.cs.kiev.ua with uucp id m0uidNZ-0004zOC; Tue, 23 Jul 96 12:03 WET DST Received: (from dk@localhost) by dog.farm.org (8.7.5/dk#3) id EAA03102; Tue, 23 Jul 1996 04:50:33 -0400 (EDT) From: Dmitry Kohmanyuk Message-Id: <199607230850.EAA03102@dog.farm.org> Subject: lp booting: first cut To: freebsd-hackers@freebsd.org Date: Tue, 23 Jul 1996 04:50:32 -0400 (EDT) Reply-To: dk+@ua.net X-Class: Fast X-OS-Of-Choice: FreeBSD 2.2-960501-SNAP X-NIC-Handle: DK379 X-Pager-Email: dk@interpage.net X-Mailer: ELM [version 2.4ME+ PL13 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.