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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] Look at the file /boot/defaults/loader.conf: … ### Initial 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. … — Mira > On 19 Nov 2022, at 21:58, Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote: > > IIUC, rootdev should be set in loader.env, if needed. > `man 5 loader.conf` has nothing about rootdev variable. > > (It's undocumented, IIRC.) > > > On Sat, 19 Nov 2022 19:57:47 +0100 > Chlasták Miroslav <mira@chlastak.cz <mailto:mira@chlastak.cz>> wrote: > >> I have my device working for now - but the question is - Is the documentation and example for “rootdev” right or not? >> >> — >> Mira >> >>> On 18 Nov 2022, at 21:13, Warner Losh <imp@bsdimp.com <mailto:imp@bsdimp.com>> wrote: >>> >>> >>> >>> On Fri, Nov 18, 2022 at 12:57 PM Chlasták Miroslav <mira@chlastak.cz <mailto:mira@chlastak.cz> <mailto:mira@chlastak.cz <mailto: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 >> > > > -- > 青木 知明 [Tomoaki AOKI] <junchoon@dec.sakura.ne.jp <mailto:junchoon@dec.sakura.ne.jp>> [-- Attachment #2 --] <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Look at the file /boot/defaults/loader.conf:<div class=""><br class=""></div><div class="">…</div><div class=""><div class="">### Initial memory disk settings ###########################</div><div class="">#mdroot_load="YES" # The "mdroot" prefix is arbitrary.</div><div class="">#mdroot_type="md_image" # Create md(4) disk at boot.</div><div class="">#mdroot_name="/boot/root.img" # Path to a file containing the image.</div><div class="">#rootdev="ufs:/dev/md0" # Set the root filesystem to md(4) device.</div><div class="">…</div><div class=""><br class=""></div><div class="">—</div><div class="">Mira</div><div><br class=""><blockquote type="cite" class=""><div class="">On 19 Nov 2022, at 21:58, Tomoaki AOKI <<a href="mailto:junchoon@dec.sakura.ne.jp" class="">junchoon@dec.sakura.ne.jp</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="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="">IIUC, rootdev should be set in loader.env, if needed.</span><br style="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=""><span style="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="">`man 5 loader.conf` has nothing about rootdev variable.</span><br style="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=""><br style="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=""><span style="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="">(It's undocumented, IIRC.)</span><br style="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=""><br style="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=""><br style="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=""><span style="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="">On Sat, 19 Nov 2022 19:57:47 +0100</span><br style="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=""><span style="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="">Chlasták Miroslav <</span><a href="mailto:mira@chlastak.cz" style="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="">mira@chlastak.cz</a><span style="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="">> wrote:</span><br style="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=""><br style="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=""><blockquote type="cite" style="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="">I have my device working for now - but the question is - Is the documentation and example for “rootdev” right or not?<br class=""><br class="">—<br class="">Mira<br class=""><br class=""><blockquote type="cite" class="">On 18 Nov 2022, at 21:13, Warner Losh <<a href="mailto:imp@bsdimp.com" class="">imp@bsdimp.com</a>> wrote:<br class=""><br class=""><br class=""><br class="">On Fri, Nov 18, 2022 at 12:57 PM Chlasták Miroslav <<a href="mailto:mira@chlastak.cz" class="">mira@chlastak.cz</a><span class="Apple-converted-space"> </span><<a href="mailto:mira@chlastak.cz" class="">mailto:mira@chlastak.cz</a>>> wrote:<br class="">Hi all,<br class=""><br class="">In the /boot/defaults/loader.conf are these options for memory disk settings:<br class=""><br class="">#mdroot_load="YES" # The "mdroot" prefix is arbitrary.<br class="">#mdroot_type="md_image" # Create md(4) disk at boot.<br class="">#mdroot_name="/boot/root.img" # Path to a file containing the image.<br class="">#rootdev="ufs:/dev/md0" # Set the root filesystem to md(4) device.<br class=""><br class=""><br class="">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:<br class=""><br class="">Can’t determine root device<br class=""><br class=""><br class="">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.<br class=""><br class="">I think you want vfs.root.mountfrom= instead of rootdev= here.<br class=""><br class="">Warner<br class=""><br class="">—<br class="">Mira<br class=""></blockquote><br class=""></blockquote><br style="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=""><br style="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=""><span style="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="">--<span class="Apple-converted-space"> </span></span><br style="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=""><span style="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="">青木 知明 [Tomoaki AOKI] <</span><a href="mailto:junchoon@dec.sakura.ne.jp" style="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="">junchoon@dec.sakura.ne.jp</a><span style="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="">></span></div></blockquote></div><br class=""></div></body></html>home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?97A75B5E-6C38-4CFB-9978-7E254595D980>
