Skip to content

Make installed rootfs configurable for when generating an ISO #935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bib/cmd/bootc-image-builder/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,12 @@ func manifestForISO(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest, erro
img.RootfsType = manifest.SquashfsRootfs
img.Filename = "install.iso"

installRootfsType, err := disk.NewFSType(c.RootFSType)
if err != nil {
return nil, err
}
img.InstallRootfsType = installRootfsType

mf := manifest.New()

foundDistro, foundRunner, err := getDistroAndRunner(c.SourceInfo.OSRelease)
Expand Down
21 changes: 10 additions & 11 deletions bib/cmd/bootc-image-builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,19 +273,18 @@ func manifestFromCobra(cmd *cobra.Command, args []string, pbar progress.Progress
}()

var rootfsType string
if !imageTypes.BuildsISO() {
if rootFs != "" {
rootfsType = rootFs
} else {
rootfsType, err = container.DefaultRootfsType()
if err != nil {
return nil, nil, fmt.Errorf("cannot get rootfs type for container: %w", err)
}
if rootfsType == "" {
return nil, nil, fmt.Errorf(`no default root filesystem type specified in container, please use "--rootfs" to set manually`)
}
if rootFs != "" {
rootfsType = rootFs
} else {
rootfsType, err = container.DefaultRootfsType()
if err != nil {
return nil, nil, fmt.Errorf("cannot get rootfs type for container: %w", err)
}
if rootfsType == "" {
return nil, nil, fmt.Errorf(`no default root filesystem type specified in container, please use "--rootfs" to set manually`)
}
}

// Gather some data from the containers distro
sourceinfo, err := source.LoadInfo(container.Root())
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions bib/data/defs/fedora-42.yaml
Loading