From owner-freebsd-questions@freebsd.org Tue Oct 29 14:17:41 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F194C1A7CF6 for ; Tue, 29 Oct 2019 14:17:41 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene2a.sentex.ca (unknown [IPv6:2607:f3e0:0:3::19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "pyroxene2.sentex.ca", Issuer "pyroxene2.sentex.ca" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 472YZY0yR1z4Ybb for ; Tue, 29 Oct 2019 14:17:41 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [IPv6:2607:f3e0:0:4:c938:e96c:c58e:60ff] ([IPv6:2607:f3e0:0:4:c938:e96c:c58e:60ff]) by pyroxene2a.sentex.ca (8.15.2/8.15.2) with ESMTPS id x9TEHdds062272 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 29 Oct 2019 10:17:40 -0400 (EDT) (envelope-from mike@sentex.net) To: FreeBSD Questions From: mike tancsa Subject: replacing zfs disk (freebsd-boot vs freebsd-efi) Openpgp: preference=signencrypt Autocrypt: addr=mike@sentex.net; keydata= mQENBFywzOMBCACoNFpwi5MeyEREiCeHtbm6pZJI/HnO+wXdCAWtZkS49weOoVyUj5BEXRZP xflV2ib2hflX4nXqhenaNiia4iaZ9ft3I1ebd7GEbGnsWCvAnob5MvDZyStDAuRxPJK1ya/s +6rOvr+eQiXYNVvfBhrCfrtR/esSkitBGxhUkBjOti8QwzD71JVF5YaOjBAs7jZUKyLGj0kW yDg4jUndudWU7G2yc9GwpHJ9aRSUN8e/mWdIogK0v+QBHfv/dsI6zVB7YuxCC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vSAQz1cchbdy8LD0Tnpzjgp5KLU7sNojbI8vqt4yKAi cayI88j8+xxNXPMWM4pHELuUuVHS5XTpHa/wwulUtI5w/zyKlUDsIvqTPZLUEwH7DfNBueVM WyNaIjV2kxSmM8rNMC+RkgyfbjGLCkmWsMRVuLIUYpl5D9WHmenUbiErlKU2KvEEXEg/aLKq 3m/AdM9RAYsP9O4l+sAZEfyYoNJzDhTZMzn/9Q0uFPLK9smDQh4WBTFaApveVJPHRKmHPoNF Xxj+yScYdQ4SKH34WnhNSELvnZQ3ulH5tpASmm0w+GxfZqSc8+QCwoKtBRDUxoE56A== Message-ID: <5bf91c8b-a101-a174-a08b-cda42a43a0b5@sentex.net> Date: Tue, 29 Oct 2019 10:17:40 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 472YZY0yR1z4Ybb X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:3::19 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [0.78 / 15.00]; ARC_NA(0.00)[]; RDNS_NONE(1.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f3e0::/32]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; HFILTER_HELO_IP_A(1.00)[pyroxene2a.sentex.ca]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; DMARC_NA(0.00)[sentex.net]; TO_DN_ALL(0.00)[]; HFILTER_HELO_NORES_A_OR_MX(0.30)[pyroxene2a.sentex.ca]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-1.72)[ipnet: 2607:f3e0::/32(-4.93), asn: 11647(-3.56), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; HFILTER_HOSTNAME_UNKNOWN(2.50)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Oct 2019 14:17:42 -0000 In the past when replacing a disk in a zfs pool that I boot from, simply doing gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 where     p1 = freebsd-boot     p2 = freebsd-swap     p3 = freebsd-zfs works just fine (ie. replacing ada0).  However, on this one box, I noticed the disk has both freebsd-boot and efi     p1 = efi     p2 = freebsd-boot     p3 = freebsd-swap     p4 = freebsd-zfs If I replace ada0, what do I need to do in order to full restore boot functionality to the disk ? gpart bootcode -b /boot/pmbr -p /boot/boot1.efifat -i 1 ada0 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ada0 vs gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 ? And is it boot1.efi or boot1.efifat ? I am guessing I also need the lable ? gpart modify -l efiboot2 -i 1 ada0 e.g. current ada0 is Geom name: ada0 modified: false state: OK fwheads: 16 fwsectors: 63 last: 976773127 first: 40 entries: 128 scheme: GPT Providers: 1. Name: ada0p1    Mediasize: 209715200 (200M)    Sectorsize: 512    Stripesize: 0    Stripeoffset: 20480    Mode: r0w0e0    efimedia: HD(1,GPT,a1ffb215-ff5c-11e8-98c7-ac1f6b70b306,0x28,0x64000)    rawuuid: a1ffb215-ff5c-11e8-98c7-ac1f6b70b306    rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b    label: efiboot0    length: 209715200    offset: 20480    type: efi    index: 1    end: 409639    start: 40 2. Name: ada0p2    Mediasize: 524288 (512K)    Sectorsize: 512    Stripesize: 0    Stripeoffset: 209735680    Mode: r0w0e0    efimedia: HD(2,GPT,a20b59f0-ff5c-11e8-98c7-ac1f6b70b306,0x64028,0x400)    rawuuid: a20b59f0-ff5c-11e8-98c7-ac1f6b70b306    rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f    label: gptboot0    length: 524288    offset: 209735680    type: freebsd-boot    index: 2    end: 410663    start: 409640