metropolis: align EFI partition layout
This moves non-EFI-related data inside the ESP from under the EFI
subdirectory to the root. The data moved is never accessed from EFI and
thus shouldn't be under the EFI folder. This also aligns localstorage
with the new layout as previously it and osimage didn't agree on a
specific layout, indirectly breaking the installer.
Change-Id: I36bdc9782e181dafab40aaa85cc0b4eaf2448f6e
Reviewed-on: https://review.monogon.dev/c/monogon/+/483
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/cli/metroctl/core/install.go b/metropolis/cli/metroctl/core/install.go
index e894079..c20e38d 100644
--- a/metropolis/cli/metroctl/core/install.go
+++ b/metropolis/cli/metroctl/core/install.go
@@ -130,7 +130,7 @@
}
// Create EFI partition structure.
- for _, dir := range []string{"/EFI", "/EFI/BOOT", "/EFI/metropolis-installer"} {
+ for _, dir := range []string{"/EFI", "/EFI/BOOT", "/metropolis-installer"} {
if err := fs.Mkdir(dir); err != nil {
panic(err)
}
@@ -146,7 +146,7 @@
return fmt.Errorf("failed to copy installer file: %w", err)
}
if args.NodeParams != nil {
- nodeParamsFile, err := fs.OpenFile("/EFI/metropolis-installer/nodeparams.pb", os.O_CREATE|os.O_RDWR)
+ nodeParamsFile, err := fs.OpenFile("/metropolis-installer/nodeparams.pb", os.O_CREATE|os.O_RDWR)
if err != nil {
panic(err)
}
@@ -156,7 +156,7 @@
}
}
if args.Bundle != nil {
- bundleFile, err := fs.OpenFile("/EFI/metropolis-installer/bundle.bin", os.O_CREATE|os.O_RDWR)
+ bundleFile, err := fs.OpenFile("/metropolis-installer/bundle.bin", os.O_CREATE|os.O_RDWR)
if err != nil {
panic(err)
}