Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

PXE Network Boot Server


captfrito

Question

I built a PXE server system as described at http://www.funtoo.org/PXE_network_boot_server

 

There were a few things I needed to do differently to get things to work even partially.  For example, I needed to add these additional files to my /tftproot:

ldlinux.c32
libcom32.c32
libutil.c32

There is another quirk in that the initial menu displayed on the system that is trying to boot via PXE is allowing a 1,000sec timeout versus the 10sec I was expecting via the pxelinux.cfg/default file.

 

The issue I am having now is that I get all the way through the loading of the initrd=srcd/isolinux/initram.igz loading, but then the system trying to boot can never find the  netboot=http://172.16.3.213/sysrcd.datfile.  What happens instead is that the system booting completes the network configuration via the initrd but then reports

Searching for device with /sysrcd.dat

It fails to find it, then tries to mount all the SATA partitions (3 disks with a total of 22 partitions among them), then reports again

!! Cannot find a device with /sysrcd.dat. Retrying...

It does this several times, then gives up dumping me to a "mini shell".

 

I searched the at-large internet, and can't really find anything that helps.

 

I have tried offering the sysrcd.dat and the sysrcd.md5 files via apache and vsftp.

 

Here is the output from tcpdump:

 

bolan tftproot # tcpdump -n port 80 or port 69
dropped privs to tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
18:58:46.837984 IP 172.16.3.229.2070 > 172.16.3.213.69:  27 RRQ "pxelinux.0" octet tsize 0
18:58:46.841925 IP 172.16.3.229.2071 > 172.16.3.213.69:  32 RRQ "pxelinux.0" octet blksize 1456
18:58:47.004463 IP 172.16.3.229.49152 > 172.16.3.213.69:  41 RRQ "ldlinux.c32" octet tsize 0 blksize 1408
18:58:47.018249 IP 172.16.3.229.49153 > 172.16.3.213.69:  63 RRQ "pxelinux.cfg/01-00-24-1d-27-ec-7f" octet tsize 0 blksize 1408
18:58:47.018995 IP 172.16.3.229.49154 > 172.16.3.213.69:  51 RRQ "pxelinux.cfg/AC1003E5" octet tsize 0 blksize 1408
18:58:47.019703 IP 172.16.3.229.49155 > 172.16.3.213.69:  50 RRQ "pxelinux.cfg/AC1003E" octet tsize 0 blksize 1408
18:58:47.020374 IP 172.16.3.229.49156 > 172.16.3.213.69:  49 RRQ "pxelinux.cfg/AC1003" octet tsize 0 blksize 1408
18:58:47.021047 IP 172.16.3.229.49157 > 172.16.3.213.69:  48 RRQ "pxelinux.cfg/AC100" octet tsize 0 blksize 1408
18:58:47.021758 IP 172.16.3.229.49158 > 172.16.3.213.69:  47 RRQ "pxelinux.cfg/AC10" octet tsize 0 blksize 1408
18:58:47.022460 IP 172.16.3.229.49159 > 172.16.3.213.69:  46 RRQ "pxelinux.cfg/AC1" octet tsize 0 blksize 1408
18:58:47.023147 IP 172.16.3.229.49160 > 172.16.3.213.69:  45 RRQ "pxelinux.cfg/AC" octet tsize 0 blksize 1408
18:58:47.023822 IP 172.16.3.229.49161 > 172.16.3.213.69:  44 RRQ "pxelinux.cfg/A" octet tsize 0 blksize 1408
18:58:47.024459 IP 172.16.3.229.49162 > 172.16.3.213.69:  50 RRQ "pxelinux.cfg/default" octet tsize 0 blksize 1408
18:58:47.025334 IP 172.16.3.229.49163 > 172.16.3.213.69:  42 RRQ "vesamenu.c32" octet tsize 0 blksize 1408
18:58:47.028685 IP 172.16.3.229.49164 > 172.16.3.213.69:  42 RRQ "libcom32.c32" octet tsize 0 blksize 1408
18:58:47.047745 IP 172.16.3.229.49165 > 172.16.3.213.69:  41 RRQ "libutil.c32" octet tsize 0 blksize 1408
18:58:47.053732 IP 172.16.3.229.49166 > 172.16.3.213.69:  50 RRQ "pxelinux.cfg/default" octet tsize 0 blksize 1408
18:58:47.283029 IP 172.16.3.229.49167 > 172.16.3.213.69:  43 RRQ "netboot-1.png" octet tsize 0 blksize 1408




And here's what happens when I wget the files directly:

 

vaughan ~ # wget 172.16.3.213/sysrcd.md5 .
--2017-01-05 23:44:04--  http://172.16.3.213/sysrcd.md5
Connecting to 172.16.3.213:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45 [application/x-md5]
Saving to: 'sysrcd.md5'


sysrcd.md5                                                      100%[=======================================================================================================================================================>]      45  --.-KB/s    in 0s


2017-01-05 23:44:04 (11.8 MB/s) - 'sysrcd.md5' saved [45/45]


--2017-01-05 23:44:04--  http://./
Resolving .... failed: No address associated with hostname.
wget: unable to resolve host address '.'
FINISHED --2017-01-05 23:44:04--
Total wall clock time: 0.02s
Downloaded: 1 files, 45 in 0s (11.8 MB/s)

Not sure what is happening here, any help is gratefully accepted (-:

 

 
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

The other files:

ldlinux.c32
libcom32.c32
libutil.c32

Are also in the "/usr/share/syslinux/" directory.

The PXE boot process gets the "tftp server" from the DHCP request.  It then uses "tftp" to download a 32-bot DOS program that then downloads and displays the menu. Menu's can be nested (by referencing a menu rather than a kernel).  The location of the kernel and ramdisk are relative to the directory specified in the configuration of the TFTP server.  The value of 1000 in the time out is 1 second do you need to multiply the number of seconds by 1000 for the time-out vaule.  Also the "kernel" and "append" are on there own lines and each must not span a line (that means two lines one for each).

Another issue is that the standard Gentoo "genkernel" does not produce a initial ram disk which brings up the network to mount an NFS shared filesystem. I had to edit the "init" script to bring up the network and had to add in the dhcp client as well when I created a PXE based gentoo imager (about 7 years ago).

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...