Date: Tue, 31 May 2022 17:05:41 -0600 From: Warner Losh <imp@bsdimp.com> To: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= <olivier@freebsd.org> Cc: FreeBSD Current <current@freebsd.org> Subject: Re: Loader can't find /boot/ua/loader.lua on UFS after main-n255828-18054d0220c Message-ID: <CANCZdfr3gVXT6qEvXY3S9AeuBT7KKs_YcrBEk60a0jZmZ531VQ@mail.gmail.com> In-Reply-To: <CA%2Bq%2BTcp_wfhhK2CvdKsx9GwkKmD3mR9D12pny4ge1Dq4=NokDQ@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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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. UEFI 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 that 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 not define it at all, but that is a longer conversation after reflection not a quick fix to get people back up and running). Warner [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 31, 2022 at 3:55 PM Olivier Cochard-Labbé <<a href="mailto:olivier@freebsd.org">olivier@freebsd.org</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 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></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></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><br></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></div><div>diff --git a/sys/sys/param.h b/sys/sys/param.h<br>index 1f720ed31142..8cd9616e872e 100644<br>--- a/sys/sys/param.h<br>+++ b/sys/sys/param.h<br>@@ -176,7 +176,7 @@<br> #define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */<br> #endif<br> #ifndef MAXPHYS /* max raw I/O transfer size */<br>-#ifdef __ILP32__<br>+#if defined(__ILP32__) && !defined(_STANDALONE) /* Always 1M for loader */<br> #define MAXPHYS (128 * 1024)<br> #else<br> #define MAXPHYS (1024 * 1024)<br></div><div><br></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></div><div>Warner</div></div></div>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr3gVXT6qEvXY3S9AeuBT7KKs_YcrBEk60a0jZmZ531VQ>
