Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
booting ipxe from pxelinux
2013-08-01, 21:43
Post: #1
booting ipxe from pxelinux
booting ipxe from pxelinux (V4.04) worked fine in both variants

LABEL IPXE_command
KERNEL IPXE.LKRN ipxe_command

LABEL IPXE_initrd
KERNEL IPXE.LKRN
INITRD IPXE_initrd_file.ipxe


booting pxelinux (V6.01) both variants terminate with an error (invalid argument)

is there a workaround? How can I boot ipxe.lkrn and supply parameters without engaging dhcp or embed them in ipxe.
I try to avoid embedding commands in ipxe.lkrn because of additional administration efforts.
Find all posts by this user
Quote this message in a reply
2013-08-08, 15:02
Post: #2
RE: booting ipxe from pxelinux
How about using gpxecmd.c32? Or aren't you using ipxe in front of pxelinux?
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-08-09, 20:10
Post: #3
RE: booting ipxe from pxelinux
I cannot believe that gpxecmd.c32 will solve my problem.
Maybe my description was to generic.

Up to syslinux 4.04 the following default. file worked fine.

#Default.
DEFAULT menu.c32
LABEL nfw
KERNEL ipxe.krn dhcp && chain http://10.10.10.10/NFW.ipxe


I could boot ipxe and transfer the commandline in one statement. Embedding commands in ipxe via "make" was not necessary.

Since syslinux 6.01 I get an error: invaldi argument.

How can I boot ipxe.lkrn or ipxe.pxe and supply parameters without engaging dhcp or embed them in ipxe during building ipxe?
Find all posts by this user
Quote this message in a reply
2013-08-22, 09:53
Post: #4
RE: booting ipxe from pxelinux
You're doing the right thing in that pxelinux config file. I think this might be an issue with syslinux 6.xx. You might find more help if you ask in their forums. If it works in 4.xx but not in 6.xx then I believe something must've changed on the pxelinux side.
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-08-24, 17:30
Post: #5
RE: booting ipxe from pxelinux
Digging a little deeper I modified my default. file in pxelinux.cfg

#Default.
KERNEL ipxe.lkrn xxx


The result is:
Loading ipxe.lkrn...
Booting kernel failed: Invalid Argument

This is independant of the parameter xxx (can also be nul)

Obviously this is a ipxe.lkrn booting problem.
I suppose SYSLINUX team will tell me "debug your code"

How to identify, if this is a bug in syslinux or in ipxe.lkrn?
(Maybe syslinux team changed their requirements for booting.)

Can someone of the developers of ipxe verify my experience?
Find all posts by this user
Quote this message in a reply
2013-08-24, 18:10
Post: #6
RE: booting ipxe from pxelinux
I don't know if this will work, but you do have to add the APPEND line in order to add kernel arguments...

Code:
#Default.
KERNEL ipxe.lkrn
APPEND dhcp && chain http://10.10.10.10/NFW.ipxe

Now, embedding code into iPXE is simplicity itself:

your script:

Code:
#!ipxe
dhcp && chain http://10.10.10.10/NFW.ipxe
exit


as boot.ipxe

Then when compiling iPXE:

make bin/undionly.kpxe EMBED=boot.ipxe

If you want to use the full driver kernel, it is too large to boot on it's own, so you chainload the ipxe.pxe file... undionly.kpxe with an embedded script to chainload ipxe.pxe, and then ipxe.pxe with an embedded script to chainload NFW.ipxe

e.g.

make bin/undionly.kpxe EMBED=chain.ipxe
make bin/ipxe.pxe EMBED=boot.ipxe

your undionly script (chain.ipxe):

Code:
#!ipxe
dhcp && chain http://10.10.10.10/ipxe.pxe
exit


your ipxe.pxe script (boot.ipxe) :

Code:
#!ipxe
dhcp && chain http://10.10.10.10/NFW.ipxe
exit


make bin/undionly.kpxe EMBED=chain.ipxe
make bin/ipxe.pxe EMBED=boot.ipxe


Best,

Matt

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
2013-09-01, 14:45
Post: #7
RE: booting ipxe from pxelinux
Also, if you build ipxe.lkrn it is a bzImage Linux kernel image, which syslinux should be very capable of booting, regardless of version. Are you having issues booting any other type of linux kernel bzimages? Also, you can also use ipxe.pxe, as pxelinux should be able to load that format as well.
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-09-02, 18:56
Post: #8
RE: booting ipxe from pxelinux
Replying to MultimediaMan:
Using APPEND does not solve the problem. (As ipxe.lkrn will not get booted at all, the append statement is not relevant.)
Embedding works fine, but is cumbersome to administrate. That's why I try to avoid it.

Replying to robinsmidsrod:
Other bzImage images work fine. Using ipxe.pxe requires embedding. See above.

There are indications that syslinux causes the problems.
Did anybody try to prove my test results? As there are no special preconditions it's quite easy to do so.
Find all posts by this user
Quote this message in a reply
2013-09-02, 23:28
Post: #9
RE: booting ipxe from pxelinux
I was able to get it to work with syslinux 6.01 pxelinux.0 using the ldlinux.c32 helper binary. HPA changed quite bit in syslinux 6.01, and you should read all of the documentation. Not all of the old ways of doing things translate to this release.

Going back to Embedded Scripts... Realize that with a little thought you can do some amazing things with an embedded script which does something in a repeatable manner, which is then controlled server-side.

Consider:

${17} = http://your.webserver.com

undionly.kpxe with the following embedded script:

Code:
#!ipxe
dhcp  
chain ${17}/default.ipxe

You can then write default.ipxe as simple or as complicated as you like.

In default.ipxe you could then do something like:

Code:
chain ${17}/${uuid}

and so on.

The point being, iPXE beats the daylights out of what syslinux can do, and it doesn't have to be restricted to private networks to get a decent amount of security while doing it. Syslinux is and remains a powerful tool, but it's continued reliance on TFTP, lack of native DNS support as well as it's DOS-like *.c32 binaries are limiting it's potential as a viable network boot program in today's environments. Syslinux pxelinux.0 does seem to have better overall basic hardware compatibility, but the tradeoff with compatibility is flexibility.

I do use syslinux on those hardware types I know have issues with the larger undionly iPXE images (Realtek), but that's about the only place I use it anymore.

Best,

Matt

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
2013-09-04, 20:12
Post: #10
RE: booting ipxe from pxelinux
Quote:MultimediaMan wrote: HPA changed quite bit in syslinux 6.01, and you should read all of the documentation. Not all of the old ways of doing things translate to this release.

I had red the documentation and used pxechn.c32 all the time. It works fine. But I have no idea how to pass parameters when I chain ipxe.pxe.
So I have to use embedding...

My standard configuration is to boot pxelinux.0 and chain ipxe.pxe. Although this is not the fastest solution it is reliable and does not require any ROM burning or other modification.
Embedding dhcp and chain chain-main.ipxe I can take the best of both worlds.

By the way I started testing syslinux 6.01 because I red that syslinux 6.01 supports FTP. Later I recognized that also IPXE supports FTP. (To recognize this I had to read some .h files, as the build options in the web-doc do not show this option.)

In general I perfer to use either pxelinux or ipxe whichever suits best for my tasks. My concern was to avoid embedding, because this adds to the administration efforts. That's why I posted here.

In the meantime I have decreased my efforts by just embedding two statements in one program (ipxe.pxe, see above) Everything else I can do via scripts. So my problem is solved.

I assume that in one of the next releases of syslinux ipxe.lkrn will be bootable again.
Find all posts by this user
Quote this message in a reply
2013-09-04, 23:02
Post: #11
RE: booting ipxe from pxelinux
I understand, and am totally in agreement that the documentation might need a little more polish.

Re: Passing arguments; I'm not sure what you want to do is possible, because in ipxe.pxe and ipxe.lkrn you still must hit "ctrl-b" to enter the CLI. So you might want to look up the ASCII command and read up on whether pxechn.c32 or ldlinux.c32 can pass ASCII character codes and try Appending that ASCII code to begin with.

As far as embedding, if you standardize your infrastructure, you will find yourself not touching the embedded scripts very often.

Functionally-Speaking, I have not substantially altered my embedded scripts. There were some major scripting changes done during mid-summer, and that caused me to re-write the embedded scripts to save space in the undionly.kpxe binary.

However, if you are a frequent compiler like me, you might want to think about scripting the build process itself. I created a short script which automated the make process. It creates a undionly.kpxe file, an ipxe.pxe file, and an ipxe.usb file (for Broken BIOS machines). When the make is complete it copies them to an archive folder and then copies the files to the TFTP and Web Servers. So the process from end-to-end, takes about 60 seconds.

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
2013-09-12, 20:19
Post: #12
RE: booting ipxe from pxelinux
I prefer to boot initially pxelinux.0. To boot ipxe I chain ipxe.pxe.
Code:
LABEL L1
KERNEL pxechn.c32 /ipxe.pxe
This solution requires to embed an xxx.ipxe command file.
As I stated at the beginning of this posting with syslinux 4.04 it was possible to pass ipxe commands without embedding.
Code:
#default (my pxelinux.cfg/default file)
LABEL iPXE
Kernel iPXE.LKRN
INITRD xxx.ipxe (this is the same .ipxe file I have to embed with syslinux 6.01)
There was no need to hit „Ctrl-B“ at any time.
I prefer not to use undionly.kpxe as this requires additional efforts but I do not see any advantage compared with booting pxelinux.0.
There is also no infinite loop I have to break. This solution also works fine with WDS.
I hope the solution available with syslinux 4.04 will be available with syslinux 6.02 again. (First tests with a pre-release look good.)

iPXE offers a lot of valuable features but some of them are well hidden, as descriptions in the documentation are missing.
Find all posts by this user
Quote this message in a reply
2013-10-18, 23:24
Post: #13
RE: booting ipxe from pxelinux
I chain boot ipxe.krn from pxelinux 6.02 but encounter "invalid argument" error. Is there any solution so far?
Find all posts by this user
Quote this message in a reply
2013-10-19, 17:45 (This post was last modified: 2013-10-19 17:45 by MultimediaMan.)
Post: #14
RE: booting ipxe from pxelinux
(2013-10-18 23:24)ccy Wrote:  I chain boot ipxe.krn from pxelinux 6.02 but encounter "invalid argument" error. Is there any solution so far?

For now, use Syslinux 4.04 or earlier binaries. HPA knows there is an issue, and they are working on a fix.

If you are running an environment where there are multiple versions of syslinux, remember that all search directories in syslinux are relative to 'pxelinux.0' passed as DHCP Option 67.

So if you have syslinux 3.86, 4.04, 5.01 and 6.02

Create a directory structure under tftpboot/syslinux with the version numbered directories: unfortunately symlinks are an iffy thing with syslinux (and TFTP Servers in general for that matter), so the pxelinux.cfg directory would also need to be copied into each directory structure. However, this isn't entirely a bad thing, because of all the attendant binaries: memdisk, menu.c32, etc... I place those files in a directory named "bin".

Example:

tftpboot/syslinux
3-86
bin
pxelinux.cfg
pxelinux.0

4-04
bin
pxelinux.cfg
pxelinux.0

5-01
bin
pxelinux.cfg
pxelinux.0

6-02
bin
pxelinux.cfg
pxelinux.0

If you need a specific client to boot a specific version of syslinux, point them to the relative path desired:

Example:
The TFTP Root directory has undionly.kpxe and is the default passed to all clients.
Code:
option bootfile-name "undionly.kpxe";

A DHCP Reservation for a client is created that needs to use syslinux 4.04:

Code:
option bootfile-name "syslinux/4-04/pxelinux.0";



Best,

M^3

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
2013-10-20, 11:58 (This post was last modified: 2013-10-20 12:47 by ccy.)
Post: #15
RE: booting ipxe from pxelinux
(2013-10-19 17:45)MultimediaMan Wrote:  For now, use Syslinux 4.04 or earlier binaries. HPA knows there is an issue, and they are working on a fix.

Thanks for the information. I use syslinux 6.02 is because of new UEFI boot.

I prefer to use symbolic link to pxelinux.cfg to for various version of syslinux. I also turn on TFTP log to monitor the request files for debugging.

May I know what is HPA? So this is Syslinux problem and not ipxe problem?
I also want to use lpxelinux.0 but it doesn't exist in syslinux 4.04

(2013-10-19 17:45)MultimediaMan Wrote:  For now, use Syslinux 4.04 or earlier binaries. HPA knows there is an issue, and they are working on a fix.
Find all posts by this user
Quote this message in a reply
2013-10-20, 18:09
Post: #16
RE: booting ipxe from pxelinux
(2013-10-20 11:58)ccy Wrote:  May I know what is HPA? So this is Syslinux problem and not ipxe problem?

HPA = Hans Peter Anvin, creator and maintainer of syslinux, and an all-around good guy.

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
2013-10-21, 00:01
Post: #17
RE: booting ipxe from pxelinux
I have tried Syslinux 4.07 and it can boot to ipxe.lkrn too.
Find all posts by this user
Quote this message in a reply
2014-03-03, 23:53
Post: #18
RE: booting ipxe from pxelinux
I had the same issue as the OP with Syslinux 6.02. I've upgrade to 6.03-pre6 which seems to have resolved the issue in the OP.

But now, after selecting ipxe.krn (tried ipxe.lkrn as well) all I get on the screen is:
iPXE Initialising devices...

Then it just hangs. CTL-ALT-DEL won't even bring it back, must hit the power switch.

Any idea what's going on?

Thanks..
Find all posts by this user
Quote this message in a reply
2014-03-10, 10:53
Post: #19
RE: booting ipxe from pxelinux
VirtualNobody: If things work with older pxelinux then maybe that pre-release version has some issue still. I'd contact the syslinux people and see if they can figure it out.
Visit this user's website Find all posts by this user
Quote this message in a reply
2014-05-09, 16:19
Post: #20
RE: booting ipxe from pxelinux
hi everyone,
i reply to this thread because i have a similar problem booting iPXE from pxelinux. I have no access to the dhcp (only to the tftp) and just want to use an existing dhcp group, which comes up with tftp. So i defined

DEFAULT XXXX
LABEL XXXX
KERNEL ipxe/ipxe.lkrn

I compiled ipxe.lkrn with an embedded script for loading a debirf kernel and image. But i don't want to repeat the dhcp request with "ifconf" or "dhcp" command (sometimes it works sometimes not, maybe because of a dhcp loop or whatever, wonder why this worked at all ;-)) With "IPAPPEND 1" in SYSLINUX i could get all the settings (ip, gateway...) from my first request to setting up my net0 manually. But how can i hand over a simple commandline string and post process it in my ipxe script? Or should i compile my own command? Something like

DEFAULT XXXX
LABEL XXXX
KERNEL ipxe/ipxe.lkrn custom=
IPAPPEND 1

any ideas how to get a custom string variable passed to ipxe script?
kind regards
stefan
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)