From nobody Sat Dec 14 21:05:23 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 4Y9dyp122Cz5gm8v for ; Sat, 14 Dec 2024 21:05:38 +0000 (UTC) (envelope-from jmpalacios@gmail.com) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (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 4Y9dyn591fz4LZh for ; Sat, 14 Dec 2024 21:05:37 +0000 (UTC) (envelope-from jmpalacios@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-4679eacf2c5so27576641cf.0 for ; Sat, 14 Dec 2024 13:05:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734210337; x=1734815137; 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=kpNuw+096hiP+Krrnf3yzmswpU+iCs8Ngz6eCn9omS8=; b=R7H9CSaau/flIX/x0daoIsubij4mGcfgJSTk0qh9fHOpgo75pXMvfr5slG4KyPKJYB YSe7YqghgRkbNmSwFLZNp8AGvX2lxXdozPJvYyWquP7MmcxEW74hlTYGJYh1HJi2IjeP vrfETN2Z2NC32cylGjDVuXrLKx7Rt8/7yIqTGdsbx0THyDsMhRrQl4PtQ8P5hi0bgZ3Z GlhbeuwpKRRsxOmMq0PjWCcBOgJQ141rakqcbA90iNtNFiif9ktaC5VXfWcLaYJLp0yr 28sy5jDU1NRS1nZvYavdmqR/P5B/wY8mIUZ3l9ukcJxs/bYv2n9YtApGWWyGxzipidBy xBKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734210337; x=1734815137; 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=kpNuw+096hiP+Krrnf3yzmswpU+iCs8Ngz6eCn9omS8=; b=hVmvxMioy3ZBhKM+3szyGOn4wINc5bD9N9qzWaJzQswSqdPPJehc5AKqXkfKlkFYmH kYJP0PdXRvsVl/gSyUCPQnAs6fQPcvq6i1g8p4Bm9VK4FJZHDHE2EXxD3/MeGHeYaZN8 HNtFWe0CBb94MqEpuGqgV5jV80Ai3oYd+lrc5e78kHjhtej+wifAd2JWTLkiD/9qRP5w HAMlrwkUk5RMiOjWFcYqkgTJIRnLDmYd/d4Xty8o9BmKxvfNxUauoXE1I7COTO1DmEN2 sI9P8/III24kzDZkIFhsxMFnuDLRQGR5myHhAKrdAt6oSfPGpdEBAytVHd+HwMzfSmLK r4ug== X-Gm-Message-State: AOJu0Yxc4Qv/Dg3GaoczOKL0TeTVl7/V9FE4faC1wjNgvHGgQSA9Irn+ ofod28b4YK0bdBcJk/r9w1c6mBtSuHnyDWk+LTSo64HQOEbI7As+P80tnA== X-Gm-Gg: ASbGncukjzkzptNiFiNc45ExnfBVZ1S9KexugsxaFD0hN3fed1zUllu5Tv721c4WDoX pD/tkkqUNDIxJDOibvPavRMVzGqeQDGLyepVRCwxgE12hvPT08PgHjrBUFUOD5XypRS/3M5fSeL QOHgc3dlwKDJGN1KD9unkE7QpF/WQs/2IUvz6fEDBT6WPBj/Yjr/zY3FZZZJg3qNc/+BWE8XyAA bF61Q6clTHY5IrqEC42qFWz3SpWphYdeaNbxeVVJ4Q5wt4xUvH8si+CX3Q+1uhIVH66AcGdtCz6 SWYH0Oj74g== X-Google-Smtp-Source: AGHT+IHu0xqDrMxJaYxkoeLJMC8ImQaHR6y3EUsLvDtZeHjs3vebBF3xffpbu10q82761hqcdtA4LQ== X-Received: by 2002:ac8:5910:0:b0:461:22f0:4f83 with SMTP id d75a77b69052e-467a5841041mr134708361cf.43.1734210336788; Sat, 14 Dec 2024 13:05:36 -0800 (PST) Received: from smtpclient.apple ([2600:4041:7970:8b10:a0d8:ce23:a588:3ad0]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-467b2e81606sm10857491cf.71.2024.12.14.13.05.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Dec 2024 13:05:35 -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: <5d9dd365-843c-4dcf-806c-ad8a97ca2b6d@Julf.com> Date: Sat, 14 Dec 2024 16:05:23 -0500 Cc: questions@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <77CF0CA4-4E78-4667-B384-6C7930BA830B@gmail.com> References: <94606a32-71b1-459d-8aa8-9cdac28714dd@Julf.com> <158e114b-f5ea-4b68-a654-68a309c2b518@Julf.com> <5d9dd365-843c-4dcf-806c-ad8a97ca2b6d@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: 4Y9dyn591fz4LZh X-Spamd-Bar: ---- Thanks for the confirmation! - Juan > On Dec 14, 2024, at 5:25=E2=80=AFAM, Johan Helsingius = wrote: >=20 >=20 > Hi Juan, >=20 > Thanks for spotting that - my error in copying text from the console. > Yes, the "-2" should be "-s". >=20 > Julf >=20 >=20 > On 13/12/2024 20:59, Juan Manuel Palacios wrote: >> 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 >=20