Date: Sat, 14 Dec 2024 16:05:23 -0500 From: Juan Manuel Palacios <jmpalacios@gmail.com> To: Johan Helsingius <julf@Julf.com> Cc: questions@freebsd.org Subject: Re: Corrupted/broken EFI boot partition Message-ID: <77CF0CA4-4E78-4667-B384-6C7930BA830B@gmail.com> In-Reply-To: <5d9dd365-843c-4dcf-806c-ad8a97ca2b6d@Julf.com> References: <94606a32-71b1-459d-8aa8-9cdac28714dd@Julf.com> <158e114b-f5ea-4b68-a654-68a309c2b518@Julf.com> <FAF1CB52-3C23-4EF7-9A5D-75E02784A386@gmail.com> <5d9dd365-843c-4dcf-806c-ad8a97ca2b6d@Julf.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the confirmation! - Juan > On Dec 14, 2024, at 5:25=E2=80=AFAM, Johan Helsingius <julf@Julf.com> = 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 = <julf@julf.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?77CF0CA4-4E78-4667-B384-6C7930BA830B>