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
F86780340: D40388.id.diff
Tue, Jun 25, 11:51 AM
Unknown Object (File)
Wed, Jun 5, 4:05 PM
Unknown Object (File)
May 18 2024, 6:48 PM
Unknown Object (File)
May 6 2024, 1:45 PM
Unknown Object (File)
May 5 2024, 3:43 AM
Unknown Object (File)
May 2 2024, 10:40 PM
Unknown Object (File)
May 2 2024, 10:40 PM
Unknown Object (File)
May 2 2024, 10:40 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.