Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Safe migration from OpenRC to Systemd
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message

Joined: 11 Oct 2014
Posts: 3

PostPosted: Sat Oct 11, 2014 10:22 pm    Post subject: Safe migration from OpenRC to Systemd Reply with quote

Hello all,

After installing my distro, I enable systemd use flag and selected a systemd profile with eselect. However, I continue seing "OpenRC starting" at boot: am I running some risks by having two init systems on the same machines ? How can I make sure systemd is used and OpenRC not anymore ? If I can, will I be able to simply drop OpenRC without being stuck at boot or by running some programs ?

Thanks for tips :-)
Back to top
View user's profile Send private message

Joined: 09 Dec 2006
Posts: 7605
Location: Goose Creek SC

PostPosted: Sat Oct 11, 2014 10:37 pm    Post subject: Reply with quote :
Booting with systemd[edit]
In order to run systemd, you have to switch the init that your executable kernel (or your initramfs) uses.

The services that you have set up in your previous service manager will not be automatically started, this is because you are switching to a different service manager; it order to obtain back functionality like for example the networking or a login manager, you will need to enable and start these services again. More information about this follows in the services section later in this article.
In case your migration yields a broken state, you can always opt to boot back into the default service manager (OpenRC) by undoing this init change step; allowing you to use the troubleshooting section at the end of this article to fix the problem.
The following subsections document how to switch the init in one of the boot managers or the kernel.

Grub Legacy (0.x)[edit]
The init=/usr/lib/systemd/systemd argument should be added to the kernel command-line. An example excerpt from grub.conf would look like:

[Collapse] File/boot/grub/grub.confExample GRUB config for systemd
title=Gentoo with systemd
root (hd0,0)
kernel /vmlinuz root=/dev/sda2 init=/usr/lib/systemd/systemd
Should the system boot using openrc, try using real_init instead of init

Grub 2[edit]
If using the grub2-mkconfig configuration generator, add the init option to GRUB_CMDLINE_LINUX.

[Collapse] File/etc/default/grubExample grub2-mkconfig config for systemd
# Append parameters to the linux kernel command line
If writing a configuration by hand (experts only), append the init parameter to the linux or linux16 command.

[Collapse] File/boot/grub/grub.cfgExample GRUB2 configuration fragment
linux /vmlinuz-3.10.9 root=UUID=508868e4-54c6-4e6b-84b0-b3b28b1656b6 init=/usr/lib/systemd/systemd
If using genkernel-next's initrd, use real_init instead of init.

In kernel config[edit]
You can also set this in your kernel configuration. See "Processor type and features" -> "Built-in kernel command line". Note that this technique works for both grub and grub2.

Setting root password[edit]
At this point you might also want to set your root password. If something goes wrong, systemd would prompt for root password to go into maintenance mode.

Defund the FCC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum