[systemd-devel] booting A/B rootfs
Darko Luketic
info at icod.de
Wed Oct 8 21:13:01 PDT 2014
Hi,
I have limited knowledge of the boot process.
I'm wondering if the following is possible with systemd.
Imagine you have 2 rootfs partitions.
You build a new rootfs on a security update or when a new version of a
listed package that has dependencies is released and extract this on
either A or B partition (A if B is the current rootfs, B if A is the
current rootfs)
The idea is, with systemd you can isolate targets. I assume you could
shutdown all services so that nothing but systemd is running.
Then unmount the current rootfs and mount the new rootfs and boot to
default target.
All without needing to poweroff or physically reboot the system.
Only if you install a new kernel a "real" reboot would be required.
Would this be possible with systemd in its current state?
Why? Minimal downtime and if the new rootfs fails for whatever reason
you could revert to the old rootfs but have a consistent userspace. Or
you could run a testing system and if the new image reports no errors
flag it stable and distribute to clients.
And if this is possible, what if... you could shutdown the current
running kernel and boot a new kernel which would in turn again run
init and boot targets.
More information about the systemd-devel
mailing list