JFFS2
From Leo's Notes
Last edited on 1 October 2022, at 21:17.
Journaling Flash File System version 2 is a filesystem used with flash memory devices. This is usually found within firmware files and can be detected by binwalk.
Extracting JFFS2 data[edit | edit source]
Most major distros should support JFFS2 already. You may however still need to install the MTD utilities.
# yum -y install mtd-utils
The simplest way to extract contents from a JFFS2 filesystem is to create a virtual flash device and then mount it.
# modprobe mtdram total_size=32768 erase_size=256
# modprobe mtdblock
## Verify
# mtdinfo
# mtdinfo /dev/mtd0
## Copy your image and mount it for extraction
# dd if=extracted.bin of=/dev/mtdblock0
# mount -t jffs2 -o ro /dev/mtdblock0 /mnt/disk
To clean up, just umount
the directory and rmmod mtdram
.
# umount /mnt/disk
# rmmod mtdram