[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining the MAC address of the boot NIC for a PXE boot

From: Rigoberto Corujo
Subject: Re: Obtaining the MAC address of the boot NIC for a PXE boot
Date: Fri, 10 May 2013 09:12:57 -0700 (PDT)

----- Original Message -----

> From: Andrey Borzenkov <address@hidden>
> To: Rigoberto Corujo <address@hidden>
> Cc: "address@hidden" <address@hidden>; "address@hidden" <address@hidden>
> Sent: Wednesday, May 8, 2013 3:25 PM
> Subject: Re: Obtaining the MAC address of the boot NIC for a PXE boot
> В Wed, 8 May 2013 10:27:47 -0700 (PDT)
> Rigoberto Corujo <address@hidden> пишет:
>>  Thank you very much, Andrey.  This worked.  I did have to add the following 
> lines to "grub-core/" to get a "eval.mod" 
> generated, but I'm sure that it's probably because I missed an important 
> step that would have automatically generated it.
> In the meantime Vladimir pushed different implementation that provides
> net_default_mac:
> `net_default_interface'
>      Initially set to name of network interface that was used to load
>      grub.  Read-write, although setting it affects only interpretation
>      of `net_default_ip' and `net_default_mac'
> `net_default_ip'
>      The IP address of default interface.  Read-only. This is alias for
>      the `net_${net_default_interface}_ip'.
> `net_default_mac'
>      The default interface's MAC address.  Read-only.  This is alias
>      for the `net_${net_default_interface}_mac'.
> Could you verify that it works for you? Also if you would comment on
> documentation in Network section from user's perspective.
> _______________________________________________
> Help-grub mailing list
> address@hidden

Thank you Andrey.  I can confirm that the net_default_interface, 
net_default_ip, and net_default_mac variables worked as expected.  I did 
notice, however, then when I'm in the grub shell and I type "set", these 
variables show up in the list, but they have no values, which makes it appear 
as if something is wrong.  If I echo the variables, however, I do see their 
correct values.

As far as the documentation, I would suggest that for the description of 
net_default_mac, something similar to the following text be added:

The net_default_mac variable may be used in your GRUB configuration file as a 
substitute for the BOOTIF=<hardware-address-of-boot-interface> option that gets 
appended to the Linux kernel parameters by the pxelinux IPAPPEND option.

I think most pxelinux users that are switching to GRUB 2 will do a Google 
search for BOOTIF and IPAPPEND, looking to see how to obtain the boot NIC's MAC 
address with GRUB 2, and having those two keywords in the documentation would 
make it easy to find the answer.

Thank you very much, once again.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]