You are not logged in.

#1 2012-10-06 15:48:22

Tae
Member
From: Santiago, Chile
Registered: 2010-08-31
Posts: 32
Website

/sbin/init does not exist. Can I recover it? [Solved]

Hi there:

Last night I switched to a pure systemd installation without problems, so today I decided to remove systemd-sysvcompat (believing that it was only necessary for the mixed systemd/initscripts installation) just to discover that without that package my sistem won't boot anymore:

ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good look.

sh: can't access tty: job control turned off
[rootfs /]#

Is there a way to manually reinstall that package or do I must reinstall the entire system?

Thanks beforehand.

Last edited by Tae (2012-10-06 16:17:00)

Offline

#2 2012-10-06 15:51:48

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: /sbin/init does not exist. Can I recover it? [Solved]

Append, init=/bin/systemd to your bootloader command line, boot, then reinstall systemd-sysvcompat.  I am not sure where you got the idea that you shoudl take it off, but in the future, maybe you should look to see what something is becore you do something like that.  If you juct checked it out, you would have seen that it is just a package of symlinks to the native systemd commands.

Offline

#3 2012-10-06 15:53:09

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,700
Website

Re: /sbin/init does not exist. Can I recover it? [Solved]

No need to reinstall the system, there are two fixes - one that would be easier and should probably work - the other only slightly less easy and will definitely work:

1) edit your bootloader kernel line and append the following:

init=/bin/systemd

This should allow you to boot into your system normally, run pacman to install systemd-sysvcompat, then all should be fixed.

2) If the above fails, you can boot a live media and chroot to fix your system.  Even better if you have a live media with the install scripts (installation iso) then you can just mount your root partition and `pacstrap /mnt systemd-sysvcompat.

edit: too slow (and had wrong path)

Last edited by Trilby (2012-10-06 15:54:36)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#4 2012-10-06 15:54:44

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,428
Website

Re: /sbin/init does not exist. Can I recover it? [Solved]

Boot off of you Arch install media, chroot (arch-chroot command on the install media) into your Arch installation and reinstall the systemd-sysvcompat package.  Reboot again with your hard drive installation.

https://wiki.archlinux.org/index.php/Chroot

Alternatively, in your boot loader you can edit your boot line so that it contains "init=/usr/lib/systemd/systemd"  That will just boot the system enough for you to install the package.  Reboot and shutdown may not work correctly with that but you should get a running system enough to install systemd-sysvcompat.

Edit: double slow.

Last edited by headkase (2012-10-06 15:55:28)


We all make choices, but in the end, our choices make us.

Offline

#5 2012-10-06 15:58:01

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: /sbin/init does not exist. Can I recover it? [Solved]

headkase wrote:

Alternatively, in your boot loader you can edit your boot line so that it contains "init=/usr/lib/systemd/systemd"

Hey, I never noticed that /bin/systemd is a symlink to /usr/lib/systemd/systemd ... way to go headkase, I like learning.

Offline

#6 2012-10-06 16:00:04

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,428
Website

Re: /sbin/init does not exist. Can I recover it? [Solved]

WonderWoofy wrote:
headkase wrote:

Alternatively, in your boot loader you can edit your boot line so that it contains "init=/usr/lib/systemd/systemd"

Hey, I never noticed that /bin/systemd is a symlink to /usr/lib/systemd/systemd ... way to go headkase, I like learning.

All I did is:

ls -l /sbin/init

Which tells me right where it goes.. wink


We all make choices, but in the end, our choices make us.

Offline

#7 2012-10-06 16:04:05

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: /sbin/init does not exist. Can I recover it? [Solved]

Well, when you posted your advice above, I did the same, but on /bin/systemd.  Interesting though... I wonder why not simply either actually put it in /bin/systemd, or do away with /bin/systemd altogether since /sbin/init is pointing to the /lib spot anyway.  I mean, since systemd will only run on Linux, it seems unnecessary to really stick to the FHS for compatibility.

Offline

#8 2012-10-06 16:15:55

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,428
Website

Re: /sbin/init does not exist. Can I recover it? [Solved]

Had to look up FHSsmile

I would say that a bit of redundancy is good because Arch as a whole is a mish-mash of many different packages.  For the same reason when you have a pure-systemd computer you still have lots of scripts in "/etc/rc.d" - they are owned by packages that haven't been updated to systemd yet.  So those scripts sit there as cruft.  Unused.  The "good" part is that different users will have different setups.  The more redundancy the greater the chance of all setups working.

But, hey, if everything was pure-systemd including all of the packages in Arch's repos then I wouldn't mind - getting to that is a ton of work however, both with Arch and upstream.


We all make choices, but in the end, our choices make us.

Offline

#9 2012-10-06 16:16:35

Tae
Member
From: Santiago, Chile
Registered: 2010-08-31
Posts: 32
Website

Re: /sbin/init does not exist. Can I recover it? [Solved]

Thank you all, my system is back. I promise never to do such a stupid thing.

Now I wonder if systemd-systemvcompat have any advantage over set up the init path in my bootloader.

Offline

#10 2012-10-06 16:23:45

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,428
Website

Re: /sbin/init does not exist. Can I recover it? [Solved]

You want to keep systemd-sysvcompat installed.  It is a tiny little package, ~45KB, and all that is in it is symlinks from initscripts commands over to the appropriate systemd commands.

Do:

pacman -Ql systemd-sysvcompat

To see exactly what is in there.  It is nothing but mappings from sysv to systemd.  Trivial, but when your kernel says "do /sbin/init" there needs to be something AT /sbin/init.. wink


We all make choices, but in the end, our choices make us.

Offline

#11 2012-10-06 16:48:20

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: /sbin/init does not exist. Can I recover it? [Solved]

Tae wrote:

Thank you all, my system is back. I promise never to do such a stupid thing.

Now I wonder if systemd-systemvcompat have any advantage over set up the init path in my bootloader.

I kind of read this as "Oh crap I did something silly, I promise not to do something like that again.  .... but I wonder if I take of systemd-sysvcompat....."

Offline

#12 2012-10-23 00:30:43

Tae
Member
From: Santiago, Chile
Registered: 2010-08-31
Posts: 32
Website

Re: /sbin/init does not exist. Can I recover it? [Solved]

I know that systemd-systemvcompa is a small package. What bothers me is now I'm using systemd, so why don't do all the daily stuff in a systemd way?  (Like pas systemd as kernel parameter and use 'systemctl hibernate' to hibernate).

Offline

#13 2012-10-23 01:03:49

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: /sbin/init does not exist. Can I recover it? [Solved]

You can do it that way.  This is just legacy support.  It is just a package of symlinks.

Offline

#14 2012-10-24 02:05:08

Tae
Member
From: Santiago, Chile
Registered: 2010-08-31
Posts: 32
Website

Re: /sbin/init does not exist. Can I recover it? [Solved]

Got it. Thank you smile

Offline

Board footer

Powered by FluxBB