From nobody Fri Oct 27 00:07:05 2023 X-Original-To: freebsd-current@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 4SGjf03Lxyz4xSSJ for ; Fri, 27 Oct 2023 00:07:20 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SGjf01Wblz4HW7; Fri, 27 Oct 2023 00:07:20 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-507c91582fdso2223168e87.2; Thu, 26 Oct 2023 17:07:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698365238; x=1698970038; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vlL+HBWJrK8PBFhrcenP+QKmiLSHkUAhi9ukv0ssM/s=; b=JEFcKIbIpy24kiJkgNJXMV4I3yVDgdVbstmJcMwkkSCOy9hslOlTU4jQIX8zMQJaP9 anb76FK7c+VEoTI75epGGSQ9ciwZYVkJm2nz9dLrhv9oKHuuQF89ch6NNcrhwC0sPjaN y0gRjqVP6zE3VEKNICgxTSdEk6BNA2gyccPzW7j11gSl62Zp7YerMhgOSe4D8zu2/X3Y yPIXzE5a2RrqFQyGgfogaY0zgiqfEPpu0oTq2i19XuLdepIpA5EmyACtPJDBZgVr+Mbj jiyYoBJWer3wTbf/Asp707uctn6a/W37UHiyUi6lpgjIu0How800hJPydB2FQuCOD6TT Lhyg== X-Gm-Message-State: AOJu0YzceeBlMh1tWHW8B21+y6q10Y5DZbC4KtvpK9kfW6hgMtEJAZwC tPBOIC1s+R40Bafouh6/6hnWBnC8sMs2CsXPrCosFMQO X-Google-Smtp-Source: AGHT+IHvIKNOjaY+oGYH17UMgws+7Obwau5Ue21w0rNDOyBu9NHPiTqCqkBD2W9Xv/wIV/H9YP4XwhM57Q4JLC/ytbk= X-Received: by 2002:ac2:4f13:0:b0:503:18c3:d874 with SMTP id k19-20020ac24f13000000b0050318c3d874mr806337lfr.45.1698365237841; Thu, 26 Oct 2023 17:07:17 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <202310250103.39P13maS040503@gndrsh.dnsmgr.net> <93ae484b-0f67-4f8b-829d-f75162afd680@FreeBSD.org> In-Reply-To: From: Ed Maste Date: Thu, 26 Oct 2023 20:07:05 -0400 Message-ID: Subject: Re: Ventoy support To: Warner Losh Cc: Kyle Evans , FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4SGjf01Wblz4HW7 On Thu, 26 Oct 2023 at 14:39, Warner Losh 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.