Fix unknown partition-type Fat32 at mount and in fstab

Only the string "fat32" and "fat16" will be replaced with vfat. If an
case sensitive "Fat32" some problems occure:
- mount: partition cannot be mounted (e.g. a fat32 efi partition)
- fstab: system won't even boot because fstab does not know the type "Fat32"
This commit is contained in:
Kai Dohmen 2017-07-03 17:20:02 +02:00 committed by Philip
parent 47ba304b0c
commit 7991e4548b
2 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,7 @@ class FstabGenerator(object):
def generate_fstab_line_info(self, partition):
""" Generates information for each fstab entry. """
filesystem = partition["fs"]
filesystem = partition["fs"].lower()
mount_point = partition["mountPoint"]
disk_name = disk_name_for_partition(partition)
is_ssd = disk_name in self.ssd_disks

View File

@ -38,7 +38,7 @@ def mount_partitions(root_mount_point, partitions):
# Create mount point with `+` rather than `os.path.join()` because
# `partition["mountPoint"]` starts with a '/'.
mount_point = root_mount_point + partition["mountPoint"]
fstype = partition.get("fs", "")
fstype = partition.get("fs", "").lower()
if fstype == "fat16" or fstype == "fat32":
fstype = "vfat"