From owner-freebsd-hackers Thu Jun 4 01:02:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA22775 for freebsd-hackers-outgoing; Thu, 4 Jun 1998 01:02:40 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id BAA22592 for ; Thu, 4 Jun 1998 01:01:52 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id IAA08871; Thu, 4 Jun 1998 08:21:47 +0200 From: Luigi Rizzo Message-Id: <199806040621.IAA08871@labinfo.iet.unipi.it> Subject: Re: tftp in bootp process To: mike@smith.net.au (Mike Smith) Date: Thu, 4 Jun 1998 08:21:47 +0200 (MET DST) Cc: Nicolas.Souchu@prism.uvsq.fr, freebsd-hackers@FreeBSD.ORG, mbouget@club-internet.fr In-Reply-To: <199806040528.WAA00537@antipodes.cdrom.com> from "Mike Smith" at Jun 3, 98 10:28:08 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > tftp is not used anymore in the diskless boot process. Unfortunately the > > documentation (especially, the handbook) has not been updated. The > > best source of documentation is the netboot(8) manpage. > > Ah, last time I looked at the netboot sources, it still fetched and > read the configuration file. The netboot(8) manpage was stolen from on this you are right, but the tftp stuff is only a relic of the past and probably has been left in for backward compatibility only. In my local copy of the sources I have #ifdef'd out this section of code for a long time. > NetBSD and never updated. It doesn't describe the (primitive, Sun > -inspired) NetBSD diskless environment very well, and its applicability > to FreeBSD is even less. I quote from netboot(8) just for perspective: > > In phase 2, the boot program loads a kernel. Operation in this phase de- > pends on the design of the boot program. (The design described here is > the one used by Sun and NetBSD/hp300.) The boot program: > > I can't imagine what this manpage is doing apart from confusing people. Which manpage are you looking at ? The one attached below is from a stock 2.2.6-RELEASE . It was rewritten almost completely about one year ago by Tor Egge (if i remember well) and myself, to account for the extensive (in functionality; the code did not change much) changes in netboot to get all info from the bootptab, and to the kernel (this time more extensive changes done by Tor Egge) to give better support for diskless. To me this page seems very clear. If something is missing, it is just a set of related kernel config options. cheers luigi NETBOOT(8) FreeBSD System Manager's Manual NETBOOT(8) NAME netboot - Allows remote booting of the operating system SYNOPSIS netboot is used for booting the operating system over a network card. The program is either loaded into a ROM, or run from DOS. DESCRIPTION netboot loads parameters such as IP addresses, kernel name and filesystem names from a bootp server, tries to mount the specified root and swap filesystems, loads the specified kernel from the root filesystem using NFSv2, and then gives control to the kernel. The bootp server must be configured appropriately. An example configura- tion for /etc/bootptab is the following: .default:\ :sm=255.255.255.0:\ :gw=your.gateway.ip:\ :hn:ht=ether:vm=rfc1048:\ :rp="rootfs.ip:/rootfs/path":\ :T128="swapfs.ip:/swapfs/path":\ :T129=swapsize:\ :T130="root,mount,options":\ :T131="swap,mount,options":\ :ra=255.255.255.255: client01:bf="kernel.300":ha=00400530d6d9:tc=.default: client02:bf="kernel.280":ha=00400530d6d3:tc=.default: ... For a precise description of the bootptab parameters, see bootptab (5) . The netboot code uses options as follows. sm indicates the subnet mask. gw is the ip address of the gateway. hn instructs the bootp server to send the hostname in the reply. ht=ether indicates that the hardware is ethernet. vm=rfc1048 indicates the use of rfc1048 extensions. rp specifies where the directory mounted as the root filesystem is located. The IP address of the server must be specified, fol- lowed by a : and the directory pathname. T128 specifies where the directory containing the swap file is locat- ed. The IP address of the server must be specified, followed by a : and the directory pathname. The actual swapfile is a file named swap.X.Y.Z.T where X.Y.Z.T is the IP address of the client. If this argument is given, the swap file must exist. T129 specifies the size of the swap file, in KB. Must be specified as a 8 digits long hexadecimal number. 16 MB swap thus becomes T129=00004000. This argument is optional; if missing, the size of the swap file is read from the server. T130 specifies root mount options, such as soft, intr, tcp, etc. This argument is optional. The default is to use UDP. T131 specifies swap mount options. This argument is optional. bf is the name of the kernel. If not specified, it defaults to "ker- nel". ra is used to override the reply address. FILES /usr/mdec/nb8390.rom rom image for NE1000/NE2000 cards /usr/mdec/nb8390.com DOS executable for NE1000/NE2000 cards /usr/mdec/nb3c509.rom rom image for 3C509 cards /usr/mdec/nb3c509.com DOS executable for 3C509 cards SEE ALSO bootpd(8), bootptab(5) BUGS To use netboot with Western Digital/SMC cards or 3C503 cards, a recompile is needed after a little Makefile tweaking. May 15, 1997 2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message