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:
./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
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).
I can attach some screenshot of the error message if needed. Please tell me if I need to provide more information.
Thanks in advance!
Regards,