Hey all!
I wanted to write some firmware drivers on my router that I've been trying to make an openwrt image for.
Right now I am mucking about in manufacturer's firmware and wanted to check if I am able to write to /rom
for it to survive factory reset.
Touching /rom
:
root@OpenWrt:~# touch /rom test.sh
touch: /rom: Read-only file system
Tried mounting/unmounting /rom
, but nothing came of that yet, other than unmounting it makes it dissappear from df and mount /rom /mnt -rw
makes /dev/root
mounted on /mnt
.
root@OpenWrt:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 3584 3584 0 100% /rom
tmpfs 60616 168 60448 0% /tmp
/dev/mtdblock5 9856 1424 8432 14% /overlay
overlayfs:/overlay 9856 1424 8432 14% /
tmpfs 512 0 512 0% /dev
root@OpenWrt:~# mount /rom /mnt -rw
root@OpenWrt:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 3584 3584 0 100% /rom
tmpfs 60616 168 60448 0% /tmp
/dev/mtdblock5 9856 1424 8432 14% /overlay
overlayfs:/overlay 9856 1424 8432 14% /
tmpfs 512 0 512 0% /dev
/dev/root 3584 3584 0 100% /mnt
After mounting it on /mnt
the entire /rom
appears in that directory, but what to do with that - i don't know.