Page MenuHomeFreeBSD

Add support for various workarounds to solve issues some hardware has with booting from GPT

Authored by allanjude on Jul 15 2015, 5:43 AM.



Add the "GPT with Protective MBR set Active" hack (PR 194359)
Add the "Lenovo Protective MBR in seconds slot" hack (PR 184910 and rS285594)

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

allanjude retitled this revision from to Add support for various workarounds to solve issues some hardware has with booting from GPT.
allanjude updated this object.
allanjude edited the test plan for this revision. (Show Details)
allanjude added reviewers: dteske, marcel, brueffer, eadler.

Update with blacklist for hardware that is known to require the workarounds. Prompt the user to enable them automatically.

Rework the way the workarounds are applied

Set workaround flags before asking the user if they wish to use autopart or zfsboot, so they can be applied in either case

In autopart, ask the user which partitioning scheme they wish to use, with the current defaults, rather than forcing the default. (allow GPT in BIOS mode)

282 ↗(On Diff #7060)

With scheme != NULL, jumping to schememenu for cancel would result in the partition being created anyway, would it not?

260–261 ↗(On Diff #7060)

When the user cancels for choose_part_type, he/she is confronted with exactly the same dialog again by virtue of passing NULL to part_partition and that function calling choose_part_type.
I don't know the bigger flow, but maybe call gpart_partition only when scheme != NULL?

275–276 ↗(On Diff #7060)

Same as line 260/261.

193 ↗(On Diff #7060)

May want to apply the workaround only when error is 0?

Thank you for the very helpful feedback

282 ↗(On Diff #7060)

good catch, thank you

282 ↗(On Diff #7060)

good catch, thank you.

260–261 ↗(On Diff #7060)

return NULL from wizard_partition() when the user hits cancel, which will cause part_wizard() to exit with an error

193 ↗(On Diff #7060)

in the case of an error, the disk will be left in an inconsistent state, so it likely makes no difference, but lets do it anyway to avoid generating even more error messages.

allanjude marked 3 inline comments as done.

Address feedback from marcel

marcel edited edge metadata.

LGTM. Thanks again for getting this fixed!
You can put me down as approver and send all complaints to me :-)

This revision is now accepted and ready to land.Jul 18 2015, 5:11 PM
This revision was automatically updated to reflect the committed changes.