[syslinux] Syslinux Digest, Vol 116, Issue 20

Torgeir.Wulfsberg at kongsberg.com Torgeir.Wulfsberg at kongsberg.com
Thu Nov 22 10:59:15 PST 2012


Hi!

It is #2.

Anyway I got exactly what I needed by adding this in core/fs/pxe/pxe.c
_________________________________________________________
static int pxe_load_config(void)
{
.
.
.
/* Chop of, so we only get 01-00-aa-bb left */
strncpy(stripped_mac_str, MAC_str, 11);

    /* Try loading the stripped MAC address */
    strcpy(config_file, stripped_mac_str);
    if (try_load(ConfigName))
        return 0;
_________________________________________________________

Actually I got an extra letter "E" on the end. So the file would have to look like this: 01-00-aa-bbE :)
Does not bother me very much. But if some of you have an easier fix, I would really appreciate it.

The only reason for this is that I want pxelinux to present a different "menu" or more exactly just one different label.
If a specific brand of broadcom is booting use this menu with undionly.kpxe, everyone else gets the regular ipxe.pxe.

I want to do things like this automatically, for our users. I dont want some to use the label "install" and some other with a specific Broadcom use "install2".

As before I am using NATIVE PXE-> PXE -iPXE
And then, iPXE is only used to display a Linux installmenu written in iPXE/PHP.
Just to replace an old comboot module (Written in C). Easier to maintain, add features ++.

-Torgeir
________________________________________
From: Shao Miller [sha0.miller at gmail.com]
Sent: Thursday, November 22, 2012 3:32 PM
To: Wulfsberg, Torgeir
Cc: 'For discussion of Syslinux and tftp-hpa'
Subject: RE: [syslinux] Syslinux Digest, Vol 116, Issue 20

Which of these are you doing, if any?:

1. Native PXE -> iPXE -> PXELINUX
2. Native PXE -> PXELINUX -> iPXE

If you are doing #1, then you can control which config-file PXELINUX will
use by setting options 209 and 210 from an iPXE script or the iPXE shell.

If you are doing #2, then if we forget about patching PXELINUX for a moment,
is your deeper goal simply for PXELINUX to choose the right iPXE based on
the MAC address?

- Shao Miller

-----Original Message-----
From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On
Behalf Of Torgeir.Wulfsberg at kongsberg.com
Sent: Thursday, November 22, 2012 08:33
To: syslinux at zytor.com
Subject: Re: [syslinux] Syslinux Digest, Vol 116, Issue 20

Hi!

We use Windows tftp-servers (so I dont think switching now would be an
alternative). But I can try to suggest it.

More specific, vendor id of the mac address, is what I want to be able to
"choose" (if match) which bootmenu to display.

Like all broadcom NICs we have would boot the undionly.kpxe "menu!! (I am
having some trouble with broadcom (PCI fiber) and iPXE :)
And the rest would use ipxe.pxe (works best for our setup).

Would it be much work to implement or rather have available as an patch, so
if anyone else are in need of this later, we could just patch the code and
compile ourself.

Torgeir
________________________________________
Message: 3
Date: Wed, 21 Nov 2012 10:19:14 -0800
From: "H. Peter Anvin" <hpa at zytor.com>
To: syslinux at zytor.com
Subject: Re: [syslinux] pxelinux load configuration files (ARP type
        code, and IPaddress in hex)
Message-ID: <50AD1B22.6050004 at zytor.com>
Content-Type: text/plain; charset=UTF-8

On 11/21/2012 06:49 AM, Torgeir.Wulfsberg at kongsberg.com wrote:
>
> Is is possible to make pxelinux look for MAC and IP, removing one hex
digit (or 2 for mac) and try again like this:
>
>         /mybootdir/pxelinux.cfg/01-88-99-aa-bb-cc-dd
>         /mybootdir/pxelinux.cfg/C000025B
>         /mybootdir/pxelinux.cfg/01-88-99-aa-bb-cc
>         /mybootdir/pxelinux.cfg/C000025
>         /mybootdir/pxelinux.cfg/01-88-99-aa-bb
>         /mybootdir/pxelinux.cfg/C00002
>         /mybootdir/pxelinux.cfg/01-88-99-aa
>         /mybootdir/pxelinux.cfg/C0000
>         /mybootdir/pxelinux.cfg/01-88-99
>         /mybootdir/pxelinux.cfg/C000
>         /mybootdir/pxelinux.cfg/01-88
>         /mybootdir/pxelinux.cfg/C00
>         /mybootdir/pxelinux.cfg/01
>         /mybootdir/pxelinux.cfg/C0
>         /mybootdir/pxelinux.cfg/C
>         /mybootdir/pxelinux.cfg/default
>
> We could be in need for a custom file/menu for this group of addresses (as
an example): /mybootdir/pxelinux.cfg/01-88-99-aa
>

Not really very useful; besides the rather obvious ambiguity, there
simply isn't a lot of locality in MAC space.

There *may* be some value in specifically the OID portion of the MAC
address (the 01 for Ethernet plus three octets), but I have yet to hear
a compelling enough use case for everyone else to take the load time
penalty.

        -hpa


________________________________

CONFIDENTIALITY
This e-mail and any attachment contain KONGSBERG information which may be
proprietary, confidential or subject to export regulations, and is only
meant for the intended recipient(s). Any disclosure, copying, distribution
or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If
received in error, please delete it immediately from your system and notify
the sender properly.

_______________________________________________
Syslinux mailing list
Submissions to Syslinux at zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.



________________________________

CONFIDENTIALITY
This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly.




More information about the Syslinux mailing list