Error root device mounted successfully but sbin init does not exist

I upgraded system and restarted,now I'm stuck here
  • Index
  • » Newbie Corner
  • » Root device mounted successfully, but /sbin/init does not exist.

#1 2016-11-03 10:18:39

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

I upgraded system and restarted,now I’m stuck here

/dev/sda1: recovering journal
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
[rootfs ]#

[rootfs ]# ls
VERSION  config hooks lib proc sbin usr
Bin dev init lib64 root sys
buildconfig  etc init_functions new_root run to
[rootfs new_root]#ls -l /sbin/init  -> busybox
From chroot
ls -l /sbin/init ->lib/systemd/systemd
mkinitcpio -p linux 
Building image from preset: /etc/mkinitcpio.d/linux.preset:'default'
Starting build: 4.8.6-1-ARCH
  Running build hook: [base]
  Running build hook: [udev]
ERROR: file not found '/usr/lib/systemd/systemd-udevd'
ERROR:binary dependency 'libsystemd-shared-231.so' not found for '/usr/bin/systemd-tmpfiles'
Running build hook: [autodetect]
  Running build hook: [modconf]
Running build hook: [block]
WARNING: errors were encountered during the build.the image may not be complete.

Fallback initramfs

systemd-tmpfiles: error while loading shared libraries: libsystemd-shared-231.so: cannot open shared object file: No such file or directory
/Init:line 23:/usr/lib/systemd/systemd-udevd':not found
ERROR : device 'UUID=769248f5-7eab-4bc6-777d-14b24f8731f8 'not found.Skipping fsck.
ERROR: Unable to find root device 'UUID='769248f5-7eab-4bc6-777d-14b24f8731f8'.
You are being dropped to a recovery shell
   Type 'exit' to try and continue booting
Sh: can't access tty; job control turned off
[Rootfs ]#

Tried pacman -S systemd

Warning: could not get file information for /usr/lib/systemd/libsystemd-shared-231.so
Warning: could not get file information for /usr/lib/systemd/systemd
Warning: could not get file information for /usr/lib/systemd/systemd-journald
Warning: could not get file information for /usr/lib/systemd/systemd-logind
Warning: could not get file information for /usr/lib/systemd/udevd

How can I resolve this?Please help me

Last edited by rohithreddy (2016-11-04 09:09:59)

#2 2016-11-03 11:06:43

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

Hey,can anyone please help me
my boot partition and root partitions are same and root partition is mounted at new_root
sbin/init points to /lib/systemd/systemd

#3 2016-11-03 11:22:47

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,023
Website

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


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

#4 2016-11-03 11:26:26

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

Wow,Got reply!
I was reading other threads and moderator asked to post where sbin/init points to so I posted that

#5 2016-11-03 14:32:19

Scimmia
Fellow
Registered: 2012-09-01
Posts: 10,065

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

This usually happens because you’re mounting the wrong partition as «root» in the kernel command line.

#6 2016-11-03 16:06:48

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

I’ve not changed anything,I just upgraded with command pacman -Syyu and after that my system stuck for a while,so I restarted and I got error.
What should I do in order to recover?
I can’t even edit files with nano

#7 2016-11-03 17:22:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,013

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

Tell us about your partition scheme ( lsblk -af )
Tell us which bootloader you are using.
Tell us about your bootloader configuratuion

I don’t have any idea what files you are trying to edit with nano, or what environment you are in (I suspect a recovery shell).  You may need to boot an install media and work from there.


Nothing is too wonderful to be true, if it be consistent with the laws of nature — Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. — Alan Turing

How to Ask Questions the Smart Way

#8 2016-11-03 18:17:32

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

Hi ewaller, I’m at [rootfs ]# , I tried lsblk -af ,I got lsblk not found.
Bootloader is grub,I was referring to rookie comment https://bbs.archlinux.org/viewtopic.php?id=219105 he asked to edit bootloader configuration to include init=/usr/lib/systemd/systemd

#9 2016-11-04 04:20:40

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

Somehow I managed to get a live usb ,could anyone help me from here?
I’ve only one partition /dev/sda1 that uuid is same as in grub.cfg file
Here is grub.cfg

insmod part_gpt
insmod part_msdos
If [ -s $prefix/grubenv]; then 
 load_env
Fi
if [$nextentry]
  set default=$next_entry
  set next_entry=
  save_env next_entry
  set boot_once =true
else
  Set default="0"
Fi
.
.
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if[x$feature_platform_search_hint =xy];then
 Search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-bios metal=ahci0,msdos1 769248f5-7eab-4bc6-777d-14b24f8731f8
else
 search --no-floppy --fs-uuid --set=root 769248f5-7eab-4bc6-777d-14b24f8731f8
Fi
 Font="/usr/share/grub/Unicode.pf2"
Fi
.
.
menu entry 'arch linux' --class 'arch --class gnu-linux --class gnu-linux --class os $menuentry_id_option 'gnulinux-simple-uuid' {
 load_video
 set gfxpayload=keep
 Insmod gzio
insmod part_msdos
 set root='hd0,msdos1'
if[x$feature_platform_search_hint =xy];then
 Search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-bios metal=ahci0,msdos1 769248f5-7eab-4bc6-777d-14b24f8731f8
else
 search --no-floppy --fs-uuid --set=root #uuid
Fi
echo 'Loading Linux linux...'
linux /boot/vmlinuz-linux root=UUID=769248f5-7eab-4bc6-777d-14b24f8731f8 rw quiet
echo 'Loading initial ramdisk'
United /boot/initramfs-linux.img
}

Last edited by rohithreddy (2016-11-04 05:52:59)

#10 2016-11-04 04:47:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,379
Website

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

grub config wrote:

linux /boot/vmlinuz-linux root=UUID=uuid rw quiet

That isn’t going to work…


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

#11 2016-11-04 05:14:17

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

So,I can’t recover?
Does it work if I install grub on /dev/sda1 again?
Everytime I upgrade I run into some problem,I don’t want to loose my data

#13 2016-11-04 05:34:12

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

linux /boot/vmlinuz-linux root=UUID=769248f5-7eab-4bc6-777d-14b24f8731f8 rw quiet

It actually points to correct UUID
I wrote uuid  in short for my uuid(769248f5-7eab-4bc6-777d-14b24f8731f8) in the code as I’m on mobile rn
What am I missing?
Here’s my /etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_ DISTRIBUTOR="'arch"
GRUB_CMDLINE_LINUX_DEFAULT="QUEIT"
Grub_CMDLINE_LINUX=""
grub_PRELOAD_MODULES="part_gpt part_msdos"
.
.
#GRUB_DISABLE_LINUX_UUID=true

GRUB_DISABLE_RECOVERY=true

Last edited by rohithreddy (2016-11-04 06:01:06)

#14 2016-11-04 06:21:05

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

From chroot I’m trying to install grub  but I get
pacman: error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header

Tried to generate grub.cfg file

grub-mkconfig -o /boot/grub/grub.cfg
Generating linux image:/boot/vmlinuz-linux
Found initrd image(s) int /boot: initramfs-linux.cfg
Found fallback initrd image in/boot:initramfs-linux-fallback.cfg
logger:error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header
logger:error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header
logger:error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header
logger:error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header
logger:error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header
logger:error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header
logger:error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header
logger:error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header
  Warning: Failed to connect to lvmetad. Falling back to device scanning
logger:error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header
done

Could anyone please help

Last edited by rohithreddy (2016-11-04 06:35:14)

#15 2016-11-04 06:43:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,379
Website

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

While in the chroot, reinstall lz4 and -Syu.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

#16 2016-11-04 07:01:53

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

I get same error:
pacman -S lz4

pacman: error while loading shared libraries:/usr/lib/liblz4.so.1: invalid ELF header

Everytime I upgrade I run into some problem and I had to reinstall again,Is there a way to get in?

Last edited by rohithreddy (2016-11-04 07:06:15)

#17 2016-11-04 07:04:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,379
Website

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

From outside the chroot do `pacman -r /mnt -S lz4`.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

#18 2016-11-04 07:11:06

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

No errors with lz4

grub-mkconfig -o /boot/grub/grub.cfg
Generating linux image:/boot/vmlinuz-linux
Found initrd image(s) int /boot: initramfs-linux.cfg
Found fallback initrd image in/boot:initramfs-linux-fallback.cfg
  Warning: Failed to connect to lvmetad. Falling back to device scanning
done

#19 2016-11-04 07:13:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,379
Website

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

Ignore the lvm warning. Check the grub config to make sure it actually does have a valid kernel line and then reboot.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

#20 2016-11-04 07:15:02

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

Thanks for helping and your patience.
I didn’t get» valid kernel line».what is that?
linux /boot is pointing to correct uuid

#21 2016-11-04 07:44:13

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

Here’s the entire grub.cfg file

insmod part_gpt
insmod part_msdos
If [ -s $prefix/grubenv]; then 
 load_env
Fi
if [$nextentry]
  set default=$next_entry
  set next_entry=
  save_env next_entry
  set boot_once =true
else
  Set default="0"
Fi
if [ x"${feature_menuentry_id}" = xy]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
Fi
export menuentry_id_option
if ["${prev_saved_entry}"];then]
  set saved_entry=$prev_saved_entry
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once =true
fi
function savedefault {
  if[-z "${boot_once}"]; then
     saved_entry="$chosen"
      Save_env saved_entry
   Fi
}

insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if[x$feature_platform_search_hint =xy];then
 Search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-bios metal=ahci0,msdos1 769248f5-7eab-4bc6-777d-14b24f8731f8
else
 search --no-floppy --fs-uuid --set=root 769248f5-7eab-4bc6-777d-14b24f8731f8
Fi
 Font="/usr/share/grub/Unicode.pf2"
Fi
.
.
menu entry 'arch linux' --class 'arch --class gnu-linux --class gnu-linux --class os $menuentry_id_option 'gnulinux-simple-uuid' {
 load_video
 set gfxpayload=keep
 Insmod gzio
insmod part_msdos
 set root='hd0,msdos1'
if[x$feature_platform_search_hint =xy];then
 Search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-bios metal=ahci0,msdos1 769248f5-7eab-4bc6-777d-14b24f8731f8
else
 search --no-floppy --fs-uuid --set=root #uuid
Fi
echo 'Loading Linux linux...'
linux /boot/vmlinuz-linux root=UUID=769248f5-7eab-4bc6-777d-14b24f8731f8 rw quiet
echo 'Loading initial ramdisk'
United /boot/initramfs-linux.img
}
submenu 'Advanced options for 'Arch Linux' $menuentry_id_option 'gnulinux-advanced-769248f5-7eab-4bc6-777d-14b24f8731f8'{
  menu entry 'arch linux, with Linux linux' --class 'arch --class gnu-linux --class gnu-linux --class os $menuentry_id_option 'gnulinux-linux-advanced- 769248f5-7eab-4bc6-777d-14b24f8731f8'{
 load_video
 set gfxpayload=keep
 Insmod gzio
insmod part_msdos
insmod ext2
 set root='hd0,msdos1'
if[x$feature_platform_search_hint =xy];then
 Search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-bios metal=ahci0,msdos1 769248f5-7eab-4bc6-777d-14b24f8731f8
else
 search --no-floppy --fs-uuid --set=root 769248f5-7eab-4bc6-777d-14b24f8731f8
Fi
echo 'Loading Linux linux...'
linux /boot/vmlinuz-linux root=UUID=769248f5-7eab-4bc6-777d-14b24f8731f8 rw quiet
echo 'Loading initial ramdisk'
initrd /boot/initramfs-linux.img
}
menu entry 'arch linux, with Linux linux(fallback initramfs)' --class 'arch --class gnu-linux --class gnu-linux --class os $menuentry_id_option 'gnulinux-linux-advanced- 769248f5-7eab-4bc6-777d-14b24f8731f8'{
 load_video
 set gfxpayload=keep
 Insmod gzio
insmod part_msdos
insmod ext2
 set root='hd0,msdos1'
if[x$feature_platform_search_hint =xy];then
 Search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-bios metal=ahci0,msdos1 769248f5-7eab-4bc6-777d-14b24f8731f8
else
 search --no-floppy --fs-uuid --set=root 769248f5-7eab-4bc6-777d-14b24f8731f8
Fi
echo 'Loading Linux linux...'
linux /boot/vmlinuz-linux root=UUID=769248f5-7eab-4bc6-777d-14b24f8731f8 rw quiet
echo 'Loading initial ramdisk'
initrd /boot/initramfs-linux-fallback.img
}

}

Last edited by rohithreddy (2016-11-04 07:46:22)

#22 2016-11-04 07:46:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,379
Website

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

Reboot and see if it works. Don’t expect us to hold your hand through every step here…


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

#23 2016-11-04 07:48:48

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

I did pacman -Syu and I did reboot but still I’m stuck at

/dev/sda1: recovering journal
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
[rootfs ]#

Rookie asked to edit https://bbs.archlinux.org/viewtopic.php?id=219105 he asked to edit bootloader configuration to include init=/usr/lib/systemd/systemd
Where should I add that?

Last edited by rohithreddy (2016-11-04 07:51:34)

#25 2016-11-04 08:01:39

rohithreddy
Member
Registered: 2016-04-05
Posts: 38

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

I’ve only one desktop and now I’m using mobile though. I opened this thread after reading several threads with same problem.None of them helped me.

[rootfs ]# ls
VERSION  config hooks lib proc sbin usr
Bin dev init lib64 root sys
buildconfig  etc init_functions new_root run to
[rootfs new_root]#ls -l /sbin/init  -> busybox
From chroot
ls -l /sbin/init ->lib/systemd/systemd

Appreciate your help

Last edited by rohithreddy (2016-11-04 08:01:53)

#
7 лет назад

(отредактировано

7 лет назад)

Темы:

2

Сообщения:

9

Участник с: 06 февраля 2016

Я новичок, поставил систему получилось с первого раза но при загрузке системы грузиться до этого момента, и появляется не окно авторизации, а следующее:

:: running early hook [udev]
Starting version 228
:: running hook [udev]
::Triggering uevents…
:: running hook [keymap]
::Loading keymap…done
::perfoming fsck on ‘/dev/dev2’
/dev/sda2: recovering journal
/dev/sda2: clean? 27359/1638400 files? 343175/6553600 blocks
::mounting ‘/dev/sda2’ on real root
::running cleanup hook [udev]
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.
[rootfs /]#

Не понимаю что не так с разделом root, не монтируется или что? объясните пожалуйста….

P.S. Могут быть опечатки, т.к. набирал от руки.

indeviral

#
7 лет назад

Темы:

39

Сообщения:

3170

Участник с: 10 августа 2013

fstab, Good luck.

Ошибки в тексте-неповторимый стиль автора©

Aivar

#
7 лет назад

(отредактировано

7 лет назад)

Темы:

4

Сообщения:

6897

Участник с: 17 февраля 2011

anikienko
Не понимаю что не так с разделом root, не монтируется или что?

Там же написано: Федот да не тот:

Root device mounted successfully? But /sbin/init does not exist.

anikienko

#
7 лет назад

Темы:

2

Сообщения:

9

Участник с: 06 февраля 2016

подскажите как исправить то?

jim945

#
7 лет назад

jim945 avatar

Темы:

8

Сообщения:

3069

Участник с: 25 января 2010

anikienko
подскажите как исправить то?

Написать правильный корень в fstab

Lupus pilum mutat, non mentem.

Aivar

#
7 лет назад

Темы:

4

Сообщения:

6897

Участник с: 17 февраля 2011

Монтировать нужный при загрузке. indeviral, подсказал же.

teplovoz

#
7 лет назад

(отредактировано

7 лет назад)

teplovoz avatar

Темы:

7

Сообщения:

1044

Участник с: 28 мая 2012

Лучше написать в fstab по UUID , посмотреть можно командами к примеру —

sudo blkid

или

lsblk -f

— wiki fstab

vasek

#
7 лет назад

(отредактировано

7 лет назад)

Темы:

47

Сообщения:

11422

Участник с: 17 февраля 2013

Причина думаю не в fstab — можно загружаться без всякого fstab …..пример (PS…..только загрузился — стоит 1 винда и 2 линукса)
$ cat /etc/fstab
cat: /etc/fstab: Нет такого файла или каталога
PS….. уже об этом не раз писал и Natrio

Ошибки не исчезают с опытом — они просто умнеют

teplovoz

#
7 лет назад

teplovoz avatar

Темы:

7

Сообщения:

1044

Участник с: 28 мая 2012

vasek
можно загружаться без всякого fstab .

Тогда возможно — grub.cfg ?

Aivar

#
7 лет назад

(отредактировано

7 лет назад)

Темы:

4

Сообщения:

6897

Участник с: 17 февраля 2011

vasek
можно загружаться без всякого fstab

Можно монтировать корень и т.д. средствами systemd, но сути это не меняет:

/sbin/init does not exist

который есть симлинк на systemd.

teplovoz
Тогда возможно — grub.cfg ?

Но initramfs же стартовал.

Topic solved
This topic has been marked as solved and requires no further attention.

0 Members and 1 Guest are viewing this topic.



03 April 2021, 19:54:14
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

/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

 ls -l sbin/init 

returned

 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 – 03 April 2021, 20:12:42
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 – 03 April 2021, 20:30:16

   + I installed .NET framework 4 in my Windows

That should have no effect on your GNU/Linux partitions.

   + 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 – 03 April 2021, 20:40:49

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 – 04 April 2021, 00:47:21

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 – 04 April 2021, 03:41:17
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 – 04 April 2021, 12:26:37

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 – 04 April 2021, 12:45:34

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 – 04 April 2021, 14:41:38
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 – 04 April 2021, 16:28:58

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 – 05 April 2021, 12:26:11
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 – 05 April 2021, 14:46:47
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 – 05 April 2021, 16:28:30

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 – 06 April 2021, 13:45:34
I’ve been able to chroot my system using artix-chroot (I found it while looking through lib64) and I executed

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 – 06 April 2021, 14:48:29
/sbin and /bin are only symlinks to /usr/bin…

#installation #archlinux #btrfs

Вопрос:

Я довольно новичок в Linux, но решил сразу погрузиться в arch-linux, чтобы ознакомиться со всем. К сожалению, я даже не могу закончить установку — позор мне.

Ошибка при загрузке после настройки arch заключается в:

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

Я пошел на btrfs на luks на lvm

Макет выглядит следующим образом

 sda
 |- sda1          512MB     fat32 /boot
 `- sda2          remaining lvm
     |- cryptswap 4GB       swap
     |- crypttmp  2GB       tmp   /tmp
     `- cryptroot remaining btrfs
         |- @                     /
         |- @home                 /home
         |- @snapshots            /.snapshots
         |- @log                  /var/log
         |- @cache                /var/cache
         `- @tmp                  /var/tmp
 

Это команды и конфигурации, которые я использовал для настройки arch:

dd status=progress if=/dev/zero of=/dev/sda стереть диск

gdisk /dev/sda

o очистить таблицу gpt

загрузочный раздел

 n
↵
↵
 512M
ef00
 

раздел lvm

 n
↵
↵
↵
8e00
 

w запись изменений разделов

настройка lvm

 pvcreate /dev/sda2
vgcreate vg1 /dev/sda2
lvcreate -L 4G -n cryptswap vg1
lvcreate -L 2G -n crypttmp vg1
lvcreate -l 100%FREE cryptroot vg1
 

настройка шифрования

 cryptsetup luksFormat /dev/vg1/cryptroot
cryptsetup open /dev/vg1/cryptroot root
 

создание файловых систем

 mkfs.fat -F32 -n BOOT /dev/sda1
mkfs.btrfs --label ROOT /dev/mapper/root
 

create btrfs subvolumes

 mount /dev/mapper/root /mnt
cd /mnt

btrfs subvolume create @
btrfs subvolume create @home
btrfs subvolume create @snapshots
btrfs subvolume create @log
btrfs subvolume create @cache
btrfs subvolume create @tmp

cd ..
umount /mnt
 

mount btrfs subvolumes and BOOT partition

 mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=@ /dev/mapper/root /mnt

mkdir /mnt/home
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=@home /dev/mapper/root /mnt/home

mkdir /mnt/.snapshots
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=@snapshots /dev/mapper/root /mnt/.snapshots

mkdir /mnt/var
mkdir /mnt/var/log
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=@log /dev/mapper/root /mnt/var/log

mkdir /mnt/var/cache
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=@cache /dev/mapper/root /mnt/var/cache

mkdir /mnt/var/tmp
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=@tmp /dev/mapper/root /mnt/var/tmp

mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
 

pacstrap /mnt base linux linux-firmware lvm2 btrfs-progs amd-ucode vim install necessities

genfstab -L /mnt > mnt/etc/fstab generate fstab

arch-chroot /mnt

basic configuration

 ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock --systohc
vim /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
echo "KEYMAP=de-latin1" >> /etc/vconsole.conf
echo "devstation" >> /etc/hostname
vim /etc/hosts
 

vim /etc/mkinitcpio.conf

the mkinitcpio.conf content:

 MODULES=(btrfs)
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block lvm2 encrypt filesystems fsck)
 

mkinitcpio -p linux

bootctl install

echo "default arch" > /boot/loader/loader.conf

vim /boot/loader/entries/arch.conf

the arch.conf content

 title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options cryptdevice=UUID={/dev/vg1/cryptroot uuid inserted here}:root root=/dev/mapper/root rw
 

exit

umount -a

poweroff

Извлеките установочный носитель arch из компьютера и запустите его.

Загрузочный вывод

 :: running early hook [udev]
Starting version 248.3-2-arch
:: running hook [udev]
:: Triggering uevents...
:: running hook [keymap]
:: Loading keymap...done.
:: running hook [encrypt]

A password is requires to acces the root volume:
Enter passphrase for /dev/mapper/vg1-cryptroot: {inserting passphrase}
:: performing fsck on '/dev/mapper/root'
:: mounting '/dev/mapper/root' on real root
:: running cleanup hook [udev]
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
[rootfs ]#
 

Очевидно, я еще не настроил cryptswap и cryptmp. Они будут настроены с помощью crypttab и fstab. Я просто упоминаю об этом и очень сомневаюсь, что это часть проблемы, потому что на данный момент они просто разделы, которые ничем не распознаются, не так ли.

Я надеюсь, что не пропустил ни одной команды или конфигурации, которую я сделал — я печатаю видео, которые я смотрел, и из головы, потому что ни в одном видео, которое я нашел, не было конфигурации btrfs, luks, lvm, с которой я работал. Спасибо за ваше время/помощь и за то, что дочитали это до конца.

Ответ №1:

Добавление rootflags=subvol=@ в /boot/loader/entries/arch.conf нравится так

 title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options cryptdevice=UUID={/dev/vg1/cryptroot uuid inserted here}:root root=/dev/mapper/root rootflags=subvol=@ rw
 

сделал свое дело.

As @Leiaz very correctly pointed out in the comments, /sbin in Arch (and by extension, Manjaro) is now a symlink to /usr/bin. This means that unless /usr is mounted, /usr/sbin/init will not exist. You therefore need to make sure that /usr is mounted by the initial ramdisk. That’s what the Arch wiki quote in your OP means:

If you keep /usr as a separate partition, you must adhere to the following requirements:

  • Enable mkinitcpio-generate-shutdown-ramfs.service or add the shutdown hook.

  • Add the fsck hook, mark /usr with a passno of 0 in /etc/fstab. While recommended for everyone, it is mandatory if you want your /usr partition to be fsck’ed at boot-up. Without this hook, /usr will never be fsck’d.

  • Add the usr hook. This will mount the /usr partition after root is mounted. Prior to 0.9.0, mounting of /usr would be automatic if it was found in the real root’s /etc/fstab.

So, you need to generate a new init file with the right hooks1. These are added by changing the HOOKS="" line in /etc/mkinitcpio.conf. So

  1. Boot into Mint and mount the Manjaro / directory:

    mkdir manjaro_root && sudo mount /dev/sda11 manjaro_root
    

    Now, Manjaro’s root will be mounted at ~/manjaro_root.

  2. Edit the mkinitcpio.conf file using your favorite editor (I’m using nano as an example, no more):

    sudo nano ~/manjaro_root/etc/mkinitcpio.conf
    

    Find the HOOKS line and make sure it contains the relevant hooks

    HOOKS="shutdown usr fsck"
    

    Important» : do not remove any of the hooks already present. Just add the above to those there. For example, the final result might look like

    HOOKS="base udev autodetect sata filesystems shutdown usr fsck"
    
  3. Mark /usr with a passno of 0 in /etc/fstab. To do this, open manjaro_root/etc/fstab and find the /usr line. For this example, I will assume it is /dev/sda12 but use whichever one it is on your system. The «pass» number is the last field of an /etc/fstab entry. So, you need to make sure the line looks like

    /dev/sda12  /usr  ext4  rw,errors=remount-ro     0      0
                                                            ^
                             This is the important one -----|
    
  4. Create the new init image. To do this, you will have to mount Manjaro’s /usr directory as well.

    sudo mount /dev/sda12 ~/manjaro_root/usr
    

    I don’t have much experience with Arch so this might not bee needed (you might be able to run mkinitcpio without a chroot) but to be on the safe side, set up a chroot environment:

    sudo mount --bind /dev ~/manjaro_root/dev && 
    sudo mount --bind /dev/pts ~/manjaro_root/dev/pts && 
    sudo mount --bind /proc ~/manjaro_root/proc && 
    sudo mount --bind /sys ~/manjaro_root/sys &&
    sudo chroot ~/manjaro_root
    

    You will now be in a chroot environment that thinks that ~/manjaro_root/ is actually /. You can now go ahead and generate your new init image

    mkinitcpio -p linux
    
  5. Exit the chroot

    exit
    
  6. Update your grub.cfg (again, this might not actually be needed):

    sudo update-grub
    

Now reboot and try booting into Manjaro again.


1 «Hooks» are small scripts that tell mkinitcpio what should be added to the init image it generates.

From Mint, you can change root to your Manjaro installation, in order to regenerate initramfs.

Mount your Manjaro root under the directory of your choice ( ~/foo). Mount your /usr partition at ~/foo/usr, also mount boot if it is separate.
Mount proc sys dev :

# mount -t proc proc ~/foo/proc/
# mount --rbind /sys ~/foo/sys/
# mount --rbind /dev ~/foo/dev/

And change root : chroot ~/foo /bin/bash

As explained in the wiki : «Hooks are small scripts which describe what will be added to the image». Edit /etc/mkinitcpio.conf, add the usr fsck and shutdown hooks to the HOOK entry, as indicated in the wiki and comments.
Regenerate initramfs : mkinitcpio -p linux (it will be written in /boot)

Exit the chroot, unmount proc, sys, dev and Manjaro partitions and try rebooting.

Понравилась статья? Поделить с друзьями:
  • Error romon is not enabled on the router mikrotik
  • Error romon agent not found add it to managed list
  • Error rollback framework could not be initialized installation aborted teamviewer
  • Error role username does not exist
  • Error retrieving credentials from the instance profile metadata service