You are not logged in.

#1 2013-06-03 16:46:48

gadelat
Member
Registered: 2013-03-11
Posts: 49

/sbin/init does not exist

I followed steps on arch frontpage (I guess), but now my system can't boot. So i booted to newest arch cd and wanted to chroot to this installation and I can't.

# arch-chroot /mnt
chroot: failed to run command /bin/sh: No such file or directory

Yea, I mounted correct partition. Well, removing these dirs in root folder was kinda point of this update, wasn't it? If they were supposed to symlink, it did not happen. So I tried to symlink it myself and I did it in a way I could chroot to this installation (read: "I somehow did it but I'm not sure if I did it correctly as I am noob"), but step "pacman -Su" still throws these kind of errors:

"filesystem: /bin exists in filesystem"

What now?

Offline

#2 2013-06-03 16:48:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: /sbin/init does not exist

remove the symlinks you made and use pacman's --root option to install the filesystem package.

Offline

#3 2013-06-03 17:00:08

gadelat
Member
Registered: 2013-03-11
Posts: 49

Re: /sbin/init does not exist

pacman --root /mnt -S filesystem throws:
"filesystem: /mnt/usr/sbin exists in filesystem" am i supposed to remove this dir too?

Offline

#4 2013-06-03 17:00:51

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

Re: /sbin/init does not exist

gadelat wrote:

pacman --root /mnt -S filesystem throws:
"filesystem: /mnt/usr/sbin exists in filesystem" am i supposed to remove this dir too?

No, but it has to be empty.


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

Offline

#5 2013-06-03 17:01:36

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: /sbin/init does not exist

I have the same problem and I have no idea what to do!

Can you please give the exact steps and commands to solve this. thanks

Offline

#6 2013-06-03 17:03:42

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: /sbin/init does not exist

gadelat, pacman --root /mnt -Qo /usr/sbin

That dir should be empty and only be owned by the filesystem package. If other packages own it or there's files in it, they need to be fixed.

Offline

#7 2013-06-03 17:20:22

gadelat
Member
Registered: 2013-03-11
Posts: 49

Re: /sbin/init does not exist

In /mnt/usr/sbin were some files which are probably vmware's and syslinux about whom I don't care much so I just deleted those.
pacman --root /mnt -Qo /usr/sbin gives:

error: No package owns /usr/sbin

I guess it's ok. So, I did pacman --root /mnt -S filesystem again and it outputs:

filesystem: /mnt/usr/sbin exists in filesystem

again.. So now we're sure it's empty and it isn't owned by any packages, what now?

Last edited by gadelat (2013-06-03 17:22:10)

Offline

#8 2013-06-03 17:23:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: /sbin/init does not exist

Hmm, how about /mnt/usr/sbin instead of just /usr/sbin?

Worst case you can just delete it if it's empty, but it's best to fix the package that still owns it so it doesn't cause problems later.

Last edited by Scimmia (2013-06-03 17:24:45)

Offline

#9 2013-06-03 17:35:04

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: /sbin/init does not exist

o.k. perhaps someone finds this useful, thanks to all the help in here I got it working like this

boot from latest arch cd
keyboard is us layout
/ is on - for german
- is on ß for german

loadkeys de-latin1-nodeadkeys

mount /dev/sda7 /mnt        # /mnt on my virtualbox
mount /dev/sdb6 /mnt        # /mnt on my server
arch-chroot /mnt            # gives error
pacman --root /mnt -S filesystem    # gives error, too

finding out the "bad package", for me it was pure-ftpd
pacman --root /mnt -Qo /mnt/usr/sbin

pacman --root /mnt -Rd pure-ftpd
old config goes to /mnt/etc/pure-ftpd.conf.pacsave

pacman --root /mnt -S filesystem

reboot and eject cd

yaourt -Sy pure-ftpd
cp /etc/pure-ftpd.conf.pacsave /etc/pure-ftpd.conf
systemctl restart pure-ftpd.service

Last edited by archtom (2013-06-22 19:23:25)

Offline

#10 2013-06-03 17:37:13

gadelat
Member
Registered: 2013-03-11
Posts: 49

Re: /sbin/init does not exist

Yes, pacman --root /mnt -Qo /mnt/usr/sbin outputted two packages, one was filesystem, second was syslinux (it was dependency of unetbootin). So I did "pacman --root /mnt -R syslinux unetbootin", then "pacman --root /mnt -S filesystem" ended successfully and now booting works. Thanks for help!

@archtom
1. Boot to arch CD live cd
2. Mount correct partition using command "mount /dev/sdxy /mnt" where xy are is number of disk and partition.
3. Do

mkdir /mnt/usr/sbin-backup && mv /mnt/usr/sbin/* /mnt/usr/sbin-backup/

4. Do

pacman --root /mnt -Qo /mnt/usr/sbin

. It should output packages which own it. Remove every package other then filesystem by using pacman --root /mnt -Rd name_of_package

I'm sure this isn't optimal solution but hey it works! big_smile

edit: Yeah, late to the party.
edit2: You can mark topic as solved i guess.

Last edited by gadelat (2013-06-03 17:42:48)

Offline

#11 2013-06-03 18:13:09

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: /sbin/init does not exist

gadelat wrote:

Yes, pacman --root /mnt -Qo /mnt/usr/sbin outputted two packages, one was filesystem, second was syslinux (it was dependency of unetbootin). So I did "pacman --root /mnt -R syslinux unetbootin", then "pacman --root /mnt -S filesystem" ended successfully and now booting works. Thanks for help!

@archtom
1. Boot to arch CD live cd
2. Mount correct partition using command "mount /dev/sdxy /mnt" where xy are is number of disk and partition.
3. Do

mkdir /mnt/usr/sbin-backup && mv /mnt/usr/sbin/* /mnt/usr/sbin-backup/

4. Do

pacman --root /mnt -Qo /mnt/usr/sbin

. It should output packages which own it. Remove every package other then filesystem by using pacman --root /mnt -Rd name_of_package

I'm sure this isn't optimal solution but hey it works! big_smile

edit: Yeah, late to the party.
edit2: You can mark topic as solved i guess.

Thanks a lot!

Offline

#12 2013-06-03 18:14:02

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: /sbin/init does not exist

How would it been correct to avoid this? How could pure-ftpd been "fixed" before the update?

Offline

#13 2013-06-03 18:19:08

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: /sbin/init does not exist

The commands that the news post told you to run should have alerted you to a problem with pure-ftpd before you ever started the actual update. Once you're aware of that, you need to rebuild the pure-ftpd package in a way that puts its files in /usr/bin instead of /usr/sbin. A quick glance makes me think it's using autotools, so it's usually as easy as adding --sbindir=/usr/bin to the configure options.

If the package maintainer was paying attention, he could have done that weeks ago if nothing needs to access it using the full path. If there are things that do, it's a bit tougher to avoid, as that update would need to happen at the exact same time as the update in the main repos.

Last edited by Scimmia (2013-06-03 18:22:09)

Offline

#14 2013-06-03 18:26:10

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: /sbin/init does not exist

Scimmia wrote:

The commands that the news post told you to run should have alerted you to a problem with pure-ftpd before you ever started the actual update. Once you're aware of that, you need to rebuild the pure-ftpd package in a way that puts its files in /usr/bin instead of /usr/sbin. A quick glance makes me think it's using autotools, so it's usually as easy as adding --sbindir=/usr/bin to the configure options.

If the package maintainer was paying attention, he could have done that weeks ago if nothing needs to access it using the full path. If there are things that do, it's a bit tougher to avoid, as that update would need to happen at the exact same time as the update in the main repos.

thanks, I´ll try in my virtualbox. Is there anything wrong with installing the package normally after the update?

Last edited by archtom (2013-06-03 18:27:36)

Offline

#15 2013-06-03 23:47:05

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: /sbin/init does not exist

archtom wrote:

thanks, I´ll try in my virtualbox. Is there anything wrong with installing the package normally after the update?

Yes. However, I don't yet entirely understand what. Sorry not to have a more informative answer.

The best I have gleaned so far is that pacman will at some point stop traversing symlinks. When that happens, bad things will unexpectedly happen if you do this.

What you can do is also edit pacman's file list so that the files are tracked properly in /usr/bin no matter what. However, it is probably a whole lot easier to fix the PKGBUILD as suggested above.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#16 2013-06-05 20:08:38

giacombum
Member
Registered: 2011-08-03
Posts: 94

Re: /sbin/init does not exist

gadelat wrote:

Yes, pacman --root /mnt -Qo /mnt/usr/sbin outputted two packages, one was filesystem, second was syslinux (it was dependency of unetbootin). So I did "pacman --root /mnt -R syslinux unetbootin", then "pacman --root /mnt -S filesystem" ended successfully and now booting works. Thanks for help!

@archtom
1. Boot to arch CD live cd
2. Mount correct partition using command "mount /dev/sdxy /mnt" where xy are is number of disk and partition.
3. Do

mkdir /mnt/usr/sbin-backup && mv /mnt/usr/sbin/* /mnt/usr/sbin-backup/

4. Do

pacman --root /mnt -Qo /mnt/usr/sbin

. It should output packages which own it. Remove every package other then filesystem by using pacman --root /mnt -Rd name_of_package

I can't do the fourth command: I obtain the error "failed to initialize alpm library (could not find or read directory)". How can I solve the problem?

Tahnk you!

Offline

#17 2013-06-06 01:09:22

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: /sbin/init does not exist

You booted the live media, right, and chose the live environment?

What does uname -a give?

Last edited by cfr (2013-06-06 01:09:42)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#18 2013-06-06 14:56:10

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: /sbin/init does not exist

this thread helped me to solve my problem, which was very  like the one described by OP.
after the confusion with files in /sbin etc. this was already the second time upgrades did not work and i had made my system unbootable.
i had created the mess myself, no need to go into that now.
upgrading 'filesystem' through arch live 'cd' was the key.

just 1 thing to add: when you boot into the live environment, make sure you connect to the internet first, i had problems with that once i had issued any kind of chroot command.

but really i wanted to leave my mark here because:
searching for answers, i read many threads about the current "/bin exists in filesystem" confusion, and they're quite full of sarcastic remarks and cryptic inside jokes, in a way i find off-putting.
would it have been such a bad thing if i had started another thread on this, after trying for hours, days, making matters worse than better, daring to ask a question that marks me as less experienced? many hardcore forum posters' remarks surely made me feel like that.

but, this thread is the positive example! all is not lost. thanks.

Last edited by ondoho (2013-06-06 15:01:39)

Offline

#19 2013-06-20 18:30:37

Swashy
Member
Registered: 2012-11-02
Posts: 22

Re: /sbin/init does not exist

archtom wrote:

o.k. perhaps someone finds this useful, thanks to all the help in here I got it working like this...

You saved my Bacon, thanks man.
Gotta love moments like this that bring the arch community together via a torrent of cries in the newbie corner..

Last edited by Swashy (2013-06-20 18:30:48)

Offline

#20 2013-06-22 19:22:11

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: /sbin/init does not exist

Swashy wrote:
archtom wrote:

o.k. perhaps someone finds this useful, thanks to all the help in here I got it working like this...

You saved my Bacon, thanks man.
Gotta love moments like this that bring the arch community together via a torrent of cries in the newbie corner..

this thread brought me to the right direction and saved me, without it I would have never fixed my problem. so I`m glad I helped someone, too wink

Last edited by archtom (2013-06-22 19:22:41)

Offline

Board footer

Powered by FluxBB