Page MenuHomeFreeBSD

stand/loader.efi: read zfs bootonce attribute before checking currdev
ClosedPublic

Authored by glebius on Jun 2 2023, 5:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 20 2024, 6:13 PM
Unknown Object (File)
Nov 11 2024, 12:58 AM
Unknown Object (File)
Nov 6 2024, 9:26 PM
Unknown Object (File)
Nov 6 2024, 7:32 PM
Unknown Object (File)
Oct 8 2024, 8:29 AM
Unknown Object (File)
Oct 5 2024, 8:51 AM
Unknown Object (File)
Oct 5 2024, 8:00 AM
Unknown Object (File)
Oct 5 2024, 4:57 AM
Subscribers

Details

Summary

First check if bootonce is configured and if it is, then change currdev
accordingly and after that do the sanity check. This fixes boot in a
situation when ZFS pool doesn't have the "bootfs" property, but has
bootonce attribute set. A strange, but legitimate case.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jun 2 2023, 11:42 AM
stand/efi/loader/main.c
268

I'm not 100% sure this is completely right. If we wind up not using it, then this shouldn't be set. And if it's not sane, shouldn't we act as if it wasn't set at all?

stand/efi/loader/main.c
268

This doesn't change the current behavior. I agree that env should be unset if we fail to mount the specified bootonce, but that can be a separate change.

imp added inline comments.
stand/efi/loader/main.c
268

I might quibble with not changing current behavior, but current behavior is broken so let's do what I think is needed as a followup patch.