Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iuDmG-0007Ce-Jt for mharc-grub-devel@gnu.org; Wed, 22 Jan 2020 06:02:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33952) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuDmD-00079N-Fu for grub-devel@gnu.org; Wed, 22 Jan 2020 06:02:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuDmC-0001Kb-4G for grub-devel@gnu.org; Wed, 22 Jan 2020 06:02:25 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:50527 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iuDmC-0001KL-0J for grub-devel@gnu.org; Wed, 22 Jan 2020 06:02:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579690943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6/FwDq0bKQuYApYVB6dZWNifFpctD/dZQJZTT3JuyzI=; b=iLhs6P7CvcFn1/F5whKyQfU97354YgtrHpMW2LvUz77xZWqj7cPXcx3c0ixreVKjv9sXJW TCvJjYhEoNSLjTRnJjrGkZHVtCABSFJy4shMZmVc7usCjNEMY9+LILI0q7nmB9nQk81DS3 NS4NnWdDxMruGS7ro8q0fkpJ8F3VG94= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-44-dHtHof_ZOWqEHniUwxVmHg-1; Wed, 22 Jan 2020 06:02:21 -0500 Received: by mail-wr1-f69.google.com with SMTP id z14so2894313wrs.4 for ; Wed, 22 Jan 2020 03:02:21 -0800 (PST) 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=CIcaW/j+gjErlD5uMo1OqSq4FpK/CRXiM4g+6dIEbXE=; b=f/iimSi/UO5do51mdhRnNMxtyIvOvfFE9cqYfHLhyZ/6nnPTMUYFpiCzEtysOYp2k6 2GgIky59NsgN0wRbbc7EDAiTfMzCXwHFDSnHczSyfkGnUvEY6GUz416L4reStagW5qSB ifXvhwaRO696nVp5mLpehTLu7tXRS7ga8a5rYezDacNyBRKTVxg/AmO4ypFdpz71dnQX fOtylXS0vMWC4RO7aXAPv8s/IJbaHbeCpAPXQKAb6snzwwhSpjM2puSb8NyaTN0nqn9P xqR+kjfcn/l7DTHuJHui7mUyH4Ov3iLlg8OZKE2UyH6SWYTs3auRg6Mk2VumHnGCQ82a 9Ngg== X-Gm-Message-State: APjAAAXEjNUplTNXIHDEbklHJS+yOxfdulQKkU01Qd5fXUACVWmQkODW Jcfvl42mf4+qc4I2Isujld0dE1rR0BB6nUnT34nT70UI8lTUAQJDlHCgHvBe+clySX/SRrfMqQr 5XsaBMiRx8yk= X-Received: by 2002:a5d:42c5:: with SMTP id t5mr11035518wrr.73.1579690940357; Wed, 22 Jan 2020 03:02:20 -0800 (PST) X-Google-Smtp-Source: APXvYqzqbHjsvqTZKdc9IZDtY/Knoh0IAvbKxvSrnVtJjyhhp+n06y+Jsi2tyocVc/TOmZwQpldEnQ== X-Received: by 2002:a5d:42c5:: with SMTP id t5mr11035493wrr.73.1579690940102; Wed, 22 Jan 2020 03:02:20 -0800 (PST) Received: from minerva.redhat.com ([2a01:c50f:ab80:6700:527f:85b3:5615:ff0b]) by smtp.gmail.com with ESMTPSA id c2sm56546692wrp.46.2020.01.22.03.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2020 03:02:19 -0800 (PST) From: Javier Martinez Canillas To: grub-devel@gnu.org Cc: Daniel Kiper , Paulo Flabiano Smorigo , Vladimir Serbinenko , Robert Marshall , Javier Martinez Canillas Subject: [PATCH v6 5/5] docs: Update info with grub.cfg netboot selection order Date: Wed, 22 Jan 2020 12:01:56 +0100 Message-Id: <20200122110157.1062269-6-javierm@redhat.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200122110157.1062269-1-javierm@redhat.com> References: <20200122110157.1062269-1-javierm@redhat.com> MIME-Version: 1.0 X-MC-Unique: dHtHof_ZOWqEHniUwxVmHg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII 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: 205.139.110.120 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, 22 Jan 2020 11:02:27 -0000 From: Robert Marshall Add documentation to the GRUB manual that specifies the order netboot clients use to select a GRUB configuration file. Also explain that the feature is enabled by default but can be disabled by setting the 'feature_net_search_cfg' environment variable to 'n' in an embedded configuration file. Signed-off-by: Robert Marshall Signed-off-by: Javier Martinez Canillas --- Changes in v6: - Explain in the GRUB manual that the feature is enabled by default and how can be disabled by setting a variable in an embedded configuration file. Changes in v5: - Add Reviewed-by tag from Daniel Kiper to patch #5. 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 | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index 1b25466c735..83979af381d 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -2495,6 +2495,57 @@ 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 your = 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 appended +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 i= n +RFC 4578. The client will only attempt to loouk up a UUID config file if i= t +was provided by the DHCP server. + +The client will only attempt to look up an IPv6 address config once, howev= er, +it will try the IPv4 multiple times. The concrete example below shows what +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 + +This feature is enabled by default but it can be disabled by setting the +@samp{feature_net_search_cfg} to @samp{n}. Since this happens before the +configuration file is read by GRUB, this option has to be disabled in an +embedded configuration file (@pxref{Embedded configuration}). + After GRUB has started, files on the TFTP server will be accessible via th= e @samp{(tftp)} device. =20 --=20 2.24.1