[Ovmsdev] Garbage in /store

Stephen Casner casner at acm.org
Tue May 28 13:18:49 HKT 2019


On Fri, 21 Dec 2018, Michael Balzer wrote:

> You might consider saving the flash partition for further bug
> analysis before erasing it
> https://docs.google.com/document/d/1q5M9Lb5jzQhJzPMnkMKwy4Es5YK12ACQejX_NWEixr0/edit#heading=h.o79tlr919yab

I finally got around to fixing the corrupted /store filesystem on my
OVMS v3.0 module.  I did save the partition first, as directed by the
section of the OVMS v3 Developer Guide to which the reference above
points.  I also updated the instructions there to add an example of
how to mount the saved filesystem on macOS rather than Linux.

Looking at the whole filesystem as a raw binary file, I see that the
sector at 0x00002000 is all 0xFFs.  I don't know if that is what
caused the "vfs ls /store" command to show 128 invalid directory
entries, but after erasing the flash and rebuilding the /store
filesystem and then saving the flash partition to another file on my
Mac, there is not a sector of 0xFF like that.

Running fsck_msdos on the broken filesystem (as attached on macOS)
only shows orphaned clusters, not any invalid directory entries:

auge16> fsck_msdos /dev/disk11
** /dev/rdisk11
** Phase 1 - Preparing FAT
** Phase 2 - Checking Directories
** Phase 3 - Checking for Orphan Clusters
Found orphan cluster(s)
Fix? [yn] n
Found 25 orphaned clusters
19 files, 800 KiB free (200 clusters)
** Phase 1 - Preparing FAT
** Phase 2 - Checking Directories
** Phase 3 - Checking for Orphan Clusters
Found orphan cluster(s)
Fix? [yn] n
Found 25 orphaned clusters
19 files, 1600 KiB free (400 clusters)
** Phase 1 - Preparing FAT
** Phase 2 - Checking Directories
** Phase 3 - Checking for Orphan Clusters
Found orphan cluster(s)
Fix? [yn] n
Found 25 orphaned clusters
19 files, 2400 KiB free (600 clusters)
auge17>

                                                        -- Steve


More information about the OvmsDev mailing list