how to loopback mount a JFFS2 filesystem on my linux box?
Robert P. J. Day
rpjday at mindspring.com
Mon Jan 10 13:17:18 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>
right, that's starting to bring back memories -- doing an "insmod"
with the appropriate values, or something like that. i don't suppose
you have the actual recipe? :-) you know, step by step?
> Really though, we should look at making JFFS2 and/or the loopback
> driver grok each other. Would be useful. Maybe a JFFS3 candidate?
that would be just delightful. :-)
rday
More information about the linux-mtd
mailing list