State "bios" firmware support for OSes

Fabiano Fidêncio fidencio at redhat.com
Tue May 26 22:28:25 UTC 2020


Felipe,

On Tue, May 26, 2020 at 4:06 PM Felipe Borges <felipe10borges at gmail.com> wrote:
>
> Hi everyone,
>
> We recently landed EFI support in GNOME Boxes where we create guests
> with "firmware = efi" by default when libosinfo reports that the OS
> supports it. This has worked great except for the regression with
> snapshots. Long story short, internal snapshots won't work with EFI,
> external snapshots won't allow our users to revert their domain to a
> certain snapshot.
>
> For this reason, the Boxes designers and I concluded that the best
> approach for us here would be to only create EFI guests for OSes that
> REQUIRE it. If an OS can still boot with the legacy "bios" we should
> go for it, since it maintains our Snapshot management functionality.
>
> The reason I am emailing libosinfo about this is to assess whether you
> folk would be open to having me adding <firmware arch="x86_64"
> type="bios"/> to the OSes that support it (some of them already state
> support for EFI).
>
> Since the API returns a list of Osinfo.Firmware objects, we won't need
> any more work on libosinfo side in order to implement what we need in
> Boxes.
>
> All in all, adding <firmware arch="x86_64" type="bios"/> to some OSes
> would be something you'd accept?

I'd take the opposite direction, Felipe.
Although our schema supports <firmware ... type="bios"/>, as you can
see here[0], I'd rather assume that all OSes support BIOS, unless
something like <firmware ... type="bios" supported="false"/> is set,
and we're prepared for this[1].

So, what about changing the check we do on Boxes[2] to something like:
```
if (firmware.get_firmware_type () == "bios" && !firmware.is_supported ())
    return true
```

That should do the trick.

[0]: https://gitlab.com/libosinfo/osinfo-db/-/blob/master/data/schema/osinfo.rng.in#L936
[1]: https://gitlab.com/libosinfo/osinfo-db/-/blob/master/data/schema/osinfo.rng.in#L596
[2]: https://gitlab.gnome.org/GNOME/gnome-boxes/-/blob/master/src/installer-media.vala#L65

Best Regards,
-- 
Fabiano Fidêncio





More information about the Libosinfo mailing list