Received: from list by lists.gnu.org with archive (Exim 4.71) id 1agSvC-0002Nv-N5 for mharc-grub-devel@gnu.org; Thu, 17 Mar 2016 04:04:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agSvA-0002Kd-72 for grub-devel@gnu.org; Thu, 17 Mar 2016 04:04:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agSv6-0008Cy-2y for grub-devel@gnu.org; Thu, 17 Mar 2016 04:04:40 -0400 Received: from e28smtp06.in.ibm.com ([125.16.236.6]:58254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agSv5-0008CS-Cm for grub-devel@gnu.org; Thu, 17 Mar 2016 04:04:36 -0400 Received: from localhost by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Mar 2016 13:34:31 +0530 Received: from d28relay01.in.ibm.com (9.184.220.58) by e28smtp06.in.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 17 Mar 2016 13:34:29 +0530 X-IBM-Helo: d28relay01.in.ibm.com X-IBM-MailFrom: nikunj@linux.vnet.ibm.com X-IBM-RcptTo: grub-devel@gnu.org Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u2H84S0J38666456 for ; Thu, 17 Mar 2016 13:34:29 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u2H84Q6v002228 for ; Thu, 17 Mar 2016 13:34:28 +0530 Received: from abhimanyu.in.ibm.com.vnet.linux.ibm.com (abhimanyu.in.ibm.com [9.124.35.92] (may be forged)) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u2H84QP1002206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 17 Mar 2016 13:34:26 +0530 From: Nikunj A Dadhania To: Andrei Borzenkov 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> <87a8lxwrw7.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 13:34:26 +0530 Message-ID: <877fh1wmwl.fsf@abhimanyu.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable x-cbid: 16031708-0021-0000-0000-00000ADEEF69 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 125.16.236.6 Cc: The development of GNU GRUB , 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 08:04:41 -0000 Andrei Borzenkov writes: > On Thu, Mar 17, 2016 at 9:16 AM, Nikunj A Dadhania > wrote: >> 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 >> > > This should be net_ofnet0_dhcp_server_name, sorry. What variables are > set (could you show full list)? ?=0 cmdpath=(ieee1275/disk) color_highlight=black/light-gray color_normal=light-gray/black default= feature_200_final=y feature_all_video_module=y feature_chainloader_bpb=y feature_default_font_path=y feature_menuentry_id=y feature_menuentry_options=y feature_nativedisk_cmd=y feature_ntldr=y feature_platform_search_hint=y feature_timeout_style=y grub_cpu=powerpc grub_platform=ieee1275 lang= locale_dir= menuentry_id_option=--id net_default_interface=ofnet_net:dhcp net_default_ip=(null) net_default_mac=(null) net_default_server=10.0.2.2 net_ofnet_net_dhcp_boot_file=ubuntu-installer/ppc64el/powerpc-ieee1275/core.elf net_ofnet_net_dhcp_ip=10.0.2.15 net_ofnet_net_dhcp_mac=52:54:00:12:34:56 pager=1 prefix=(ieee1275/disk,msdos2)/grub pxe_default_server=10.0.2.2 root=ieee1275/disk,msdos2 secondary_locale_dir= timeout_style=menu Regards Nikunj