From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MytzJ-000802-Ub for mharc-grub-devel@gnu.org; Fri, 16 Oct 2009 17:05:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MytzG-0007yf-Jx for grub-devel@gnu.org; Fri, 16 Oct 2009 17:05:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MytzC-0007y9-2k for grub-devel@gnu.org; Fri, 16 Oct 2009 17:05:22 -0400 Received: from [199.232.76.173] (port=49287 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MytzB-0007y6-Si for grub-devel@gnu.org; Fri, 16 Oct 2009 17:05:17 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:36099) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MytzB-0005FV-Ak for grub-devel@gnu.org; Fri, 16 Oct 2009 17:05:17 -0400 Received: by fg-out-1718.google.com with SMTP id e21so442713fga.12 for ; Fri, 16 Oct 2009 14:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=52mwaMqAFkwbyTPUsb3r4vnmawAHy7pOpm7E2rVLhgk=; b=OhpdNsGfinX/WhCyMooQnHeTyP2DHn334cIbwAfFYKvDiF4TJzkqv426hk2jA/zESC THwqVTv2xMip+b/sprlObnvP4OLNAbmmW/xtirSzC06bySPciNiK7XJ2XDWVB6DysqTt VSa8478EnKo62coBIlXUNMVbenMjS42v7/c+0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=J9eaQncnBgGs8slmJGusufgwi7yLTll8lJajQSXsV96YkjxduuhLqXUaf6rKGyknkD b++xab/u7amIta6BshGLDJ6eomWGRl6dZNRoeQBHzYae/h5p0ZWjTvBxsL10AO9hMPGa uBVI051AT5YMzmDumqWce4rVDUG25A6Z5jNNQ= Received: by 10.86.170.4 with SMTP id s4mr1529270fge.9.1255727116502; Fri, 16 Oct 2009 14:05:16 -0700 (PDT) Received: from debian.bg45.phnet (190-234.203-62.cust.bluewin.ch [62.203.234.190]) by mx.google.com with ESMTPS id e20sm933121fga.10.2009.10.16.14.05.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Oct 2009 14:05:15 -0700 (PDT) Message-ID: <4AD8E00A.6020503@gmail.com> Date: Fri, 16 Oct 2009 23:05:14 +0200 From: Vladimir 'phcoder' Serbinenko User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: The development of GRUB 2 References: <4AD85FBB.6010507@gmail.com> <200910162012.47463.pisa@cmp.felk.cvut.cz> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Using network informations from PXE as grub2 enviroment variables X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2009 21:05:23 -0000 Seth Goldberg wrote: > Hi, > > Quoting Pavel Pisa, who wrote the following on Fri, 16 Oct 2009: > >>>> Nobody can't use options 150 from DHCP, because GRUB2 don't have any >>>> driver for network adapters. Network task are done only through >>>> adapters PXE firmware. PXE passes informations only about IP >>>> addresses, but no DHCP options. > > Not true -- all DHCP options are available by inspecting the cached > DHCPACK that is available from a call to PXE firmware. This is a > stable interface and works quite well. In fact, we enhanced the > Legacy GRUB we use in Solaris to pass the entire DHCPACK via the > multiboot structure (albeit in a non-standard way -- and I'd like to > rectify that by including the DHCPACK in the multiboot structure > explicitly) so it can be used by the kernel. Since you are familiar with networking and PXE could you make a multiboot amendment proposal? It has to be (a) expandable to new network interfaces (not only PXE), it includes the necessity of passing info pertatining to multiple adapters and a way to match this info to adapters (I think MAC is good for this) (b) possibility to add custom information, not only what is specified by DHCP standard. Vendor info encapsulation is perhaps a way. I'm not sure we'll ever need this but I would like to have this possibility if we ever need it > Note also that the EFI PXE wrapper also provides access to the > cached DHCPACK. > >>> >>> I let someone more familiar with PXE than me to answer this. >> >> The 150 option would be usesfull a lot, but I do not know PXE >> good enough to support that. The PXE firmware seems to be >> problematic (high probability of bugs and diversity) to me anyway >> so we want to use as small subset as possible. > > In our experience (booting Solaris using PXE firmware), for our > uses, the firmware has been quite stable. The trick it to ensure that > you're using APIs that Microsoft uses -- that's the only way these > APIs will be stable enough for general use. This is the same story as > with the multitude of BIOS calls -- as time has progressed, the only > stable set of calls you can 100% rely on are that set that are used by > Windows. > > We've been using DHCP Option 150 extensively without a problem. In > fact, we made modification to Legacy GRUB to go a bit beyond Option > 150, which includes a search order for finding the appropriate GRUB > menu. The search order is as follows (see the `solaris_config_file' > in OpenSolaris's grub source base): (1) We look for DHCP option 150; > (2) We look for menu.lst.01 using the MAC address of the > PXE-booted NIC; (3) We look for menu.lst. (but if BootFile > is "pxelinux.{X}" we just use {X} for ; (4) Finally, if > those fail, we fall back on plain-old "menu.lst". > > This allows a significant amount of customization, either at the DHCP > server level, or based on the MAC of the requesting client. Our > install-server preparation scripts create the appropriate files > automatically. > > Since our customers have come to rely on this behavior, we will > continue to offer these options (obviously, with different menu > filenames, though). It would be nice to include this functionality > for all other GRUB2 users as well. > > Thanks, > --S > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git