[gPXE] Problem using gPXE to load PXELINUX with HTTP server

Gene Cumm gene.cumm at gmail.com
Fri Dec 6 19:33:32 EST 2013


On Fri, Dec 6, 2013 at 6:39 PM, Allan Wu <allwu at cs.ucla.edu> wrote:
> Hello,
>
> I got a problem of starting PXELINUX with gPXE using HTTP server. I am
> trying to setup a diskless system using gPXE. I intend for all the client
> machines to use static IP in the network, and our network already have a
> DHCP server which is difficult for me to modify. So I want to use gPXE to
> assign static IP for my client machine and obtain image from a HTTP server.
>
> In gPXE, I can successfully load the pxelinux.0 file and execute it.
> However, PXELINUX then reported an error saying "Unable to locate
> configuration file". I tried with several versions but got similar problems.
>
> In general, I want to set each client with static IP to get around the DHCP
> server, which seems to work for getting the images. I also tried to load the
> initrd image and vmlinuz kernel directly. But I got error saying the kernel
> cannot find ramdisk. I think I need to use the parameters such as 'initrd='
> and 'root=' when booting the kernel. Is there a way to do that with gPXE
> along? I'm open to other alternatives, since my approach may be limited on
> my lack of knowledge.
>
> My setup looks like this:
>
> - On the HTTP server:
> http://xxxx.xxx.xxx/xxx/tftpboot/   ~ this is the root directory for the
> pxelinux file
> ./pxelinux.0
> ./pxelinux.cfg/default
> ./centos6/                          ~ this directory contains the ramdisk
> image and kernel
>
> The pxelinux configure file looks something like this:
>
> default rhel6
> label rhel6
> kernel centos6/vmlinuz
> append initrd=centos6/diskless_initrd.img
> root=nfs:xxx.xxx.xxx.xxx:/diskless/x86_64/RHEL6/root/ rw
>
> - For my client, I embedded a static.gpxe script looks something like this:
> #! gpxe
> ifclose net0
> set net0/ip       xxx.xxx.xxx.xxx
> set net0/netmask  xxx.xxx.xxx.xxx
> set net0/gateway  xxx.xxx.xxx.xxx
> set net0/dns      xxx.xxx.xxx.xxx
> ifopen net0
> set 209:string pxelinux.cfg/default
> set 210:string http://xxx.xxx.xxx/xxx/tftpboot/
> chain ${210:string}pxelinux.0
>
> After this the PXELINUX is booted, but then failed on the error. I was using
> PXELINUX 4.02. For newer version, I also tried 5.10, but then PXELINUX
> stucks on the first line (version and copyright stuff).

How are you loading gPXE, from floppy/ISO/USB?

For a first test, I'd suggest a different version of PXELINUX.  Having
seen numerous bugfixes on syslinux at zytor.com, I'd suggest starting
with the precompiled binaries from the binary/source archive at
kernel.org and using 4.07.

If you want to try 5.1x, you can either use gPXE to load
core/pxelinux.0 via HTTP then com32/elflink/ldlinux/ldlinux.c32 (yes,
it needs that before the configuration file) OR set DHCP option 210
(direct or encapsulated) on your DHCP server and load core/lpxelinux.0
from TFTP then all other files relative to the prefix in 210.  I'd
suggest version 5.11-pre9 for your first test of a 5.1x version.

Also, if you wanted to try 6.0x, either 6.02 or 6.01, either
bios/core/pxelinux.0 or bios/core/lpxelinux.0 with
bios/com32/elflink/ldlinux/ldlinux.c32
-- 
-Gene


More information about the gPXE mailing list