I am trying to use read-only overlayfs(no workdir and upperdir) inside custom initrd.
This works fine in completely booted OS:
mkdir /tmp/ovl1 /tmp/ovl2 /tmp/merged mount -t overlay none -o lowerdir=/tmp/ovl1:/tmp/ovl2 /tmp/merged
This also works if I use
busybox sh as shell, which has built-in mount command.
Inside initrd shell directories are successfully created, and mount command gives this error:
mount: mounting none on /tmp/merged failed: No such device
Here is output of mount command inside initrd:
rootfs on / type rootfs (... sysfs on /sys type sysfs (... proc on /proc type proc (... udev on /dev type devtmpfs (... devpts on /dev/pts type devpts (... tmpfs on /run type tmpfs (...
I got no idea how to debug this one :(
P.S. Now I use AUFS and it works fine, but it was rejected from mainline kernel and it's recommended to switch to overlayfs.