Skip to contentSkip to conversation

grub2pxe give a specific cfg file per host

DISCUSSION Yoann Moulin 3 participants 4 messages Oct 14, 2009 – Oct 15, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

I'm testing grub2pxe and I'd like to know if it's possible to give different configfile (diff that grub.cfg) per host/mac address such as pxelinux does with mac address detection.
option-150 was used for that before but seem to not be implemented with grub2

I'd like to do something like into the dhcpd.conf file:

host test1 {
hardware ethernet 00:1c:42:01:f8:18;
fixed-address test1.local;
filename "grub2pxe";
option option-150 "/boot/grub/test1.cfg";
}

where /boot/grub/test1.cfg might be a symlink on a default file.cfg or a specific file.

is that something already implemented ? if not is there any plan for something like that ?

Test environment :
- Parallels for Mac 4
- boot server runs Centos 5.3
- grep2pxe build from grub-1.97~beta4
- kernel : 2.6.18-164.el5

thanks for your help

Yoann Moulin

#1 lore raw

Quoting Yoann Moulin, who wrote the following on Wed, 14 Oct 2009:

Quoted 8 lines

Hi,

I'm testing grub2pxe and I'd like to know if it's possible to give different configfile (diff that grub.cfg) per host/mac address such as pxelinux does with mac address detection.
option-150 was used for that before but seem to not be implemented with grub2

Quoted 8 lines

I'd like to do something like into the dhcpd.conf file:

host test1 {
hardware ethernet 00:1c:42:01:f8:18;
fixed-address test1.local;
filename "grub2pxe";
option option-150 "/boot/grub/test1.cfg";
}

This is something that's absolutely essential to our customers. It's
something we rely on in Legacy GRUB and it's something that we'll need in GRUB2 when we make the transition.

--S

#2 lore raw
Quoted 15 lines
Quoted 6 lines

I'm testing grub2pxe and I'd like to know if it's possible to give different configfile (diff that grub.cfg) per host/mac address such as pxelinux does with mac address detection.
option-150 was used for that before but seem to not be implemented with grub2

Quoted 8 lines

I'd like to do something like into the dhcpd.conf file:

host test1 {
hardware ethernet 00:1c:42:01:f8:18;
fixed-address test1.local;
filename "grub2pxe";
option option-150 "/boot/grub/test1.cfg";
}

Quoted 3 lines

This is something that's absolutely essential to our customers. It's
something we rely on in Legacy GRUB and it's something that we'll need in GRUB2 when we make the transition.

good :)

but is that mean it's not possible yet to do something like that right now ?

Yoann

#3 lore raw
Quoted 15 lines · Yoann Moulin
Quoted 15 lines
Quoted 14 lines

I'm testing grub2pxe and I'd like to know if it's possible to give different configfile (diff that grub.cfg) per host/mac address such as pxelinux does with mac address detection.
option-150 was used for that before but seem to not be implemented with grub2

I'd like to do something like into the dhcpd.conf file:

host test1 {
hardware ethernet 00:1c:42:01:f8:18;
fixed-address test1.local;
filename "grub2pxe";
option option-150 "/boot/grub/test1.cfg";
}

Quoted 7 lines
Quoted 3 lines

  This is something that's absolutely essential to our customers.  It's something we rely on in Legacy GRUB and it's something that we'll need in GRUB2 when we make the transition.

good :)

but is that mean it's not possible yet to do something like that right now ?

Hi,

Yeah, it's impossible to do it now. But this feature is not difficult to add using the tree config loader from my menu branch, I'd post a patch soon.

Signature · 4 lines
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/