View Single Post
  #12 (permalink)  
Old 01-22-2005
noggie noggie is offline
Registered User
 
Join Date: Sep 2004
Posts: 339
Thanks: 0
Thanked 0 Times in 0 Posts
noggie is on a distinguished road
Quote:
Originally Posted by xphile
One thing noggie. You mention you were able to mount the jffs2 partitions. When I try to mount any of these 2 partitions on PC linux as -o loop and -t jffs2 I get:

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
or too many mounted file systems

Any ideas?
Read the script I posted. As a programmer yourself, I'm sure you find that the most accurate description possible. For those who want the light version:

Jffs2 must be running on a mtd device. That's the way it's designed.

Within mtd, a small loophole has been made in that you can make a special kind of an mtd device, where the mtd API layer is put on top on top of any block device in the kernel. You need to specify the block device upon module load (or kernel startup if you're not using modules). Not exactly user-friendly, but there you go.

A loop device is of course a block device that lives on top of a regular file.

So you take a jffs2 image (a regular file), put a loop device on top it (so you can see it as a block device), load the special mtd driver pointing to that loop device, and finally mount the jffs2 filesystem on top of that simulated mtd device. Isn't Linux just wonderful?

As if that wasn't enough, jffs2 is sexually biased (byte sex, that is) and a jffs2 filesystem doesn't look the same on a big-endian machine (the dreambox) as it does on a little-endian machine (the PC). Fortunately there's a utility to do a sex-change operation on a jffs2 dump, so you have to start off by changing the endian-ness of the jffs2-file. The final stage (which I haven't bothered with in the script) is to change the file back to big-endian jffs2 when you have finished with it.

Anybody wonder why I wanted a script to remember all this crap for me?
Reply With Quote
 
Page generated in 0.13784 seconds with 9 queries