Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2023 20:07:05 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Kyle Evans <kevans@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Ventoy support
Message-ID:  <CAPyFy2DU_OfXY38BU5jJdNh5g2MBzd6RskYgcq_az_E8oc1ySA@mail.gmail.com>
In-Reply-To: <CANCZdfoDPogQTDsmFGi%2BQirfHsFR=xAVRxR_34Yg28OKQGyeYQ@mail.gmail.com>
References:  <202310250103.39P13maS040503@gndrsh.dnsmgr.net> <93ae484b-0f67-4f8b-829d-f75162afd680@FreeBSD.org> <CAPyFy2Bh9nLtQvQDT1Q_WOQ7k5mmS_Dn3CZy-_Z9DztN6yxvrg@mail.gmail.com> <CANCZdfoDPogQTDsmFGi%2BQirfHsFR=xAVRxR_34Yg28OKQGyeYQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 26 Oct 2023 at 14:39, Warner Losh <imp@bsdimp.com> wrote:
>
> I've looked to pass the root filesystem into FreeBSD via a UEFI file path,
> which FreeBSD has most, but not quite all, of the infrastructure to do.

I'm not sure that is any direct help for the issues with Ventoy. There
are two ways that an OS can work with Ventoy: either using stacked
filesystems, or with some sort of block mapping.

For the first case the lower filesystem is typically exFAT, which
contains a variety of OS installer ISO images. We could conceivably
support this mode by using fusefs-exfat to mount the actual storage,
mdconfig, and mounting the ISO image. We can't use reroot here though,
because the underlying filesystem must remain mounted. Maybe we could
chroot and carry on with startup.

The second way is via block mapping, using some service to translate
offsets in the image file within the lower filesystem to physical
offsets in the underlying device. Linux has native support for this
via lvm2/dmsetup, and this is the mode that's used when I tried
booting a Ubuntu ISO via Ventoy. As it turns out NetBSD and
DragonflyBSD have a GPL'd lvm2 port, and presumably work the same way
with Ventoy. Ventoy's geom_ventoy FreeBSD kernel module works
similarly, just in a slightly hackish and Ventoy-specific way.



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