I want to modify my ZyXEL P-2812HNU-F1 dsl router by storing some extra files in /etc. However, /etc is mounted as tmpfs so changes are lost on reboot. But there's probably a way around it ;)# cat /proc/mounts rootfs / rootfs rw 0 0/dev/root / yaffs2 ro,relatime 0 0tmpfs /etc tmpfs rw,relatime 0 0[..snip..]/dev/mtdblock4 /mnt/Config yaffs2 rw,relatime 0 0/dev/mtdblock3 /mnt/firmware yaffs2 rw,relatime 0 0# touch /am-i-really-mounted-rwtouch: /am-i-really-mounted-rw: Read-only file system# cat /proc/mtd dev:    size   erasesize  namemtd0: 01e00000 00020000 rootfs,kernel1mtd1: 01e00000 00020000 rootfs,kernel2mtd2: 00ac0000 00020000 reservemtd3: 02cc0000 00020000 firmwaremtd4: 00aa0000 00020000 configmtd5: 00040000 00020000 mrd_cert1mtd6: 00040000 00020000 mrd_cert2# cat /proc/cmdline root=/dev/mtdblock0 rootfstype=yaffs2 console=ttyS0,115200 phym=128M mem=126M panic=1 vpe1_load_addr=0x87e00000M vpe1_mem=2M vpe1_wired_tlb_entries=0 # uname -aLinux router 2.6.32.42 #25 Mon Oct 5 14:41:26 CST 2015 mips unknownSo,Why is / mounted rw but actually read-only?Why are there two rootfs/kernel partitions? So the router can flash itself while running and then switch to the other upon boot?Can I safely copy the running kernel/rootfs to the other mtdblock by using dd? How do I boot from the other mtblock? I got a USB FTDI cable already.Or, is there another way to write persistent files to /etc here?
How to store files on a router's NAND without writing the whole firmware
firmware;linux
Alright, so thanks to Arkadiusz' comment, I figured out that all I had to do was mount /dev/root / -o remount,rw -t yaffs2 and presto, writable root!