Recommended way to setup systemd init

Hi, I’ve mistakenly removed systemd-sysvcompat package, and my system went unbootable. I’ve booted editing GRUB kernel line, but now I’m reading about this issue, and found this package is just a workaround to link /sbin/init to /lib/systemd/systemd. So, I have here a question: What is the recommended way to setup this, if I have a pure systemd OS? I see multiple options here:

  • Reinstall systemd-sysvcompat (seems unnecessary to me)
  • Manually create a symbolic link to /lib/systemd/systemd on /sbin/init
  • Modify GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub (idk if this would work)
  • Manually adding an init= line in /boot/grub/grub.cfg (I think this will be overwritten on each kernel or GRUB update)
  • Is there any option to config init line in /etc/default/grub?

You don’t need to change the Grub config, unless you use encryption and want to unlock the partition after the bootloader.

You don’t need to link to /sbin/init or edit the grub config manually.

But the important part is to modify the hooks in mkinitcpio.conf . You need to switch form the busybox hooks to the systemd hooks. After that rebuild your kernel images. To run update-grub should not be necessary, but you can do it.

1 Like

It worked flawlessly! I just replaced udev with systemd and keymap with sd-console in HOOKS line there; then ran mkinitcpio -P and then rebooted, and now it works perfect. Thanks!!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.