[ipxe-devel] ${net1/mac} is empty

Suresh Nathagoundenpalayam suresh at pc-doctor.com
Tue May 6 15:51:56 UTC 2014


Hi Michael,

I'm new to PXE booting stuff. I ended up here while experimenting with razor-server (https://github.com/puppetlabs/razor-server/wiki/Installation). In the installation instructios for razor-server, I was asked to make the following changes in my dhcp.


 if exists user-class and option user-class = "iPXE" {
    filename "bootstrap.ipxe";
  } else {
    filename "undionly.kpxe";
  }

Does this mean that I'm using undionly.kpxe ? If so, how do I modify it to use ipxe.pxe or ipxe.iso.

The bootstrap.ipxe file contains 

#!ipxe

isset ${ip} || goto dhcp_net0
set dhcp_mac ${mac:hexhyp}
goto chain_boot

:dhcp_net0
isset ${net0/mac} && dhcp net0 || goto dhcp_net1
echo net0 has DHCP
set dhcp_mac net0$${net0/mac:hexhyp}

:dhcp_net1
isset ${net1/mac} && dhcp net1 || goto dhcp_net2
echo net1 has DHCP
set dhcp_mac net1$${net1/mac:hexhyp}

:dhcp_net2
isset ${net2/mac} && dhcp net2 || goto dhcp_net3
echo net2 has DHCP
set dhcp_mac net2$${net2/mac:hexhyp}

:dhcp_net3
isset ${net3/mac} && dhcp net3 || goto chain_boot
echo net3 has DHCP
set dhcp_mac net3$${net3/mac:hexhyp}


:chain_boot
chain http://192.168.52.2:8080/svc/boot?net0=${net0/mac:hexhyp}&net1=${net1/mac:hexhyp}&net2=${net2/mac:hexhyp}&net3=${net3/mac:hexhyp}&dhcp_mac=${dhcp_mac}&serial=${serial}&asset=${asset}&uuid=${uuid} || goto error
echo successfully completed the chain-loaded script; booting locally with 'exit'
exit

:error
echo error handler invoked; waiting one minute and rebooting
sleep 60
reboot


Thanks,
Suresh.
-- 
Suresh Kumar
Sr. Software Engineer, Team Lead (Analytics/R&D)

PC-Doctor, Inc.
10345 Professional Circle,
Reno, NV – 89521

Contact
Phone: 775 336 4047
Fax: 775 336 4099
Email: suresh at pc-doctor.com

CONFIDENTIALITY
The information contained in this message is confidential. It is intended to be read only by the individual or entity to whom it is addressed or by an authorized designee. If the reader of this message is not the intended recipient, be aware that distribution of this message in any form is strictly prohibited. If you have received this message in error, please immediately notify the sender and destroy any copy of this message.

----- Original Message -----
From: "Michael Brown" <mcb30 at ipxe.org>
To: "Suresh Nathagoundenpalayam" <suresh at pc-doctor.com>, ipxe-devel at lists.ipxe.org
Sent: Tuesday, May 6, 2014 7:44:32 AM
Subject: Re: [ipxe-devel] ${net1/mac} is empty

On 06/05/14 02:22, Suresh Nathagoundenpalayam wrote:
> I'm trying to use iPXE with razor-server. I have a machine with two nics. But when I log into the iPXE and look at the config for this machine, I get info for only one of the nics. Is this a usual occurrence ? Is it possible to get the mac addresses for both the nics ie have both net1 and net0 populated ?
>
> boardmanufacturer: "Supermicro"
> boardproductname: "X10SLE"
> boardserialnumber: "NM13CS013211"
> macaddress1: "00:25:90:e7:74:aa"
> macaddress2: "00:25:90:e7:74:ab"

How are you loading iPXE?

If you are using undionly.kpxe, then that will only ever see the NIC 
from which it was chainloaded.  To get access to any other NICs, you 
will need to use native iPXE drivers (e.g. ipxe.pxe, ipxe.iso, etc) 
rather than the undionly driver.

Michael




More information about the ipxe-devel mailing list