how to loopback mount a JFFS2 filesystem on my linux box?
Artem B. Bityuckiy
dedekind at infradead.org
Tue Jan 11 07:34:11 EST 2005
On Mon, 10 Jan 2005, Josh Boyer wrote:
> On Mon, 2005-01-10 at 11:49, Robert P. J. Day wrote:
> > i swear i once knew how to do this, but it's lost in the mists of
> > time. i used "mkfs.jffs2" to create a simple JFFS2 image, and now i
> > just want to mount it on my fedora core 3 system using a loopback
> > mount.
> >
> > i have the jffs2 and mtdcore modules currently loaded, and normally,
> > what i would try is:
> >
> > # mkdir m
> > # mount -o loop -t jffs2 <jffs2.img file> m
> >
> > but what i get is:
> >
> > # mount -o loop -t jffs2 hello.img m
> > mount: wrong fs type, bad option, bad superblock on /dev/loop0,
> > or too many mounted file systems
> > (could this be the IDE device where you in fact use
> > ide-scsi so that sr0 or sda or so is needed?)
> >
> > i *vaguely* recall needing to do a bit more work, like loading
> > another module or two. any pointers to a URL for this? thanks.
>
> You can't do that AFAIK because JFFS2 needs an MTD device. Instead, use
> mtdram to create a fake MTD device, dd the image to it, and do:
>
> # mount -t jffs2 /dev/mtdblock0 <mnt/point>
mtdblock is hardcoded to 4BM. So if you need larger, use nand/nandsim.c.
This is NAND flash simulation driver and it is configurable, so you may
configure it to have larger size.
> Really though, we should look at making JFFS2 and/or the loopback driver
> grok each other. Would be useful. Maybe a JFFS3 candidate?
AFAIK, JFFS3 is candidate for all improvements :-)
>
> josh
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
More information about the linux-mtd
mailing list