From nobody Fri Sep 6 11:02:03 2024 X-Original-To: freebsd-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 4X0YG75w3qz5ThnP for ; Fri, 06 Sep 2024 11:02:07 +0000 (UTC) (envelope-from ludovit.koren@gmail.com) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0YG70S5Xz3xBS for ; Fri, 6 Sep 2024 11:02:07 +0000 (UTC) (envelope-from ludovit.koren@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=KUWY3RR5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ludovit.koren@gmail.com designates 2a00:1450:4864:20::62d as permitted sender) smtp.mailfrom=ludovit.koren@gmail.com Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a8a7596b7dfso279815466b.0 for ; Fri, 06 Sep 2024 04:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725620525; x=1726225325; darn=freebsd.org; h=mime-version:user-agent:message-id:in-reply-to:date :user-mail-address:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=mf+YThg7vY+AvsLRTC7eaYd1ibg3gmbv1pvhKK1hHWs=; b=KUWY3RR5grl97IBqiA0WwYMcNRN/bXKQIdHZCRqRPBtQl8ds1JCbyaEUpKotp66J/G gNLkZcPBi832h8wawURVPVcZ30A8Hw16tbWcas/hxaFEK97JkGHzTi7rCrCRuxTMLw0F ftUSCC0I8nzzDctqo8+4ytCn0oeCf+EFD+Jef6wQlQoXHK0ln7g+QYEGkyj+pbdm6sCl kaOeGS157zLj3FbFYlTqCrPlLWG33HqIBOkE8bXTqFdL/hL9ojHK+fTY9M4ZFT+ecS8b t4p6Nl6+rpCafEwAbgtjBZVnz1+xdr9YDmnwwzyAtfbOBKnhEfrFtPvFlCl1H479MxEE eBFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725620525; x=1726225325; h=mime-version:user-agent:message-id:in-reply-to:date :user-mail-address:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=mf+YThg7vY+AvsLRTC7eaYd1ibg3gmbv1pvhKK1hHWs=; b=SAkcJ4xwlnNnFigthjkP1XS009+e3l0Z4z5N9KsIVts0tTN+4IIKaanCUJAwMoXi9/ XN73HQqwWDY0QVUNOJs2mMF939WRwd0ZK1gNLyb9flu8n5GBZzWqpBggaEdAL3jr/HME fQBuN8qzUzrpka17oxYADFrqzRlnT15HI6X2rSAbRo/2ag477HDtpvOP7OfihFTcBLz5 YdxasXBOJKkau/doRzp1oIc4MgFHDe0aAnCc1PGDeWNhumukX4Ctg0QWkBn9GizCEHKZ p8wtbE8Dd0tC+ESIWWpe8Mk34qn/owhjN+ANsYfX9E1Wp0fnahGE0GzRYPTK01KnvON0 pI+Q== X-Gm-Message-State: AOJu0YyOO4EdLjHE7yVj3wX/1/d2olL6IQo7ddEwkdWx/Gmj0gzNjS75 mmtCRTnzH/Al+1+qE7cbjLT7FDdSe1kFtalL3Cc64TlIY1O7R4AnThtiPQ== X-Google-Smtp-Source: AGHT+IEA7qrWxCtbiF1zekJltoA0qld71+D7sK4wJ8XmLg65w9wZN8v8xE7HZkFgb7VSHAkULCfPDg== X-Received: by 2002:a17:906:730a:b0:a7a:130e:fb6e with SMTP id a640c23a62f3a-a8a430914c1mr969135266b.15.1725620524943; Fri, 06 Sep 2024 04:02:04 -0700 (PDT) Received: from jedi.localdomain ([195.28.109.130]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3cc528bdasm2316168a12.4.2024.09.06.04.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 04:02:04 -0700 (PDT) Received: by jedi.localdomain (Postfix, from userid 1001) id 5DDB9E0418; Fri, 06 Sep 2024 13:02:03 +0200 (CEST) From: Ludovit Koren To: Karl Vogel Cc: freebsd-questions@freebsd.org Subject: Re: ZFS boot devices specification References: <86y146zbef.fsf@gmail.com> User-Mail-Address: ludovit.koren@gmail.com Date: Fri, 06 Sep 2024 13:02:03 +0200 In-Reply-To: (Karl Vogel's message of "Fri, 6 Sep 2024 02:01:29 -0400") Message-ID: <8634md11w4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (berkeley-unix) 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 Content-Type: text/plain X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.978]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TAGGED_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62d:from] X-Rspamd-Queue-Id: 4X0YG70S5Xz3xBS >>>>> Karl Vogel writes: >>> On Thu, 05 Sep 2024 05:40:43 -0400, >>> Ludovit Koren may have said: >> I cannot find the recommended way to specify the devices to boot >> from on 13.4-STABLE FreeBSD 13.4-STABLE stable/13-n258224-f702110bc4bc. >> I am using internal disks for the system and external for data. >> The problem occurs when the disks from data array are assigned to >> /dev/da0 and /dev/da1. The booting process starts and finishes on >> remounting root RW, because it cannot find root file system. >> It depends on the order of hardware initialization. >> What is the recommended way of specifying internal disks in ZFS, >> something like disks uid? The mount process tries to mount ZFS >> gpt/zfs0 and gpt/zfs1 (which are shown in zpool status), but they are >> not on /dev/da0 and /dev/da1. > When I installed 13.2, I had a problem finding the root filesystem. > I got this far, did the reboot thing... > Install FreeBSD Handbook? yes (requires network) > Language (en) > Final configuration Exit > Open shell No > Complete Reboot > ...and I ran into this: > Mount from zroot/ROOT/default failed with error 6 mountroot> > The default setting was vfs.root.mountfrom=zfs:zroot/ROOT/default > I fired up Live CD and ran gpart to see where things wound up -- abbreviated > for readability: > root# gpart list > Geom name: ada0 > Providers: > 1. Name: ada0p1 > Mediasize: 272629760 (260M) > label: efiboot0 > type: efi > 2. Name: ada0p2 > Mediasize: 524288 (512K) > label: gptboot0 > type: freebsd-boot > 3. Name: ada0p3 > Mediasize: 4294967296 (4.0G) > label: swap0 > type: freebsd-swap > 4. Name: ada0p4 > Mediasize: 995635494912 (927G) > label: zfs0 > type: freebsd-zfs > Consumers: > 1. Name: ada0 > Mediasize: 1000204886016 (932G) > Sectorsize: 512 > Mode: r3w3e6 > Geom name: ada1 > Providers: > 1. Name: ada1p1 > Mediasize: 272629760 (260M) > label: efiboot1 > type: efi > 2. Name: ada1p2 > Mediasize: 524288 (512K) > label: gptboot1 > type: freebsd-boot > 3. Name: ada1p3 > Mediasize: 4294967296 (4.0G) > label: swap1 > type: freebsd-swap > 4. Name: ada1p4 > Mediasize: 995635494912 (927G) > label: zfs1 > type: freebsd-zfs > Consumers: > 1. Name: ada1 > Mediasize: 1000204886016 (932G) > Geom name: ada2 [this is from the previous OS] > Providers: > 1. Name: ada2p1 > label: (null) > type: linux-lvm > Consumers: > 1. Name: ada2 > Mediasize: 3000592982016 (2.7T) > Geom name: ada3 > Providers: > 1. Name: ada3p1 > Mediasize: 209715200 (200M) > label: efiboot3 > type: efi > 2. Name: ada3p2 > Mediasize: 2147483648 (2.0G) > label: swap3 > type: freebsd-swap > 3. Name: ada3p3 > Mediasize: 2998234251264 (2.7T) > label: zfs3 > type: freebsd-zfs > Consumers: > 1. Name: ada3 > Mediasize: 3000592982016 (2.7T) > Geom name: da0 [This is my SSD] > Providers: > 1. Name: da0p1 > Mediasize: 272629760 (260M) > label: efiboot2 > type: efi > 2. Name: da0p2 > Mediasize: 524288 (512K) > label: gptboot2 > type: freebsd-boot > 3. Name: da0p3 > Mediasize: 4294967296 (4.0G) > label: swap2 > type: freebsd-swap > 4. Name: da0p4 > Mediasize: 995635494912 (927G) > label: zfs2 > type: freebsd-zfs > Consumers: > 1. Name: da0 > Mediasize: 1000204886016 (932G) > Turns out that "zpool import" can use the gpart stuff to import existing > pools for use: > root# zpool import > pool: zroot > state: ONLINE > action: can be imported using pool name or numeric ID > config: > NAME STATE > zroot ONLINE > mirror-0 ONLINE > ada0p4 ONLINE > ada1p4 ONLINE > da0p4 ONLINE > I tried "zpool import zroot" but the system said the a pool with that > name already exists. Running "zpool list" crashed immediately. mountroot> zfs:zroot/ada0p4 > also failed. Booted from DVD and used a different pool name: mountroot> cd9660:/dev/cd0 ro > (press return for /bin/sh) > # zpool import newroot > When booting from DVD, you can also go to Shell and run this: > # zfs mount newroot/ROOT/default > It mounted as /, which conflicted with the DVD but at least let me modify > files. I editied /boot/loader.conf and added the mountfrom= line: > root# cp /boot/loader.conf /boot/loader.conf.orig > root# vi /boot/loader.conf > root# cat /boot/loader.conf > kern.geom.label.disk_ident.enable="0" > kern.geom.label.gptid.enable="0" > cryptodev_load="YES" > zfs_load="YES" > vfs.root.mountfrom="zfs:newroot/ROOT/default" > After that, the system came up without problems. Hope this helps. Hello Kurt, both kern.geom.label.disk_ident.enable="0" kern.geom.gptid.enable="0" I already had in /boot/loader.conf. So these kernel variable settings do not solve the problem. Regards, lk