[ipxe-devel] Problem with later versions of iPXE and WinPE/memdisk

Lindgren Daniel daniel.lindgren at tullverket.se
Wed Oct 31 10:10:37 UTC 2012


> > Looks like the problem is caused by changes in iPXE, not Syslinux. I
> > realize that there's been a ton of changes since November 2011, but
> > does anyone have an idea as to what might be the cause of the
problem?
> 
> You may find the offending commit by using git bisect:
>   http://ipxe.org/howto/bisect

Yeah, I should have given it a shot before sending the first message.

Anyway, this is the result of git bisect:

---

9a93db3f0947484e30e753bbd61a10b17336e20e is the first bad commit
commit 9a93db3f0947484e30e753bbd61a10b17336e20e
Author: Michael Brown <mcb30 at ipxe.org>
Date:   Sun Dec 11 02:11:45 2011 +0000

    [pxe] Provide PXENV_FILE_EXIT_HOOK only for ipxelinux.0 builds

    PXENV_FILE_EXIT_HOOK is designed to allow ipxelinux.0 to unload both
    the iPXE and pxelinux components without affecting the underlying
PXE
    stack.  Unfortunately, it causes unexpected behaviour in other
    situations, such as when loading a non-embedded pxelinux.0 via
    undionly.kpxe.  For example:

      PXE ROM -> undionly.kpxe -> pxelinux.0 -> chain.c32 to boot hd0

    would cause control to return to iPXE instead of booting from the
hard
    disk.  In some cases, this would result in a harmless but confusing
    "No more network devices" message; in other cases stranger things
    would happen, such as being returned to the iPXE shell prompt.

    The fundamental problem is that when pxelinux detects
    PXENV_FILE_EXIT_HOOK, it may attempt to specify an exit hook and
then
    exit back to iPXE, assuming that iPXE will in turn exit cleanly via
    the specified exit hook.  This is not a valid assumption in the
    general case, since the action of exiting back to iPXE does not
    directly cause iPXE to exit itself.  (In the specific case of
    ipxelinux.0, this will work since the embedded script exits as soon
as
    pxelinux.0 exits.)

    Fix the unexpected behaviour in the non-ipxelinux.0 cases by
including
    support for PXENV_FILE_EXIT_HOOK only when using a new .kkkpxe
format.
    The ipxelinux.0 build process should therefore now use
undionly.kkkpxe
    instead of undionly.kkpxe.

    Signed-off-by: Michael Brown <mcb30 at ipxe.org>

---

git bisect log:

git bisect start
# good: [be90241ec292ba561562827b2685d2881bc92b5e] [getopt] Accept "--"
as an end-of-options marker
git bisect good be90241ec292ba561562827b2685d2881bc92b5e
# bad: [6586e03fba2c04f066660c707a352b15ab99f33d] [forcedeth] Increase
TX ring size to prevent dropped packets
git bisect bad 6586e03fba2c04f066660c707a352b15ab99f33d
# bad: [5b18489685e8424c42b93e3c2707c2c9ffa2fc31] [realtek] Update link
state when device is opened
git bisect bad 5b18489685e8424c42b93e3c2707c2c9ffa2fc31
# bad: [4e53303c03a9b24e192811716fa62ce7444c5df2] [test] Add big integer
self-tests
git bisect bad 4e53303c03a9b24e192811716fa62ce7444c5df2
# bad: [5a80c1106230f4308fe330eb9b881a349a3f9278] [crypto] Use ANS X9.82
Approved get_random_nz() for RSA
git bisect bad 5a80c1106230f4308fe330eb9b881a349a3f9278
# bad: [187cd80106ad2f24e0d6f66ca1fec466f1f37a6b] [dns] Allow trailing
dots in DNS names
git bisect bad 187cd80106ad2f24e0d6f66ca1fec466f1f37a6b
# good: [6c73a8b51dde8101b640418d18c24f76b57bc249] [arbel] Reorder code
in preparation for quiescing patch
git bisect good 6c73a8b51dde8101b640418d18c24f76b57bc249
# good: [f2893911345c82a69d53e06dd5bad612200a3517] [e1000e] Strip the
Ethernet CRC from received packets
git bisect good f2893911345c82a69d53e06dd5bad612200a3517
# good: [61944ed602e756c5a398b7ad5f352811bb7b5e77] [pxe] Tidy up
debugging output
git bisect good 61944ed602e756c5a398b7ad5f352811bb7b5e77
# bad: [9a93db3f0947484e30e753bbd61a10b17336e20e] [pxe] Provide
PXENV_FILE_EXIT_HOOK only for ipxelinux.0 builds
git bisect bad 9a93db3f0947484e30e753bbd61a10b17336e20e
# good: [fa410e0a414f932cf170db5fb1e6fc340f37ec53] [pxe] Modularise PXE
API provision
git bisect good fa410e0a414f932cf170db5fb1e6fc340f37ec53

---

I used Syslinux 4.06 to build ipxelinux.0.

I've used a Dell Latitude E4310 with BIOS A11 to test the builds,
booting WinPE ISO with memdisk.

If I understand "The ipxelinux.0 build process should therefore now use
undionly.kkkpxe" comment correctly, I should update the Makefile from:

src/bin/undionly.kkpxe: src/bin/blib.a pxelinux.ipxe ../core/pxelinux.0
        $(PXEMAKE) bin/undionly.kkpxe
EMBEDDED_IMAGE=../pxelinux.ipxe,../../core/pxelinux.0

to:

src/bin/undionly.kkkpxe: src/bin/blib.a pxelinux.ipxe ../core/pxelinux.0
        $(PXEMAKE) bin/undionly.kkkpxe
EMBEDDED_IMAGE=../pxelinux.ipxe,../../core/pxelinux.0

How about ipxelinuxk.0, should the Makefile be updated for that one too?

Cheers,
Daniel




More information about the ipxe-devel mailing list