Skip to content

Commit

Permalink
actions: fix fstab generated in case of FAT{12|16|32}.
Browse files Browse the repository at this point in the history
Recent changes introduced a tuned formatting of the partitions created
with FAT{12|16|32}. The issue is that fstab is generated using the fs
property which won't match the system expectations.

If the fs property is "fat", "fat12", "fat16", "fat32" or "msdos", then
fstab must use "vfat".

Signed-off-by: Aymen Zayet <[email protected]>
  • Loading branch information
azayet01 committed May 21, 2024
1 parent 84c4e58 commit de36714
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion actions/image_partition_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,17 @@ func (i *ImagePartitionAction) generateFSTab(context *debos.DebosContext) error
fs_passno = 2
}
}

fsType := m.part.FS
switch m.part.FS {
case "fat", "fat12", "fat16", "fat32", "msdos":
fsType = "vfat"
default:
break
}

context.ImageFSTab.WriteString(fmt.Sprintf("UUID=%s\t%s\t%s\t%s\t0\t%d\n",
m.part.FSUUID, m.Mountpoint, m.part.FS,
m.part.FSUUID, m.Mountpoint, fsType,
strings.Join(options, ","), fs_passno))
}

Expand Down

0 comments on commit de36714

Please sign in to comment.