[ipxe-devel] [gPXE] Problem using gPXE to load PXELINUX with HTTP server
Allan Wu
allwu at cs.ucla.edu
Mon Dec 9 21:17:20 UTC 2013
Thanks a lot Michael and Gene!
I am loading gPXE from USB using the ./bin/gpxe.usb.
I tried with using the gPXE script Michael suggests, but gPXE reported "no
specific image to load" at 'boot'. When I use 'boot vmlinuz', then there's
the old errors of not finding RAMDISK and unspecified root. Does it mean I
have the wrong kernel or initrd image? The 'vmlinuz' file is from the /boot
folder, and the 'diskless_initrd.img' is made by dracut.
I will try some of the PXELINUX version suggested by Gene, and I already
switched to iPXE. Meanwhile, I still have one question which seems to be
common to both gPXE and iPXE.
Because I'm using static IP, I think due to our network setup, it takes the
gateway some time to recognize the new IP every time it is set. The result
is, when I use the script to setup static IP, the following fetching for
image will have a connection timeout, because either the DNS or the gateway
hasn't responded yet. So every time I have to Ctrl+B and manually type the
image fetching command again after the connection timeout, and that will
work. In iPXE, it seems to quit the moment the connection failure occurs
and I don't have opportunities to go into command line. So my question is,
is there a command or some way to do a sleep() to wait for the IP address
to be ready and then start to fetch the image? Or maybe a way to set a
number of retries for the fetching command?
Thanks,
Allan
--
Di Wu (Allan)
Center of Domain-Specific Computing <http://www.cdsc.ucla.edu/>,
Department of Computer Science, UC Los Angeles
Email: allwu at cs.ucla.edu
Phone: 310-982-5215
On Fri, Dec 6, 2013 at 4:33 PM, Gene Cumm <gene.cumm at gmail.com> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20131209/5d7c04d5/attachment.htm>
More information about the ipxe-devel
mailing list