You are not logged in.

#1 2008-03-15 20:39:55

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Mounting jffs2 filesystem

I'm working on a project involving embedded linux systems. I'm using a system called OpenEmbedded which autocompiles a custom linux system and creates a jffs2 image which can then be loaded onto a device's flash memory. I would like to be able to look into the jffs2 and check that things are where they are supposed to be before pushing it to flash. Can someone tell me what tools i need and what procedure I need to follow to be able to mount the image onto my Arch laptop's filesystem?
Thanks,
Basu


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#2 2008-03-17 00:12:40

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Mounting jffs2 filesystem

I suppose you need to load jffs2 kernel module (modprobe jffs2) and then just mount the image: mount -o loop <imagefile> <directory-where-to-mount>. In case the filesystem is not detected automatically, you can try adding "-t jffs2" as a parameter to mount.

I did not actually try it, since I don't have any jffs2 image files, but this should work with any filesystem.

Offline

#3 2013-06-04 14:44:10

geckos
Member
Registered: 2010-12-02
Posts: 20

Re: Mounting jffs2 filesystem

You can't mount mtd devices from loop because mtd are not block devices.... Here is how I did, if some one cares..

Install mtd-utils from aur https://aur.archlinux.org/packages/mtd-utils/

Load the modules, dump filesystem to ram, create mount point and mount it

modprobe mtdram total_size=IMAGE_SIZE_KB erase_size=128
modprobe mtdchar            
modprobe mtdblock
mkdir /media/mtdmp 
dd if=rootfs.jffs2 of=/dev/mtdblock0 
mount -t jffs2 /dev/mtdblock0 /media/mtdmp

Where the IMAGE_SIZE_KB is the size of images in kb, or simpy

du -sk rootfs.jffs2

Last edited by geckos (2013-06-04 14:46:06)

Offline

#4 2013-06-04 15:13:30

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Mounting jffs2 filesystem

Hi Geckos,

Your post is relevant, just be careful of the age of the thread; it is a bit long-in-the-tooth and I would not expect a response from any of the participants in the thread smile
https://wiki.archlinux.org/index.php/Fo … Bumping.22


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB