Skip to content

Commit

Permalink
Image Customizer: Fix ISO customization. (microsoft#10885)
Browse files Browse the repository at this point in the history
In change microsoft#10789, the `imagecustomizerapi.FileSystem` type had an internal field added called `PartitionId` which is filled in by the API validity checks.

ISO to ISO customization supports cracking open the squashfs file and modifying the Live-OS. However, to do this, a temporary OS image must be created. This creation logic uses the `imagecustomizerapi.FileSystem` type but the code wasn't updated to ensure the `PartitionId` field has a value.
  • Loading branch information
cwize1 authored and JocelynBerrendonner committed Jan 23, 2025
1 parent 8ee92b1 commit 23765fe
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions toolkit/tools/pkg/imagecustomizerlib/liveosisobuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1444,16 +1444,18 @@ func (b *LiveOSIsoBuilder) createWriteableImageFromSquashfs(buildDir, rawImageFi

fileSystemConfigs := []imagecustomizerapi.FileSystem{
{
DeviceId: "esp",
Type: imagecustomizerapi.FileSystemTypeFat32,
DeviceId: "esp",
PartitionId: "esp",
Type: imagecustomizerapi.FileSystemTypeFat32,
MountPoint: &imagecustomizerapi.MountPoint{
Path: "/boot/efi",
Options: "umask=0077",
},
},
{
DeviceId: "rootfs",
Type: imagecustomizerapi.FileSystemTypeExt4,
DeviceId: "rootfs",
PartitionId: "rootfs",
Type: imagecustomizerapi.FileSystemTypeExt4,
MountPoint: &imagecustomizerapi.MountPoint{
Path: "/",
},
Expand Down

0 comments on commit 23765fe

Please sign in to comment.