Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2019 20:49:10 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 235206] add patch to fix starting with a damaged GPT scheme under legacy BIOS
Message-ID:  <bug-235206-227-xWPjMV9rG4@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-235206-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-235206-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235206

--- Comment #1 from Emrion <kmachine@free.fr> ---
Created attachment 201423
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D201423&action=
=3Dedit
Patch to add an automatic GPT recovery feature to gptzfsboot

I eventually made a patch for gptzfsboot. It modifies
/usr/src/stand/i386/zfsboot/zfsboot.c and add the automatic recovery of a G=
PT
scheme feature but not only. It also verifies the crc of the GPT header and=
 the
crc of the partition table.

I have picked the code in /usr/src/stand/libsa/gpt.c, including mine from t=
he
previous patch, and adapted it to the zfsboot.c environment.

It's a pity that the gpt.c code is used in gptboot but not in gptzfsboot. I
think this would require to rewrite a good part of gpt.c and gptboot.c (not
forget zfsboot.c itself). Besides that, if I well understood, the code of
zfsboot.c is also used for booting a MBR scheme. So there is a mix of MBR a=
nd
GPT functions & instructions in the same file. Could the design be improved?

Well, this is just my little understanding as I'm far to know enough in this
matter.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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