newaetech / sonata-rp2040

rp2040 firmware for Sonata
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

System Volume Information Invalid FAT Entry #7

Open alex-dewar opened 2 months ago

alex-dewar commented 2 months ago

When Windows connects to a USB device, it creates a System Volume Information directory and a file. In the FAT, it marks a cluster as reserved (0xFFF0), but it also marks the following cluster in an invalid way (0xFFF, which leaves a cluster chain hanging). This doesn't appear to cause any issues, but disk check utilities complain about this.

alex-dewar commented 2 months ago

This does actually cause issues with Linux guest Windows host VMs, since Windows always creates SYSTEM~1. Since the chain is invalid, Linux complains about not being able to access SYSTEM~1 and always mounts a read-only.

This can be fixed on Linux by using fsck.msdos to fix the filesystem before mounting.