Following the extroot configuration guide on a Linksys EA8300 (running OpenWrt 22.03.2, r19803-9a599fee93) I could see that there's a note stating:
This configuration will not be able to be used on devices that do not have the
/overlaypartition onmtdor on ROMs that do not have/overlaypartition at all. In the first case OpenWrt will not want to read the configuration of /etc/config/fstab(FS#2231); in the latter case you can work around it by mounting the external/additional disk directly to/.
This is my case for this router with this OpenWrt version. As df command shows, there's no /overlay partition, but a /rom/overlay (see below).
I'm not sure if I understand what would change in the process for the mentioned workaround to work. Which device should I use when configuring rootfs_data? Should I mount to /rom/overlay when configuring overlay in fstab uci commands? Should I use /rom/overlay when transferring data?
Any help would be appreciated. In fact, the outcome of this thread may be useful for the guide itself.
Thanks!
Here's some system information:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 4608 4608 0 100% /rom
tmpfs 124096 1224 122872 1% /tmp
/dev/ubi0_1 66976 9816 53704 15% /rom/overlay
overlayfs:/overlay 66976 9816 53704 15% /
tmpfs 512 0 512 0% /dev
/dev/sda1 14900552 24 14121808 0% /mnt/sda1
# cat /etc/mtab
/dev/root /rom squashfs ro,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0
/dev/ubi0_1 /rom/overlay ubifs rw,noatime,assert=read-only,ubi=0,vol=1 0 0
overlayfs:/overlay / overlay rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0 0
tmpfs /dev tmpfs rw,nosuid,noexec,noatime,size=512k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,noatime,mode=600,ptmxmode=000 0 0
debugfs /sys/kernel/debug debugfs rw,noatime 0 0
none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,noatime,mode=700 0 0
/dev/sda1 /mnt/sda1 ext4 rw,relatime 0 0
# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "sbl1"
mtd1: 00100000 00020000 "mibib"
mtd2: 00100000 00020000 "qsee"
mtd3: 00080000 00020000 "cdt"
mtd4: 00080000 00020000 "appsblenv"
mtd5: 00080000 00020000 "ART"
mtd6: 00200000 00020000 "appsbl"
mtd7: 00080000 00020000 "u_env"
mtd8: 00040000 00020000 "s_env"
mtd9: 00040000 00020000 "devinfo"
mtd10: 05800000 00020000 "kernel"
mtd11: 05500000 00020000 "rootfs"
mtd12: 05800000 00020000 "alt_kernel"
mtd13: 05500000 00020000 "alt_rootfs"
mtd14: 00100000 00020000 "sysdiag"
mtd15: 04680000 00020000 "syscfg"
# block info
/dev/mtdblock11: UUID="1117646803" VERSION="1" TYPE="ubi"
/dev/ubiblock0_0: UUID="39f04184-f6874d75-c78b30dd-13643400" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/ubi0_1: UUID="3eb5dfe2-3d73-401a-bec1-d08c7de8410f" VERSION="w5r0" MOUNT="/rom/overlay" TYPE="ubifs"
/dev/sda1: UUID="61d2fc7f-dcc6-435c-a3c3-f4513c679a80" LABEL="extroot" VERSION="1.0" MOUNT="/mnt/sda1" TYPE="ext4"
# block detect
config 'global'
optionanon_swap'0'
optionanon_mount'0'
optionauto_swap'1'
optionauto_mount'1'
optiondelay_root'5'
optioncheck_fs'0'
config 'mount'
optiontarget'/mnt/sda1'
optionuuid'61d2fc7f-dcc6-435c-a3c3-f4513c679a80'
optionenabled'0'