m/installer/install: embed bios_bootcode
We have a BIOS bootcode which displays a message that only UEFI boot is
supported, but this was not installed anywhere. Now it's included in the
installer and in installed nodes.
Change-Id: I319fcd30ad3eacbfdcb9bf7d95925e51ff896570
Reviewed-on: https://review.monogon.dev/c/monogon/+/4378
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/cli/metroctl/core/install.go b/metropolis/cli/metroctl/core/install.go
index 31fe4a0..5a41fc7 100644
--- a/metropolis/cli/metroctl/core/install.go
+++ b/metropolis/cli/metroctl/core/install.go
@@ -47,7 +47,8 @@
if err != nil {
return fmt.Errorf("failed to read OS image: %w", err)
}
- bootPath, err := install.EFIBootPath(osImage.Config.ProductInfo.Architecture())
+ architecture := osImage.Config.ProductInfo.Architecture()
+ bootPath, err := install.EFIBootPath(architecture)
if err != nil {
return err
}
@@ -88,6 +89,9 @@
if err != nil {
return fmt.Errorf("target device has invalid geometry: %w", err)
}
+ if architecture == "x86_64" {
+ partTable.BootCode = install.BootcodeX86
+ }
esp := gpt.Partition{
Type: gpt.PartitionTypeEFISystem,
Name: "MetropolisInstaller",