how to loopback mount a JFFS2 filesystem on my linux box?
Josh Boyer
jdub at us.ibm.com
Mon Jan 10 13:09:25 EST 2005
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>
Really though, we should look at making JFFS2 and/or the loopback driver
grok each other. Would be useful. Maybe a JFFS3 candidate?
josh
More information about the linux-mtd
mailing list