1

How to extract content from NVRAM file? NVRAM type is SPI Serial NOR Flash. NVRAM has been copied as mtdblock partition.

An embedded device that run Linux v2.6.18_pro500.

Linux version 2.6.18_pro500 (gcc version 4.2.0 20070126 (prerelease) (MontaVista 4.2.0-2.0.0.custom 2007-02-12) 
Processor: ARMv6-compatible processor rev 4 (v6b)

MTD device contain 8 partitions, nvram mtd7 partition is jffs2 filesystem.

/proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "U-Boot"
mtd1: 00010000 00010000 "env1"
mtd2: 00010000 00010000 "env2"
mtd3: 007b0000 00010000 "UBFI1"
mtd4: 007b0000 00010000 "UBFI2"
mtd5: 000c886c 00010000 "Kernel"
mtd6: 00416800 00010000 "RootFileSystem"
mtd7: 00050000 00010000 "nvram"
5
  • Need more details. What's the device, what's the OS, etc. List anything you know about the system.
    – Igor Skochinsky
    Feb 12, 2017 at 21:29
  • By NVRAM you mean you want to pull some data from a hard drive or sad? Feb 12, 2017 at 21:50
  • I added details.
    – Lexx Luxx
    Feb 12, 2017 at 23:39
  • If it's really jffs2, then you can just extract the FS contents.
    – Igor Skochinsky
    Feb 15, 2017 at 17:30
  • Yes,nvram mtd7 partition is jffs2 filesystem.
    – Lexx Luxx
    Feb 15, 2017 at 22:02

3 Answers 3

1

Since there is no standard NVRAM format, you will need to find whatever code reads and/or writes it and analyze how it works. If the maker provides GPL source code, maybe some details can be gleaned from it. However, in some cases the format may be obvious by just looking at the data with a hex editor/viewer, e.g. see this blog.

1

According to this page, you can try this command :

dd if=/dev/mtdblock/0 bs=1 skip=4116 count=2048 | strings > /tmp/cfe.txt

0

I've solved this myself. NVRAM mtd7 partition is jffs2 filesystem, I successfully extracted content using JFFS2 filesystem extraction tool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.