fall back to mounting permanent storage as vfat if not ext4

This commit is contained in:
Michael Stapelberg 2021-01-04 15:19:18 +01:00
parent caded46676
commit 5a84eb5921

View File

@ -95,8 +95,12 @@ func mountfs() error {
}
dev := rootdev.Partition(rootdev.Perm)
if err := syscall.Mount(dev, "/perm", "ext4", 0, ""); err != nil {
log.Printf("Could not mount permanent storage partition %s: %v", dev, err)
for _, fstype := range []string{"ext4", "vfat"} {
if err := syscall.Mount(dev, "/perm", fstype, 0, ""); err != nil {
log.Printf("Could not mount permanent storage partition %s as %s: %v", dev, fstype, err)
} else {
break
}
}
return nil