I installed Ubuntu Gnome 17.04 with overlayroot on a USB pen drive and set in /etc/overlayroot.conf:
overlayroot="tmpfs" to use tmpfs as overlay filesystem.
That works very well. However, I want to hardware-protect that Ubuntu is read-only, therefore I want to use the hardware-protected read-only mode of my USB pen drive. If I activate the hardware-protected read-only mode, I get the following error message if I boot:
error: failure writing sector 0x1088808 to `hd0'. Press any key to continue..._
Grub2 starts successfully.