Red Hat Bugzilla – Bug 873406
Add ability to autoload grub2's config file when netbooting
Last modified: 2012-12-06 02:25:42 EST
== Comment: #0 - Brent J. Baude <firstname.lastname@example.org> - 2012-11-05 13:40:08 ==
+++ This bug was initially created as a clone of Bug #80686 +++
Similar to yaboot and pxelinux, grub2 network boot needs to auto load a config file. A few things that we need to fix:
1. net_bootp must default to the network we loaded grub2 off. RIght now it seems to default to the last network card. We need to use the info in boot-device to find the correct interface.
2. We need to load a machine specific config file over tftp. The algorithm used by both yaboot and pxelinux can be found at:
------- Comment From email@example.com 2012-11-05 19:53 EDT-------
Original response from Paulo below:
I made a patch to do the pxe config. The procedure looks for the following files, just like pxe/yaboot do:
After talking with GRUB2 maintainer about it, he suggested to put a script inside grub.cfg to do this job. I made one with the content:
for c in 1 2 3 4; do
regexp --set=ip '^(.*)\..+$' "$ip"
Do you think this approach is good?
What do you think about use IP as decimal?
Created attachment 653057 [details]
[PATCH 1/3] Add %X option to printf functions.
Created attachment 653058 [details]
[PATCH 2/3] DHCP client ID and UUID options added.
Created attachment 653059 [details]
[PATCH 3/3] Search for specific config file for netboot
Those patches implement a search for a specific configuration when the config
file is on a remote server. It uses the following order:
1) DHCP client UUID option.
2) MAC address (in lower case hexadecimal with dash separators);
3) IP (in upper case hexadecimal) or IPv6;
4) The original grub.cfg file.
This procedure is similar to what is used by pxelinux and yaboot:
grub2-2.00-13.fc18 has been submitted as an update for Fedora 18.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing grub2-2.00-13.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
grub2-2.00-13.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.