From nobody Sat Dec 14 10:25:37 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 4Y9MmS5Fn2z5h2Sp for ; Sat, 14 Dec 2024 10:25:44 +0000 (UTC) (envelope-from julf@Julf.com) Received: from outbound11.mail.transip.nl (outbound11.mail.transip.nl [IPv6:2a01:7c8:7c9:ca11:136:144:136:18]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y9MmR5LZBz4Twr for ; Sat, 14 Dec 2024 10:25:43 +0000 (UTC) (envelope-from julf@Julf.com) Authentication-Results: mx1.freebsd.org; none Received: from submission3.mail.transip.nl (unknown [10.100.4.72]) by outbound11.mail.transip.nl (Postfix) with ESMTP id 4Y9MmL4nfyzkQNJj; Sat, 14 Dec 2024 11:25:38 +0100 (CET) Received: from [172.24.42.42] (julf.connected.by.freedominter.net [45.138.231.4]) by submission3.mail.transip.nl (Postfix) with ESMTPA id 4Y9MmK62Ppz2nC0cr; Sat, 14 Dec 2024 11:25:37 +0100 (CET) Message-ID: <5d9dd365-843c-4dcf-806c-ad8a97ca2b6d@Julf.com> Date: Sat, 14 Dec 2024 11:25:37 +0100 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 User-Agent: Mozilla Thunderbird Subject: Re: Corrupted/broken EFI boot partition To: Juan Manuel Palacios Cc: questions@freebsd.org References: <94606a32-71b1-459d-8aa8-9cdac28714dd@Julf.com> <158e114b-f5ea-4b68-a654-68a309c2b518@Julf.com> Content-Language: en-US From: Johan Helsingius Autocrypt: addr=julf@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gn6YkIhQnXX6xpQYWG Io29r58AYbZucmsSMyKTglONEAaxQ+KNge26aQCanWY92hx6VETQsA2y8pap0gt88K6+Hj3V Y3x50j0AEQEAAcLBfAQYAQgAJhYhBLN8WbKwsiakCtjh5luGTTOMg4BVBQJh5V5GBQkJZgGA AhsMAAoJEFuGTTOMg4BVMLIQAK3BJzak+mKKxaqqvPtr5qOWyVJpL31qnegQS64ObZAF7tui 7yYkhCzjPckef+DcWEmK0xWpORk4e8Afts86J7MCSETlCKKnNM/bKCtPei9zEV6J62GjRg8Q nSw/tf1J5yLmA0sAdzUWuXknLYgAzvWbLtqwxcWabBhFiUj4jQE7h/8uz8VoOUrssjwvIDMQ k8574qdFHdzTEy8dOMAYJQF0TDJzaOUJ6WQZFizDbqpTtWgydgB3NcdFA2yLFUVN+UfwJ0va 5yUjHDfuvWCRlzkQhgDFlE7igcM+czOa912V9o25tlSXZ+Jf1l631kSJqGpoMlZCJ76/XMCw kE34v9OISSKQZPvw1a+O/8EZYK2ybQlKqDppk+2D1kPgE25ZVDqmFr/4Mo4k6s5qAqQUQPop pU3zCsmon6saoIpVE8G2EIhE6Av5Ulete4KXArr8H+v7sfX0b5Bk1dL/CeynHxA90k03rJ7D d/VhDDnYDDjaymu2xZ1W/NTh04cgW3qxoineNFFxdi9R+AB7kgfjoCKjvNN39WdWkgECBjUT 5aVPLyVd84DT9U0Dfo/VJ+3XnHbf+QOZOAqandX9S9BFpl9pEHCkwJYrFgZqAP9EmjRZqK29 HL2ui6lVIsulB095N40KDFqgXW7jciUdH1yVm7p2DvrZBJoBhAbv7tyE8au+ In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: ClueGetter at submission3.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=julf.com; t=1734171937; h=from:subject:to:cc: references:in-reply-to:date:mime-version:content-type; bh=TZI7k74WMEmp6kzgH2Qn5P8FBdc+JykP9y1dpADIshs=; b=vN1VtaKg/q3JCULGDHYU4U+ToEXz0tKqmhnPScuPbl2J/YpFav8s8fFzNWeMkzl6Z4NEGX IIMeQ/if8C/7Pav8vJ6xBsf29pnVGcx+vHo/jqdXUbbsD2eufFFdpfVkE2WzkoRFl4C0QH RGJjUKi8Q6VrZ2ZoUmtkqnXY1sXFvtm867oXhbV6zJjerN6bRrwelyx6zvgjYZqH0kWmbH h83ejirhBmyRg3OPo1bP0xGdzDZSwPAtOzYlz8NLg8NDo1Dqfu4nz7Y04nA5imhRH2uc2j WJXxLsusIvPNYcOsFe0vsap8age6GbujMoSomdZ3TIh7skWVO7qBNWHR//vKlg== X-Report-Abuse-To: abuse@transip.nl 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:20857, ipnet:2a01:7c8::/32, country:NL] X-Rspamd-Queue-Id: 4Y9MmR5LZBz4Twr X-Spamd-Bar: ---- Hi Juan, Thanks for spotting that - my error in copying text from the console. Yes, the "-2" should be "-s". Julf 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’m reading a dash-two there, which seems odd. > > Thank you, > >> On Dec 13, 2024, at 10:31 AM, Johan Helsingius wrote: >> >> Replying to myself in case anyone else is in the same situation. >> >> Managed to repair the EFI partition by booting into the live >> environment of the installer image, deleting the corrupted >> EFI partition with >> >> gpart delete -i 1 da0 >> >> and then recreating it with >> >> 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 >> >> (I then did the same for the other disks in the array just for >> redundancy) >> >> Julf >> >> 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 >> >> >