Hi Noah,
thanks for the update, and sorry for my delayed answer.
I tested it, and must say, it provides surprisingly little gain for
overlayroot:
* I first tested it with initramfs-tools, to check through open bug reports.
* The missing e2fsprogs dependency (or more generic solution) remains
true in combination with initramfs-tools, as the hook explicitly copies
mke2fs into the initramfs.
* I could not find overlayroot depending on busybox. It worked without
it on my tests. The mount call in the mentioned script has not changed,
but maybe klibc's mount changed to make "-t" truly optional, or it
depends on the filesystem type used (tmpfs in my case).
* I did not check the /usr on separate drive topic, as IMO this is a
useless edge case. The usr-merge transition basically underlines that.
* The major open issue remains: As of GRUBs hardcodes a "ro" cmdline
entry, the overlayfs is R/O, too, which kinda defeats its purpose, and
causes e.g. the separately reported DHCP lease issue. Adding "rw" to the
cmdline via /etc/default/grub does not help, since this is only
appended, but does not replace the "ro" entry. And the overlayroot seems
to follow the "ro" entry it sees first. "ro" hence needs to be manually
removed from /boot/grub/grub.cfg, resp edited out of
/etc/grub.d/10_linux to make it permanent. A "ro" cmdline entry is
actually common, as the init system is doing the rw-remount later. So
overlayroot IMO needs to ignore it, and rw-mount by default, with an
option to switch to R/O, or the other way round.
But the topic more interesting for me was Dracut support, which however
turns out to be quite pointless:
* It does not read /etc/overlayroot.conf, hence the comment there does
not hold for Dracut, and it needs to be added to the cmdline instead.
* All it does is translating the "overlayroot" cmdline entry into
Dracut's native "rd.overlay", not even preserving options for e.g.
"overlayroot=tmpfs:<opts>". And it prints a warning that "rd.overlay"
should be used directly.
* The overlayroot-chroot command can hence not work either when using
Dracut, as its mounts the overlaying rootfs at a different location.
* It does not suffer from the "ro" issue: The overlayfs is mounted R/W
unless specified differently. Only the separate underlying rootfs mount
follows the cmdline's "ro" entry.
So when using initramfs-tools, overlayroot can do the job, but requires
some tweaks which IMO need to be addressed before this is a worthy
Debian package.
When using Dracut, just enable its overlayfs module and add "rd.overlay"
to the cmdline, to have a properly functional implementation. This
overlayroot Dracut support is just a backwards compatibility approach,
moving users to "rd.overlay", and it won't work at all for most
overlayroot users who switch to Dracut, without doing manual
adjustments, which then can better manually switch to "rd.overlay" directly.
Since Debian switches its default to Dracut, and the interest in
cloud-initramfs-tools seems to be low, dropping it for Forky might be
well an alternative. But I did not test or know anything about the other
tools provided by cloud-initramfs-tools.
Best regards,
Micha (@MichaIng)