Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iNGG8-0006M6-8g for mharc-grub-devel@gnu.org; Wed, 23 Oct 2019 09:01:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41066) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNGFu-0006Hb-UF for grub-devel@gnu.org; Wed, 23 Oct 2019 09:00:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNGFt-0004pU-O4 for grub-devel@gnu.org; Wed, 23 Oct 2019 09:00:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43314) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNGFt-0004ok-Cw for grub-devel@gnu.org; Wed, 23 Oct 2019 09:00:49 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5CBBA5AFE9 for ; Wed, 23 Oct 2019 13:00:48 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id q22so7248869wmc.1 for ; Wed, 23 Oct 2019 06:00:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bxQjMaQhwyLpQYJJd4dB/5m9WrRzyeb/aPnJaTvtCTY=; b=EiVWcE4qyIpzJpSVw5cu0ifAqobl8+aZKPcyBaZ5biTpPcXGxrFwKqllcywZkUMCOT KuYp3Iff8L8OHb6Wd/kGRrCHoGTybymWp5OM09pyu6dLaBa7D/wlOUpD/FevPLOq+q48 eFuCJYZzMUZdOzGHbYw+dvQRZiukf/hkYhDjfxFTr6AQacAz+m/0rQ4QzvhgMMPC2r2z qocBx3F1DNs/I56RW/abe9Z8iU3np0rug6SWHkGdx6l1WE5ZPpIRtmu+jrIrS7Pu+p4e YowGkYXoQecnNKg/Pi5Yr4hg2bFKe5HMU0jaYg/tFOvGj9W7icWm2nX7xOXSm6o4Q/Z8 iSVw== X-Gm-Message-State: APjAAAXUmJVIf19Ce+9qJ/zHdOcGenBKqNBMsfX7NQFlbc4RiFP4vZ8i n+FDZiBdLqexNapo/jlqVDLbtcloteOBRAfdGpxAn791QTOqJV6QTf4ZvGCVi6UgOfe8MNICBfR vx9Z0VUYHO8Q= X-Received: by 2002:a05:6000:11cd:: with SMTP id i13mr8105143wrx.197.1571835646785; Wed, 23 Oct 2019 06:00:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLpIeDPYP6YrUZuKY05mI/ZuydUU7EJvcl72409hunYGVjYQ8W2G60fzkSIXSbC0bLbLg5og== X-Received: by 2002:a05:6000:11cd:: with SMTP id i13mr8105098wrx.197.1571835646386; Wed, 23 Oct 2019 06:00:46 -0700 (PDT) Received: from minerva.redhat.com ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id t123sm27423301wma.40.2019.10.23.06.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 06:00:45 -0700 (PDT) From: Javier Martinez Canillas To: grub-devel@gnu.org Cc: Vladimir Serbinenko , Daniel Kiper , Paulo Flabiano Smorigo , Robert Marshall , Javier Martinez Canillas Subject: [PATCH v4 5/5] docs: Update info with grub.cfg netboot selection order Date: Wed, 23 Oct 2019 15:00:33 +0200 Message-Id: <20191023130034.12834-6-javierm@redhat.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191023130034.12834-1-javierm@redhat.com> References: <20191023130034.12834-1-javierm@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2019 13:00:57 -0000 From: Robert Marshall Add documentation to the grub info page that specifies the order netboot clients use to select a grub configuration file. Signed-off-by: Robert Marshall Signed-off-by: Javier Martinez Canillas --- Changes in v4: - Mention that the UUID is unique to the machine and not the NIC and also refer to the RFC 4578 where the client UUID DHCP option is specified. Changes in v3: - Add a patch documenting the grub.cfg netboot selection order. Changes in v2: None docs/grub.texi | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index 5ac61c09d1b..2f69c47175e 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -2486,6 +2486,52 @@ grub-mknetdir --net-directory=3D/srv/tftp --subdir= =3D/boot/grub -d /usr/lib/grub/i38 Then follow instructions printed out by grub-mknetdir on configuring you= r DHCP server. =20 +The grub.cfg file is placed in the same directory as the path output by +grub-mknetdir hereafter referred to as FWPATH. GRUB will search for its +configuration files in order using the following rules where the appende= d +value corresponds to a value on the client machine. + +@example +@group +@samp{(FWPATH)}/grub.cfg-@samp{(UUID OF MACHINE)} +@samp{(FWPATH)}/grub.cfg-@samp{(MAC ADDRESS OF NIC)} +@samp{(FWPATH)}/grub.cfg-@samp{(IPv4 OR IPv6 ADDRESS)} +@samp{(FWPATH)}/grub.cfg +@end group +@end example + +The UUID is the Client Machine Identifier Option Definition as specified= in +RFC 4578. The client will only attempt to loouk up a UUID config file if= it +was provided by the DHCP server. + +The client will only attempt to look up an IPv6 address config once, how= ever, +it will try the IPv4 multiple times. The concrete example below shows wh= at +would happen under the IPv4 case. + +@example +@group +UUID: 7726a678-7fc0-4853-a4f6-c85ac36a120a +MAC: 52:54:00:ec:33:81 +IPV4: 10.0.0.130 (0A000082) +@end group +@end example + +@example +@group +@samp{(FWPATH)}/grub.cfg-7726a678-7fc0-4853-a4f6-c85ac36a120a +@samp{(FWPATH)}/grub.cfg-52-54-00-ec-33-81 +@samp{(FWPATH)}/grub.cfg-0A000082 +@samp{(FWPATH)}/grub.cfg-0A00008 +@samp{(FWPATH)}/grub.cfg-0A0000 +@samp{(FWPATH)}/grub.cfg-0A000 +@samp{(FWPATH)}/grub.cfg-0A00 +@samp{(FWPATH)}/grub.cfg-0A0 +@samp{(FWPATH)}/grub.cfg-0A +@samp{(FWPATH)}/grub.cfg-0 +@samp{(FWPATH)}/grub.cfg +@end group +@end example + After GRUB has started, files on the TFTP server will be accessible via = the @samp{(tftp)} device. =20 --=20 2.21.0