From nobody Fri Dec 13 15:31:30 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 4Y8tbv5Nlpz5gjkC for ; Fri, 13 Dec 2024 15:31:39 +0000 (UTC) (envelope-from julf@Julf.com) Received: from outbound2.mail.transip.nl (outbound2.mail.transip.nl [IPv6:2a01:7c8:7c8::73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y8tbr4vd5z4rlb for ; Fri, 13 Dec 2024 15:31:36 +0000 (UTC) (envelope-from julf@Julf.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=julf.com header.s=transip-a header.b=Q9KTl3fV; spf=pass (mx1.freebsd.org: domain of julf@Julf.com designates 2a01:7c8:7c8::73 as permitted sender) smtp.mailfrom=julf@Julf.com; dmarc=pass (policy=quarantine) header.from=julf.com Received: from submission2.mail.transip.nl (unknown [10.100.4.71]) by outbound2.mail.transip.nl (Postfix) with ESMTP id 4Y8tbl6HqYzYd67 for ; Fri, 13 Dec 2024 16:31:31 +0100 (CET) Received: from [172.24.42.42] (julf.connected.by.freedominter.net [45.138.231.4]) by submission2.mail.transip.nl (Postfix) with ESMTPA id 4Y8tbl04cjz2rJ5ns for ; Fri, 13 Dec 2024 16:31:30 +0100 (CET) Message-ID: <158e114b-f5ea-4b68-a654-68a309c2b518@Julf.com> Date: Fri, 13 Dec 2024 16:31:30 +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: questions@freebsd.org References: <94606a32-71b1-459d-8aa8-9cdac28714dd@Julf.com> Content-Language: en-US From: Johan Helsingius Autocrypt: addr=julf@Julf.com; keydata= xsFNBGHlXkUBEAC8Pb1v3z7aANA5qIujbeXaoIaZ14Q/G7hR0SY30XdWJBQyR7tus7PE10cB a3Yrd+iNSCA78NeInaQFf/fsXakb7LUPYOU9wUixlvbpPoDqNrbi4rcoBkwezAxSkNZQLEuR 8QYFQIvb8RIePXD3eajugD0em63d+9gnnNLWbQr6dgixWffvDmM91430IW9OPbmdGIztlZ1a g1tUcbr0n6Esd5e6E9ZqZkH6JJ8vNI2Iw+IJC/NKfwTQf3rCrAcp61DYnxG6DyU1IQIdfSuO hQis8YntnbTjL6oSevnaTemY/gWkcqSUbKHZeOOgmOVN/w1FpcsoP3+Y/hlZjpemZwdE6CgA mgo7klrnKXCG9iQAOTvJ8t9Zp4lQnbWlCF3trLGkzcmoI1v0BClYaUhr5hy/sPD2Hbzk7IPV 04RNSllh0UH6qXtz4w6+/DrFUfieAJedFRFmhHxFHAOFLMokvI4TTO0tpcYqXPyqw3cr3ORM tCtWJX/8TeOu+/DY6ioRqZIia3p8BlgY5JKwSnf9m9pZjLVlZd6OYgh4CCroodZZGyMavdT+ Ef4/PcPC+PqcGuZSvzfIcvxuO8XrdaSW14MQxWwlFmB8jRWJQPHr6kZA8zdpMMtXzaE8CM4A 17Xe9hoc4BmnYsO1lmJdplRHReYz1lHIoGtBMfc+rTNWX83YvwARAQABzSBKb2hhbiBIZWxz aW5naXVzIDxqdWxmQEp1bGYuY29tPsLBjwQTAQgAORYhBLN8WbKwsiakCtjh5luGTTOMg4BV BQJh5V5FBQkJZgGAAhsDBQsJCAcCBhUICQoLAgUWAgMBAAAKCRBbhk0zjIOAVdMBEACwQ02a nPijYXbLbvsDHSA+pxtLvn46x0jeQK50NK1h7Tu0zVe7r8SXHiuhCv2QIBoiStkntox81ROT t1qqJScholiWFIYdvhGxNe443qv1F3pAdlCa9lyNV4nBwtFZpFpgx+VD9YBVIapd/dv/reIe eiktn9fayC8Cyi+dU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GqwTuSjkAXt6xzEkqHQ2CcfJmlnoTzkKzMt3120w3gn6YkIhQnXX6xpQYWG 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: <94606a32-71b1-459d-8aa8-9cdac28714dd@Julf.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: ClueGetter at submission2.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=julf.com; t=1734103891; h=from:subject:to:references: in-reply-to:date:mime-version:content-type; bh=laQuKK/6uMEuEp0czRoof3Dx2ZcwtIYWi4N+RdRCjHQ=; b=Q9KTl3fVT8jhrpw3HxNR+KgfRsUPa7Lds3qUtLg1NjW6gEBNVG4j1WG9j48zLKl0J9zz/o VtAXA431Fnukz1iCOEQFKBaoV16+/E0ASCbayTniNPS1tT6evr2OcWumYxkLz2SFIUwgQa h+TjrWARNcrmd+a+H4WGLFcgehj56Kal9Kn2Q7RcmeAZHcv37CySaNe3Yaylr4fftpFqUi nS9PE7FutIhYU2rMonsmUCre2CmKmpnOVxArtRws5U5tAN8Qj9YW4EQBXyw/Da26QcPGHm ExWGn4khQz+V+kfvEypPqyBIBVp5U5VDd6VPWG9GMGTSOex/nvMs57KXaFh3kQ== X-Report-Abuse-To: abuse@transip.nl X-Spamd-Result: default: False [-4.06 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.966]; DMARC_POLICY_ALLOW(-0.50)[julf.com,quarantine]; R_DKIM_ALLOW(-0.20)[julf.com:s=transip-a]; R_SPF_ALLOW(-0.20)[+ip6:2a01:7c8:7c8::73]; RCVD_IN_DNSWL_LOW(-0.10)[2a01:7c8:7c8::73:from]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:20857, ipnet:2a01:7c8::/32, country:NL]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; DKIM_TRACE(0.00)[julf.com:+] X-Rspamd-Queue-Id: 4Y8tbr4vd5z4rlb X-Spamd-Bar: ---- 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 > >