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)
Tue, Oct 8, 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
Unknown Object (File)
Oct 2 2024, 7:26 PM
Unknown Object (File)
Oct 2 2024, 3:22 PM
Unknown Object (File)
Oct 1 2024, 3:14 AM
Unknown Object (File)
Sep 27 2024, 5:53 PM
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.