From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oT7fZ-00032b-Qg for mharc-grub-devel@gnu.org; Tue, 30 Aug 2022 16:17:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT7fW-000313-BM for grub-devel@gnu.org; Tue, 30 Aug 2022 16:17:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:26642) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT7fU-0004LS-MQ for grub-devel@gnu.org; Tue, 30 Aug 2022 16:17:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661890624; 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=LN4Y2Dto3l7Ze6ytpPU+2PKOtDMkHbNxdb9fQxlzZNk=; b=TVBnkOkIcIQUmE5UDF05lg93GpGsxLi79MhitKWOUCoJlg7aFY4v4qWfh3qS6Wh6dMi94+ 9ugWwHRw7Yox9WgJXzQcyBjaYqfzLVCUMM7yADTz05ghmKG0rsZqGTURTwC4aCqqaHOSxM eJoVM+DpiVQhsTaSlkCLS7LVUoRJWiI= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-217-BLMBPM5WM7OefsHQd45rlA-1; Tue, 30 Aug 2022 16:17:01 -0400 X-MC-Unique: BLMBPM5WM7OefsHQd45rlA-1 Received: by mail-qk1-f200.google.com with SMTP id az11-20020a05620a170b00b006bc374c71e8so10118746qkb.17 for ; Tue, 30 Aug 2022 13:17:01 -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=LN4Y2Dto3l7Ze6ytpPU+2PKOtDMkHbNxdb9fQxlzZNk=; b=grA2lg+4AAt1YLc+XcsaTU/r4ZvHbDO7dK+UXlFHYK5YfT5cypO15bc1eFZGxv4e3A ftM6bXa3u1qGAoxQAXJPo0C6CBIDV44Un3ViDPUUamZqFpWagY8fmZlB1yVrg6NPRtcj CE+f8c1A29PEGaVlW2yZz0Pj7RXEqvw9s+gtTBdxwi7qBfxB/2ughjOk+VKapAI1AzN3 DZuGmhIOyf4aBH6n8D6ri3E76nZFH4Fu5I7WDVIgUJY88L9a817DBzun3Fucy8YWIGnr ZDTsNhmB6dSLli1ukfYmaX+kZKvuH9hcRW2okHi2e+fiqM9OsO+/+DcbYlF0hdxUorXe ftdg== X-Gm-Message-State: ACgBeo0zzUXoWhdz1Qm7UVFXutuaVpjcBnivgn/CV8IfeYiLO2PGt65I 1g0YWXxvIOartnCKhPmvJaknxmJKyBY0o31QIhQR+n6Zpi7VFRLh8MeAB0tdIznIMF38Ub4j8b5 byENfxy2HSU0= X-Received: by 2002:a05:622a:303:b0:343:6eb2:31fe with SMTP id q3-20020a05622a030300b003436eb231femr16229904qtw.439.1661890620647; Tue, 30 Aug 2022 13:17:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR4MNMBJzv1quFVdQbD3fGrAHB2GDugadzrJqn9pn9hcq8Cl5xgzsVJ43i4DXhgVJObSvigiQw== X-Received: by 2002:a05:622a:303:b0:343:6eb2:31fe with SMTP id q3-20020a05622a030300b003436eb231femr16229875qtw.439.1661890620329; Tue, 30 Aug 2022 13:17:00 -0700 (PDT) Received: from localhost (pool-96-237-164-50.bstnma.fios.verizon.net. [96.237.164.50]) by smtp.gmail.com with ESMTPSA id bk42-20020a05620a1a2a00b006aedb35d8a1sm8940041qkb.74.2022.08.30.13.16.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 13:16:59 -0700 (PDT) From: Robbie Harwood To: Philip =?utf-8?Q?M=C3=BCller?= , Daniel Kiper , Javier Martinez Canillas Cc: Bernhard Landauer , Mark Wagie , grub-devel@gnu.org Subject: Re: [Regression] efi: Don't display a uefi-firmware entry if it's not supported In-Reply-To: <897c60aa-a254-09e3-9efa-a221cd58d2a9@manjaro.org> References: <9274cc62-1922-76c8-925b-b172389b6c3d@manjaro.org> <897c60aa-a254-09e3-9efa-a221cd58d2a9@manjaro.org> Date: Tue, 30 Aug 2022 16:16:57 -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: Tue, 30 Aug 2022 20:17:08 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Philip M=C3=BCller writes: >> Hello Robbie, hello Daniel, >> >> with the commit 26031d3b101648352e4e427f04bf69d320088e77 >> 30_uefi-firmware will always call `fwsetup --is-supported' to check >> if the system supports EFI or not. However most installed grub >> versions on MBR don't support the '--is-supported' flag and crash the >> menu creation routine. >> >> Arch Linux is tracking the issue here: https://bugs.archlinux.org/task/7= 5701 >> >> What would be the best approach with older installations of grub via >> grub-install not having to reinstall grub to MBR as some users don't >> even know on how to install grub properly as that job a graphical >> installer does. > > Hi all, Adding grub-devel to CC. > I looked into the '30_uefi-firmware' changes a little more and also=20 > commented my findings at the Arch-Bugtracker:=20 > https://bugs.archlinux.org/task/75701#comment210684 > > Before Menu changes we simply had this: > > ### BEGIN /etc/grub.d/30_uefi-firmware ### > menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' { > fwsetup > } > ### END /etc/grub.d/30_uefi-firmware ### > > After Menu changes we went to that: > > ### BEGIN /etc/grub.d/30_uefi-firmware ### > fwsetup --is-supported > if [ "$grub_platform" =3D "efi" -a "$?" =3D 0 ]; then > menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware= ' { > fwsetup > } > fi > ### END /etc/grub.d/30_uefi-firmware ### > > So 0eb684e8bfb0a9d2d42017a354740be25947babe I get and=20 > 26031d3b101648352e4e427f04bf69d320088e77 tries to improve things,=20 > however doesn't count in what will happen if 'fwsetup' is not supporting= =20 > the flag. It may either crash due to=20 > 1e79bbfbda24a08cb856ff30f8b1bec460779b91 or start UEFI firmware instead. Why doesn't grub on the MBR get updated when you install a new grub package? That seems like the real issue here - what am I missing? Regardless, if we can't count on fwsetup being updated, then I think we need to go back to the original version of my patch which doesn't have =2D-is-supported. > Simply don't break user-space when older grub got installed to MBR.=20 > Somehow this idea needs some more thinking and a solution for that > case too. Sure, what do you suggest? Be well, =2D-Robbie --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEA5qc6hnelQjDaHWqJTL5F2qVpEIFAmMOcDkUHHJoYXJ3b29k QHJlZGhhdC5jb20ACgkQJTL5F2qVpEKDSRAAtMXGl9Nn2FiMVcCtOE4jn3v+xL8m jdMoEH/POClUrP+1/USkA11A6IyR/TOSAVnK6a5MvhLDBxM1m+2nL6M00QpPB5ou WT5RK+Vp2jcPm95FAR9nALeFZSYzCWSTpaw7MDEUwCAgP58UCF8xzXXQI6g6p6DI hJPCeN8n0wnXyLoRrE0xrj+IvmgddHXaTN+XgpR2hz7Fw/UDqmYBJtvSJMgMGCFa QUbManA6MwANEIc90fJBJA60lv7zFvLS416PXf1Jdp02eGR6lz1KrkDrIkCLuFeT Xc+gzrc6E2ghUJGn9cw7FtkyKFmi2OVlRtOA/v8JkFm4OdCRK4P4S8OKcMtiYjDD A+AGigfcX8YSIAhsWCZNU7pNQaTyuLc16IteKiKwor7WKjOs8sovIOcrCBkjnUo+ XO8/drFw1TN93+hxeB1XFVeQXXcHQ2X5EIAH0jDR7RDVLPZuWcZZM5B/zgF3jUVH nMhhOnmqXTmngdJseLG4++DP4esixyVXDdsiMZAResyiruGwkOO6a1b9QX75XMHO HrjJvZPwzFfjKyY3AOkGIrSriT7TB8513W2ZqwDWY0A3SGplqy8SyzhZ8W+iBjE0 sVZzTZVOmZU0b9k/tgk72mmx1vTqF1FcUOEZHuXFHFavAx7Fb7U43ZnDZ/D98pJ4 NkSTGK7nzPHvCMk= =FJsG -----END PGP SIGNATURE----- --=-=-=--