Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iPSIV-0008CI-Bl for mharc-grub-devel@gnu.org; Tue, 29 Oct 2019 10:16:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60452) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPSIQ-00086b-Uf for grub-devel@gnu.org; Tue, 29 Oct 2019 10:16:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPSIP-0001A8-HW for grub-devel@gnu.org; Tue, 29 Oct 2019 10:16:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33670) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iPSIP-00019R-7d for grub-devel@gnu.org; Tue, 29 Oct 2019 10:16:29 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (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 379044E8B8 for ; Tue, 29 Oct 2019 14:16:28 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id b10so919296wmh.6 for ; Tue, 29 Oct 2019 07:16:28 -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=v3EYnoNWL4O2nJykFc3a41UTHqfWziJADnhDEFY7gwU=; b=NagZA9lfTyKM0kMzs0RcRpty4hq2qKGXZxAA+WVtiYdGejhIp5NGoXxSxuVOfhNEAb 1Q2uOGEb2/FO4YCuzKCjy5ENGJXBCARUThQjCfnPSfBBylH1wTKQtBQtFJQhPHkuahXb tuKkTPLsQ7RRTGQGxr3GfanqDeGRtNF9Kkqr3hCOvXapPh6K+21MZvh/cw9A8TXDbhuJ fDGY7puhREi3ylnaEzvH3t54okON4j77QSQq5ruDHa+VS2MvMCbs7ILZYtZWXEtJTRaF B3I1RAe1z4t6U/2Rhg0lYIyvfWQlXh+BHe4dY+es/0x5f7sEvNnvnBqHzni7IGOiT+Fc Qx4g== X-Gm-Message-State: APjAAAUwNLFCmuyL3DrPMA7hGYBC3P97lS8izgCVVYpkfP5oY2gQmF+n DzxG0QgJtK+/vmTvZukdbfkMZA65vnAWEiZyCl5KU1FtoTyArxkjyF2ysfiLo2xSukpnGSe9jaW zPQTEnWaJNTk= X-Received: by 2002:adf:f342:: with SMTP id e2mr21393169wrp.61.1572358586472; Tue, 29 Oct 2019 07:16:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJCgJdkxHw1Nzxoy4KaiJc0zvMqqBIg6F2ZFK5SlGIRrvqY3wRyOnkCqYWSM2s751SFbMA1w== X-Received: by 2002:adf:f342:: with SMTP id e2mr21393150wrp.61.1572358586265; Tue, 29 Oct 2019 07:16:26 -0700 (PDT) Received: from minerva.redhat.com ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id s17sm2965808wmh.3.2019.10.29.07.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2019 07:16:25 -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 v5 5/5] docs: Update info with grub.cfg netboot selection order Date: Tue, 29 Oct 2019 15:16:12 +0100 Message-Id: <20191029141612.29488-6-javierm@redhat.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191029141612.29488-1-javierm@redhat.com> References: <20191029141612.29488-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: Tue, 29 Oct 2019 14:16:33 -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 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 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git docs/grub.texi docs/grub.texi index 5ac61c09d1b..2f69c47175e 100644 --- docs/grub.texi +++ 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