Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jun 2022 09:46:21 +0000 (UTC)
From:      Filippo Moretti <filippomore@yahoo.com>
To:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Loader can't find /boot/ua/loader.lua on UFS after main-n255828-18054d0220c
Message-ID:  <842021085.7679468.1654508781175@mail.yahoo.com>
In-Reply-To: <CANCZdfr3gVXT6qEvXY3S9AeuBT7KKs_YcrBEk60a0jZmZ531VQ@mail.gmail.com>
References:  <YpQdK70gH%2B%2BZ9ZjA@albert.catwhisker.org> <AE2261C9-12E5-4DA2-AEA9-43C3E9C4AA2A@me.com> <YpSb5aWAn3DYZXZQ@albert.catwhisker.org> <CANCZdfqDx2rVNy=K1rcbQZu1igFDhuUwwBQN7UN9p=Ya-t3ZbA@mail.gmail.com> <7BEE44CC-4D31-4CBC-BC12-9A327424299C@me.com> <CANCZdfpqiOj595_uU=kWg4qD37GCO1zXZo6B2MUbWTokUeugHg@mail.gmail.com> <20220530223432.D91C518F@slippy.cwsent.com> <CA%2Bq%2BTcp_wfhhK2CvdKsx9GwkKmD3mR9D12pny4ge1Dq4=NokDQ@mail.gmail.com> <CANCZdfr3gVXT6qEvXY3S9AeuBT7KKs_YcrBEk60a0jZmZ531VQ@mail.gmail.com>

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

[-- Attachment #1 --]
 
Is it now safe to attempt updating current with UFS?SincerelyFilippo
    On Wednesday, June 1, 2022 at 01:07:20 AM GMT+2, Warner Losh <imp@bsdimp.com> wrote:  
 
 

On Tue, May 31, 2022 at 3:55 PM Olivier Cochard-Labbé <olivier@freebsd.org> wrote:

Same problem here:- I'm building FreeBSD head on a builder machine, and NFS mounting its /usr/src and /usr/obj to 4 others
Results:- 2 of them, UEFI+ZFS machines works great ((Thinkpad T420 and AMD Epyc with Tyan motherboard)- 2 of them, BIOS+UFS machines meet this "can't find /boot/ua/loader.lua" (HP microserver and PC Engines APU2)
I had to boot from an USB stick, mounting the system partition and "cp boot/loader_4th.old boot/loader".

Kirk found that the boot loader defines MAXPHYS to be 128k, which only is for the BIOS loader since it's 32-bit. UEFIis 64-bits and just works because it's define to 1MB. So the UEFI machines with ZFS are doubly safe. Kirk has a changethat relaxes the check and I think we should do this
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 1f720ed31142..8cd9616e872e 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -176,7 +176,7 @@
 #define DFLTPHYS       (64 * 1024)     /* default max raw I/O transfer size */
 #endif
 #ifndef MAXPHYS                                /* max raw I/O transfer size */
-#ifdef __ILP32__
+#if defined(__ILP32__) && !defined(_STANDALONE) /* Always 1M for loader */
 #define MAXPHYS                (128 * 1024)
 #else
 #define MAXPHYS                (1024 * 1024)

as well to ensure that the loader always assumes a larger MAXPHYS (though I'd kinda like the loader to notdefine it at all, but that is a longer conversation after reflection not a quick fix to get people back up andrunning).
Warner  
[-- Attachment #2 --]
<html><head></head><body><div class="ydp1922b367yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div><br></div><div dir="ltr" data-setdir="false">Is it now safe to attempt updating current with UFS?</div><div dir="ltr" data-setdir="false">Sincerely</div><div dir="ltr" data-setdir="false">Filippo<br></div>
        
        </div><div id="yahoo_quoted_4794599096" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Wednesday, June 1, 2022 at 01:07:20 AM GMT+2, Warner Losh &lt;imp@bsdimp.com&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv0786447234"><div><div dir="ltr"><div dir="ltr"><br clear="none"></div><br clear="none"><div class="yiv0786447234gmail_quote"><div id="yiv0786447234yqt94645" class="yiv0786447234yqt8846933344"><div dir="ltr" class="yiv0786447234gmail_attr">On Tue, May 31, 2022 at 3:55 PM Olivier Cochard-Labbé &lt;<a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:olivier@freebsd.org" target="_blank" href="mailto:olivier@freebsd.org">olivier@freebsd.org</a>&gt; wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;" class="yiv0786447234gmail_quote"><div dir="ltr"><div dir="ltr"><div>Same problem here:</div><div>- I'm building FreeBSD head on a builder machine, and NFS mounting its /usr/src and /usr/obj to 4 others</div><div><br clear="none"></div><div>Results:</div><div>- 2 of them, UEFI+ZFS machines works great ((Thinkpad T420 and AMD Epyc with Tyan motherboard)</div><div>- 2 of them, BIOS+UFS machines meet this "can't find /boot/ua/loader.lua" (HP microserver and PC Engines APU2)</div><div><br clear="none"></div><div>I had to boot from an USB stick, mounting the system partition and "cp boot/loader_4th.old boot/loader".</div></div></div></blockquote></div><div><br clear="none"></div><div>Kirk found that the boot loader defines MAXPHYS to be 128k, which only is for the BIOS loader since it's 32-bit. UEFI</div><div>is 64-bits and just works because it's define to 1MB. So the UEFI machines with ZFS are doubly safe. Kirk has a change</div><div>that relaxes the check and I think we should do this</div><div><br clear="none"></div><div>diff --git a/sys/sys/param.h b/sys/sys/param.h<br clear="none">index 1f720ed31142..8cd9616e872e 100644<br clear="none">--- a/sys/sys/param.h<br clear="none">+++ b/sys/sys/param.h<br clear="none">@@ -176,7 +176,7 @@<br clear="none">&nbsp;#define DFLTPHYS &nbsp; &nbsp; &nbsp; (64 * 1024) &nbsp; &nbsp; /* default max raw I/O transfer size */<br clear="none">&nbsp;#endif<br clear="none">&nbsp;#ifndef MAXPHYS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* max raw I/O transfer size */<br clear="none">-#ifdef __ILP32__<br clear="none">+#if defined(__ILP32__) &amp;&amp; !defined(_STANDALONE) /* Always 1M for loader */<br clear="none">&nbsp;#define MAXPHYS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(128 * 1024)<br clear="none">&nbsp;#else<br clear="none">&nbsp;#define MAXPHYS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1024 * 1024)<br clear="none"></div><div><br clear="none"></div><div>as well to ensure that the loader always assumes a larger MAXPHYS (though I'd kinda like the loader to not</div><div>define it at all, but that is a longer conversation after reflection not a quick fix to get people back up and</div><div>running).</div><div><br clear="none"></div><div>Warner</div></div></div>
</div></div></div>
            </div>
        </div></body></html>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?842021085.7679468.1654508781175>