Date: Fri, 18 Nov 2022 13:13:31 -0700 From: Warner Losh <imp@bsdimp.com> To: =?UTF-8?Q?Chlast=C3=A1k_Miroslav?= <mira@chlastak.cz> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: loader.conf and rootdev option for memory disk Message-ID: <CANCZdfqGhHXCJtUOctpoB-sAuxSdzJZERSBritTazp_uragZ=Q@mail.gmail.com> In-Reply-To: <2E58D34B-F8C5-4291-B019-9E24F56DC3DF@chlastak.cz> References: <2E58D34B-F8C5-4291-B019-9E24F56DC3DF@chlastak.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000009ae2aa05edc4577c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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) devi= ce. > > > 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=9C= md0=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 > --0000000000009ae2aa05edc4577c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 18, 2022 at 12:57 PM Chla= st=C3=A1k Miroslav <<a href=3D"mailto:mira@chlastak.cz">mira@chlastak.cz= </a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:= 0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">= <div style=3D"overflow-wrap: break-word;">Hi all,<div><br></div><div>In the= /boot/defaults/loader.conf are these options for memory disk settings:</di= v><div><br></div><div><div style=3D"margin:0px;font-stretch:normal;line-hei= ght:normal;font-family:"Helvetica Neue"">#mdroot_load=3D"YES= "=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # The "mdroot&q= uot; prefix is arbitrary.</div><div style=3D"margin:0px;font-stretch:normal= ;line-height:normal;font-family:"Helvetica Neue"">#mdroot_type=3D= "md_image" =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Create md(4) disk at boo= t.</div><div style=3D"margin:0px;font-stretch:normal;line-height:normal;fon= t-family:"Helvetica Neue"">#mdroot_name=3D"/boot/root.img&qu= ot; =C2=A0 # Path to a file containing the image.</div><div style=3D"margin= :0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neu= e"">#rootdev=3D"ufs:/dev/md0" =C2=A0 =C2=A0 =C2=A0 =C2=A0 # = Set the root filesystem to md(4) device.</div></div><div style=3D"margin:0p= x;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue&q= uot;"><br></div><div style=3D"margin:0px;font-stretch:normal;line-height:no= rmal;font-family:"Helvetica Neue""><br></div><div style=3D"margin= :0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neu= e"">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:</div><div style=3D"margin:= 0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue= ""><br></div><div style=3D"margin:0px;font-stretch:normal;line-height:= normal;font-family:"Helvetica Neue"">Can=E2=80=99t determine root= device</div><div style=3D"margin:0px;font-stretch:normal;line-height:norma= l;font-family:"Helvetica Neue""><br></div><div style=3D"margin:0p= x;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue&q= uot;"><br></div><div style=3D"margin:0px;font-stretch:normal;line-height:no= rmal;font-family:"Helvetica Neue"">When I use this option with va= lue =E2=80=9C/dev/md0=E2=80=9D or =E2=80=9Cmd0=E2=80=9D (even with this opt= ion commented out),=C2=A0so the machine boots correctly without any error.<= /div></div></blockquote><div><br></div><div>I think you want=C2=A0vfs.root.= mountfrom=3D instead of rootdev=3D here.</div><div><br></div><div>Warner</d= iv><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0= px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div = style=3D"overflow-wrap: break-word;"><div style=3D"margin:0px;font-stretch:= normal;line-height:normal;font-family:"Helvetica Neue"">=E2=80=94= </div><div style=3D"margin:0px;font-stretch:normal;line-height:normal;font-= family:"Helvetica Neue"">Mira</div></div></blockquote></div></div= > --0000000000009ae2aa05edc4577c--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqGhHXCJtUOctpoB-sAuxSdzJZERSBritTazp_uragZ=Q>