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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Fri, Nov 18, 2022 at 12:57 PM Chlasták Miroslav <mira@chlastak.cz> wrote: > Hi all, > > In the /boot/defaults/loader.conf are these options for memory disk > settings: > > #mdroot_load="YES" # The "mdroot" prefix is arbitrary. > #mdroot_type="md_image" # Create md(4) disk at boot. > #mdroot_name="/boot/root.img" # Path to a file containing the image. > #rootdev="ufs:/dev/md0" # Set the root filesystem to md(4) device. > > > But - is this example for rootdev option still right? Because > “ufs:/dev/md0” works fine on freebsd 12.1, but on freebsd 12.3 this does > not work and generates error message: > > Can’t determine root device > > > When I use this option with value “/dev/md0” or “md0” (even with this > option commented out), so the machine boots correctly without any error. > I think you want vfs.root.mountfrom= instead of rootdev= here. Warner > — > Mira > [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 18, 2022 at 12:57 PM Chlasták Miroslav <<a href="mailto:mira@chlastak.cz">mira@chlastak.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hi all,<div><br></div><div>In the /boot/defaults/loader.conf are these options for memory disk settings:</div><div><br></div><div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue"">#mdroot_load="YES" # The "mdroot" prefix is arbitrary.</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue"">#mdroot_type="md_image" # Create md(4) disk at boot.</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue"">#mdroot_name="/boot/root.img" # Path to a file containing the image.</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue"">#rootdev="ufs:/dev/md0" # Set the root filesystem to md(4) device.</div></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue""><br></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue""><br></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue"">But - is this example for rootdev option still right? Because “ufs:/dev/md0” works fine on freebsd 12.1, but on freebsd 12.3 this does not work and generates error message:</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue""><br></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue"">Can’t determine root device</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue""><br></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue""><br></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue"">When I use this option with value “/dev/md0” or “md0” (even with this option commented out), so the machine boots correctly without any error.</div></div></blockquote><div><br></div><div>I think you want vfs.root.mountfrom= instead of rootdev= here.</div><div><br></div><div>Warner</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue"">—</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue"">Mira</div></div></blockquote></div></div>help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqGhHXCJtUOctpoB-sAuxSdzJZERSBritTazp_uragZ=Q>
