[ipxe-devel] [gPXE] Problem using gPXE to load PXELINUX with HTTP server
Michael Brown
mbrown at fensystems.co.uk
Sat Dec 7 00:27:28 UTC 2013
On 06/12/13 23:39, Allan Wu wrote:
> 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.
>
> <snip>
Firstly, please upgrade to iPXE (http://ipxe.org). gPXE is a dead
project, and has not been maintained for several years.
You can load the RHEL6 kernel directly using an embedded script such as:
#!ipxe
ifopen 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
kernel http://xxx.xxx.xxx.xxx/xxx/centos6/vmlinuz \
root=nfs:xxx.xxx.xxx.xxx:/diskless/x86_64/RHEL6/root/ rw
initrd http://xxx.xxx.xxx.xxx/xxx/centos6/diskless_initrd.img
boot
You may wish to consider using the DHCP server to obtain the IP address,
even though you ignore its ${next-server} and ${filename} settings. For
example:
#!ipxe
dhcp net0
kernel http://xxx.xxx.xxx.xxx/xxx/centos6/vmlinuz \
root=nfs:xxx.xxx.xxx.xxx:/diskless/x86_64/RHEL6/root/ rw
initrd http://xxx.xxx.xxx.xxx/xxx/centos6/diskless_initrd.img
boot
Hope that helps,
Michael
More information about the ipxe-devel
mailing list