Wipe and reinstall a running Linux system via SSH (2017)
A script to completely take over a running Linux system remotely, allowing you to log into an in-memory rescue environment, unmount the original root filesystem, and do anything you want, all without rebooting. This allows you to keep (a new copy of) the existing init system running, as well as essential daemons, and then go back to the original root filesystem once you’re done. This is a more useful version if, for example, you want to resize the original root filesystem or re-configure disk partitions, but not actually install a different distro, and you want to avoid rebooting at all.
Source: github.com