I successfully made overlayroot work under Debian Jessie.
Ubuntu package
I installed overlayroot_0.27ubuntu1.2_all.deb package
wget http://fr.archive.ubuntu.com/ubuntu/pool/main/c/cloud-initramfs-tools/overlayroot_0.27ubuntu1.2_all.deb
dpkg -i overlayroot_0.27ubuntu1.2_all.deb
Correcting overlayfs module name
About the following error:
Failure: overlayroot: missing kernel module overlayfs
I had to modify the /usr/share/initramfs-tools/scripts/init-bottom/overlayroot file:
Here is a diff:
diff --suppress-common-lines -r -y ./usr/share/initramfs-tools/scripts/init-bottom/overlayroot /usr/share/initramfs-tools/scripts/init-bottom/overlayroot
VARIABLES="overlayroot overlayroot_cfgdisk" | VARIABLES="overlayroot overlayroot_cfgdisk overlayroot_driver
overlayfs) | overlayfs|overlay)
mount_type="overlayfs" | mount_type="overlay"
mount_opts="${mount_opts} overlayroot ${ROOTM | mount_opts="${mount_opts} overlay ${ROOTMNT}"
mount --move "${ROOTMNT}" "${root_ro}" || | mount -o move "${ROOTMNT}" "${root_ro}" ||
mount --move ${root_ro} ${ROOTMNT} | mount -o move ${root_ro} ${ROOTMNT}
mount --move ${root_ro} "${ROOTMNT}${root_ro}" || | mount -o move ${root_ro} "${ROOTMNT}${root_ro}" ||
mount --move "${root_rw}" "${ROOTMNT}${root_rw}" || | mount -o move "${root_rw}" "${ROOTMNT}${root_rw}" ||
As you can see, I added one variable to the VARIABLES list and made some changes to mount parameters.
Here is the complete file:
I modified the /usr/share/initramfs-tools/hooks/overlayroot:
diff --suppress-common-lines -r -y ./usr/share/initramfs-tools/hooks/overlayroot /usr/share/initramfs-tools/hooks/overlayroot
manual_add_modules overlayfs | manual_add_modules overlay
Configuration
I added a file named /etc/overlayroot.local.conf (instead of modifying /etc/overlayroot.conf):
overlayroot_cfgdisk="disabled"
overlayroot="tmpfs"
overlayroot_driver="overlay"
Chrooting to R/W
Last but not least, I had to modify the overlayroot-chroot executable
diff --suppress-common-lines -r -y ./usr/sbin/overlayroot-chroot /usr/sbin/overlayroot-chroot
overlay=$(grep -m1 "^overlayroot / overlayfs " /proc/ | overlay=$(grep -m1 "^overlay / overlay " /proc/mounts
Fast-forward
I attached an archive with the modifications.
Using
tar zxvf overlayroot-debian-lauhub.tar.gz -C /
after package installation should do the trick
overlayroot-debian.tar.gz