HOW TO: boot any Spring rev release with systemd

Forum rules
Share your brain ;)
pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

HOW TO: boot any Spring rev release with systemd

Unread post by pidsley » Tue Apr 29, 2014 1:40 am

The default init for the Spring rev release (and any spin based on it) is sysv. You may not know that systemd is also included, and can easily be used instead of sysv. Or you may already know this, and you can stop reading now.

There are two ways to boot the Spring rev with systemd. The easiest is simply to add the following text to the end of the kernel boot line in /boot/grub/grub.cfg:

Code: Select all

init=/lib/systemd/systemd
Another way, and this will be useful if I ever get around to writing up busybox init, is to actually change /sbin/init to point to systemd. Please don't try this unless you are willing to fix breakage if and when it happens. To change the init, use the following commands in the Spring rev you want to change:

Code: Select all

cd /sbin
sudo mv init init.sysv
sudo ln -s /lib/systemd/systemd init
This saves the sysv init (so you can switch back later if you choose) and links init to systemd. Because you changed the init, you will now need to use this command (the first time) to reboot into systemd:

Code: Select all

sudo reboot -f
and after reboot you should be using systemd.

Even when the Spring rev uses sysv for init, it still needs systemd because udev is now part of systemd. To be completely free of systemd, we need to use eudev (the Gentoo systemd-free fork of udev) or busybox and mdev. Neither of these is a trivial change.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: HOW TO boot any Sprin rev release with systemd

Unread post by dkeg » Tue Apr 29, 2014 1:48 am

good information pids, I new to change grub to utilize systemd, but not the other ways. I also didn't know udev was part of systemd.

Work hard; Complain less

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: HOW TO: boot any Spring rev release with systemd

Unread post by pidsley » Tue Apr 29, 2014 1:54 am

Try this command in a system running sysv:

Code: Select all

ls -l /sbin/udevd
You will see

Code: Select all

/sbin/udevd -> /lib/systemd/systemd-udevd
Even LFS now uses the systemd udev. So does Gentoo unless you specifically build the eudev package. Many Gentoo users are very unhappy about this.

I have said this before, but if anything we now have more choices, not fewer. All the furor about systemd has spawned the creation and rediscovery of several alternate init systems.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: HOW TO: boot any Spring rev release with systemd

Unread post by dkeg » Tue Apr 29, 2014 2:01 am

oh wow, check that out. Yes, agreed. Competition breeds innovation

Work hard; Complain less

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: HOW TO: boot any Spring rev release with systemd

Unread post by ivanovnegro » Tue Apr 29, 2014 4:40 pm

What about installing systemd-sysv as per Debian Wiki?

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: HOW TO: boot any Spring rev release with systemd

Unread post by pidsley » Tue Apr 29, 2014 5:23 pm

ivanovnegro wrote:What about installing systemd-sysv as per Debian Wiki?
As far as I can tell, that does add the symlink, but it also removes sysv. If you add the boot parameter or manually change the init link you can change it back if you want. On one machine I have two boot entries -- one to boot with systemd, another to boot with sysv.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: HOW TO: boot any Spring rev release with systemd

Unread post by dkeg » Tue Apr 29, 2014 6:01 pm

pidsley wrote:On one machine I have two boot entries -- one to boot with systemd, another to boot with sysv.
Me too

Work hard; Complain less

User avatar
RandomCharacter
Gangbanger
Posts: 323
Joined: Thu Aug 15, 2013 5:25 pm

Re: HOW TO: boot any Spring rev release with systemd

Unread post by RandomCharacter » Tue Apr 29, 2014 10:32 pm

Hmmm. One of my main reasons to want to switch to Spring is to stop using systemd.

Tim

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: HOW TO: boot any Spring rev release with systemd

Unread post by pidsley » Tue Apr 29, 2014 11:36 pm

Yes, we know you don't like systemd. With Spring you have a choice, but as I mentioned you still get systemd udev (as with most distros today, including Gentoo unless you build eudev). To be completely free of systemd you need to use CRUX, BSD, or Slackware, or learn how to use alternate inits like busybox, runit, openrc, minit, sinit, epoch, upstart, or some others I can't think of right now or haven't heard of yet. Most of these can be built and used with Debian or any other distro.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: HOW TO: boot any Spring rev release with systemd

Unread post by GekkoP » Tue May 06, 2014 2:53 pm

Thanks for this. Didn't know about systemd-udevd.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: HOW TO: boot any Spring rev release with systemd

Unread post by machinebacon » Tue May 20, 2014 3:21 pm

lovely post, thank you for your work!
..gnutella..

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: HOW TO: boot any Spring rev release with systemd

Unread post by GekkoP » Tue Jun 03, 2014 11:24 am

Works like a charm. Just did this on my Elektra - because I want to keep sysv and I want to read Pidsley's guide on busybox ;)

Post Reply