I too was initially trying to use overlay-root in Debian and couldn't get it to work. Until I did a serial debug of the boot process.
Here's what I found.
Ubuntu has a built in executable called wait-for-root, which the overlay-root calls during boot.
I believe the Debian port just used the Ubuntu code, but excluded the wait-for-root.
There is no wait-for-root exe in Debian, hence why it was not configuring the overlay.
Like @ValdikSS said you also require busybox-static package. (I left my /etc/initramfs-tools/initramfs.conf with BUSYBOX=auto)
So I created my own wait-for-root script an placed it on the $PATH. (/usr/local/sbin)
#!/bin/sh
device=${1}
timeout=${2}
#
[ "$timeout" = "0" ] && return 1
# wait-for-root writes fstype to stdout, redirect to null
until [ -b $device ]; do
echo "waiting for root device $dev"
sleep $timeout
done
I worked out that the two parameters come from the overlay-fs, device and timeout.
With that worked out I then created the overlay.local.conf, as per the instructions in /etc to overlay my NVME disk from the eMMC. (No need to edit overlay.conf)
#
# Overlay Root Config
# NVME drive 0 partition 1
#
overlayroot="device:dev=/dev/nvme0n1p1,recurse=0,timeout=5"
You need to do an update-initramfs after to place the wait-for-root in the initrd.
After a reboot I now have this:
Caveats:
You cannot do swap files/partitions in the /etc/fstab when overlayfs is activated, it will comment them out.
If you're running docker it will not work with it's built in default overlay-fs. You will need to install the fuse-overlayfs package and create a custom docker config in /etc/docker/daemon.json
Solutions: Create a swap systemd unit that starts after the overlay is active
Create the unit file in /etc/systemd/system
Name the file the same as the swap location. (In this case I named it dev-nvme0n1p2.swap, with dashes instead of /'s)
[Unit]
Description="Swap device (/dev/nvme0n1p2)"
[Swap]
What=/dev/nvme0n1p2
Options=defaults
Priority=10
[Install]
WantedBy=basic.target
Docker Daemon needs this added to it:
"storage-driver": "fuse-overlayfs",