From de367146a43686e699ab119742e748d0aaaf4b8c Mon Sep 17 00:00:00 2001 From: Aymen Zayet Date: Tue, 21 May 2024 11:44:06 +0200 Subject: [PATCH] actions: fix fstab generated in case of FAT{12|16|32}. 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 --- actions/image_partition_action.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/actions/image_partition_action.go b/actions/image_partition_action.go index ab015d9d..a9288e33 100644 --- a/actions/image_partition_action.go +++ b/actions/image_partition_action.go @@ -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)) }