Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Correct way to revert back to OpenRC from Systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, West Yorkshire

PostPosted: Sat Nov 15, 2014 7:00 pm    Post subject: Correct way to revert back to OpenRC from Systemd Reply with quote

When I installed my system, I wanted to give Systemd a spin to see for myself if it was worth using. So after 3 months of using it, I've decided to move to OpenRC and have go with that.

I looked at the Systemd page that the handbook showed here and installed it with the instructions shown there: Unmerge sys-fs/udev, then add systemd and -consolekit to the global USE flags and then emerge sys-apps/systemd which also installs virtual/udev.

I'd like to clarify how to revert this in a way that Portage will allow. My thoughts are to:
    1) Unmerge sys-apps/systemd
    2) Remove the systemd and -consolekit global USE flags
    3) Emerge sys-fs/udev
    4) Then recompile any packages that have updated USE flags using emerge -avND @world


Although, I think that I possibly might need to swap steps 3 and 4.

Is it possible for someone to clarify this? Thanks.
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1677
Location: Edinburgh, UK

PostPosted: Sat Nov 15, 2014 7:45 pm    Post subject: Re: Correct way to revert back to OpenRC from Systemd Reply with quote

Hi,

rurouni_hou_ou wrote:

I'd like to clarify how to revert this in a way that Portage will allow. My thoughts are to:
    1) Unmerge sys-apps/systemd
    2) Remove the systemd and -consolekit global USE flags
    3) Emerge sys-fs/udev
    4) Then recompile any packages that have updated USE flags using emerge -avND @world


Although, I think that I possibly might need to swap steps 3 and 4.



I've not been in a similar situation before, but I have systemd in /etc/portage/package.mask and I think you would also have to emerge eudev as opposed to udev (check the forums or online on how to migrate to eudev just in case).

Best,

Alex
Back to top
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, West Yorkshire

PostPosted: Sat Nov 15, 2014 8:18 pm    Post subject: Re: Correct way to revert back to OpenRC from Systemd Reply with quote

evoweiss wrote:

I've not been in a similar situation before, but I have systemd in /etc/portage/package.mask and I think you would also have to emerge eudev as opposed to udev (check the forums or online on how to migrate to eudev just in case).


I don't have systemd in /etc/portage/package.mask so I don't know what difference that makes. Please can you explain why I would need eudev instead of udev? udev came with the stage 3 tarball so shouldn't it suffice?

Thanks for your reply.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45794
Location: 56N 3W

PostPosted: Sat Nov 15, 2014 8:45 pm    Post subject: Reply with quote

rurouni_hou_ou,

udev or eudev will be fine.
udev will be installed by default when you set USE=-systemd
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, West Yorkshire

PostPosted: Sat Nov 15, 2014 9:15 pm    Post subject: Reply with quote

NeddySeagoon wrote:

udev or eudev will be fine.
udev will be installed by default when you set USE=-systemd


So to clarify, I can safely unmerge systemd then emerge -avND which will then install udev?

Thanks.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45794
Location: 56N 3W

PostPosted: Sat Nov 15, 2014 9:28 pm    Post subject: Reply with quote

rurouni_hou_ou,

Maybe ... udev is not the problem its your replacement init and maybe your kernel command line in grub.conf too.
You have to get everything right in one go or your box won't boot.

When you unmerge systemd you will have no init system until you emerge one ...

Set USE=-systemd and choose a non systemd profile, then see what emerge -uDNpv @world tells you.
I would expect some blocks.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, West Yorkshire

PostPosted: Sat Nov 15, 2014 9:41 pm    Post subject: Reply with quote

My replacement init system and kernel command line options are not what I'm worried about; I know how to correct those. I just wanted some reassurance that I was going to remove Systemd without any problems with my method. Plus I already stated that I have another init system installed. I just need to set that one up before I switch and then remove.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45794
Location: 56N 3W

PostPosted: Sat Nov 15, 2014 10:21 pm    Post subject: Reply with quote

rurouni_hou_ou,

What happened when you did
Quote:
Set USE=-systemd and choose a non systemd profile, then see what emerge -uDNpv @world

The output will be informative.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, West Yorkshire

PostPosted: Sat Nov 15, 2014 11:30 pm    Post subject: Reply with quote

I changed USE to USE="-systemd"

Code:

~ $ emerge -uDNpv @world

These are the packages that would be merged, in order:

Calculating dependencies  ... ... ...... done!
[ebuild   R    ] sys-auth/pambase-20120417-r3  USE="cracklib sha512 -consolekit -debug -gnome-keyring -minimal -mktemp -pam_krb5 -pam_ssh -passwdqc (-selinux) -systemd*" 0 kB
[ebuild   R    ] sys-apps/busybox-1.21.0  USE="ipv6 pam static -livecd -make-symlinks -math -mdev -savedconfig (-selinux) -sep-usr -syslog -systemd*" 0 kB
[ebuild   R    ] app-admin/syslog-ng-3.4.8  USE="ipv6 pcre ssl tcpd -amqp -caps -dbi -geoip -json -mongodb -pacct -smtp -spoof-source -systemd*" 0 kB
[ebuild   R    ] sys-apps/dbus-1.8.10  USE="X -debug -doc (-selinux) -static-libs -systemd* {-test}" 0 kB
[ebuild   R    ] sys-auth/polkit-0.112-r2  USE="gtk introspection nls pam -examples -jit -kde (-selinux) -systemd*" 0 kB
[ebuild  N     ] sys-auth/consolekit-0.4.6  USE="acl pam policykit -debug -doc (-selinux) -systemd-units {-test}" 370 kB
[ebuild  N     ] sys-fs/udev-216  USE="acl firmware-loader gudev introspection kmod -doc (-selinux) -static-libs" 3,530 kB
[uninstall     ] sys-apps/gentoo-systemd-integration-4
[blocks b      ] sys-apps/gentoo-systemd-integration ("sys-apps/gentoo-systemd-integration" is blocking sys-fs/udev-216)
[uninstall     ] sys-apps/systemd-215-r3:0/2  USE="acl firmware-loader gudev introspection kmod pam policykit seccomp -audit -cryptsetup -doc -elfutils -gcrypt -http (-kdbus) -lzma -python -qrcode (-selinux) (-ssl) {-test} -vanilla" PYTHON_SINGLE_TARGET="python2_7 (-python3_2) -python3_3 -python3_4" PYTHON_TARGETS="python2_7 python3_3 (-python3_2) -python3_4"
[blocks b      ] sys-fs/udev ("sys-fs/udev" is blocking sys-apps/systemd-215-r3, sys-apps/gentoo-systemd-integration-4)
[blocks b      ] sys-apps/systemd ("sys-apps/systemd" is blocking sys-fs/udev-216)
[ebuild   R    ] virtual/udev-215  USE="-systemd*" 0 kB
[ebuild   R    ] virtual/libudev-215-r1:0/1  USE="-static-libs -systemd*" 0 kB
[ebuild   R    ] virtual/libgudev-215-r1  USE="introspection -static-libs -systemd*" 0 kB
[ebuild   R    ] sys-fs/udisks-2.1.3:2  USE="gptfdisk introspection -cryptsetup -debug (-selinux) -systemd*" 0 kB
[ebuild   R    ] net-print/cups-1.7.5  USE="X acl dbus pam ssl threads usb -debug -gnutls -java -kerberos -lprng-compat -python (-selinux) -static-libs -systemd* -xinetd -zeroconf" LINGUAS="ca es fr it ja pt_BR ru" PYTHON_TARGETS="python2_7" 0 kB
[ebuild   R    ] net-wireless/bluez-5.21-r1:0/3  USE="cups obex readline udev -debug (-selinux) -systemd* {-test}" 0 kB
[ebuild   R    ] gnome-base/gvfs-1.20.2  USE="cdda fuse gtk http udev udisks -afp -archive -avahi -bluray -gnome-online-accounts -gphoto2 -ios -libsecret -mtp -samba -systemd* {-test}" 0 kB
[ebuild   R    ] media-sound/pulseaudio-5.0-r4  USE="X alsa asyncns bluetooth caps dbus gdbm glib gtk ipv6 orc ssl tcpd udev webrtc-aec -avahi -doc -equalizer -gnome -jack -libsamplerate -lirc (-neon) (-oss) -qt4 -realtime (-system-wide) -systemd* {-test} -xen" 0 kB

Total: 15 packages (2 new, 13 reinstalls, 2 uninstalls), Size of downloads: 3,900 kB
Conflict: 3 blocks


But don't these blocks occur because I still have Systemd and and a few of it's friends (other systemd packages) installed? Wouldn't it work if I unmerged Systemd and used --depclean first?
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1772

PostPosted: Sun Nov 16, 2014 12:21 am    Post subject: Reply with quote

The emerge operation shows that it will go ahead and remove systemd for you, so those blocks are taken care of for you, and you don't need to worry about. The only thing I see, that you may want to make sure you have installed is openrc. Otherwise I don't see any issue in that output.

The only blocks you need to worry about, are the ones with a "B" (will also be listed at the bottom of the package list).
Back to top
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, West Yorkshire

PostPosted: Sun Nov 16, 2014 12:45 am    Post subject: Reply with quote

ct85711 wrote:
The emerge operation shows that it will go ahead and remove systemd for you, so those blocks are taken care of for you, and you don't need to worry about. The only thing I see, that you may want to make sure you have installed is openrc. Otherwise I don't see any issue in that output.

The only blocks you need to worry about, are the ones with a "B" (will also be listed at the bottom of the package list).


So it would be fine and dandy to go ahead and hit "y", go ahead with this?
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1772

PostPosted: Sun Nov 16, 2014 1:57 am    Post subject: Reply with quote

Yes, you'll be fine to hit yes. As it look like everything should be fine to remove systemd. After that, you just need to setup openrc, the kernel, and possibly your grub.conf. I know when I last switched to sysd and back, it wasn't too difficult. The biggest thing, is getting the kernel/grub setup to use openrc as the init. When I tried sysd and switched back (it was about 6 years ago, but I doubt it has changed since), I had my grub/kernel switch init back to openrc before I removed sysd.

So if you are really worried about it, you could always change your grub/kernel back to openrc, boot with that to ensure it works then remove sysd. This way, if something goes wrong, you have your old kernel to boot from.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45794
Location: 56N 3W

PostPosted: Sun Nov 16, 2014 9:12 am    Post subject: Reply with quote

rurouni_hou_ou,

The
Code:
[blocks b      ]
is portage doing the systemd to udev switch for you.
The
Code:
[ebuild   R    ]
is portage rebuilding things that were build agaist systemd.

As ct85711 says, you can have both systemd and openrc installed at the same time and choose between them at boot time.
Gentoo used to have a eselect init but I think its been removed now.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, West Yorkshire

PostPosted: Sun Nov 16, 2014 4:50 pm    Post subject: Reply with quote

ct85711,

So I shall set up OpenRC before hand and recompile a kernel with both OpenRC and Systemd support, then boot with OpenRC. Check that works, and then uninstall Systemd?

NeddySeagoon,

So Portage is actually really good at resolving dependencies. I kind of assumed that block meant that it couldn't be installed like when you try to install a contradicting package with APT. It seems that this is another reason why Gentoo absolutely rocks.

So a revision of the battle plan:

    1) Configure OpenRC to my needs.
    2) Re-compile my kernel to support OpenRC as well as Systemd (Just in case something goes wrong and so I can change back to it)
    3) Change GRUB to accommodate booting using OpenRC
    4) If all is dandy and well, remove the USE="-systemd" flag and emerge -avuND @world to remove Systemd and reinstall udev
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45794
Location: 56N 3W

PostPosted: Sun Nov 16, 2014 6:03 pm    Post subject: Reply with quote

rurouni_hou_ou,

Almost ...

Quote:
3) Change GRUB to accommodate booting using OpenRC
should be add a boot stanka to grub to boot using openRC.
Then systemd and open RC will both be on the grub menu. You can take the systemd option off when you are done.

Portage is fairly good at resolving blocks for you, whun its clear (to portage) what you want.
Blocks with a capital B in red, are for you to fix.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, West Yorkshire

PostPosted: Sun Nov 16, 2014 8:24 pm    Post subject: Reply with quote

NeddySeagoon,

NeddySeagoon wrote:

Quote:
3) Change GRUB to accommodate booting using OpenRC
should be add a boot stanka to grub to boot using openRC.
Then systemd and open RC will both be on the grub menu. You can take the systemd option off when you are done.


I'm not sure what you mean by stanka, plus, I have to tell the kernel to boot with Systemd by passing it init=/usr/bin/systemd/systemd but without it, it automatically tries to boot with OpenRC.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45794
Location: 56N 3W

PostPosted: Sun Nov 16, 2014 8:32 pm    Post subject: Reply with quote

rurouni_hou_ou,

Stanza. Sorry, I'm still learning the dvorak-uk keyboard layout. It was a typo.
Its like a verse in poetry.

Here is a piece from my grub.conf
Code:
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

# Boot from SSD

# 3.13.0-gentoo-r1
title Gentoo Linux 3.13.0-r1 Nouveau on SSD
root (hd4,0)
kernel /boot/3.13.0-gentoo-r1 root=UUID=ba840a47-ca9a-4a8f-a867-9ab816c4537f
initrd /boot/initrd-ssd

# 3.12.5-gentoo-ssd
title  Gentoo Linux 3.12.5 on SSD
root (hd4,0)
kernel /boot/3.12.5-gentoo-ssd root=UUID=ba840a47-ca9a-4a8f-a867-9ab816c4537f vga=0x317 video=vesafb:mtrr:3,ywrap
initrd /boot/initrd-ssd

Each block beginning "title" is the start of a stanza and boots the machine sligtly differently.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, West Yorkshire

PostPosted: Sun Nov 16, 2014 8:49 pm    Post subject: Reply with quote

NeddySeagoon,

Now I see what you mean, have a stanza for booting with Systemd, and another for booting with OpenRC.

Code:

# Load Systemd as init
menuentry 'Gentoo GNU/Linux with Systemd'
{
set root='hd0,gpt2'
linux /vmlinux-3.16.5-gentoo root=/dev/sda4 ro init=/usr/lib/systemd/systemd
}

# Load OpenRC as init
menuentry 'Gentoo GNU/Linux with OpenRC'
{
set root='hd0,gpt2'
linux /vmlinux-3.16.5-gentoo root=/dev/sda4 ro
}
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45794
Location: 56N 3W

PostPosted: Sun Nov 16, 2014 8:54 pm    Post subject: Reply with quote

rurouni_hou_ou,

Exactly.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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