Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jul 2020 10:11:42 +0200 (CEST)
From:      Christian Kratzer <ck-lists@cksoft.de>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        Allan Jude <allanjude@freebsd.org>, freebsd-fs@freebsd.org,  Toomas Soome <tsoome@freebsd.org>
Subject:   Re: gptzfsboot targeting wrong vdev
Message-ID:  <alpine.BSF.2.22.395.2007191008480.82939@nocfra1.cksoft.de>
In-Reply-To: <e5e31c3e-67ef-e449-2c4e-1600e8cf6923@FreeBSD.org>
References:  <alpine.BSF.2.22.395.2007061453250.82939@nocfra1.cksoft.de> <9400f5f0-e267-932c-b1ce-8436748cf2c0@FreeBSD.org> <78024f0d-4889-713e-15a5-56ec6d8d82b3@freebsd.org> <alpine.BSF.2.22.395.2007131155560.82939@nocfra1.cksoft.de> <d1b537da-8a94-4e12-4d45-b4318db2fbb8@freebsd.org> <alpine.BSF.2.22.395.2007131953300.82939@nocfra1.cksoft.de> <e5e31c3e-67ef-e449-2c4e-1600e8cf6923@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Tue, 14 Jul 2020, Andriy Gapon wrote:
> On 13/07/2020 21:02, Christian Kratzer wrote:
>> In the future I will ensure  to have the first partition after boot to be the
>> zroot.
>
> By the way, I've been considering changing our ZFS boot code so that it does not
> treat a pool as a candidate unless it has bootfs explicitly set (non-default value).
> I think that that would be a reasonable change.  And not hard to do.
> But never got around to doing it.

that would actually be most welcome.

I have just finished changeing all my non boot freebsd-zfs partition types to freebsd-vinum
so as not to confuse the boot loader.

I also disabled my sas controllers exposing the drives in the arrays to the bios as that was
also bloating the initial set of potential targets to boot from.

So having an explicit way of targeting the boot devices would really be cool.

You would propably still need to keep the current default logic when there is no bootme
property set on any bios visible partition.

Greetings
Christian

-- 
Christian Kratzer                   CK Software GmbH
Email:   ck@cksoft.de               Wildberger Weg 24/2
Phone:   +49 7032 893 997 - 0       D-71126 Gaeufelden
Fax:     +49 7032 893 997 - 9       HRB 245288, Amtsgericht Stuttgart
Mobile:  +49 171 1947 843           Geschaeftsfuehrer: Christian Kratzer
Web:     http://www.cksoft.de/
From owner-freebsd-fs@freebsd.org  Sun Jul 19 08:15:27 2020
Return-Path: <owner-freebsd-fs@freebsd.org>
Delivered-To: freebsd-fs@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 9C66E37FED1
 for <freebsd-fs@mailman.nyi.freebsd.org>; Sun, 19 Jul 2020 08:15:27 +0000 (UTC)
 (envelope-from ck-lists@cksoft.de)
Received: from mx1.cksoft.de (mx1.cksoft.de [IPv6:2001:67c:24f8:1::25:1])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mx1.cksoft.de", Issuer "CA" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 4B8d2k1181z4HbP;
 Sun, 19 Jul 2020 08:15:25 +0000 (UTC)
 (envelope-from ck-lists@cksoft.de)
Received: from m.cksoft.de (m.cksoft.de [195.88.109.48])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx1.cksoft.de (Postfix) with ESMTPSA id 3057E1EA988;
 Sun, 19 Jul 2020 10:15:24 +0200 (CEST)
Received: from amavisfra1.cksoft.de (unknown [IPv6:2001:67c:24f8:2003::25:a1])
 by m.cksoft.de (Postfix) with ESMTP id C81BC63028;
 Sun, 19 Jul 2020 10:15:23 +0200 (CEST)
X-Virus-Scanned: amavisd-new at cksoft.de
Received: from m.cksoft.de ([IPv6:2001:67c:24f8:2003::25:3])
 by amavisfra1.cksoft.de (amavisfra1.cksoft.de
 [IPv6:2001:67c:24f8:2003::25:a1]) (amavisd-new, port 10051)
 with ESMTP id 8-rObDelrcby; Sun, 19 Jul 2020 10:15:20 +0200 (CEST)
Received: from nocfra1.cksoft.de (nocfra1.cksoft.de
 [IPv6:2001:67c:24f8:2001::53:1])
 by m.cksoft.de (Postfix) with ESMTP id 7D50B63026;
 Sun, 19 Jul 2020 10:15:21 +0200 (CEST)
Received: by nocfra1.cksoft.de (Postfix, from userid 1000)
 id 84B0913E9E; Sun, 19 Jul 2020 10:15:21 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
 by nocfra1.cksoft.de (Postfix) with ESMTP id 7FF6A13D6F;
 Sun, 19 Jul 2020 10:15:21 +0200 (CEST)
Date: Sun, 19 Jul 2020 10:15:21 +0200 (CEST)
From: Christian Kratzer <ck-lists@cksoft.de>
X-X-Sender: ck@nocfra1.cksoft.de
Reply-To: Christian Kratzer <ck@cksoft.de>
To: "Kevin P. Neal" <kpn@neutralgood.org>
cc: Andriy Gapon <avg@freebsd.org>, freebsd-fs@freebsd.org, 
 Toomas Soome <tsoome@freebsd.org>
Subject: Re:  gptzfsboot targeting wrong vdev
In-Reply-To: <20200718220657.GA99649@neutralgood.org>
Message-ID: <alpine.BSF.2.22.395.2007191011530.82939@nocfra1.cksoft.de>
References: <alpine.BSF.2.22.395.2007061453250.82939@nocfra1.cksoft.de>
 <9400f5f0-e267-932c-b1ce-8436748cf2c0@FreeBSD.org>
 <78024f0d-4889-713e-15a5-56ec6d8d82b3@freebsd.org>
 <alpine.BSF.2.22.395.2007131155560.82939@nocfra1.cksoft.de>
 <d1b537da-8a94-4e12-4d45-b4318db2fbb8@freebsd.org>
 <alpine.BSF.2.22.395.2007131953300.82939@nocfra1.cksoft.de>
 <e5e31c3e-67ef-e449-2c4e-1600e8cf6923@FreeBSD.org>
 <20200718220657.GA99649@neutralgood.org>
User-Agent: Alpine 2.22 (BSF 395 2020-01-19)
X-NCC-RegID: de.cksoft
X-Spammer-Kill-Ratio: 75%
MIME-Version: 1.0
X-Rspamd-Queue-Id: 4B8d2k1181z4HbP
X-Spamd-Bar: -
Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none;
 spf=pass (mx1.freebsd.org: domain of ck-lists@cksoft.de designates
 2001:67c:24f8:1::25:1 as permitted sender) smtp.mailfrom=ck-lists@cksoft.de
X-Spamd-Result: default: False [-1.56 / 15.00]; ARC_NA(0.00)[];
 HAS_REPLYTO(0.00)[ck@cksoft.de]; RCVD_COUNT_FIVE(0.00)[6];
 RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[];
 RCPT_COUNT_THREE(0.00)[4];
 R_SPF_ALLOW(-0.20)[+a:mx1.cksoft.de:c];
 REPLYTO_DN_EQ_FROM_DN(0.00)[];
 MIME_GOOD(-0.10)[multipart/mixed,text/plain];
 REPLYTO_DOM_EQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[cksoft.de];
 TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.968];
 TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.29)[-0.294];
 CTYPE_MIXED_BOGUS(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.001];
 FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[];
 MIME_TRACE(0.00)[0:+,1:+];
 ASN(0.00)[asn:57407, ipnet:2001:67c:24f8::/48, country:DE];
 RCVD_TLS_LAST(0.00)[]
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8BIT
X-Content-Filtered-By: Mailman/MimeDel 2.1.33
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.33
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-fs>,
 <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs/>;
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
 <mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Jul 2020 08:15:27 -0000

Hi,

On Sat, 18 Jul 2020, Kevin P. Neal wrote:

> On Tue, Jul 14, 2020 at 08:34:30AM +0300, Andriy Gapon wrote:
>> On 13/07/2020 21:02, Christian Kratzer wrote:
>>> In the future I will ensure  to have the first partition after boot to be the
>>> zroot.
>>
>> By the way, I've been considering changing our ZFS boot code so that it does not
>> treat a pool as a candidate unless it has bootfs explicitly set (non-default value).
>> I think that that would be a reasonable change.  And not hard to do.
>> But never got around to doing it.
>
> Would that include full dataset paths in vfs.root.mountfrom? Because I
> load the kernel from one ufs filesystem and then boot from a zfs pool
> with the full dataset path/name (which term?) specified. It'd be a shame
> to lose that.

is that not what load vfs.root.mountfrom in loader.conf is for

    vfs.root.mountfrom="zfs:zroot/ROOT/default"

Once the first stage has located the drive to boot from it will be in the loader
and will have consumed /boot/loader.conf

The bootme property is just there to point the first stage at the correct
device from where to get the loader from.

Greetings
Christian

-- 
Christian Kratzer                   CK Software GmbH
Email:   ck@cksoft.de               Wildberger Weg 24/2
Phone:   +49 7032 893 997 - 0       D-71126 Gaeufelden
Fax:     +49 7032 893 997 - 9       HRB 245288, Amtsgericht Stuttgart
Mobile:  +49 171 1947 843           Geschaeftsfuehrer: Christian Kratzer
Web:     http://www.cksoft.de/
From owner-freebsd-fs@freebsd.org  Mon Jul 20 09:41:38 2020
Return-Path: <owner-freebsd-fs@freebsd.org>
Delivered-To: freebsd-fs@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 97A48376663
 for <freebsd-fs@mailman.nyi.freebsd.org>; Mon, 20 Jul 2020 09:41:38 +0000 (UTC)
 (envelope-from martin@lispworks.com)
Received: from mail.lispworks.com (mail.lispworks.com [46.17.166.21])
 by mx1.freebsd.org (Postfix) with ESMTP id 4B9Gvj3JZZz3TWg;
 Mon, 20 Jul 2020 09:41:37 +0000 (UTC)
 (envelope-from martin@lispworks.com)
Received: from higson.cam.lispworks.com (higson.cam.lispworks.com
 [192.168.1.7])
 by lwfs1-cam.cam.lispworks.com (8.15.2/8.15.2) with ESMTP id 06K9fWNL094344;
 Mon, 20 Jul 2020 10:41:32 +0100 (BST)
 (envelope-from martin@lispworks.com)
Received: from higson.cam.lispworks.com (localhost.localdomain [127.0.0.1]) by
 higson.cam.lispworks.com (8.14.4) id 06K9fVUx017026;
 Mon, 20 Jul 2020 10:41:31 +0100
Received: (from martin@localhost)
 by higson.cam.lispworks.com (8.14.4/8.14.4/Submit) id 06K9fVRr017022;
 Mon, 20 Jul 2020 10:41:31 +0100
Date: Mon, 20 Jul 2020 10:41:31 +0100
Message-Id: <202007200941.06K9fVRr017022@higson.cam.lispworks.com>
From: Martin Simmons <martin@lispworks.com>
To: Christian Kratzer <ck@cksoft.de>
CC: kpn@neutralgood.org, avg@freebsd.org, freebsd-fs@freebsd.org,
 tsoome@freebsd.org
In-reply-to: <alpine.BSF.2.22.395.2007191011530.82939@nocfra1.cksoft.de>
 (message from Christian Kratzer on Sun, 19 Jul 2020 10:15:21 +0200
 (CEST))
Subject: Re: gptzfsboot targeting wrong vdev
References: <alpine.BSF.2.22.395.2007061453250.82939@nocfra1.cksoft.de>
 <9400f5f0-e267-932c-b1ce-8436748cf2c0@FreeBSD.org>
 <78024f0d-4889-713e-15a5-56ec6d8d82b3@freebsd.org>
 <alpine.BSF.2.22.395.2007131155560.82939@nocfra1.cksoft.de>
 <d1b537da-8a94-4e12-4d45-b4318db2fbb8@freebsd.org>
 <alpine.BSF.2.22.395.2007131953300.82939@nocfra1.cksoft.de>
 <e5e31c3e-67ef-e449-2c4e-1600e8cf6923@FreeBSD.org>
 <20200718220657.GA99649@neutralgood.org>
 <alpine.BSF.2.22.395.2007191011530.82939@nocfra1.cksoft.de>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 4B9Gvj3JZZz3TWg
X-Spamd-Bar: /
Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none;
 spf=none (mx1.freebsd.org: domain of martin@lispworks.com has no SPF policy
 when checking 46.17.166.21) smtp.mailfrom=martin@lispworks.com
X-Spamd-Result: default: False [0.79 / 15.00]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-0.23)[-0.233]; FROM_HAS_DN(0.00)[];
 TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[text/plain];
 DMARC_NA(0.00)[lispworks.com]; AUTH_NA(1.00)[];
 RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3];
 TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.10)[-0.095];
 NEURAL_SPAM_LONG(0.12)[0.119];
 RCVD_IN_DNSWL_NONE(0.00)[46.17.166.21:from];
 R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[];
 FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[];
 MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:51055, ipnet:46.17.166.0/24, country:GB]
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.33
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-fs>,
 <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs/>;
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
 <mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Jul 2020 09:41:38 -0000

>>>>> On Sun, 19 Jul 2020 10:15:21 +0200 (CEST), Christian Kratzer said:
> 
> Hi,
> 
> On Sat, 18 Jul 2020, Kevin P. Neal wrote:
> 
> > On Tue, Jul 14, 2020 at 08:34:30AM +0300, Andriy Gapon wrote:
> >> On 13/07/2020 21:02, Christian Kratzer wrote:
> >>> In the future I will ensure  to have the first partition after boot to be the
> >>> zroot.
> >>
> >> By the way, I've been considering changing our ZFS boot code so that it does not
> >> treat a pool as a candidate unless it has bootfs explicitly set (non-default value).
> >> I think that that would be a reasonable change.  And not hard to do.
> >> But never got around to doing it.
> >
> > Would that include full dataset paths in vfs.root.mountfrom? Because I
> > load the kernel from one ufs filesystem and then boot from a zfs pool
> > with the full dataset path/name (which term?) specified. It'd be a shame
> > to lose that.
> 
> is that not what load vfs.root.mountfrom in loader.conf is for
> 
>     vfs.root.mountfrom="zfs:zroot/ROOT/default"
> 
> Once the first stage has located the drive to boot from it will be in the loader
> and will have consumed /boot/loader.conf
> 
> The bootme property is just there to point the first stage at the correct
> device from where to get the loader from.

Also, don't confuse bootme and bootfs.

bootme is a GPT attribute used by gptboot, for booting from UFS.

bootfs is a zpool property used by gptzfsboot, for booting from ZFS.

__Martin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.22.395.2007191008480.82939>