Skip to content

Commit 3bb0d28

Browse files
Mbarak Bujramvo5
authored andcommitted
Use rootfs when generating ISO
1 parent 6a04608 commit 3bb0d28

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

bib/cmd/bootc-image-builder/image.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,12 @@ func manifestForISO(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest, erro
589589
img.RootfsType = manifest.SquashfsRootfs
590590
img.Filename = "install.iso"
591591

592+
installRootfsType, err := disk.NewFSType(c.RootFSType)
593+
if err != nil {
594+
return nil, err
595+
}
596+
img.InstallRootfsType = installRootfsType
597+
592598
mf := manifest.New()
593599

594600
foundDistro, foundRunner, err := getDistroAndRunner(c.SourceInfo.OSRelease)

bib/cmd/bootc-image-builder/main.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,19 +273,18 @@ func manifestFromCobra(cmd *cobra.Command, args []string, pbar progress.Progress
273273
}()
274274

275275
var rootfsType string
276-
if !imageTypes.BuildsISO() {
277-
if rootFs != "" {
278-
rootfsType = rootFs
279-
} else {
280-
rootfsType, err = container.DefaultRootfsType()
281-
if err != nil {
282-
return nil, nil, fmt.Errorf("cannot get rootfs type for container: %w", err)
283-
}
284-
if rootfsType == "" {
285-
return nil, nil, fmt.Errorf(`no default root filesystem type specified in container, please use "--rootfs" to set manually`)
286-
}
276+
if rootFs != "" {
277+
rootfsType = rootFs
278+
} else {
279+
rootfsType, err = container.DefaultRootfsType()
280+
if err != nil {
281+
return nil, nil, fmt.Errorf("cannot get rootfs type for container: %w", err)
282+
}
283+
if rootfsType == "" {
284+
return nil, nil, fmt.Errorf(`no default root filesystem type specified in container, please use "--rootfs" to set manually`)
287285
}
288286
}
287+
289288
// Gather some data from the containers distro
290289
sourceinfo, err := source.LoadInfo(container.Root())
291290
if err != nil {

0 commit comments

Comments
 (0)