I have a remote computer protected with overlayroot. Currently, I write "overlayroot=disabled" in grub boot to disable it until it is rebooted, but sometimes I want to make changes using SSH. Is there a way to disable overlayroot remotely?
22 Answers
You can run overlayroot-chroot to remount the root as rw, or bind-mount the lowerdir elsewhere as rw with something like mount --bind <lowerdir> /mnt/rootrw and modify on /mnt/rootrw (potentially chrooting to it if needed).
Check the link @Melebius gave, it (at least partially) answers the question.
4My solution to this is as follows. It involves several reboots to bring the system up rw then back to ro once again.
- SSH into the system and enter a rw chroot via the following command:
sudo overlayroot-chroot - Modify the /etc/overlayroot.local.conf (docs mention that you should create a .local. rather than the default overlayroot.conf file to avoid conflict if overlayroot package ever gets updated.)
overlayroot="" - Reboot, system is now mounted rw, make changes to system. edit /etc/overlayroot.local.conf overlayroot= line back to the enabled
value (in my case:
overlayroot="tmpfs:swap=1,recurse=0"). - Reboot again, system is once again read-only.