Received: from list by lists.gnu.org with archive (Exim 4.71) id 1agRF2-0005nI-F0 for mharc-grub-devel@gnu.org; Thu, 17 Mar 2016 02:17:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agREz-0005je-PB for grub-devel@gnu.org; Thu, 17 Mar 2016 02:17:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agREu-0002sh-QQ for grub-devel@gnu.org; Thu, 17 Mar 2016 02:17:01 -0400 Received: from e28smtp08.in.ibm.com ([125.16.236.8]:39280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agREu-0002sQ-3q for grub-devel@gnu.org; Thu, 17 Mar 2016 02:16:56 -0400 Received: from localhost by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Mar 2016 11:46:52 +0530 Received: from d28relay03.in.ibm.com (9.184.220.60) by e28smtp08.in.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 17 Mar 2016 11:46:49 +0530 X-IBM-Helo: d28relay03.in.ibm.com X-IBM-MailFrom: nikunj@linux.vnet.ibm.com X-IBM-RcptTo: grub-devel@gnu.org Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u2H6Glew61538356 for ; Thu, 17 Mar 2016 11:46:48 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u2HBjYR8008369 for ; Thu, 17 Mar 2016 17:15:35 +0530 Received: from abhimanyu.in.ibm.com.vnet.linux.ibm.com (abhimanyu.in.ibm.com [9.124.35.92] (may be forged)) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u2HBjVJs008131 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Mar 2016 17:15:32 +0530 From: Nikunj A Dadhania To: Andrei Borzenkov , The development of GNU GRUB Subject: Re: [PATCH] bootp: set is_def while processing dhcp ack In-Reply-To: References: <1458117324-5685-1-git-send-email-nikunj@linux.vnet.ibm.com> <87h9g63ey5.fsf@abhimanyu.in.ibm.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-redhat-linux-gnu) Date: Thu, 17 Mar 2016 11:46:40 +0530 Message-ID: <87a8lxwrw7.fsf@abhimanyu.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable x-cbid: 16031706-0029-0000-0000-00000BDA16F7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 125.16.236.8 Cc: mpe@ellerman.id.au X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2016 06:17:02 -0000 Andrei Borzenkov writes: > On Wed, Mar 16, 2016 at 1:16 PM, Nikunj A Dadhania > wrote: >> Hi Andrei, >> >>> If you call net_bootp manually, >> >> Thats what we are using in this current case, booting from the disk, >> and the grub.cfg has a netboot entry. >> >> menuentry 'Linux dev netboot' --class os { >> insmod net >> insmod ofnet >> insmod tftp >> >> net_bootp >> >> echo 'Network status: ' >> net_ls_cards >> net_ls_addr >> net_ls_routes >> >> echo 'Loading Linux ...' >> linux (tftp)/ubuntu-installer/ppc64el/vmlinux tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false --- quiet >> initrd (tftp)/ubuntu-installer/ppc64el/initrd.gz >> } >> > > OK, so you attempt to configure everything. The first obvious question > is - *which* interface should now become default? Your patch would > make them compete, whoever is the last would win. > > We would need to define some mechanism to designate interface as "default" here. > >>> server is stored in environment variable net__dhcp_server_name; >>> you are free to use it as needed, e.g. set $root and $prefix. >>> > > You can already fetch this information from environment. Something like > > for i in 0 1 2 3 4 5; do > eval "set ip=\$net_ofnet${i}_dhcp_server" I dont see net_ofnet0_dhcp_server or net_ofnet_dhcp_server set > if [ -n "$ip" ]; then > set boot_from=tftp,$ip > break > fi > done > > And later use ($boot_from) everywhere. Regards Nikunj