You are not logged in.
I managed to boot my arch linux system's initramfs with chroot rather that switch_root. systemd-udevd loads up fine and I managed to login to my desktop environent. To accomplish that I ran
[rootfs]# exec chroot /new_root /usr/lib/systemd/systemd
in the mkinitcpio initramfs emergency shell.
and it was successful. Are there any drawbacks switching the root like that over:
[rootfs]# exec switch_root /new_root /usr/lib/systemd/systemd
Last edited by diyfan (2022-12-09 05:39:29)
Offline
Looking at the man pages of both commands switch_root starts systemd as init , while chroot executes it as a command .
combining that with https://wiki.archlinux.org/title/Arch_boot_process indicates switch_root executes at final stage of early userspace .
chroot appears to be executed after the boot process has finished .
To me this suggests switch_root and chroot are so different they also have very different usecases .
What is your usecase ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline