Hi All,
New to openWRT filesystems and partitions, Any suggestions on the below would be helpful.
For development purposes I would want the root "/" directory to be read write,
thus allowing any file creation.
Since root dir / is mounted as ro, facing a lot of issues while exection of some scripts, errors similar to below one:
mkdir: can't create directory '/cfg/': Read-only file system
cp: can't create directory '/cfg/default/': No such file or directory
cp: can't stat '/cfg/default/ini/global.ini': No such file or directory
sed: can't create temp file '/ini/global.iniXXXXXX': Read-only file system
/sbin/wifi: eval: line 1: can't create /ini/global.ini: Read-only file system
As of now, not able to modify the squashfs /dev/mtdblock18 as a rw partition.
Below is the log from device, displaying mount and partitions.
root@RuckusAP:/# mount
/dev/mtdblock18 on / type squashfs (ro,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
ubi2:data on /writable type ubifs (rw,sync,relatime,assert=read-only,ubi=2,vol=0)
root@RuckusAP:/# cat /proc/mtd
dev: size erasesize name
mtd0: 0c000000 00020000 "rcks_wlan.main"
mtd1: 0c000000 00020000 "rcks_wlan.bkup"
mtd2: 08000000 00020000 "datafs"
mtd3: 00800000 00010000 "NOR"
mtd4: 00050000 00010000 "SBL1"
mtd5: 00010000 00010000 "MIBIB"
mtd6: 00020000 00010000 "BOOTCONFIG"
mtd7: 00080000 00010000 "ART"
mtd8: 00040000 00010000 "RPM"
mtd9: 00010000 00010000 "CDT"
mtd10: 00010000 00010000 "APPSBLENV"
mtd11: 000a0000 00010000 "APPSBL"
mtd12: 00020000 00010000 "BOOTCONFIG1"
mtd13: 00180000 00010000 "QSEE"
mtd14: 00010000 00010000 "DEVCFG"
mtd15: 00010000 00010000 "APDP"
mtd16: 00010000 00010000 "Board Data"
mtd17: 003e0000 0001f000 "kernel"
mtd18: 03546000 0001f000 "ubi_rootfs"
mtd19: 00410000 0001f000 "kernel"
mtd20: 02ef6000 0001f000 "ubi_rootfs"
mtd21: 06e13000 0001f000 "data"
Below is the snippet from image Makefile:
define Image/Build
echo "...................Image/Build/127....................." >&2
#$(call Image/Build/$(1),$(1))
dd if=$(KDIR)/root.squashfs of=$(BIN_DIR)/squashfs-root.img bs=2k conv=sync
endef
Other similar errors:
touch: /etc/config/network: Read-only file system
Thanks in adv!
DR