From nobody Sat Nov 19 18:57:47 2022 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 4NF2wN6DLgz4hf7S for ; Sat, 19 Nov 2022 18:57:56 +0000 (UTC) (envelope-from mira@chlastak.cz) Received: from mxb-1-3f7.seznam.cz (mxb-1-3f7.seznam.cz [IPv6:2a02:598:128:8a00::1000:3f7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "email-registrator.ops.iszn.cz", Issuer "Servers 2022.1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NF2wN34TYz4FP0 for ; Sat, 19 Nov 2022 18:57:56 +0000 (UTC) (envelope-from mira@chlastak.cz) Authentication-Results: mx1.freebsd.org; none Received: from email.seznam.cz by smtpc-mxb-68545b7b84-q2m5b (smtpc-mxb-68545b7b84-q2m5b [2a02:598:128:8a00::1000:3f7]) id 6adaccd2e61a5a2668ad59e9; Sat, 19 Nov 2022 19:57:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emailprofi.seznam.cz; s=szn20221014; t=1668884271; bh=JKEDpAdPVGQ0cXfqhn+6C4JvPItiaCg2BDTsDKEYszc=; h=Received:From:Message-Id:Content-Type:Mime-Version:Subject:Date: In-Reply-To:Cc:To:References:X-Mailer; b=djWbmasEw5wqiR+oS6UTVWT5pjEwYhbBS4UaVBB33uvBzGJQzYzPwibXJ/ZXB5wow FGzOx/aOLjJvRCuZF+Wrt0eIFZAF7Klu32KPCi6kAjcIpOLNX0iPygc7GWLirFU5rg AQPA43DUlGrZI6MHQ2jLQ5eYI9FXTQTFKCcXKa8rla8j4HQEGK53RqMza4dQNN+470 anZoeh04tjZ+IB7emvbPUmboyM3RVWlWnuwY9MJz9GzQX5LFcg/c+Nk7TdBBiAtKQa 6FubmUcEe5gXm+WOHgdNal/Ag4OTmyYgIvGB/PbsjA7km30vnpc7az4s4oigRKvR42 VVwSIjDIdXx5A== Received: from [10.10.100.102] (cust.uvtnet.cz [185.63.97.36]) by email-relay2.ko.seznam.cz (Seznam SMTPD 1.3.140) with ESMTP; Sat, 19 Nov 2022 19:57:49 +0100 (CET) From: =?utf-8?Q?Chlast=C3=A1k_Miroslav?= Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_C9DE10EB-BB9F-4B0A-8B1D-5293F75C27EE" 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 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: loader.conf and rootdev option for memory disk Date: Sat, 19 Nov 2022 19:57:47 +0100 In-Reply-To: Cc: FreeBSD CURRENT To: Warner Losh References: <2E58D34B-F8C5-4291-B019-9E24F56DC3DF@chlastak.cz> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4NF2wN34TYz4FP0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:43037, ipnet:2a02:598::/32, country:CZ] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_C9DE10EB-BB9F-4B0A-8B1D-5293F75C27EE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I have my device working for now - but the question is - Is the = documentation and example for =E2=80=9Crootdev=E2=80=9D right or not? =E2=80=94 Mira > On 18 Nov 2022, at 21:13, Warner Losh wrote: >=20 >=20 >=20 > On Fri, Nov 18, 2022 at 12:57 PM Chlast=C3=A1k Miroslav = > wrote: > Hi all, >=20 > In the /boot/defaults/loader.conf are these options for memory disk = settings: >=20 > #mdroot_load=3D"YES" # The "mdroot" prefix is arbitrary. > #mdroot_type=3D"md_image" # Create md(4) disk at boot. > #mdroot_name=3D"/boot/root.img" # Path to a file containing the = image. > #rootdev=3D"ufs:/dev/md0" # Set the root filesystem to md(4) = device. >=20 >=20 > But - is this example for rootdev option still right? Because = =E2=80=9Cufs:/dev/md0=E2=80=9D works fine on freebsd 12.1, but on = freebsd 12.3 this does not work and generates error message: >=20 > Can=E2=80=99t determine root device >=20 >=20 > When I use this option with value =E2=80=9C/dev/md0=E2=80=9D or = =E2=80=9Cmd0=E2=80=9D (even with this option commented out), so the = machine boots correctly without any error. >=20 > I think you want vfs.root.mountfrom=3D instead of rootdev=3D here. >=20 > Warner > =20 > =E2=80=94 > Mira --Apple-Mail=_C9DE10EB-BB9F-4B0A-8B1D-5293F75C27EE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 I = have my device working for now - but the question is - Is the = documentation and example for =E2=80=9Crootdev=E2=80=9D right or = not?

=E2=80=94
Mira

On 18 Nov 2022, at 21:13, = Warner Losh <imp@bsdimp.com> wrote:



On Fri, Nov 18, 2022 at 12:57 PM Chlast=C3=A1k = Miroslav <mira@chlastak.cz> wrote:
Hi all,

In the /boot/defaults/loader.conf are these options for = memory disk settings:

#mdroot_load=3D"YES"            =   # The "mdroot" prefix is arbitrary.
#mdroot_type=3D"md_image"   =       # Create md(4) disk at boot.
#mdroot_name=3D"/boot/root.img"   # Path to a file = containing the image.
#rootdev=3D"ufs:/dev/md0"         # Set = the root filesystem to md(4) device.


But - is this example for rootdev option still right? Because = =E2=80=9Cufs:/dev/md0=E2=80=9D works fine on freebsd 12.1, but on = freebsd 12.3 this does not work and generates error message:

Can=E2=80=99t determine root device


When I use this option with value =E2=80=9C/dev/md0=E2=80=9D = or =E2=80=9Cmd0=E2=80=9D (even with this option commented out), so = the machine boots correctly without any = error.

I think you want vfs.root.mountfrom=3D instead of = rootdev=3D here.

Warner
 
=E2=80=94
Mira
= --Apple-Mail=_C9DE10EB-BB9F-4B0A-8B1D-5293F75C27EE--