From nobody Mon Oct 16 08:09:37 2023 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 4S88sj17txz4x41l for ; Mon, 16 Oct 2023 08:09:45 +0000 (UTC) (envelope-from mirror176@hotmail.com) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02olkn2081d.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eb2::81d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S88sh3gkyz4bN2 for ; Mon, 16 Oct 2023 08:09:44 +0000 (UTC) (envelope-from mirror176@hotmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=fp9C9CIK; spf=pass (mx1.freebsd.org: domain of mirror176@hotmail.com designates 2a01:111:f400:7eb2::81d as permitted sender) smtp.mailfrom=mirror176@hotmail.com; dmarc=pass (policy=none) header.from=hotmail.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AzG5Kwa/3ZXKcAu8VD/QV0tNxQ6YcOhQJUM6RYh/BQKOAIztT++Qt67h4vHICJ1JrHL/mEJFwBPksBBIGP0dIBMKLNIlbBgimDD8uDI0Ps/PbmfZt4zdQ2uA3iVLLKM1AQAGtZhsZSE47uoqgKilk8rBTcCkbq3VwQfQ50ajnmofX19l+rI+8mcT3gRPSB4gwRBhBl/2723xVKUnWEk8VkFewvdqtzac7q6wYEuHdOz9TL3pBquPWfwsyNMabKxUA3T+CtP04fAm0r3RAfYwT5yZOhjlSx8ndSazgWyjkT2NepP5M5KwJSmpA94r3CPP4YkdSdiw/+DL7KgXplIOLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4jzBneKRheY+DYNpQWv2u62/BQ//kvCTbiXcUbvHW3c=; b=kiW3Qi8wky27r2rpLYWFRl0O8PpD+A+ShHl4HYj08N7PjK/Gxv3sRVi8c+pDAl3OtvXmRABLeYiJ3VdyDRUvQSeTIZ2vBGLDLJerx4iFwYxXTplEusseOjhkDDdEKGFXQS2K+cv2tEgqU9DGwTDxP2sWvsszFTW7Ws+Odgtm2DLDizqOPbzRbbmRbcttZ2lUT9kbs45SPqqMTUsDejnNh9XYD0lYALYwyJkZQqMp8cTgBnI9G5EKOz2xZUkBjJ16W61jemsgJAsKDeJl+3nmkfsfTHntCcbOfZJeR6NajCaORm9xnvx6wBYmoDNRLeykQ/q4u6i+xFCcywYpUQ/wng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4jzBneKRheY+DYNpQWv2u62/BQ//kvCTbiXcUbvHW3c=; b=fp9C9CIKNE7CbRebEh8LmBoCKPcLTpkMOMXBUDTeoTulDwF69n5UfFPe+kfMCq5dsPjqz83eJO0vDygM32IR2XPmEhoIjr7HOG0+qgQ+tiYPcobfi+FMHPX2rXaQoZKzfENwxZe3GBm4U00+8X/ETjQeSUvieICU2wR/HjU6AsP+XrkI+d+89iXqMGfl+fURSNfROY4DrHXV8Ht1WfHLzotQHjZrBCwK6TiewGIQTIPeRwgk8zFoQwKWOngdhGIlLDQnhklURNVmOvuCsNFDxNNmRNyz4ZmxiS9ou6q8DuCIu60YBWs0bFB9Kih16oOrY/YIQBM8CG/URO8z4PU5ug== Received: from CO1PR11MB4770.namprd11.prod.outlook.com (2603:10b6:303:94::19) by MN6PR11MB8242.namprd11.prod.outlook.com (2603:10b6:208:474::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.34; Mon, 16 Oct 2023 08:09:40 +0000 Received: from CO1PR11MB4770.namprd11.prod.outlook.com ([fe80::a542:a24f:4156:3a05]) by CO1PR11MB4770.namprd11.prod.outlook.com ([fe80::a542:a24f:4156:3a05%7]) with mapi id 15.20.6886.034; Mon, 16 Oct 2023 08:09:40 +0000 Message-ID: Date: Mon, 16 Oct 2023 01:09:37 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: can not boot from second disk after installation which computer use zfs and raid1 Content-Language: en-US To: questions@freebsd.org References: From: "Edward Sanford Sutton, III" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TMN: [yMYm6azP3V64sGI7d2XzA/m9UwFR9pqJ] X-ClientProxiedBy: BL0PR02CA0125.namprd02.prod.outlook.com (2603:10b6:208:35::30) To CO1PR11MB4770.namprd11.prod.outlook.com (2603:10b6:303:94::19) X-Microsoft-Original-Message-ID: <771ac492-b68a-6d5f-31fd-b94df062e119@hotmail.com> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR11MB4770:EE_|MN6PR11MB8242:EE_ X-MS-Office365-Filtering-Correlation-Id: 14be5507-014b-467c-2cb6-08dbce1f3ef3 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bTJX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JEVk15cURQMFIv?= =?utf-8?B?VnYrQWdXNUd4SXFUUmloRExKYTdGWEY3T3IvOUJMa21DV3RKTDBTSjdhM2pY?= =?utf-8?B?YUszbVRxZm5XcmRKR2hMSkxzczBUVWQwVVRKTnZFU3l5WXNsM0ZZZmVnMUNo?= =?utf-8?B?eDdKZ25CcktGa1lqQ1ROMktrZ1Z3dlVaY2RaekxBdVR2R21OK0pRZ2RoYjVv?= =?utf-8?B?TWVTWmpjc0k0bWZNL0g1aU5RQTgwWVhGY1IwMWNrSnpYTFZWeG1vRmFYaEx6?= =?utf-8?B?RDhWZnN6WjNkd05JblpVYXZ5eTF0MGxBUmVPMUN1UVUxemh3anF2SmZwTVo3?= =?utf-8?B?Z2Z3TVBVeEhIR2NCSnpTVTRCOFRaV2Yyc2VJYUZhN1A4cU15WVdyMHJjVWIv?= =?utf-8?Q?RpeUdu84vIsgjEBskNKCEgJWkcSkx+BxBkdxn+ii0mAQ=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-e8f36.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 14be5507-014b-467c-2cb6-08dbce1f3ef3 X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4770.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2023 08:09:40.2937 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR11MB8242 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.05 / 15.00]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[hotmail.com,none]; NEURAL_SPAM_SHORT(0.45)[0.451]; R_SPF_ALLOW(-0.20)[+ip6:2a01:111:f400::/48]; R_DKIM_ALLOW(-0.20)[hotmail.com:s=selector1]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; MLMMJ_DEST(0.00)[questions@freebsd.org]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; MIME_TRACE(0.00)[0:+]; BLOCKLISTDE_FAIL(0.00)[2a01:111:f400:7eb2::81d:server fail,2603:10b6:303:94::19:server fail]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[hotmail.com:+]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[hotmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4S88sh3gkyz4bN2 On 10/15/23 07:57, PstreeM China wrote: > hello Expert: > > It's glad to discuss with you. > here is my issue: > > I have an computer which has 2 sata ssd, and i install freebsd 13.2 in the > computer. > during the installation stage, i select to use zfs and raid1, choice uefi > as the boot support. > > after the installation, test only the first disk > can be boot. > only one bootable disk can be found in the bios's boot menu. > if i remove the first disk, i can not boot into the > system. > > try use the command gpart bootcode > to write the bootcode into the second disk, but not work. UEFI bootcode is not installed or updated with gpart. If you ran a command along the lines of "gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1" but you are using UEFI booting then the step was wrong. That command would be appropriate for the older BIOS style of booting. If `gpt show` lists an EFI partition on one disk but not the other, than one disk has a partition to store /boot/loader.efi, which is what UEFI booting looks for, while the other disk does not. The partition is likely mounted as /boot/efi by default, but only one will be mounted. It is an msdos type of partition. If only one disk has that partition and the other does not and doesn't have room, then you would need to make room for it by deleting and recreating partitions accordingly. If RAID1=mirroring, you could delete the partition structure on one disk and recreate it to match the correct disk; this requires removing and replacing the vdev for zfs accordingly and it should sync up the data with a scrub process. If you have a swap partition on the disk without the boot partition, you could delete swap partition, make boot partition, and make swap out of the remaining space. In the future, you need to copy /boot/loader.efi to its appropriate location (likely /boot/efi/freebsd/loader.efi or /boot/efi/boot/bootx64.efi) and need to make sure it is copied to both disks. If you question its bootability, copy it to only 1 and force booting form that disk (disconnecting the drive if unsure how the BIOS responds no a failed bootcode load) and then copy it to the second disk after testing; zfs boot environments do not protect this data. Upgrading zfs pool/filesystem (a manual step not performed by freebsd-update) without doing so will likely leave the system unbootable until a new compatible bootloader is copied in. loader.efi(8) and uefi(8) seem to be documentation related to understanding this with the first even giving such upgrade instructions. > google's result is also no help for this issue. > launch this session to ask if someone face the same question or can give > some solution to fix this. very thanks. > > br/armin >