How to mount a jffs2 biffer's image

570 views
Skip to first unread message

Konstantinos Aravanis

unread,
Jul 6, 2012, 6:26:07 AM7/6/12
to biffe...@googlegroups.com
Hello,

I am trying to mount a biffer's jffs2 image on my Desktop but I am unable to do that.

The commands I had run on both Debian and Ubuntu are the following:

# apt-get install mtd-tools
# modprobe -v mtd
# modprobe -v jffs2
# modprobe -v mtdram total_size=256000 erase_size=256
# modprobe -v mtdchar
# modprobe -v mtdblock
# dd if=openwrt-rdc-jffs2-64k-bifferboard.img of=/dev/mtd0  
10064+1 records in
10064+1 records out
5152772 bytes (5.2 MB) copied, 0.0752968 s, 68.4 MB/s
# mount -t jffs2 /dev/mtdblock0 ~/mnt_img 

If I do
 
# ls -la ~/mnt_img 

I get

total 4
drwxr-xr-x  3 root root    0 Jan  1  1970 .
drwxr-xr-x 26 root root 4096 Jun 19 10:32 ..
 
Is something that I am doing wrong?

Thanks in advance,
Kostas Aravanis

Andrew Scheller

unread,
Jul 6, 2012, 7:47:33 AM7/6/12
to biffe...@googlegroups.com
It's not something I've ever done myself, but I did a bit of googling and found
http://www.elinux.org/File_Systems#Mounting_JFFS2_image_on_PC_using_mtdram

I notice that in the steps you posted, you've used both /dev/mtd0 and
/dev/mtdblock0 which /may/ explain why things aren't working?

Lurch

Konstantinos Aravanis

unread,
Jul 6, 2012, 8:25:14 AM7/6/12
to biffe...@googlegroups.com
Hi,

Sorry this was a wrong copy paste.

Even though I tried the 

jffs2dump -b -c -e fix_endianess.img openwrt-rdc-jffs2-64k-bifferboard.img 

to fix the endianess, if there was a problem with that, the command either seems to fail or it just doesn't solve my problem.

The results of the command:

Wrong bitmask  at  0x00000000, 0xea05
Empty space found from 0x00003268 to 0x0000326c
Wrong hdr_crc  at  0x0007a22c, 0x0e2fe0b2 instead of 0x20a74021
Wrong bitmask  at  0x0007a230, 0xe5d2
Empty space found from 0x000d03a4 to 0x000d03a8
Empty space found from 0x000d0894 to 0x000d0898
Empty space found from 0x000d1978 to 0x000d197c
Empty space found from 0x000d2060 to 0x000fa000
Empty space found from 0x00169cc4 to 0x00169cc8
Empty space found from 0x00179df8 to 0x00179dfc
Empty space found from 0x00199da0 to 0x00199da4
Empty space found from 0x00199e90 to 0x00199e94
Empty space found from 0x00199f8c to 0x00199f90
Empty space found from 0x001a9f90 to 0x001aa000
Wrong hdr_crc  at  0x001b1c48, 0xce491417 instead of 0x0091e116
Wrong bitmask  at  0x001b1c4c, 0x0812
Empty space found from 0x001b9f64 to 0x001ba000
Wrong hdr_crc  at  0x001bb0fc, 0x900e28f6 instead of 0x8eb33d25
Wrong bitmask  at  0x001bb100, 0x541a
Wrong hdr_crc  at  0x001d01f8, 0x66d6d435 instead of 0x26b8b265
Wrong bitmask  at  0x001d01fc, 0x70e5
Empty space found from 0x001d9ddc to 0x001d9de0
Wrong hdr_crc  at  0x001f8638, 0x90c4ed6b instead of 0xe65fd213
Wrong bitmask  at  0x001f863c, 0x0b81
Empty space found from 0x00219fcc to 0x0021a000
Wrong hdr_crc  at  0x0022ece4, 0x33c5d85f instead of 0x067ccfe3
Wrong bitmask  at  0x0022ece8, 0x767a
Wrong hdr_crc  at  0x00265dd4, 0x11b492db instead of 0x0e05d177
Wrong bitmask  at  0x00265dd8, 0x6724
Wrong hdr_crc  at  0x0026d834, 0xab458435 instead of 0x226d7e14
Wrong bitmask  at  0x0026d838, 0xcd76
Empty space found from 0x002b1e00 to 0x002b1e04
Wrong hdr_crc  at  0x002cf25c, 0xf957883e instead of 0x56e1efde
Wrong bitmask  at  0x002cf260, 0xed8f
Wrong hdr_crc  at  0x002d61e4, 0x4c19d892 instead of 0x9afc87c8
Wrong bitmask  at  0x002d61e8, 0x200e
Wrong hdr_crc  at  0x002db838, 0xb2d98442 instead of 0xaf145979
Wrong bitmask  at  0x002db83c, 0xfca5
Empty space found from 0x002e9f08 to 0x002e9f0c
Wrong hdr_crc  at  0x0031eea4, 0xc20c177e instead of 0x1c5da33a
Wrong bitmask  at  0x0031eea8, 0xaa33
Wrong hdr_crc  at  0x0033f9cc, 0xd8791564 instead of 0xf2741310
Wrong bitmask  at  0x0033f9d0, 0x2167
Empty space found from 0x00379fd8 to 0x0037a000
Empty space found from 0x00398818 to 0x0039881c
Empty space found from 0x003b9f84 to 0x003ba000
Empty space found from 0x003d9fd0 to 0x003da000
Wrong hdr_crc  at  0x003df014, 0xa7a64636 instead of 0x6dee30f4
Wrong bitmask  at  0x003df018, 0x5e3e
Empty space found from 0x003e9c64 to 0x003e9c68
Empty space found from 0x003f9940 to 0x003f9944
Empty space found from 0x003f9a70 to 0x003f9a74
Empty space found from 0x003f9ac4 to 0x003f9ac8
Empty space found from 0x003f9be4 to 0x003f9be8
Empty space found from 0x003f9cd4 to 0x003f9cd8
Empty space found from 0x003f9d64 to 0x003f9d68
Wrong hdr_crc  at  0x0043398c, 0x8dc3dbe2 instead of 0xa286c326
Wrong bitmask  at  0x00433990, 0x0cdf
Empty space found from 0x00449f58 to 0x0044a000
Wrong hdr_crc  at  0x004b1748, 0x6bb92c06 instead of 0xfddf5ade
Wrong bitmask  at  0x004b174c, 0x899c
Empty space found from 0x004d9b84 to 0x004d9b88
Empty space found from 0x004e0b04 to 0x004ea000
Wrong bitmask  at  0x00000000, 0xea05
Wrong bitmask  at  0x00000004, 0x078c
Wrong bitmask  at  0x00000008, 0xd88e
Wrong bitmask  at  0x0000000c, 0xd031
Wrong bitmask  at  0x00000010, 0xfcbe
Wrong bitmask  at  0x00000014, 0xac20
Wrong bitmask  at  0x00000018, 0x09b4
Wrong bitmask  at  0x0000001c, 0x0700
Wrong bitmask  at  0x00000020, 0xebf2
Wrong bitmask  at  0x00000024, 0xcd16
Wrong bitmask  at  0x00000028, 0xeaf0
Wrong bitmask  at  0x0000002c, 0xf044
Wrong bitmask  at  0x00000030, 0x6563
Wrong bitmask  at  0x00000034, 0x626f
Wrong bitmask  at  0x00000038, 0x696e
Wrong bitmask  at  0x0000003c, 0x6672
Wrong bitmask  at  0x00000040, 0x2066
Wrong bitmask  at  0x00000044, 0x7070
Wrong bitmask  at  0x00000048, 0x6973
Wrong bitmask  at  0x0000004c, 0x6f20
Wrong bitmask  at  0x00000050, 0x6e67
Wrong bitmask  at  0x00000054, 0x2073
Wrong bitmask  at  0x00000058, 0x706f
Wrong bitmask  at  0x0000005c, 0x6564
Wrong bitmask  at  0x00000060, 0x0a50
Wrong bitmask  at  0x00000064, 0x6173
Wrong bitmask  at  0x00000068, 0x7573
Wrong bitmask  at  0x0000006c, 0x6120
Wrong bitmask  at  0x00000070, 0x6f74
Wrong bitmask  at  0x00000074, 0x6f61
Wrong bitmask  at  0x00000078, 0x7220
Wrong bitmask  at  0x0000007c, 0x6f67
Wrong bitmask  at  0x00000080, 0x6d20
Wrong bitmask  at  0x00000084, 0x7374
Wrong bitmask  at  0x00000088, 0x642e
Wrong bitmask  at  0x0000008c, 0x0a52
Wrong bitmask  at  0x00000090, 0x6f76
/* this happens repeatedly */ 
Wrong bitmask  at  0x0007a1e0, 0xc83c
Wrong bitmask  at  0x0007a1e4, 0x775a
Wrong bitmask  at  0x0007a1e8, 0x44e7
Wrong bitmask  at  0x0007a1ec, 0x2833
Wrong bitmask  at  0x0007a1f0, 0xfbbd
Wrong bitmask  at  0x0007a1f4, 0x8e4c
Wrong bitmask  at  0x0007a1f8, 0x1f05
Wrong bitmask  at  0x0007a1fc, 0x2f2a
Wrong bitmask  at  0x0007a200, 0x28c6
Wrong bitmask  at  0x0007a204, 0xdda9
Wrong bitmask  at  0x0007a208, 0xb040
Wrong bitmask  at  0x0007a20c, 0x14ef
Wrong bitmask  at  0x0007a210, 0x6f7d
Wrong bitmask  at  0x0007a214, 0xd9cb
Wrong bitmask  at  0x0007a218, 0x84d1
Wrong bitmask  at  0x0007a21c, 0x67a6
Wrong bitmask  at  0x0007a220, 0x6744
Wrong bitmask  at  0x0007a224, 0x71ce
Wrong bitmask  at  0x0007a228, 0xc813
Wrong hdr_crc  at  0x0007a22c, 0x0e2fe0b2 instead of 0x20a74021
Unknown node type: 0x382c at 0x0007a22c, totlen 0xe5d21842


--
To unsubscribe send email to bifferboard...@googlegroups.com



--
Konstantinos Aravanis // sbosx
My site & blog: http://AravanisKostas.com
http://python.org.gr - Ελληνική Κοινότητα Προγραμματιστών Python

Andrew Scheller

unread,
Jul 6, 2012, 8:45:32 AM7/6/12
to biffe...@googlegroups.com
There's no need to switch endianess - bifferboard is x86, just like
your desktop PC, so both little-endian.

Lurch

Konstantinos Aravanis

unread,
Aug 17, 2012, 7:37:24 AM8/17/12
to biffe...@googlegroups.com
Hello,

I was unable to mount the jffs2 image.

A work around for me is either to backup the whole OS through with the use of tar and ssh.

ssh user@ip "tar cv /bin" > bifferos_bin.tar
ssh user@ip "tar cv /usr" > bifferos_usr.tar
etc...

Kostas


Lurch

--
To unsubscribe send email to bifferboard...@googlegroups.com

Andrew Scheller

unread,
Aug 17, 2012, 7:51:42 AM8/17/12
to biffe...@googlegroups.com
> I was unable to mount the jffs2 image.
>
> A work around for me is either to backup the whole OS through with the use
> of tar and ssh.
>
>> ssh user@ip "tar cv /bin" > bifferos_bin.tar
>> ssh user@ip "tar cv /usr" > bifferos_usr.tar
>> etc...

In your first post you were trying to mount the
openwrt-rdc-jffs2-64k-bifferboard.img as a readable image on your PC
(i.e. before it had been flashed to the bifferboard).
And now you're creating a backup of files from your bifferboard back to your PC.

These are conceptually quite different tasks - could you explain what
your "end goal" is? There might be an easier way to do whatever it is
you're attempting...

Lurch

Konstantinos Aravanis

unread,
Aug 17, 2012, 7:59:47 AM8/17/12
to biffe...@googlegroups.com
My attempt was to extract the whole OS's files... It would be easier for me if I could do that by mounting the jffs2 image...

But this also works.

The reason that I wanted to get the files was to make an "upgrade" process for the OpenWrt by downloading only the files that had changed between the old image and the new one. For now on this procedure seems to work!

ps: I thought that I had written about what I wanted to do! This is the reason I send this mail too. So that if anyone had the same problem to get an answer!

Kostas


Lurch

--
To unsubscribe send email to bifferboard...@googlegroups.com

Andrew Scheller

unread,
Aug 17, 2012, 8:32:09 AM8/17/12
to biffe...@googlegroups.com
> My attempt was to extract the whole OS's files... It would be easier for me
> if I could do that by mounting the jffs2 image...

Ah, in that case you should probably take a look at the
openwrt/staging_dir/target-i386_uClibc-0.9.32/root-rdc/ directory :-)

[creating a backup using tar and ssh]
> But this also works.

That will also include the files that get modified/created at
first-boot though, so isn't /quite/ the same ;)

> The reason that I wanted to get the files was to make an "upgrade" process
> for the OpenWrt by downloading only the files that had changed between the
> old image and the new one. For now on this procedure seems to work!

Of course that will only work if the files you want to 'upgrade'
aren't locked as in-use by the running OS (which you may be able to
work around by stopping any services etc. before running your
upgrade). And also won't work if the part you're wanting to upgrade is
the kernel itself (which is stored directly in the Bifferboard's flash
memory, not as part of the jffs2 image).

Lurch

Konstantinos Aravanis

unread,
Aug 20, 2012, 8:33:44 AM8/20/12
to biffe...@googlegroups.com
Thanks for the information... I will consider all of them.


Lurch

--
To unsubscribe send email to bifferboard...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages