I recently upgraded to 22.03.2 on my WRT1900ACS and wanted to setup the extroot. So I've been following the extroot configuration wiki page, but I'm hitting a snag at the second section. For one, I think the example doesn't setup the mount via uci correctly. Shouldn't it be using uci add fstab mount and then adding the options like uci set fstab.@mount[-1].device="${DEVICE}"'? I'm guessing that section is from a previous way of adding mounts. Does it still work on 22.03.2?
Second, my rootfs_data is a UBIFS which is on top of an MTD, but the MTD has name ubi. So grepping for rootfs_data as suggested does not work. My question here is, is my case the general case or does the wiki suggestion work on some targets?
Third and more importantly, it seems that because my rootfs_data is on a UBIFS it won't be mounted at another mount point if its already mounted (whereas I've tested that both vfat and xfs filesystems will). So this section can't work when rootfs_data is on UBIFS. Did OpenWRT which to UBIFS in the last 4 years or is this different for different devices and this wiki section is valid only on devices that don't have rootfs_data on a UBIFS?
So considering that the intention behind that wiki section doesn't work (on my device at least) are there suggestions for getting it to work? I was hoping to add a uci fstab config to bind mount /overlay to /rwm, but my understanding is that bind mounts are unsupported there. And even if they were, how could I ensure that the bind mount happened before the overlayfs was mounted over /?
It does. If it works on 21.02.x and Snapshot, it works on 22.03.
Not on your platform. the statement does come with a caveat.
FWIW, I used the wiki to add ExtRoot on my production WRT1900ACS starting from 21.02.3 through 21.02.5 as well as on my lab 1900ACS running Snapshot. Not a hitch.
Thanks for the reply and confirmation that it can work.
Yes, I've now gotten it to work. My issue was that I was using the XFS filesystem as the extroot filesystem. This file system is unsupported by block and it will say as such when running block extroot. However, that output is not output as a log message to the serial console. So this is all I see from the log messages printed to the serial console:
[ 9.549305] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[ 9.559488] block: extroot: device not present, retrying in 15 seconds
[ 24.587169] block: extroot: cannot find device with UUID 5a26d355-dfd0-4958-860a-90145755a23a
[ 24.597956] mount_root: switching to ubifs overlay
So a UBIFS can be can mounted two multiple locations simultaneously (I wasn't passing -t ubifs to mount so it was failing). However, it appears that mount_root and block have artificial restrictions that disallow a block device from being mounted multiple times.
[ 49.734334] mount_root: rootfs_data:/dev/ubi0_1 is already mounted as /overlay
root@Xela:/# block mount
block: /dev/ubi0_1 is already mounted on /overlay
So, I think the wiki section on mounting /rwm is incorrect for any rootfs_data filesystem type, UNTIL the extroot is working (because then that filesystem will not be already mounted and mount_root will mount it). This should be better explained on the wiki.