From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oTnQO-0002KV-0y for mharc-grub-devel@gnu.org; Thu, 01 Sep 2022 12:52:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTnQK-0002Gv-Om for grub-devel@gnu.org; Thu, 01 Sep 2022 12:52:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:28740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTnQH-0005ZA-RQ for grub-devel@gnu.org; Thu, 01 Sep 2022 12:52:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662051128; 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: in-reply-to:in-reply-to:references:references; bh=LeLQekrS9Tpjylgv/lkyKE/ZyTnWLvG22cvzNuq4BAc=; b=DylBIoBTBKqOJuYS7SwlwEfRjqEhyGxzV0Giey1jZj7gA0KCs6qvBJuEzpkxkm917aZ47E OPQ5xfgnegHNRZLTM8ELRyFi6c5vJuhTpjqTrtZyz6z61KKH/hX30kE3ajZVSSd0aL0Ek1 xtsYJ4plveb0JVYe3eBIKOOpjc65HuE= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-583-E_debqVQPs2yN6jPfAyo8w-1; Thu, 01 Sep 2022 12:52:07 -0400 X-MC-Unique: E_debqVQPs2yN6jPfAyo8w-1 Received: by mail-qk1-f199.google.com with SMTP id bl16-20020a05620a1a9000b006bc3aa1908dso14892813qkb.15 for ; Thu, 01 Sep 2022 09:52:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=LeLQekrS9Tpjylgv/lkyKE/ZyTnWLvG22cvzNuq4BAc=; b=NRkZ/6smLvNBRjAraUBaGLJm2W2dHmQHj0+fJspSJyhHfBC6E1X9uqLkFW+hdaXZeF OjZaZPEJK5/h3X433Oo8Jwx1aUIo2ootVp7jfYGLGML7WetWTDuUS5Ee4ztAmfFgWdui sglrhX6QlXXXW56yLdtUfYhd4qxILZdHK1TdXMH5dSCHxkf/W24AkZSe0P5naRQC6VZW /hnvek8ciSKvm1XbqTihCFP98H5Paorw8siAMZ3hpkPRp4KlPOJMBsKc0fpFcONk3xaE OaddYa1Tzslwew30w6XaXAK4YBwGH0Q5NosSfxp09gKNLsi7hCq7bHBm354it2cfA2co LI3g== X-Gm-Message-State: ACgBeo1N8Rj1H+9tyB3S/zJeZgsq1FA5pwNVorbYUQalf8Nhiz1IWffy hYRB6qGAHmfyPrcfIlPTRjjvRtpdrduQZSn9eK4wyYAJ2Q0yl+SUYOn2MqzQSthLdH0Qw4Rhm0n R63Rpp/SzIWU= X-Received: by 2002:a05:6214:c87:b0:499:1333:872e with SMTP id r7-20020a0562140c8700b004991333872emr11845893qvr.116.1662051126500; Thu, 01 Sep 2022 09:52:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR72BTEIsXu8/YjKl+ZBcOOlRn+IuYgPjbHACo/C0YYGn2/fKQ4Cy8xaxraITZmLofOygbE4FA== X-Received: by 2002:a05:6214:c87:b0:499:1333:872e with SMTP id r7-20020a0562140c8700b004991333872emr11845875qvr.116.1662051126170; Thu, 01 Sep 2022 09:52:06 -0700 (PDT) Received: from localhost (pool-96-252-89-222.bstnma.fios.verizon.net. [96.252.89.222]) by smtp.gmail.com with ESMTPSA id y26-20020a37f61a000000b006b633dc839esm11835859qkj.66.2022.09.01.09.52.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 09:52:05 -0700 (PDT) From: Robbie Harwood To: Renaud =?utf-8?Q?M=C3=A9trich?= , grub-devel@gnu.org Cc: Renaud =?utf-8?Q?M=C3=A9trich?= Subject: Re: [PATCH v4 2/2] efi: new 'eficonnect' command In-Reply-To: <20220901072854.152640-2-rmetrich@redhat.com> References: <20220901072854.152640-1-rmetrich@redhat.com> <20220901072854.152640-2-rmetrich@redhat.com> Date: Thu, 01 Sep 2022 12:52:02 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=170.10.129.124; envelope-from=rharwood@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2022 16:52:14 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Renaud M=C3=A9trich writes: > When efi.quickboot is enabled on VMWare (which is the default for > hardware release 16 and later), it may happen that not all EFI devices > are connected. Due to this, browsing the devices in make_devices() just > fails to find devices, in particular disks or partitions for a given > disk. > This typically happens when network booting, then trying to chainload to > local disk (this is used in deployment tools such as Red Hat Satellite), > which is done through using the following grub.cfg snippet: > -------- 8< ---------------- 8< ---------------- 8< -------- > unset prefix > search --file --set=3Dprefix /EFI/redhat/grubx64.efi > if [ -n "$prefix" ]; then > chainloader ($prefix)/EFI/redhat/grubx64/efi > ... > -------- 8< ---------------- 8< ---------------- 8< -------- > > With efi.quickboot, none of the devices are connected, causing "search" > to fail. Sometimes devices are connected but not the partition of the > disk matching $prefix, causing partition to not be found by > "chainloader". > > This patch introduces a new "eficonnect pciroot|scsi|all" command whic > recursively connects all EFI devices starting from a given controller > type: > - if 'pciroot' is specified, recursion is performed for all PCI root > handles > - if 'scsi' is specified, recursion is performed for all SCSI I/O > handles (recommended usage to avoid connecting unwanted handles which > may impact Grub performances) > - if 'all' is specified, recursion is performed on all handles (not > recommended since it may heavily impact Grub performances) > > Typical grub.cfg snippet would then be: > -------- 8< ---------------- 8< ---------------- 8< -------- > eficonnect scsi > unset prefix > search --file --set=3Dprefix /EFI/redhat/grubx64.efi > if [ -n "$prefix" ]; then > chainloader ($prefix)/EFI/redhat/grubx64/efi > ... > -------- 8< ---------------- 8< ---------------- 8< -------- > > The code is easily extensible to handle other arguments in the future if > needed. (The first patch doesn't apply to upstream - I assume it was sent by accident?) I wanted to call out here that we're already shipping this command in RHEL under the name in previous versions (i.e., connectefi). Renaud, you probably know better than I do how much difficulty would be involved in changing that for customers, so I'll defer to you on whether that's okay. Be well, =2D-Robbie --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEA5qc6hnelQjDaHWqJTL5F2qVpEIFAmMQ4zIUHHJoYXJ3b29k QHJlZGhhdC5jb20ACgkQJTL5F2qVpELsYQ/9GOmG7zph/kvHvRqpiPsu4Rmz4nEt ptW0yOoV4lWVf82Z2JDhT55l8oNNL7ix4BW6r7z6cTbmyF/biQR7Oj1uGY9DuTmx gZNHWuaaDgwjmnJnFequd7ttplR4weeCGAQyqWOKzLP0s78ya4F+xDr9TL0DX4tu JUbbu09JYe1Ekh7ZSvp5I0ZCLQ87ZGtEF53l9TWk6JIWMzJq7fn3aDjPfE3aF0Ty CHLyIvP/Pnhxx4UngMIiWqjxXBarA0no+VQ1hYAmCMdA6I16r7kGuG/82zJiSUrP 4k8iKhtl1zVlq3OssWEWMjbsFfNKJu7RV5v+DFkGKvE3hzZQyh0VCtWk4QBp1DVf lxcb810l3y1Kh9fsaVOK6K1+LpRfFeRRdb7XBuNg/l9cf5HleO8a9srRbRsJIfT2 p3pLz7ixjVRoEmDO7h7KaJCFBrHgYqj9JuggW6jYQCr5Yox1Z6VQLI/ZA3tnsgFr OTyE1wB2QcXnj1+5YbInzE+rKLDbg9HppMd07y+gRv6xcG0LFdWde/TEU8TzPAF8 SEFl2sQd42kq3h6KcS+QYr7VJZFAYhQursW/jdk3lUdRx1VIdne29YIyJzu+k+97 bbBA2q9/f43ueuT7pfBEqzDlGEUGSILEsloEuAPFzKTR914RihZxSCtUPtcokrRx +6296+3eZMQaei4= =dOGJ -----END PGP SIGNATURE----- --=-=-=--