Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69EC3E7716A for ; Sun, 15 Dec 2024 05:15:48 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMgyG-0000Zv-56; Sun, 15 Dec 2024 00:15:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tMgy7-0000VY-Aq for grub-devel@gnu.org; Sun, 15 Dec 2024 00:15:03 -0500 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMgy5-0008Bk-NV for grub-devel@gnu.org; Sun, 15 Dec 2024 00:15:03 -0500 Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-3a8181c5ac4so1004945ab.0 for ; Sat, 14 Dec 2024 21:15:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734239700; x=1734844500; darn=gnu.org; h=mime-version:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=Vkro3ELQqounRKFCGJ80bAnyr+AHvF3ePmBmcYOJXU0=; b=HwGGdO4NAIkX+GhCO9WJ1O/kV5ccG1iG28pHBDXvJKxqi+T72ihhXa41nd8msfbecV UgefMU6FOl2gBh0beX+nNK9pHX7dlny0n7GdpyUZdLN9hfGYMTfOdQC8vzIM+hwI8jQx TiWqh5sZwk9+/DRZX/60HPJUp9/ou7oNtQ62sUQGQZQMCymn4bGedcvh5Ga9whw61UIb +taRteVfVYrhlCHy9hJ+DYF3ltHOMazxltjU1f9e3Dn3X8VJT9fgw9TQIaoGjCwYBC6S pck3dZLTly5RB2J8tEfnGm4R2G825FyvZ/+FZhrqaNLXYet3/Eh8LPh0rSeaSBpLIwJS oQxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734239700; x=1734844500; h=mime-version:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Vkro3ELQqounRKFCGJ80bAnyr+AHvF3ePmBmcYOJXU0=; b=hx1h/ZjNiCGaNy6LSICB7dJ4W8mMngGu0/PFhcqIk0MkP9Kqiy8Ep0o39eTdAdsNN1 7zPIXK1OoAx6mavv7+eocLXFa05EP+J3832sU/mG9NjkA4tT2+M+crD3qu8gSTh+VLbW wTRZGstomFuLwEzssuJtfhhcqIo7+PQGwoaFadMAIbKs2f2+H6cyNHpU94WxY8o4L7ey mf3YuKKLwEswCqv3/a2wNhQUzeenUJ4WKFAWSIpKYfIUqDNTJpWpN1UiGwcMCn294peA aST/Om2rws1Wak3s+1vIS7H64OjmWuhYHD7dlZIJvw3N97NNuACEgN4QqGZwZfJjjgnP 5oYg== X-Gm-Message-State: AOJu0YxD5Grb+AtnJIukv0JPQRHHC3AzY9oC8arAz1I0WRfNbAGrAiSx Ptoid+JS0EyIqY45SO2y+l3B+iqWPA6OALtVWw4+dvQxsgv3M0Lp57JzAQ== X-Gm-Gg: ASbGncsghQ6aB/gu14BbU/6nkkeZIPy2vSJF2E27KJ4pgpLYpU8YT8cBi5C5tONn/ke Ggk3Q78YF509HFNF9RrdsLjqac25/g8c3mP23lRjuFwQK9rn7eYLjnOxchQ8L6CzaDl/i8ESbu5 DfjjgXORXx2B7MYMUS/FRvEfp3wGBEnVSC/DFmORjHpGH0lIZxBsffsRsDE5iifJsKzOQ14vpYW fuf4BF1R0ojqAkExQ/8h4do/GiuxuGDHaG+GSImOMHDoqu9lijT X-Google-Smtp-Source: AGHT+IFMY+tWhmH0Bk0Hmw8Zng9RZHl+gXFyqg1cQ1O1GP43Y9ppSfDHSqvICr+SVOwphzPkhocZkQ== X-Received: by 2002:a05:6e02:1565:b0:3a7:81cd:5c4a with SMTP id e9e14a558f8ab-3aff33952edmr26676485ab.7.1734239699850; Sat, 14 Dec 2024 21:14:59 -0800 (PST) Received: from kf-ir16 ([2607:fb90:bf9f:94:9b90:f00a:590e:1eec]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4e5e378389asm600485173.130.2024.12.14.21.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Dec 2024 21:14:59 -0800 (PST) Date: Sat, 14 Dec 2024 23:14:51 -0600 From: Aaron Rainbolt To: grub-devel@gnu.org Cc: adrelanos@kicksecure.com Subject: Make it possible to hide error messages in GRUB configuration files Message-ID: <20241214231451.248d90d1@kf-ir16> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::12f; envelope-from=arraybolt3@gmail.com; helo=mail-il1-x12f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Reply-To: The development of GNU GRUB Content-Type: multipart/mixed; boundary="===============4483135611146915663==" Errors-To: grub-devel-bounces+grub-devel=archiver.kernel.org@gnu.org Sender: grub-devel-bounces+grub-devel=archiver.kernel.org@gnu.org --===============4483135611146915663== Content-Type: multipart/signed; boundary="Sig_/WXBJe0s6HdWfxl1WtCGKX5T"; protocol="application/pgp-signature"; micalg=pgp-sha512 --Sig_/WXBJe0s6HdWfxl1WtCGKX5T Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Currently GRUB spits out quite a bit of information if a command fails for whatever reason. This is useful for sure, but in some instances it can be quite annoying. For instance, Debian's live-build project has GRUB configuration code in it that basically tries to load a font blindly, if it works it configures the video hardware one way, if it fails it configures it some other way. This oftentimes results in an ugly error message being presented to the user that simply does not need to be shown. In some instances it's not even possible to write working GRUB configuration that doesn't spit out errors (for instance, Super Grub2 Disk uses GRUB's configuration language as a scripting language in order to autodetect operating systems, and the way it works outputs a horrific avalanche of errors as it runs, none of which are useful). Additionally, a lot of other times it's just more convenient to do things in a way that could result in errors, for instance I may try to load modules without checking for their existence first (Debian's live-build project does this as well). I would love if there was some way to "redirect" the output of GRUB commands so that I didn't have to see them, sort of like an analogue to the `2>/dev/null` construct in Bash. I don't know if this would be best implemented as an additional '--quiet' option or something like that for every GRUB command, or if it would be better implemented as some sort of construct that all commands could share (maybe something like `command > null` or something along those lines). I am interested in trying to help implement something like this though, and am wondering if anyone has thoughts about how to best do it before I try to write a patch. Thanks for your help! Aaron --Sig_/WXBJe0s6HdWfxl1WtCGKX5T Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEudh48PFXwyPDa0wGpwkWDXPHkQkFAmdeZcsACgkQpwkWDXPH kQn0FQ//TP8/dLKyX5Cb/lKX+RcsuEAVHl81M5O3z+pdFjaLa/XRvK3bGLb6aojr K6R91hSiDaCXN2+7KuA86P2pF41RGb14bLvj2+dcJMGNQMFjQGeGS9RTlT81Kc4Y iA99X2dJWl82kxEx2QReFNuO9SHoLXFK3uy4lWGV/etbLkl6vbV78TOwAfRUVGgO 3khcqmbF3JJ2eoerJ5mlzI7JoJiBEpIlnMnrtaR5GfNE9gE7wR4LCmzZblR9BX3s KWNYaXOwc1kCF7/9drgm/RnymjcVa+ez19RFgSai1RYqoqbzMnvqvgpkCLKtzrql oc+MfhX3mlmgpPx0ywV1ysBL/1llhwb5iDlpIBqbYDNi/GOr7N/fsUcNnNkv3M8Z xINZ21PsAed+x1EXhVD9FxuDOT6XUc+vHgDt1CIesNB0s9vB3IzslgDzhtxlZAE9 XO3uJj6SN4XSSITKp7/CpCRuL+oVq/dAaDZ6s8Dm839kvZPiqKdaiK6Bb5K+JGRm lwEMsOVFCB7qog9+UahT1ISrxyJ8UaTnZwZyjIdHoWN2cR9muH3EY74vrXDxt3WT H0/dBFGVAeO4VkLhfGoOVK0ZgLn2KIsguIpD+gL/88g2DbalxIRjXJMjFRj0C+k4 2ovTNuM6vWD0iBtkEJSvh/ktEfP7A6RsJHS9n84cWPPNNRaV/O4= =UMcy -----END PGP SIGNATURE----- --Sig_/WXBJe0s6HdWfxl1WtCGKX5T-- --===============4483135611146915663== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KR3J1Yi1kZXZl bCBtYWlsaW5nIGxpc3QKR3J1Yi1kZXZlbEBnbnUub3JnCmh0dHBzOi8vbGlzdHMuZ251Lm9yZy9t YWlsbWFuL2xpc3RpbmZvL2dydWItZGV2ZWwK --===============4483135611146915663==--