From patchwork Mon Jul 27 01:10:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Li X-Patchwork-Id: 10071 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4h7gXy56d5z3wm1 for ; Mon, 27 Jul 2026 01:11:46 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "YE1" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4h7gXp2zL6z46T for ; Mon, 27 Jul 2026 01:11:38 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4h7gXM2QLWz36VQ for ; Mon, 27 Jul 2026 01:11:15 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4h7gXJ5HLTz2xfM for ; Mon, 27 Jul 2026 01:11:12 +0000 (UTC) Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4h7gX80qKMz1qS for ; Mon, 27 Jul 2026 01:11:04 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20251104 header.b=FdE5kvmj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mail01.ipfire.org: domain of vincent.mc.li@gmail.com designates 2607:f8b0:4864:20::1029 as permitted sender) smtp.mailfrom=vincent.mc.li@gmail.com ARC-Seal: i=1; a=rsa-sha256; d=lists.ipfire.org; s=202003rsa; cv=none; t=1785114664; b=gFP0b70meZO06C+QG1zLKZtTgLRjfzGxEIZwzv6vTo6hjUF2ADQ6KmOGs2hi6h14TlqIiE bstpWQAsTT6XtHaPxN+G0Xfn7oF0Ehnbd1kpVZ6j4ILTlXCwMa1aY4/58qb8yqxw7uv3ss JJyhTFGM6ZRCGAWNEEZ53zriDDifhx2USKDlqn/OOOCmGGcpw/wkS2s442/sukY4Fx1+6u FujVdGND8f1gfzx9USvWG/3HLyW+Bq8SmG1w66etFF56laVWrb9yfE829dwCeCf18N37Bx CqSQmLOozA1f5D3IQLvn1zKDILUWRlcNVLU/A+z60JcV+IxqpSHvkLd8zjBFvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1785114664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=D26pS7GXHxH7oXkE93leh4H0ILZL/pfT2Uy0neK3QP8=; b=fwhXwp2o/LBDDmPjU+hiMd740BvSrC+aGNMmihpt+8o1lUbWJuOeoV7WrBqYmDA2GV/GEQ edCOQ+JNDrj/CMNe4WVhGnbNaMWN8Ox5dy+lmU1C1D1x6R3jYyrtEj1KuFw7DvbHyneogx EqbuejpbP6c8l/KgynNgwP1Q2q33crY7c42XcfkhjQRdLAdYhhtlhDUTnTktgGGnMR+qrO aSrK4xKtxeQD3BwWjzoFlA2tzTbtYcx3ms0vBcTj6CSyr+2HADY0rWAm17dFlTP+Zz4obZ 1+NY1sbQGLwto54hM8/weuX6STJx27Ac4PmieQXdYivt1Ke7mhLpmfzMqAZDYw== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20251104 header.b=FdE5kvmj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mail01.ipfire.org: domain of vincent.mc.li@gmail.com designates 2607:f8b0:4864:20::1029 as permitted sender) smtp.mailfrom=vincent.mc.li@gmail.com Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-38ec1402b05so1571110a91.2 for ; Sun, 26 Jul 2026 18:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785114662; x=1785719462; darn=lists.ipfire.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=D26pS7GXHxH7oXkE93leh4H0ILZL/pfT2Uy0neK3QP8=; b=FdE5kvmjbsH2HTN+m/+YIPLVaw+HPGCh5wi0GXQEyDTR0Ec8xCrY86Jk3+eyC7Exvi Rc/EgaThClawm2yN2SpsE9QQW4VGdQWL39Bh0EvWxCHQtUvhCOhtw3W3rnNwUePX33Eg TnyCh1aeO41AR7u5WwN88OPRDyFGhMtbgp0yB/djCzjnz1iUzWXatU4y81NGYu8E0OaT 2BfjIzlAElBg4eKH+fF7HfhfdIhzVe1c2qHlGr5ZFniQdOQ0/ujEKh8Pg0ZwCRauPNO4 SOxMA+Cwc/OVoaA0I0oB5011nj1dlDejGWVlL9JfHEHzCM7cS0bIIqioAX1AV/TQviMs UB4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785114662; x=1785719462; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=D26pS7GXHxH7oXkE93leh4H0ILZL/pfT2Uy0neK3QP8=; b=f575T+tjwWKKZPPUnU6JnMyi++DryQeWr8LemT2ozwBeqk1kNg3dYm7VAKGNHnMkO9 vtZ04pd0UrKTQXLY1dgIdp+gFBOH7bdN6ZVkT+LLXsvThmlRmhPjkXH2Y1N3ely5Nrdo +4K5fi2MRalgxY3MmJvDIBePATUP3PQ2tw8vQcNHdZKXcu/gO821M/X3wUWX5sHtC5YW mvlBEFbzK3T52mKNeIoeq4Zv0yeZWOEbIrqV/OnjlkgYfAjgUk3vMAi89f1uN2+x1BSD hDQIepZAW6h7kVqUEr2SefsbsbgRyuU/+ATntCmCrtApOoVUrBOdziJmzS6Dyi5iT8cb psdg== X-Forwarded-Encrypted: i=1; AHgh+RpZ/QxikasJhWeBVSv/gwHv7kAHtIWQWnLITovGVgIszWCHCS526qi09nxdG6i+e4fz/iB5Q5azdUoMug==@lists.ipfire.org X-Gm-Message-State: AOJu0YxaT8Ew5/xGOgA0THjXP5m83XkgVCEqdQD0YIbjVSQTrvsKGQpC XWrkzSsZ1t2OtS2/zLlbNhPclg/7SXASNi3XQasFRXbXGxJd009QoNFr X-Gm-Gg: AR+sD10BQaLLsrhLolOJCTJgANDuI43QnI2sCCxFEkF7HxrDwpW46hXdTWez1dWs2Ls Y52xqVQisEw3rDK3AHcNV88nGfmUnEXC0cKJ9Bh3cTBNcbq9C2cceaFiI6V4NWOq4BO5pipyrBy bZAEnLyWlLihXPAYIuv7fI+OX+2qSXAPvOfqUWPdyuRvgbqBkaci233+2bDjgU8G2Evyii7spdO dAPj35BOqQYVJJZMkb6esTJl+64wItYGeLZSYQBsUnKaEFTLmepcTqIS1Fttwkwfc3NgJBHUhm/ c0o/OtsLdYaVo+E0PxXe9WB7jAkT8RNfK3vvhQWW/+U24na0pzwYGECykuq1ghWmU/gx53c/kl/ kxVUVv3CBVhe5snqJyyuC0VtCgFsMd5dQ7AYCD7kChW3duGJqa73fOgmDweDfzS3yVxdat4G6mV hcEJ1x2fDAiv7VcrBN7ug= X-Received: by 2002:a17:90b:1b08:b0:38e:679f:3b3b with SMTP id 98e67ed59e1d1-38f29660b71mr6055683a91.29.1785114661941; Sun, 26 Jul 2026 18:11:01 -0700 (PDT) Received: from wg-vpn-sf2.. ([138.197.218.192]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-314bc419e3asm24806206eec.11.2026.07.26.18.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jul 2026 18:11:01 -0700 (PDT) From: Vincent Li To: Michael Tremer , Arne Fitzenreiter , Adolf Belka , development@lists.ipfire.org Cc: Vincent Li Subject: [PATCH] installer: Fix GRUB installation fallback logic Date: Mon, 27 Jul 2026 01:10:34 +0000 Message-Id: <20260727011034.629367-1-vincent.mc.li@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4h7gX80qKMz1qS X-Rspamd-Action: no action X-Spamd-Result: default: False [-6.51 / 11.00]; BAYES_HAM(-3.00)[100.00%]; R_DKIM_ALLOW(-1.69)[gmail.com:s=20251104]; DKIM_REPUTATION(-0.96)[-0.95915079225339]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_MISSING_CHARSET(0.50)[]; SPF_REPUTATION_HAM(-0.47)[-0.46586801139128]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56:c]; MX_GOOD(-0.10)[gmail-smtp-in.l.google.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 15169(-0.30), country: US(-0.01), ip: 2607:f8b0:4864:20::(-0.78)]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_CC(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ALIAS_RESOLVED(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1029:from] The GRUB installation loop would exit immediately on the first failure, preventing it from trying alternative installation methods. This was causing issues on LoongArch64 systems where the initial installation attempt would fail, but the fallback with --removable would have succeeded if the script had continued. With this change, the installer now tries all available installation methods before failing, improving compatibility across architectures. Signed-off-by: Vincent Li --- src/installer/install-bootloader | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/installer/install-bootloader b/src/installer/install-bootloader index 977ed3674..f21578495 100644 --- a/src/installer/install-bootloader +++ b/src/installer/install-bootloader @@ -141,10 +141,10 @@ function grub_install() { local removable for removable in "" "--removable"; do - if ! grub-install ${GRUB_INSTALL_ARGS} ${args} \ + if grub-install ${GRUB_INSTALL_ARGS} ${args} \ ${removable} "${device}" &>/dev/null; then - echo "Could not install GRUB on ${device}" >&2 - return 1 + echo "GRUB installed successfully on ${device}" >&2 + return 0 fi # Do not try to install with --removable for non-efi architectures @@ -152,7 +152,7 @@ function grub_install() { done done - return 0 + return 1 } function main() {