I have an SD card that I use overlay on:
# mkfs.ext4 /dev/mmcblk0
# mount /dev/mmcblk0 /mnt
# tar -C /overlay -cvf - . | tar -C /mnt -xf -
# umount /mnt
# block detect > /etc/config/fstab
# sed -i "s#/mnt/mmcblk0#/overlay#g" /etc/config/fstab
# sed -i "s/option\senabled\s'0'/option enabled '1'/g" /etc/config/fstab
On reboot this works. However I want to do this without rebooting as this process is part of a set of setup scripts I'm writing to setup a new device. Is this possible?
Btw, I've tried:
# /etc/init.d/fstab stop
# /etc/init.d/fstab boot
And
# mount -a
And
# block umount
# block mount
None of which work. I do not see the SD card mounted on the overlay but /dev/mtdblock6 unless I reboot the device.
Edit-
Here is # df
before reboot:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 4352 4352 0 100% /rom
...
/dev/mtdblock6 10240 2816 7424 28% /overlay
overlayfs:/overlay 10240 2816 7424 28% /
And after:
Filesystem Size Used Available Use% Mounted on
/dev/root 4352 4352 0 100% /rom
...
/dev/mmcblk0 14.5G 40.3M 13.7G 0% /overlay
overlayfs:/overlay 14.5G 40.3M 13.7G 0% /