Date: Sat, 27 Oct 2001 06:01:50 +1000 (EST) From: =?iso-8859-1?q?Paul=20Jansen?= <vlaero@yahoo.com.au> To: questions@freebsd.org Subject: help required with PXE bootloader Message-ID: <20011026200150.38697.qmail@web12908.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hello. I've been playing around with diskless configurations in FreeBSD lately. I was very pleased to see that someone had finally updated the handbook page on 'diskless booting' sometime around the weekend near the 10th October. I was able to follow the steps and with a little bit of fiddling I managed to get ti all working. My current setup uses Etherboot floppy bootloaders to kick off the process (my home setup). I've decided to try and implement freeBSD diskless at work for a varieties of reasons. The vast majority of the machiens at my work are IBM's that have PXE network cards by default. I've updated the PXE code on each of the nics and after following the steps outlined here: http://www.ltsp.org/documentation/pxe.howto.html I've managed to get FreeBSD up and running by pressing F12 at boot to tell the machine to try booting using PXE. It's now a 2 step process whereby: (1) PXE retrieves the PXE bootable etherboot code from the DHCP server (2) Eherboot then retrieves the kernel from the TFTP server after again talking to the DHCP server. This setup works fine at home. I'm using ISC DHCP v3 (from ports). The 2 step process works because the ISC server is able to send the node a different file depending on the client identifier (ie: 'PXEclient' or 'Etherboot'). At work we have Microsoft DHCp servers which cannot dothe type of logic above. You can specify a filename but not a different filename depending on what the client identifier is. In order to get around I've though of a couple of options. (1) get the machines I want to boot diskless put on their own subnet seperated from the main network by a router that blocks DHCP packets. I could then run a BSD box with ISC DHCPD to provide DHCP services. This is unlikely however. (2) I saw Alfred Perlsteins page on how to setup FreeBSD installs unsing PXE. I wanted to reduce the boot process down to one step (as opposed to the 2 step process described above) in the hope that I could allow this diskless booting to be performed in conjunction with the Microsoft DHCP server. I'm investigating now as to wherther the MS DHCP server will allow me to specify the custom DHCP optins that freeBSD will require to allow it to boot diskless. I do know that I can specify the boot filename and 'next server' parameters to tell the node where the TFTP server is. The problem I'm having now is when I follow Alfred's directions to create the PXE loader (using 4.4R) It bombs out. It's my understanding the I just need to stick 'pxeldr' into the root of the TFTP server directory and tell the machine to execute this by specifying it as the boot file in the DHCP configuration. I also understand that I have to create a subdirectory called 'boot' under the TFTP root directory with the file 'loader.rc' in it. Can someone verify if this is the case? Alfred's instructions can be found here: http://people.freebsd.org/~alfred/pxe/ This is the console output that insues when I try and build pxeldr as per Alfred's instructions: " auadwesm1203280# make ===> ficl Warning: Object directory not changed from original /usr/src/sys/boot/ficl ===> i386 ===> i386/mbr Warning: Object directory not changed from original /usr/src/sys/boot/i386/mbr ===> i386/boot0 Warning: Object directory not changed from original /usr/src/sys/boot/i386/boot0 ===> i386/kgzldr Warning: Object directory not changed from original /usr/src/sys/boot/i386/kgzld r ===> i386/btx ===> i386/btx/btx Warning: Object directory not changed from original /usr/src/sys/boot/i386/btx/b tx ===> i386/btx/btxldr Warning: Object directory not changed from original /usr/src/sys/boot/i386/btx/b txldr ===> i386/btx/lib Warning: Object directory not changed from original /usr/src/sys/boot/i386/btx/l ib ===> i386/boot2 Warning: Object directory not changed from original /usr/src/sys/boot/i386/boot2 ===> i386/libi386 Warning: Object directory not changed from original /usr/src/sys/boot/i386/libi3 86 cc -O -pipe -I/usr/src/sys/boot/i386/libi386/../../common -I/usr/src/sys/boot/i 386/libi386/../btx/lib -I/usr/src/sys/boot/i386/libi386/../../.. -I. -DCOMPORT= 0x3f8 -DCOMSPEED=9600 -I/usr/src/sys/boot/i386/libi386/../../../../lib/libstand/ -DTERM_EMU -mpreferred-stack-boundary=2 -c pxe.c -o pxe.o pxe.c:41: net.h: No such file or directory pxe.c:42: netif.h: No such file or directory pxe.c:43: nfsv2.h: No such file or directory pxe.c:44: iodesc.h: No such file or directory pxe.c:46: bootp.h: No such file or directory pxe.c:84: warning: `struct netif' declared inside parameter list pxe.c:84: warning: its scope is only this definition or declaration, which is pr obably not what you want. pxe.c:85: warning: `struct netif' declared inside parameter list pxe.c:86: warning: `struct iodesc' declared inside parameter list pxe.c:88: warning: `struct iodesc' declared inside parameter list pxe.c:89: warning: `struct iodesc' declared inside parameter list pxe.c:90: warning: `struct netif' declared inside parameter list pxe.c:100: elements of array `pxe_ifs' have incomplete type pxe.c:102: warning: excess elements in struct initializer pxe.c:102: warning: (near initialization for `pxe_ifs[0]') pxe.c:102: warning: excess elements in struct initializer pxe.c:102: warning: (near initialization for `pxe_ifs[0]') pxe.c:102: invalid use of undefined type `struct netif_stats' pxe.c:102: warning: excess elements in struct initializer pxe.c:102: warning: (near initialization for `pxe_ifs[0]') pxe.c:102: warning: excess elements in struct initializer pxe.c:102: warning: (near initialization for `pxe_ifs[0]') pxe.c:103: invalid use of undefined type `struct netif_dif' pxe.c:105: variable-size type declared outside of any function pxe.c:107: variable `pxenetif' has initializer but incomplete type pxe.c:108: warning: excess elements in struct initializer pxe.c:108: warning: (near initialization for `pxenetif') pxe.c:109: warning: excess elements in struct initializer pxe.c:109: warning: (near initialization for `pxenetif') pxe.c:110: warning: excess elements in struct initializer pxe.c:110: warning: (near initialization for `pxenetif') pxe.c:111: warning: excess elements in struct initializer pxe.c:111: warning: (near initialization for `pxenetif') pxe.c:112: warning: excess elements in struct initializer pxe.c:112: warning: (near initialization for `pxenetif') pxe.c:113: warning: excess elements in struct initializer pxe.c:113: warning: (near initialization for `pxenetif') pxe.c:114: warning: excess elements in struct initializer pxe.c:114: warning: (near initialization for `pxenetif') pxe.c:115: warning: excess elements in struct initializer pxe.c:115: warning: (near initialization for `pxenetif') pxe.c:117: warning: excess elements in struct initializer pxe.c:117: warning: (near initialization for `pxenetif') pxe.c: In function `pxe_open': pxe.c:256: `FNAME_SIZE' undeclared (first use in this function) pxe.c:256: (Each undeclared identifier is reported only once pxe.c:256: for each function it appears in.) pxe.c:276: `rootip' undeclared (first use in this function) pxe.c:283: `BOOTP_PXE' undeclared (first use in this function) pxe.c:286: `rootpath' undeclared (first use in this function) pxe.c:301: `gateip' undeclared (first use in this function) pxe.c:303: `myip' undeclared (first use in this function) pxe.c:303: warning: passing arg 2 of `setenv' makes pointer from integer without a cast pxe.c:304: `netmask' undeclared (first use in this function) pxe.c:304: warning: passing arg 2 of `setenv' makes pointer from integer without a cast pxe.c:305: warning: passing arg 2 of `setenv' makes pointer from integer without a cast pxe.c:310: warning: passing arg 2 of `setenv' makes pointer from integer without a cast pxe.c: In function `pxe_close': pxe.c:339: `rootpath' undeclared (first use in this function) pxe.c: At top level: pxe.c:413: `NFS_FHSIZE' undeclared here (not in a function) pxe.c: In function `pxe_setnfshandle': pxe.c:423: `NFS_FHSIZE' undeclared (first use in this function) pxe.c:423: size of array `buf' has non-integer type pxe.c: At top level: pxe.c:490: warning: `struct netif' declared inside parameter list pxe.c:491: conflicting types for `pxe_netif_match' pxe.c:84: previous declaration of `pxe_netif_match' pxe.c:497: warning: `struct netif' declared inside parameter list pxe.c:498: conflicting types for `pxe_netif_probe' pxe.c:85: previous declaration of `pxe_netif_probe' pxe.c:516: warning: `struct netif' declared inside parameter list pxe.c:517: conflicting types for `pxe_netif_end' pxe.c:90: previous declaration of `pxe_netif_end' pxe.c:528: conflicting types for `pxe_netif_init' pxe.c:86: previous declaration of `pxe_netif_init' pxe.c: In function `pxe_netif_init': pxe.c:531: dereferencing pointer to incomplete type pxe.c:532: dereferencing pointer to incomplete type pxe.c: At top level: pxe.c:537: conflicting types for `pxe_netif_get' pxe.c:88: previous declaration of `pxe_netif_get' pxe.c:543: conflicting types for `pxe_netif_put' pxe.c:89: previous declaration of `pxe_netif_put' pxe.c: In function `sendudp': pxe.c:553: dereferencing pointer to incomplete type pxe.c:554: dereferencing pointer to incomplete type pxe.c:555: dereferencing pointer to incomplete type pxe.c:560: `netmask' undeclared (first use in this function) pxe.c:560: `myip' undeclared (first use in this function) pxe.c:560: dereferencing pointer to incomplete type pxe.c:563: `gateip' undeclared (first use in this function) pxe.c: In function `readudp': pxe.c:589: dereferencing pointer to incomplete type pxe.c:590: dereferencing pointer to incomplete type pxe.c: At top level: pxe.c:105: storage size of `pxe_st' isn't known *** Error code 1 Stop in /usr/src/sys/boot/i386/libi386. *** Error code 1 Stop in /usr/src/sys/boot/i386. *** Error code 1 Stop in /usr/src/sys/boot. auadwesm1203280# make ===> ficl Warning: Object directory not changed from original /usr/src/sys/boot/ficl ===> i386 ===> i386/mbr Warning: Object directory not changed from original /usr/src/sys/boot/i386/mbr ===> i386/boot0 Warning: Object directory not changed from original /usr/src/sys/boot/i386/boot0 ===> i386/kgzldr Warning: Object directory not changed from original /usr/src/sys/boot/i386/kgzldr ===> i386/btx ===> i386/btx/btx Warning: Object directory not changed from original /usr/src/sys/boot/i386/btx/btx ===> i386/btx/btxldr Warning: Object directory not changed from original /usr/src/sys/boot/i386/btx/btxldr ===> i386/btx/lib Warning: Object directory not changed from original /usr/src/sys/boot/i386/btx/lib ===> i386/boot2 Warning: Object directory not changed from original /usr/src/sys/boot/i386/boot2 ===> i386/libi386 Warning: Object directory not changed from original /usr/src/sys/boot/i386/libi386 cc -O -pipe -I/usr/src/sys/boot/i386/libi386/../../common -I/usr/src/sys/boot/i386/libi38 6/../btx/lib -I/usr/src/sys/boot/i386/libi386/../../.. -I. -DCOMPORT=0x3f8 -DCOMSPEED=960 0 -I/usr/src/sys/boot/i386/libi386/../../../../lib/libstand/ -DTERM_EMU -mpreferred-stack- boundary=2 -c pxe.c -o pxe.o pxe.c:41: net.h: No such file or directory pxe.c:42: netif.h: No such file or directory pxe.c:43: nfsv2.h: No such file or directory pxe.c:44: iodesc.h: No such file or directory pxe.c:46: bootp.h: No such file or directory pxe.c:84: warning: `struct netif' declared inside parameter list pxe.c:84: warning: its scope is only this definition or declaration, which is probably not what you want. pxe.c:85: warning: `struct netif' declared inside parameter list pxe.c:86: warning: `struct iodesc' declared inside parameter list pxe.c:88: warning: `struct iodesc' declared inside parameter list pxe.c:89: warning: `struct iodesc' declared inside parameter list pxe.c:90: warning: `struct netif' declared inside parameter list pxe.c:100: elements of array `pxe_ifs' have incomplete type pxe.c:102: warning: excess elements in struct initializer pxe.c:102: warning: (near initialization for `pxe_ifs[0]') pxe.c:102: warning: excess elements in struct initializer pxe.c:102: warning: (near initialization for `pxe_ifs[0]') pxe.c:102: invalid use of undefined type `struct netif_stats' pxe.c:102: warning: excess elements in struct initializer pxe.c:102: warning: (near initialization for `pxe_ifs[0]') pxe.c:102: warning: excess elements in struct initializer pxe.c:102: warning: (near initialization for `pxe_ifs[0]') pxe.c:103: invalid use of undefined type `struct netif_dif' pxe.c:105: variable-size type declared outside of any function pxe.c:107: variable `pxenetif' has initializer but incomplete type pxe.c:108: warning: excess elements in struct initializer pxe.c:108: warning: (near initialization for `pxenetif') pxe.c:109: warning: excess elements in struct initializer pxe.c:109: warning: (near initialization for `pxenetif') pxe.c:110: warning: excess elements in struct initializer pxe.c:110: warning: (near initialization for `pxenetif') pxe.c:111: warning: excess elements in struct initializer pxe.c:111: warning: (near initialization for `pxenetif') pxe.c:112: warning: excess elements in struct initializer pxe.c:112: warning: (near initialization for `pxenetif') pxe.c:113: warning: excess elements in struct initializer pxe.c:113: warning: (near initialization for `pxenetif') pxe.c:114: warning: excess elements in struct initializer pxe.c:114: warning: (near initialization for `pxenetif') pxe.c:115: warning: excess elements in struct initializer pxe.c:115: warning: (near initialization for `pxenetif') pxe.c:117: warning: excess elements in struct initializer pxe.c:117: warning: (near initialization for `pxenetif') pxe.c: In function `pxe_open': pxe.c:256: `FNAME_SIZE' undeclared (first use in this function) pxe.c:256: (Each undeclared identifier is reported only once pxe.c:256: for each function it appears in.) pxe.c:276: `rootip' undeclared (first use in this function) pxe.c:283: `BOOTP_PXE' undeclared (first use in this function) pxe.c:286: `rootpath' undeclared (first use in this function) pxe.c:301: `gateip' undeclared (first use in this function) pxe.c:303: `myip' undeclared (first use in this function) pxe.c:303: warning: passing arg 2 of `setenv' makes pointer from integer without a cast pxe.c:304: `netmask' undeclared (first use in this function) pxe.c:304: warning: passing arg 2 of `setenv' makes pointer from integer without a cast pxe.c:305: warning: passing arg 2 of `setenv' makes pointer from integer without a cast pxe.c:310: warning: passing arg 2 of `setenv' makes pointer from integer without a cast pxe.c: In function `pxe_close': pxe.c:339: `rootpath' undeclared (first use in this function) pxe.c: At top level: pxe.c:413: `NFS_FHSIZE' undeclared here (not in a function) pxe.c: In function `pxe_setnfshandle': pxe.c:423: `NFS_FHSIZE' undeclared (first use in this function) pxe.c:423: size of array `buf' has non-integer type pxe.c: At top level: pxe.c:490: warning: `struct netif' declared inside parameter list pxe.c:491: conflicting types for `pxe_netif_match' pxe.c:84: previous declaration of `pxe_netif_match' pxe.c:497: warning: `struct netif' declared inside parameter list pxe.c:498: conflicting types for `pxe_netif_probe' pxe.c:85: previous declaration of `pxe_netif_probe' pxe.c:516: warning: `struct netif' declared inside parameter list pxe.c:517: conflicting types for `pxe_netif_end' pxe.c:90: previous declaration of `pxe_netif_end' pxe.c:528: conflicting types for `pxe_netif_init' pxe.c:86: previous declaration of `pxe_netif_init' pxe.c: In function `pxe_netif_init': pxe.c:531: dereferencing pointer to incomplete type pxe.c:532: dereferencing pointer to incomplete type pxe.c: At top level: pxe.c:537: conflicting types for `pxe_netif_get' pxe.c:88: previous declaration of `pxe_netif_get' pxe.c:543: conflicting types for `pxe_netif_put' pxe.c:89: previous declaration of `pxe_netif_put' pxe.c: In function `sendudp': pxe.c:553: dereferencing pointer to incomplete type pxe.c:554: dereferencing pointer to incomplete type pxe.c:555: dereferencing pointer to incomplete type pxe.c:560: `netmask' undeclared (first use in this function) pxe.c:560: `myip' undeclared (first use in this function) pxe.c:560: dereferencing pointer to incomplete type pxe.c:563: `gateip' undeclared (first use in this function) pxe.c: In function `readudp': pxe.c:589: dereferencing pointer to incomplete type pxe.c:590: dereferencing pointer to incomplete type pxe.c: At top level: pxe.c:105: storage size of `pxe_st' isn't known *** Error code 1 Stop in /usr/src/sys/boot/i386/libi386. *** Error code 1 Stop in /usr/src/sys/boot/i386. *** Error code 1 Stop in /usr/src/sys/boot. " Can someon show me how to build pxeldr using 4.4R or is it stuffed on 4.4R. Alternatively could someone send me a working version of pxeldr. Help greatly appreciated! Thanks, Paul http://briefcase.yahoo.com.au - Yahoo! Briefcase - Manage your files online. 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?20011026200150.38697.qmail>