[Top][All Lists]

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

Re: Obtaining the UUID of the system for a PXE boot

From: Andrey Borzenkov
Subject: Re: Obtaining the UUID of the system for a PXE boot
Date: Thu, 18 Jul 2013 19:35:01 +0400

I guess further discussion should be really moved to grub-devel

В Thu, 18 Jul 2013 12:39:44 +0200
Holger Goetz <address@hidden> пишет:

> On 17.07.2013 16:31, Andrey Borzenkov wrote:
> > On Wed, Jul 17, 2013 at 3:19 PM, Holger Goetz<address@hidden>  wrote:
> >> Hello all,
> >>
> >> i've started to use grub.efi as boot loader for UEFI based systems and am
> >> getting slowly familiar w/ grub2.Now i've come across a problem w/ 
> >> assigning
> >> individual boot configurations to target system identification.
> >> The BIOS line of systems gets booted through pxelinux and get their PXE
> >> configuration through files w/ names based on the individual UUID of the
> >> system.
> >> The same should be possible for UEFI booted systems, but i couldn't find a
> >> way to get hold of the system-UUID yet. The MAC addresse(s) is/are not
> >> available and possibly have changed since the definition of the
> >> configuration, so even the lately introduced net_default_mac variable
> >> doesn't work here. Having the UUID as unique system identifyer across NICs
> >> which can be changed would be of big help.
> >>
> >> Any pointer/help would be greatly appreciated.
> >>
> > So, you need to fetch system GUID used by PXE, right? To be honest, I
> > do not even know how (if it is possible at all) to obtain it. The only
> > words about PXE GUID in EFI allow to switch between using GUID and MAC
> > for client identification, but that's all:
> >
> > ===
> > SendGUIDThis field is used to change the Client Hardware Address
> > (chaddr) field in the DHCP and Discovery packets. Set to TRUE to send
> > the SystemGuid (if one is available).
> > ===
> >
> > Do you know how to get this information?
> >
> >
> Hi Andrey,
> the system UUID is part of the SMBIOS structure which can be searched 
> between 0xf000 and 0x100000 in memory. It has a signature string "_SM_".
> With in the SMBIOS table (memory block)  the table type 1 identifys the 
> UUID table and it contains a 16byte binary number which typically is 
> returned in a form like 00112233-4455-6677-8899-AABBCCDDEEFF. See the 
> SMBIOS specs here:

David Michael posted patch to grub-devel which provides access to SM
BIOS information. You may be interested in checking to which extent it
could be used in your case. Thread title is

[PATCH/RFC] cpuid.c: Provide CPU model information

> Also in the spec is some discussions around byte swappig parts of the 
> uuid, for consistency probably a byte by byte representation as a string 
> would be best.
> One implementation can be found in eg. syslinux's core/dmi.c - including 
> a rudimentary validation check.
> Other implementations under Linux (eg. dmidecode) often take 
> /proc/efi/systab or /sys/firmware/efi/systab as starting points to the 
> SMBIOS structure, but that's obviously not available at the time grub 
> starts ;-)

I'm still not sure what exactly you need. There are three steps in
booting grub2 over network

1. Firmware loads core.img using PXE. At this point it may provide MAC
or GUID as client identification

2. core.img loads normal.mod which loads grub.cfg. This is done using
location hardcoded in core.img.

3. Finally grub.cfg loads other files, loads OS kernel and executes it.
It is using whatever features and commands grub2 provides and may
decide location dynamically.

Now, at which step exactly you need to know and use system GUID from SM

reply via email to

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