Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jun 2024 18:52:31 -0700
From:      Rick Macklem <rick.macklem@gmail.com>
To:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: Booting in bhyve always sets currdev to ZFS
Message-ID:  <CAM5tNy4u7nTF8s4a26Q644V1kZS09rTeiR0_oVqxXX%2BqV=9Ckw@mail.gmail.com>
In-Reply-To: <CAM5tNy6rDBiV5j%2BnrAyHdnuLsPECs6JPvuUtk9svkBLEd7Wy-A@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

On Fri, Jun 28, 2024 at 6:26 PM Rick Macklem <rick.macklem@gmail.com> wrote:
>
> Hi,
>
> I've installed FreeBSD current in a bhvye instance. Everything
> went ok, with UFS as a root partition.
> Then I created a zpool in another partition...
> - Now, every time I boot it I have to
>   OK set currdev=disk0s1a:
> to get it to boot.
>
> What is the trick to keep ZFS from messing up the boot variables?
I've been poking around, but haven't learned much.
I think it is userboot (although there are so many boot programs in /boot,
I am not 100% sure?) that sets currdev=zfs:example: since it sees there is ZFS
in a partition on the drive. It is not the boot partition and doesn't have
any boot stuff in it.

When I look at userboot, it appears that it always sets userboot_zfs_found
to 1 whenever userboot_zfs_probe() is called, given that there is a ZFS
partition with a pool on it. This makes extract_currdev get set to the
ZFS stuff,
assuming I am reading the code correctly.
What I do not understand is why I have not seen this before?
(Was the a change to building it with USERBOOT_ZFS_SUPPORT done?)

It seems that userboot_zfs_probe() should check for boot files on the volume
and not just that a pool exists on the partition, maybe?

Anyhow, manually setting currdev=disk0s1a: gets around the problem.

rick

>
> Thanks, rick


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM5tNy4u7nTF8s4a26Q644V1kZS09rTeiR0_oVqxXX%2BqV=9Ckw>