Ive been tryna figure this out all day, Ive read the manual for systemctl and I didnt see anything about switch-root
after the initrd target. I did see a --force
option, however it didnt do anything. Before the upgrade to version 255, I would use a script or manually mount the partition, and then I would just do like systemctl switch-root /mnt
and it would just switch to the other system in an instant as if I booted it normally. But ever since this update it just prints Not in initrd, refusing switch-root operation.
and does nothing.
Is there a configuration file I can edit to allow switch-root after the initrd? Or is it like hard-coded and systemd would need patching and recompiling to allow for this? If so is there a way to just trick systemd into thinking its in the initrd and just let me switch-root?
I was dissappointed when I found out I couldnt just switch-root anymore. Any help, ideas, or suggestions will be much appreciated, thank you!
EDIT: To switch root in the new versions of systemd, you will have to mount the filesystem you want to switch root into to /run/nextroot
and run systemctl soft-reboot
, and it will switch into the root just like before.
Maybe this functionality was replaced by the next thing?
Automatic root filesystem soft-reboot: systemctl automatically reboots into a new root filesystem located at /run/nextroot/.