> themselves in this strange edge case, this is enough for the LLM to scrap= e > and give a solution :) > > Thanks for the hints Warner. Not sure why it didnt "just work" but it > works with this added step. > OK. That tells me that the new code that supposedly creates compatible old-ZFS images doesn't in some minor, usually trivial way, but that in this case causes the old boot loader to not be able to load it. Copying the 12.x bootloader should just work with 11.x kernels. The handoff protocols are the same (ish, there's one difference with UEFI that would bite you there, but this is BIOS). Warner > > ---Mike > > FreeBSD/x86 ZFS enabled bootstrap loader, Revision 1.1 >> >> (Tues Oct 10:24:17 EDT 2018 user@hostname) >> panic: free: guard2 fail @ 0xbf153040 + 2061 from unknown:0 >> --> Press a key on the console to reboot <-- >> > > This is a memory corruption bug. You'll need to find what's corrupting > memory and make it stop. > > I imagine this might be a small incompatibility with OpenZFS or just > a bug in what openZFS is generating on the releng13 server. > > What version is the boot loader? There's been like 6 years of fixes and > churn since the date above? Maybe the latest on RELENG_11 for it > if you are still running 11.2-stable. > > Any chance you can use the stable/13 or stable/14 loaders? 11 is really > not supported anymore and hasn't been for quite some time. I have no > time for it beyond this quick peek. > > > --000000000000d5b74706191119a5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, May 17, 2024 at 1:52=E2=80=AF= PM mike tancsa <mike@sentex.net&g= t; wrote:
=20 =20 =20
On 5/16/2024 10:38 AM, Warner Losh wrote:
=20


On Thu, May 16, 2024 at 8:14=E2=80=AFAM mike tancsa <mike@sentex.net> wrote:
I have a strange edge case I am trying to work around.=C2=A0 I ha= ve a
customer's legacy VM which is RELENG_11 on ZFS.=C2=A0 There= is some
corruption that wont clear on a bunch of directories, so I want to
re-create it from backups. I have done this many times in the past but
this one is giving me grief. Normally I do something like this on my
backup server (RELENG_13)

truncate -s 100G file.raw
mdconfig -f file.raw
gpart create -s gpt md0
gpart add -t freebsd-boot -s 512k md0
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 md0
gpart add -t freebsd-swap -s 2G md0
gpart add -t freebsd-zfs md0
zpool create -d -f -o altroot=3D/mnt2 -o feature@lz4_compress=3Denabled -o
cachefile=3D/var/tmp/zpool.cache myZFSPool /dev/md0p3

I'm surprised you don't specifically create compatib= ility with some older
standard and then maybe add compression. But I'd start there: create
one that doesn't use lz4_compress (it's not read-onl= y compatible,
meaning the old boot loader has to 100% implement it faithfully).

Hi Warner,

=C2=A0=C2=A0=C2=A0 I though -d would make the LCD. But looking at th= e updated man pages for zpool create, I didnt realize there are these handy-dandy files with all the supported features!

Trying with=C2=A0

=C2=A0=C2=A0=C2=A0 zpool create -o compatibility=3D/usr/share/zfs/compatibility.d/freebsd-11.2 -o altroot=3D/mnt2=C2=A0 -o cachefile=3D/var/tmp/zpool.cache myZFSPool /dev/md0p3

and the pmbr and gptzfsboot from RELENG_12 still gives the same error

However, if I copy over from RELENG_12 /boot/loader and /boot/zfsloader and /boot/lua I am able to boot.=C2=A0=C2=A0 No idea = why that is the case, but.... I think this is "solved enough" f= or me and hopefully if someone else finds themselves in this strange edge case, this is enough for the LLM to scrape and give a solution :)=C2=A0

Thanks for the hints Warner.=C2=A0 Not sure why it didnt "just = work" but it works with this added step.


OK. That tells me that the new code that supposedly creates compati= ble old-ZFS images doesn't in some minor, usually trivial way, but that= in this case causes the old boot loader to not be able to load it.

Copying the 12.x bootloader should just work with 11.x ke= rnels. The handoff protocols are the same (ish, there's one difference = with UEFI that would bite you there, but this is BIOS).

Warner
=C2=A0


=C2=A0=C2=A0=C2=A0 ---Mike


FreeBSD/x86 ZFS enabled bootstrap loader, Revision 1.1

(Tues Oct 10:24:17 EDT 2018 user@hostname)
panic: free: guard2 fail @ 0xbf153040 + 2061 from unknown:0
--> Press a key on the console to reboot <--

This is a memory corruption bug. You'll need to find what's corrupting
memory and make it stop.

I imagine this might be a small incompatibility with OpenZFS or just
a bug in what openZFS is generating on the releng13 server.

What version is the boot loader? There's been like 6 years of fixes and
churn since the date above? Maybe the latest on RELENG_11 for it
if you are still running 11.2-stable.

Any chance you can use the stable/13 or stable/14 loaders? 11 is really
not supported anymore and hasn't been for quite some time. I have no
time for it beyond this quick peek.


--000000000000d5b74706191119a5--