Page MenuHomeFreeBSD

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

Authored by allanjude on Jul 15 2015, 5:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 13 2024, 3:34 AM
Unknown Object (File)
Feb 13 2024, 3:34 AM
Unknown Object (File)
Feb 13 2024, 3:34 AM
Unknown Object (File)
Feb 13 2024, 3:34 AM
Unknown Object (File)
Jan 10 2024, 2:51 PM
Unknown Object (File)
Jan 1 2024, 12:07 PM
Unknown Object (File)
Dec 22 2023, 10:56 PM
Unknown Object (File)
Nov 21 2023, 6:19 AM
Subscribers

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage

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)

usr.sbin/bsdinstall/partedit/gpart_ops.c
282 ↗(On Diff #7060)

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

usr.sbin/bsdinstall/partedit/part_wizard.c
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.

usr.sbin/bsdinstall/partedit/partedit.c
193 ↗(On Diff #7060)

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

Thank you for the very helpful feedback

usr.sbin/bsdinstall/partedit/gpart_ops.c
282 ↗(On Diff #7060)

good catch, thank you

282 ↗(On Diff #7060)

good catch, thank you.

usr.sbin/bsdinstall/partedit/part_wizard.c
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

usr.sbin/bsdinstall/partedit/partedit.c
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.