On Wed, Mar 16, 2016 at 11:35 AM, Nikunj A Dadhania <nik...@linux.vnet.ibm.com> wrote: > While testing netboot on ppc64, found that the grub_net_default_server > is not set even when the dhcp response has sent the server IP. This would > result in a failure during netbooting with following error: > > error: no server is specified. > > This patch sets the is_def variable which would result in setting the > grub_net_default_server and then netboot from the server. > > Signed-off-by: Nikunj A Dadhania <nik...@linux.vnet.ibm.com> > --- > grub-core/net/bootp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c > index a088244..74b8b79 100644 > --- a/grub-core/net/bootp.c > +++ b/grub-core/net/bootp.c > @@ -278,7 +278,7 @@ grub_net_process_dhcp (struct grub_net_buff *nb, > } > grub_net_configure_by_dhcp_ack (name, card, > 0, (const struct grub_net_bootp_packet *) > nb->data, > - (nb->tail - nb->data), 0, 0, 0); > + (nb->tail - nb->data), 1, 0, 0);
That's wrong, sorry. "is default" is intended to be used from initial configuration based on information from firmware (i.e. - firmware does PXE boot and we configure interface based on PXE packet firmware made available for us). If you call net_bootp manually, server is stored in environment variable net_<if>_dhcp_server_name; you are free to use it as needed, e.g. set $root and $prefix. Does your platform use PXE or some other protocol for netboot? We may need to provide platform-specific network configuration function that understands how to fetch information from firmware. > grub_free (name); > if (grub_errno) > grub_print_error (); > -- > 2.5.0 > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel