mounting jffs2 on RHEL5

By thomas, 18 November, 2008
I needed to edit the initfs filesystem on my n810 wimax. Mounting the jffs2 image was only documented for older's how I did it on my RHEL5 system. modprobe loop losetup /dev/loop0 initfs.jffs2 modprobe mtdblock modprobe block2mtd echo "/dev/loop0,128KiB" > /sys/module/block2mtd/parameters/block2mtd modprobe jffs2 That gets everything ready to mount the filesystem. mount -t jffs2 /dev/mtdblock0 /mnt If you don't have the mtdblock0 device file, you can make it (looking on the n810 I see that it's a block device major 31 minor 0 mknod /dev/mtdblock0 b 31 0 You can't edit the filesystem, so copy it off somewhere and make a new jffs2 cd -pr /mnt /tmp/foo edit things in /tmp/foo >> cd /tmp mkfs.jffs2 -r foo -o -e 128 -l -n