I can almost get this working by installing overlayroot, then adding an /etc/overlayroot.local.conf
file like this:
overlayroot_cfgdisk="disabled"
overlayroot=tmpfs
However, this bug in overlayfs is blocking my progress. That bug means NFSv3 and overlayfs currently can't play nice together for the copy-on-write functionality you're looking for. Although once that's fixed, I do think using overlayroot is probably the best way to add the needed initramfs magic.
With the above bug, you can create files in the upperdir that don't exists in the lowerdir, but the copy-up from the lowerdir to the upperdir is what's broken. So as a workaround, I recursively delete all files found in these directories when I install my rootfs on the server:
/etc/apparmor.d/cache/
/var/log/
/var/lib/ubuntu-release-upgrader/
/var/lib/update-notifier/
This gives me a more-or-less properly functioning system, enough to run the client stuff I need.
For more info, check out Dustin Kirkland's blog post on overlayroot.
overlayroot
package: http://packages.ubuntu.com/search?keywords=overlayroot – jderose Mar 16 '13 at 01:44http://askubuntu.com/questions/109413/how-do-i-use-overlayfs
– D-E-N Mar 19 '13 at 21:50