Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage question #23

Open
keck-in-space opened this issue Mar 10, 2020 · 2 comments
Open

Usage question #23

keck-in-space opened this issue Mar 10, 2020 · 2 comments

Comments

@keck-in-space
Copy link

Hello,

Can littlefs-fuse be used to mount an existing file system image? For example, I'm able to get the binary from the flash chip we're using with LFS... I mount this file using the method shown in the README, but no data is shown. I can create new files and they are written to the binary file, but the existing data isn't shown by ls. When I use LFS on the target, the directories are seen and the files are able to be written to. I've verified that the data does seem to be in the binary as well. The names of the directories that I've made are in there, at least.

Thank you!

@geky
Copy link
Member

geky commented Mar 20, 2020

Hi @keck-in-space, sorry for such a late response.

One step that is easy to overlook is existing filesystems need to be attached as a "loop device". (This isn't technically needed, but currently littlefs-fuse uses ioctls to get the physical block size.)

losetup /dev/loop0 image
./lfs /dev/loop0 mount

Another thing to check is that the major version of littlefs-fuse matches the major version of the disk. If the disk is v1 you would need the v1 branch of littlefs-fuse:
https://github.com/ARMmbed/littlefs-fuse/tree/v1

If that is not the issue, let us know. Though I would likely need a disk image to debug what is happening. Having all files missing is a strange bug and I'm not sure how that could happen.

@keck-in-space
Copy link
Author

Thanks, @geky! I'll make sure I'm mounting it correctly, though I think I am. I am using the latest release of littlefs and of littlefs-fuse, so I think the versioning should be OK as well. Anyway, I'll take another look at my mounting procedure and if that doesn't fix it, report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants