From a2dcdd5574c8b05f7349be72c5d8132aabfae29f Mon Sep 17 00:00:00 2001 From: Roshan-R Date: Thu, 12 Nov 2026 17:18:54 +0530 Subject: [PATCH] manifest: fix missing GRUB console.cfg in bootc disk images The grub2.d stage mounts the image filesystems but has no bind mount connecting them to the pipeline tree. Writing console.cfg through tree:// therefore leaves the file outside the generated disk image. Change the destination to mount://boot/grub2/console.cfg and update the expected paths in the serialization tests. --- pkg/manifest/raw_bootc.go | 2 +- pkg/manifest/raw_bootc_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/manifest/raw_bootc.go b/pkg/manifest/raw_bootc.go index e8130c083b..4f7be4e301 100644 --- a/pkg/manifest/raw_bootc.go +++ b/pkg/manifest/raw_bootc.go @@ -396,7 +396,7 @@ func (p *RawBootcImage) serialize() (osbuild.Pipeline, error) { if grub2dCfg := osbuild.NewGrub2DConfigFromGrub2Config(p.OSCustomizations.Grub2Config); grub2dCfg != nil { grub2dOpts := &osbuild.Grub2DStageOptions{ Config: grub2dCfg, - Path: "tree:///boot/grub2/console.cfg", + Path: "mount://boot/grub2/console.cfg", } grub2dStage := osbuild.NewGrub2DStage(grub2dOpts) grub2dStage.Devices, grub2dStage.Mounts, err = osbuild.GenBootupdDevicesMounts(p.filename, p.PartitionTable, p.platform) diff --git a/pkg/manifest/raw_bootc_test.go b/pkg/manifest/raw_bootc_test.go index b503f5d236..c3dcf4e1f1 100644 --- a/pkg/manifest/raw_bootc_test.go +++ b/pkg/manifest/raw_bootc_test.go @@ -492,7 +492,7 @@ func TestRawBootcImageSerializeGrub2DStage(t *testing.T) { Serial: "serial --unit=0 --speed=115200", }, expectStage: true, - expectedPath: "tree:///boot/grub2/console.cfg", + expectedPath: "mount://boot/grub2/console.cfg", }, { name: "all-console-fields", @@ -502,7 +502,7 @@ func TestRawBootcImageSerializeGrub2DStage(t *testing.T) { Serial: "serial --unit=0 --speed=115200", }, expectStage: true, - expectedPath: "tree:///boot/grub2/console.cfg", + expectedPath: "mount://boot/grub2/console.cfg", }, } { t.Run(tc.name, func(t *testing.T) {