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 4815 times) previous topic - next topic
0 Members and 5 Guests are viewing this topic.

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

Reply #15
/sbin and /bin aee only symlinks to /usr/bin...
Interesting, but I also checked /usr/bin and I couldn't find init there either, this might be the last problem I have to deal with.
How should I fix it?

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

Reply #16
by installing your init again? pacman -S runit.. ..?

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

Reply #17
by installing your init again? pacman -S runit.. ..?
Well, theeast seems to say this:
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?
Which is only possible if they didn't chroot.

The whole point is to first chroot into the hard disk partition which should be mounted to /, then reinstall. Otherwise the reinstall only happens in the live filesystem setup in RAM and goes away upon restart.

@OP: In order to have a working temporary system chrooted to your hard disk, you first need to redirect Linux pseudo file systems through mount, then chroot.

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

Reply #18
@OP: In order to have a working temporary system chrooted to your hard disk, you first need to redirect Linux pseudo file systems through mount, then chroot.
But I did, first
Code: [Select]
sudo -i
mount /dev/sda3 /mnt
then
Code: [Select]
artix-chroot /mnt
I saw that  artix: [root]:~#  become  sh-5.1#
Also, when I pacman -Syu the second time right after rebooting, all repositories except community are up to date, so I definitely made changes to the system. runit and runit-rc were both up to date when I reinstalled them so I'm really stuck here


 

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

Reply #20
Any error messages? Have you tried to do ls -l /sbin/init inside the chrooted environment?
pacman -S runit runit-rc  now return
Code: [Select]
....
:: Running post-transaction hooks...
(1/3) Applying kernel sysctl settings...
  Skipped: Current root is not booted.
(2/3) Creating temporary files...
Failed to open file "/sys/devices/system/cpu/microcode/reload": Read-only file system
error: command failed to execute correctly
(3/3) Displaying runit service help ...
==> Add a service:
ln -s /etc/runit/sv/<service> /run/runit/service/
==> Start/stop/restart a service:
sv <start/stop/restart> <service>
and  ls -l /sbin/init  returned
Code: [Select]
ls: cannot access '/sbin/init': No such file or directory
All of these commands are done in the chroot system

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

Reply #21
put here your /etc/fstab

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

Reply #22
ls -l /etc/fstab  returned
Code: [Select]
-rw-r--r-- 1 root root 415 Feb 23 03:44 /etc/fstab

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

Reply #23
Code: [Select]
ls: cannot access '/sbin/init': No such file or directory

Well, that is different from:

My
Code: [Select]
 ls -l sbin/init 
returned
Code: [Select]
 lrwxrwxrwx        1  0                 0                  7    Jan    1     1970  sbin/init  ->  busybox 

which looks like a result of playing around with busybox in place of runit/OpenRC/s6.

Code: [Select]
-rw-r--r-- 1 root root 415 Feb 23 03:44 /etc/fstab
alium meant the result of cat /etc/fstab inside the chrooted environment.

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

Reply #24
/usr/bin/init was owned by artix-sysvcompat but that got replaced by system/base sometime around October 2019. Reinstalling "base" might help with that.

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

Reply #25
Yes, I installed  base  and it said
Code: [Select]
....
(1/1)  Detecting init  ...
                        ==>  Found runit-init
and after rebooting, Artix worked normally again

I'd like to thank everyone for your advice and guidance and for sticking around.
This is one hell of a learning experience!