Re: Ventoy support
- In reply to: Warner Losh : "Re: Ventoy support"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Oct 2023 00:07:05 UTC
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.