Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Root device mounted successfully, but /sbin/init does not exist (Read 5182 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Root device mounted successfully, but /sbin/init does not exist

I've been dualbooting Artix runit with Windows 7 without any problem for several months now. But today, when restart from Windows, Artix displayed this error
Code: [Select]
/dev/sda3: recovering journal
/dev/sda3: clean, 194917/11231232 files, 3226083 blocks
ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.

sh: can't access tty: job control turned off

I did some research myself but most source are from Arch/systemd so I don't think they are useful in my case.
My
Code: [Select]
 ls -l sbin/init 
returned
Code: [Select]
 lrwxrwxrwx        1  0                 0                  7    Jan    1     1970  sbin/init  ->  busybox 

Some changes to the system that I made that could lead to the error:
   + I installed .NET framework 4 in my Windows
   + I removed some unused dependencies that did not appeared in  pacman -Qdtq
   + Some Arch users got  root        root  instead of the double 0s when run  ls -l sbin/init  so I think that could be the problem

I appreciate all help and support.
Thank you!

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #1
I'm fairly certain sbin/init should symlink to runit-init on Artix runit systems. I have no idea why it is symlinked to busybox for you, but that would explain you being unable to boot the system.

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #2
   + I installed .NET framework 4 in my Windows
That should have no effect on your GNU/Linux partitions.
Quote
   + I removed some unused dependencies that did not appeared in  pacman -Qdtq
This could be the culprit. In my experience, not every package reported as "unused" is disposable.

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #3
I'm fairly certain sbin/init should symlink to runit-init on Artix runit systems. I have no idea why it is symlinked to busybox for you, but that would explain you being unable to boot the system.
Is there any way to return my system to its normal state?

That should have no effect on your GNU/Linux partitions.This could be the culprit. In my experience, not every package reported as "unused" is disposable.
How can I reinstall culprit? pacman did not work.

Thank you for your responses, I did not expect it to be this quick!

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #4
Is there any way to return my system to its normal state?


Assuming you use grub as your bootloader, you can hit e during bootup and temporarily alter your kernel parameters. You can add init=/usr/bin/runit-init which should then allow you to boot up. Of course, that assumes you still have runit-init on your system and it didn't mysteriously get removed with whatever happened. If that does not work, you would need to chroot into your root partition. In any either case, you should probably reinstall your init (runit and runit-rc) and double check to make sure that your init symlink is correct.

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #5
If the other (rather good) ideas don't resolve it, my further suggestion is that /var/log/pacman.log should hold a record of what you did if you needed to check, and possibly the removed packages are still in /var/cache/pacman/pkg/ and if they are, pacman -U will easily reinstall them after chrooting in. Otherwise they can be found in the repos online. No need for a network connection on the problem machine either, you can get the package(s) and put them on a usb with another computer, then use pacman -U again.

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #6
You can add init=/usr/bin/runit-init which should then allow you to boot up.
If that does not work, you would need to chroot into your root partition.
When cd /usr/bin I couldn't find runit-init but run-init so I tried both but it didn't work. I also looked into https://rlbcontractor.com/fixing-a-broken-linux-system-with-chroot but I'm too afraid to try as I am rather inexperienced.

Could you give me a detailed guide on how to chroot?

/var/log/pacman.log should hold a record of what you did if you needed to check, and possibly the removed packages are still in /var/cache/pacman/pkg/ and if they are, pacman -U will easily reinstall them after chrooting in. Otherwise they can be found in the repos online. No need for a network connection on the problem machine either, you can get the package(s) and put them on a usb with another computer, then use pacman -U again.
Checked pacman.log and I didn't remove culprit but some packages belong in base-devel and /var only contain a /run file. However, /new_root (which I didn't create) contain all files you described, can this information be helpful?
I dualboot so I can use Windows when Artix is broken

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #7
How can I reinstall culprit? pacman did not work.

Checked pacman.log and I didn't remove culprit

Dude

https://www.merriam-webster.com/dictionary/culprit

Number 3. /facepalm

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #8
Damnit. Well at least now you know I'm not a native English speaker.

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #9
When cd /usr/bin I couldn't find runit-init but run-init so I tried both but it didn't work. I also looked into https://rlbcontractor.com/fixing-a-broken-linux-system-with-chroot but I'm too afraid to try as I am rather inexperienced.

Could you give me a detailed guide on how to chroot?

That guide is what you need to do (with regards to the arch section of it). The only difference is that with an artix live iso/usb you would use artools-chroot instead of arch-chroot.

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #10
I've successfully mount my partition but artools-chroot returned command not found so I used chroot instead. I know it is the right partition because it have my user file. But when I attempted to  pacman -U  my deleted packages, it returned

error: could not open file: /etc/mtab: No such file or directory
error: could not determine filesystem mount points
error: not enough free disk space
error: failed to commit transaction (unexpected error)

And I was unable to restore them. I'm so close to fixing it, how do I continue from here?

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #11
It seems quite odd artools-chroot wasn't found. Were you using an artix live iso? Well it doesn't matter in either case you can always do the chroot manually. It consists of many steps if you want a working system. Follow the Arch guide here.

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #12
It seems quite odd artools-chroot wasn't found. Were you using an artix live iso? Well it doesn't matter in either case you can always do the chroot manually. It consists of many steps if you want a working system.
It's odd to me too, first is busybox and now this, do you have the same problem with your system? Yes I was in the live inviroment
Thanks for the link, I will look into it

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #13
I've been able to chroot my system using artix-chroot (I found it while looking through lib64) and I executed
Code: [Select]
pacman -Syu
pacman -S base-devel runit runit-rc
mkinitcpio -P
all without issue. However, that didn't solve the problem, when I look into /sbin and /bin, init was nowhere to be found. Is it possible to generate or recover it?

Re: Root device mounted successfully, but /sbin/init does not exist

Reply #14
/sbin and /bin are only symlinks to /usr/bin...