Consume Disks section from attendedconfig.json in ISO attendedinstaller#17897
Open
chriso-ms wants to merge 1 commit into
Open
Consume Disks section from attendedconfig.json in ISO attendedinstaller#17897chriso-ms wants to merge 1 commit into
chriso-ms wants to merge 1 commit into
Conversation
dmcilvaney
reviewed
Jul 2, 2026
| bootPartitionFsType = "fat32" | ||
| bootPartitionStartMiB = 1 | ||
| bootPartitionEndMiB = 9 | ||
| defaultBootStartMiB = 1 |
Contributor
There was a problem hiding this comment.
Formatter isn't happy here, run make go-tidy-all and should update, or apply:
diff --git a/toolkit/tools/imagegen/attendedinstaller/views/diskview/autopartitionwidget/autopartitionwidget.go b/toolkit/tools/imagegen/attendedinstaller/views/diskview/autopartitionwidget/autopartitionwidget.go
index 34d8507325..a6a62e78ce 100644
--- a/toolkit/tools/imagegen/attendedinstaller/views/diskview/autopartitionwidget/autopartitionwidget.go
+++ b/toolkit/tools/imagegen/attendedinstaller/views/diskview/autopartitionwidget/autopartitionwidget.go
@@ -132,10 +132,10 @@ func (ap *AutoPartitionWidget) mustUpdateConfiguration(sysConfig *configuration.
targetDiskType = "path"
partitionTableType = "gpt"
- bootPartitionName = "esp"
- bootPartitionFsType = "fat32"
- defaultBootStartMiB = 1
- defaultBootEndMiB = 9
+ bootPartitionName = "esp"
+ bootPartitionFsType = "fat32"
+ defaultBootStartMiB = 1
+ defaultBootEndMiB = 9
rootPartitionName = "rootfs"
rootFsType = "ext4"
dmcilvaney
reviewed
Jul 3, 2026
Comment on lines
+152
to
+164
| switch partition.ID { | ||
| case bootPartitionName: | ||
| if partition.Start > 0 { | ||
| bootPartitionStartMiB = partition.Start | ||
| } | ||
| if partition.End > partition.Start { | ||
| bootPartitionEndMiB = partition.End | ||
| } | ||
| case rootPartitionName: | ||
| if partition.Start > 0 { | ||
| rootPartitionStartMiB = partition.Start | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
Bunch of our configs use a different name, this is probably more stable long-term.
Suggested change
| switch partition.ID { | |
| case bootPartitionName: | |
| if partition.Start > 0 { | |
| bootPartitionStartMiB = partition.Start | |
| } | |
| if partition.End > partition.Start { | |
| bootPartitionEndMiB = partition.End | |
| } | |
| case rootPartitionName: | |
| if partition.Start > 0 { | |
| rootPartitionStartMiB = partition.Start | |
| } | |
| } | |
| switch { | |
| case partition.HasFlag(configuration.PartitionFlagESP): | |
| if partition.Start > 0 { | |
| bootPartitionStartMiB = partition.Start | |
| } | |
| if partition.End > partition.Start { | |
| bootPartitionEndMiB = partition.End | |
| } | |
| case partition.ID == rootPartitionName: | |
| if partition.Start > 0 { | |
| rootPartitionStartMiB = partition.Start | |
| } | |
| } |
dmcilvaney
reviewed
Jul 3, 2026
| // New creates and returns a new AttendedInstaller. | ||
| func New(cfg configuration.Config, installationFunc func(configuration.Config, chan int, chan string) error, calamaresInstallFunc func() error) (attendedInstaller *AttendedInstaller, err error) { | ||
| finalConfig := configuration.Config{ | ||
| Disks: append([]configuration.Disk{}, cfg.Disks...), |
Contributor
There was a problem hiding this comment.
Probably out of scope for this fix, but the partition customization tool ignores these (manualpartitionwidget.go). @chriso-ms do you care about that use case at all?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The autopartitionwidget in the ISO attended installer uses its hardcoded size of 8MB for the esp partition and does not consume the configs in the Disks section. As a result, the size of the esp partition of the installed ISO cannot be changed.
Update attendedinstaller to include the Disks section and adjust partitions in the autopartitionwidget according to the config.