From nobody Fri Dec 13 19:59:21 2024 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y90Y16kmbz5g2l5 for ; Fri, 13 Dec 2024 19:59:33 +0000 (UTC) (envelope-from jmpalacios@gmail.com) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 mx1.freebsd.org (Postfix) with ESMTPS id 4Y90Y14jXYz4NpM for ; Fri, 13 Dec 2024 19:59:33 +0000 (UTC) (envelope-from jmpalacios@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-6d92cd1e811so30561826d6.1 for ; Fri, 13 Dec 2024 11:59:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734119972; x=1734724772; darn=freebsd.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zarPaCY54lS9bprwcwFsCaqlq0nDV/dEZq0+e0VMixM=; b=QPcEQvBqaBzhPMwazf3bVPJnHPrqmLTROMd9JxJWqzvHj5v+JQdxvC4lt72cOYEnW3 P0copuviA/sqLttcqMxrK9jtjswtj/2c5cd4v/LN9mimVdPwbQpz8I6GpF7K8DZ5dW8v 6hPTfpaXG+dhMBc8Xf0VLN4udgmd1vMLwm94wcxJfNc7NQkSR7gEFzuKiGYbpKJfFDCV UiVNBsazUIw1Z3uTVRlxI76TyG/ojoJl+zqoKmc/ZaozP1/vyCgo+4Y19Nvp5mvD3BL7 aowvazvs2sFpEgPvmFPKaAWKtcggUDJYhtcv4BihsHbxVL/3VF+hNbPYy24ADQAT/nR0 lDsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734119972; x=1734724772; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zarPaCY54lS9bprwcwFsCaqlq0nDV/dEZq0+e0VMixM=; b=PHZmuddSA5gIAS7udLaZIjLhc3mLU9utqP9PtY9SoAYN+/OpGN7kQ43csto/NQil3R hCRzjLQj88Yy4UST3osW0NFieW3po8MMt3EGURpvIF7IFDp9wzdZF71MerXuDsCyS/QK U8fsr8teuJTaXA800Zx6NxehUIDoyi/FBKtx2VPwttH241ZAtIp9QGwJx94cjN6ic+4l gD0UurHcEHZDVAYOpTprUla2PaE1QKE03A3k4qw+xc2Yf1mBW2o+27DzlsW3ty77HktI CLSFCiBO4ehxePPXfAixEwY7jrWNWCqQuFqWOnASZQtyF+cA6I6gH4NKn26nti9bWsO9 ty4Q== X-Gm-Message-State: AOJu0YznxTzJHvdje84nBxx5Uoeamk6NCpMb/DXtufHyOJy7oNyJQ54U MnqMVzWJfIch1UKUmLpKLsd14s13e/fJxw/aJf55+oOAFUkdzK901cU9xw== X-Gm-Gg: ASbGncuO5sP8J2n6pqb3FImkXjuEOoAIPBfzVdX2o0jH1AaOKajrJ7vc5H4ykvDa9qF Z1vpnYWW/ZaAf4VH2ArAXScApFv2XPfY5L3oa3BFCWCWNCo56lYeRKNWaC7la3GqOtrx16NtVGz tbzzU8/U1d42GQ9wqnpRjTeP2/WBklDIBkv8mdPdY5ixghqhJnuIN3tzzEqO52uxnMVPgzdCugw zITSvXpjVGitvwQvyOurdqaNLA+lddr7q96XlBscLlN44LIH7oM78XuT+20KIjYQJ3cvOZ59nz3 76LgWr5ZzA== X-Google-Smtp-Source: AGHT+IF6kM6SU5QSU/MO4yndgn12+WCxWsws2ats8gzsWfMrGyz42NA3U9RUPPJgmvV7PTRoQ2UguA== X-Received: by 2002:a05:6214:4008:b0:6d9:3016:d0fc with SMTP id 6a1803df08f44-6db0f3ada25mr89893326d6.4.1734119972469; Fri, 13 Dec 2024 11:59:32 -0800 (PST) Received: from smtpclient.apple ([2600:4041:7970:8b10:5d29:2a58:347c:6281]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6dccd23086dsm651826d6.4.2024.12.13.11.59.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Dec 2024 11:59:32 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.300.87.4.3\)) Subject: Re: Corrupted/broken EFI boot partition From: Juan Manuel Palacios In-Reply-To: <158e114b-f5ea-4b68-a654-68a309c2b518@Julf.com> Date: Fri, 13 Dec 2024 14:59:21 -0500 Cc: questions@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <94606a32-71b1-459d-8aa8-9cdac28714dd@Julf.com> <158e114b-f5ea-4b68-a654-68a309c2b518@Julf.com> To: Johan Helsingius X-Mailer: Apple Mail (2.3826.300.87.4.3) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Y90Y14jXYz4NpM X-Spamd-Bar: ---- Hi Julf, Thank you for posting this resolution! Just the one question: when you = say gpart add -i 1 -a 4k -2 260M -t efi da0 did you mean -s for the 260M partition size? I=E2=80=99m reading a = dash-two there, which seems odd. Thank you, > On Dec 13, 2024, at 10:31=E2=80=AFAM, Johan Helsingius = wrote: >=20 > Replying to myself in case anyone else is in the same situation. >=20 > Managed to repair the EFI partition by booting into the live > environment of the installer image, deleting the corrupted > EFI partition with >=20 > gpart delete -i 1 da0 >=20 > and then recreating it with >=20 > gpart add -i 1 -a 4k -2 260M -t efi da0 > newfs_msdos -F 32 -c 1 /dev/da0p1 > mount -t msdosfs -o longnames /dev/da0p1 /mnt > mkdir -p /mnt/efi/freebsd > cp /boot/loader.efi /mnt/efi/freebsd/loader.efi > efibootmgr --create --activate --label "FreeBSD" --loader \ > "/mnt/efi/freebsd/loader.efi" > umount /mnt > =09 > (I then did the same for the other disks in the array just for > redundancy) >=20 > Julf >=20 > On 12/12/2024 15:13, Johan Helsingius wrote: >> Hi, >> I have a server with 4 disks with most of the disk as a 4-way ZFS >> root partition, and small EFI, freebsd-boot (as an emergency >> backup) and swap partition. For some reason the EFI partitions >> seem to have gotten corrupted in one of the updates, so the server >> simply refuses to boot using UEFI, and when trying to boot using >> BIOS booting, it complains about the efi partition being corrupted >> (and trying to mount it as a msdos partition results in failure >> as the partition is not valid. >> What would be the easiest way to recreate the boot partitions >> without affecting the ZFS partitions)? >> Julf >=20 >=20