Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2022 22:31:42 +0100
From:      =?utf-8?Q?Chlast=C3=A1k_Miroslav?= <mira@chlastak.cz>
To:        Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: loader.conf and rootdev option for memory disk
Message-ID:  <97A75B5E-6C38-4CFB-9978-7E254595D980@chlastak.cz>
In-Reply-To: <20221120055845.366367f1d371ae4d6eb8d747@dec.sakura.ne.jp>
References:  <2E58D34B-F8C5-4291-B019-9E24F56DC3DF@chlastak.cz> <CANCZdfqGhHXCJtUOctpoB-sAuxSdzJZERSBritTazp_uragZ=Q@mail.gmail.com> <F3702494-1433-4324-B972-52FBD84EFFD8@chlastak.cz> <20221120055845.366367f1d371ae4d6eb8d747@dec.sakura.ne.jp>

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

--Apple-Mail=_50BCB33F-6C39-4359-A528-FC4EA71B940C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Look at the file /boot/defaults/loader.conf:

=E2=80=A6
###  Initial 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.
=E2=80=A6

=E2=80=94
Mira

> On 19 Nov 2022, at 21:58, Tomoaki AOKI <junchoon@dec.sakura.ne.jp> =
wrote:
>=20
> IIUC, rootdev should be set in loader.env, if needed.
> `man 5 loader.conf` has nothing about rootdev variable.
>=20
> (It's undocumented, IIRC.)
>=20
>=20
> On Sat, 19 Nov 2022 19:57:47 +0100
> Chlast=C3=A1k Miroslav <mira@chlastak.cz <mailto:mira@chlastak.cz>> =
wrote:
>=20
>> 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?
>>=20
>> =E2=80=94
>> Mira
>>=20
>>> On 18 Nov 2022, at 21:13, Warner Losh <imp@bsdimp.com =
<mailto:imp@bsdimp.com>> wrote:
>>>=20
>>>=20
>>>=20
>>> On Fri, Nov 18, 2022 at 12:57 PM Chlast=C3=A1k Miroslav =
<mira@chlastak.cz <mailto:mira@chlastak.cz> <mailto:mira@chlastak.cz =
<mailto:mira@chlastak.cz>>> 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
>>=20
>=20
>=20
> --=20
> =E9=9D=92=E6=9C=A8 =E7=9F=A5=E6=98=8E  [Tomoaki AOKI]    =
<junchoon@dec.sakura.ne.jp <mailto:junchoon@dec.sakura.ne.jp>>


--Apple-Mail=_50BCB33F-6C39-4359-A528-FC4EA71B940C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">Look =
at the file /boot/defaults/loader.conf:<div class=3D""><br =
class=3D""></div><div class=3D"">=E2=80=A6</div><div class=3D""><div =
class=3D"">### &nbsp;Initial memory disk settings =
&nbsp;###########################</div><div class=3D"">#mdroot_load=3D"YES=
" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# The "mdroot" prefix =
is arbitrary.</div><div class=3D"">#mdroot_type=3D"md_image" &nbsp; =
&nbsp; &nbsp; &nbsp; # Create md(4) disk at boot.</div><div =
class=3D"">#mdroot_name=3D"/boot/root.img" &nbsp; # Path to a file =
containing the image.</div><div class=3D"">#rootdev=3D"ufs:/dev/md0" =
&nbsp; &nbsp; &nbsp; &nbsp; # Set the root filesystem to md(4) =
device.</div><div class=3D"">=E2=80=A6</div><div class=3D""><br =
class=3D""></div><div class=3D"">=E2=80=94</div><div =
class=3D"">Mira</div><div><br class=3D""><blockquote type=3D"cite" =
class=3D""><div class=3D"">On 19 Nov 2022, at 21:58, Tomoaki AOKI &lt;<a =
href=3D"mailto:junchoon@dec.sakura.ne.jp" =
class=3D"">junchoon@dec.sakura.ne.jp</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><span =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; =
display: inline !important;" class=3D"">IIUC, rootdev should be set in =
loader.env, if needed.</span><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">`man 5 loader.conf` has nothing about rootdev =
variable.</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;" class=3D"">(It's =
undocumented, IIRC.)</span><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><br style=3D"caret-color: rgb(0, 0, =
0); font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><br style=3D"caret-color: rgb(0, 0, =
0); font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">On Sat, 19 Nov 2022 19:57:47 +0100</span><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><span =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; =
display: inline !important;" class=3D"">Chlast=C3=A1k Miroslav =
&lt;</span><a href=3D"mailto:mira@chlastak.cz" style=3D"font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; =
-webkit-text-stroke-width: 0px;" class=3D"">mira@chlastak.cz</a><span =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; =
display: inline !important;" class=3D"">&gt; wrote:</span><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;" =
class=3D""><blockquote type=3D"cite" style=3D"font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; orphans: auto; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; =
-webkit-text-stroke-width: 0px; text-decoration: none;" class=3D"">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?<br =
class=3D""><br class=3D"">=E2=80=94<br class=3D"">Mira<br class=3D""><br =
class=3D""><blockquote type=3D"cite" class=3D"">On 18 Nov 2022, at =
21:13, Warner Losh &lt;<a href=3D"mailto:imp@bsdimp.com" =
class=3D"">imp@bsdimp.com</a>&gt; wrote:<br class=3D""><br class=3D""><br =
class=3D""><br class=3D"">On Fri, Nov 18, 2022 at 12:57 PM Chlast=C3=A1k =
Miroslav &lt;<a href=3D"mailto:mira@chlastak.cz" =
class=3D"">mira@chlastak.cz</a><span =
class=3D"Apple-converted-space">&nbsp;</span>&lt;<a =
href=3D"mailto:mira@chlastak.cz" =
class=3D"">mailto:mira@chlastak.cz</a>&gt;&gt; wrote:<br class=3D"">Hi =
all,<br class=3D""><br class=3D"">In the /boot/defaults/loader.conf are =
these options for memory disk settings:<br class=3D""><br =
class=3D"">#mdroot_load=3D"YES" =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;# The "mdroot" prefix is arbitrary.<br =
class=3D"">#mdroot_type=3D"md_image" =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Create md(4) disk at =
boot.<br class=3D"">#mdroot_name=3D"/boot/root.img" &nbsp;&nbsp;# Path =
to a file containing the image.<br class=3D"">#rootdev=3D"ufs:/dev/md0" =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Set the root =
filesystem to md(4) device.<br class=3D""><br class=3D""><br =
class=3D"">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:<br =
class=3D""><br class=3D"">Can=E2=80=99t determine root device<br =
class=3D""><br class=3D""><br class=3D"">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.<br class=3D""><br class=3D"">I think you want vfs.root.mountfrom=3D=
 instead of rootdev=3D here.<br class=3D""><br class=3D"">Warner<br =
class=3D""><br class=3D"">=E2=80=94<br class=3D"">Mira<br =
class=3D""></blockquote><br class=3D""></blockquote><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><span =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; =
display: inline !important;" class=3D"">--<span =
class=3D"Apple-converted-space">&nbsp;</span></span><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><span =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; =
display: inline !important;" class=3D"">=E9=9D=92=E6=9C=A8 =E7=9F=A5=E6=98=
=8E &nbsp;[Tomoaki AOKI] &nbsp;&nbsp;&nbsp;&lt;</span><a =
href=3D"mailto:junchoon@dec.sakura.ne.jp" style=3D"font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; =
-webkit-text-stroke-width: 0px;" =
class=3D"">junchoon@dec.sakura.ne.jp</a><span style=3D"caret-color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">&gt;</span></div></blockquote></div><br =
class=3D""></div></body></html>=

--Apple-Mail=_50BCB33F-6C39-4359-A528-FC4EA71B940C--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?97A75B5E-6C38-4CFB-9978-7E254595D980>