You are not logged in.

#1 2012-03-25 15:02:56

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

[Solved] Cant find /bin/systemd or /sbin/init (for starters)

Hi.
Yesterday I compiled my own kernel and rebooted to try it out. It was some days ago since I rebooted the last time but now I can't log in anymore. I have been trying with my own kernel, linux and linux-ck. First it did complain about not finding root, like this post. [1] Then I changed the line in menu.lst to point to /dev/sda1 instead of the uuid. Now it finds and can mount the root device. But now /bin/systemd does not exist anymore. If I try to boot without systemd /sbin/init does not exist instead. It seems to be something with the init(?), the errors is not the same, but without systemd /lib/udev/udevd have an error in the first line  "syntax error: unexpected word (expecting ")")" /usr/bin/udevadm also have some problem with the first line and have an unexpected "(".

If I use systemd the line 23: /lib/udev/udevd is not found, neither udevadm in line 10, says /init.

Chroot and reinstall udev, mkinitcpio, the kernel and run mkinitcpio -p linux does not change anything, neither downgrading the kernel.


1. https://bbs.archlinux.org/viewtopic.php?id=138219

Last edited by kaptenen (2012-03-26 22:42:48)

Offline

#2 2012-03-25 16:46:45

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

Sounds like an issue with your initramfs to me.

Try "lsinitcpio /boot/yourinitramfs.img" and see if udev/udevd/udevadm support is actually in it. If not, make sure you have the udev hook in your /etc/mkinitcpio.conf and regenerate your initramfs.

Last edited by Gcool (2012-03-25 16:50:33)


Burninate!

Offline

#3 2012-03-25 18:17:46

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

I do have udev/udevd/udevadm in my initramfs!
This is my hooks in mkinitcpio.conf: "base udev autodetect pata scsi sata filesystems usbinput fsck"

Offline

#4 2012-03-25 18:23:55

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

kaptenen wrote:

"syntax error: unexpected word (expecting ")")" /usr/bin/udevadm also have some problem with the first line and have an unexpected "(".

Post your bootloader config...

Offline

#5 2012-03-25 18:48:06

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

falconindy wrote:
kaptenen wrote:

"syntax error: unexpected word (expecting ")")" /usr/bin/udevadm also have some problem with the first line and have an unexpected "(".

Post your bootloader config...

title Arch Linux CK
root (hd0,0)
kernel /vmlinuz-linux-ck root=/dev/disk/by-uuid/86078c54-80a3-47a4-b02e-bc6b537cc142 ro vga=0x034a quiet pcie_aspm=force init=/bin/systemd
initrd /initramfs-linux-ck.img

title Arch Linux systemd
root (hd0,0)
kernel /vmlinuz-linux root=/dev/sda1 ro vga=0x034a quiet init/bin/systemd
initrd /initramfs-linux.img

title Arch Linux ASROCK
root (hd0,0)
kernel /vmlinuz-linux-asrock root=/dev/disk/by-uuid/86078c54-80a3-47a4-b02e-bc6b537cc142 ro vga=0x034a quiet pcie_aspm=force init=/bin/systemd
initrd /initramfs-linux-asrock.img

title Arch Linux Fallback
root (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/86078c54-80a3-47a4-b02e-bc6b537cc142 ro vga=0x034a quiet pcie_aspm=force init=/bin/systemd
initrd /initramfs-linux-fallback.img 

I can't just copy and paste, hopefully there's no typos. I have tried to remove pcie_aspm=force and so on as well.

Last edited by kaptenen (2012-03-25 19:35:21)

Offline

#6 2012-03-25 18:51:39

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

That should be init=/bin/systemd, unless that's a typo...

Unrelated, but I suggest using root=UUID=.... instead of the udev symlink.

Offline

#7 2012-03-25 19:34:42

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

falconindy wrote:

That should be init=/bin/systemd, unless that's a typo...

Unrelated, but I suggest using root=UUID=.... instead of the udev symlink.

Sadly, it was a typo. =/ I had init=/bin/systemd.

Offline

#8 2012-03-25 19:36:27

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

You'll need to be a little more clear about the errors you're getting on bootup then. take a photo if you need to -- there's not enough context from your post to understand where it's coming from.

Offline

#9 2012-03-25 20:10:17

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

falconindy wrote:

You'll need to be a little more clear about the errors you're getting on bootup then. take a photo if you need to -- there's not enough context from your post to understand where it's coming from.

Sure!
http://dl.dropbox.com/u/13702693/Ck.jpg - The first one in menu.list, that part you can't see is about fsuck.
http://dl.dropbox.com/u/13702693/Vanlig1.jpg - The second one, with root=/dev/sda1
http://dl.dropbox.com/u/13702693/20120325_007.jpg Also the second one, but without init=/bin/systemd

Offline

#10 2012-03-25 20:16:59

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

Some day, I hope busybox ash will learn how to count properly (I doubt it, since there's bug reports dating back to 2005).

Looks like you upgraded with -Syuf at some point and blew out your udev hooks when they were moved from mkinitcpio to udev. The output of "lsinitcpio -a $chroot/boot/initramfs-linux.img" and "pacman -r $chroot -Qk udev" from a liveCD should confirm that (or just post /var/log/pacman.log from the system).

Offline

#11 2012-03-25 21:29:39

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

falconindy wrote:

Some day, I hope busybox ash will learn how to count properly (I doubt it, since there's bug reports dating back to 2005).

Looks like you upgraded with -Syuf at some point and blew out your udev hooks when they were moved from mkinitcpio to udev. The output of "lsinitcpio -a $chroot/boot/initramfs-linux.img" and "pacman -r $chroot -Qk udev" from a liveCD should confirm that (or just post /var/log/pacman.log from the system).

pacman.log didn't contain any -Syuf, looks like pacman -Sy is being used (as my alias for updating). When I run the first command, lsinitcpio -a $chroot/boot/initramfs-linux.img I can only see one item in Hook run order, and that is udev. Included binaries did have udevadm but not just udev or anything, included modules didn't have anything with udev.

This is whats happends if I try to run pacman -r $chroot -Qk udev

error: failed to initialize alpm library (could not find or read directory 

If I just run pacman -Qk udev it shows

udev: 203 total files, 0 missing files 

Hope it helps.

Offline

#12 2012-03-25 21:31:41

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

No, it doesn't help... I meant for you to substitute "$chroot" for the path where you mounted your root device. The fact that udev from the liveCD isn't missing any files doesn't mean much of anything.

Offline

#13 2012-03-25 22:32:18

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

I'm sorry, its only the second time i'm chrooting. Anyway pwd showed me that I was in /root so I did pacman -r $chroot/ -Qk udev (and pacman -r / -Qk udev, heh) and the result was like before
udev: 203 total files, 0 missing files. I hope i did it right this time.

Offline

#14 2012-03-25 22:44:38

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

That still doesn't do what I'm asking for.

If your root device is /dev/sda1 and you ran 'mount /dev/sda1 /mnt', then I'm asking for the output of 'pacman -r /mnt -Qk udev'.

Offline

#15 2012-03-25 23:01:56

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

Ok. So I did mount it to /mnt/arch and now I ran 'pacman -r /mnt/arch -Qk udev', but the result is still the same.

Offline

#16 2012-03-26 17:29:06

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

And the other things I asked for? pacman.log or the lsinitcpio output from the initramfs you're trying to boot from would both be useful...

Offline

#17 2012-03-26 18:58:17

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

falconindy wrote:

And the other things I asked for? pacman.log or the lsinitcpio output from the initramfs you're trying to boot from would both be useful...

http://pastebin.com/Zq3vaJJu - Arch kernel
http://pastebin.com/HXJzd14H - Linux-ck

http://dl.dropbox.com/u/13702693/pacman.log pacman.conf

Sorry for the delay.

Offline

#18 2012-03-26 19:11:47

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

Can you put the actual gzip image on dropbox? I'm not seeing anything immediately obvious...

Offline

#19 2012-03-26 19:40:34

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

falconindy wrote:

Can you put the actual gzip image on dropbox? I'm not seeing anything immediately obvious...

Sure, here you have initramfs and vmlinuz for arch kernel and ck.
http://dl.dropbox.com/u/13702693/initramfs-linux-ck.img
http://dl.dropbox.com/u/13702693/initramfs-linux.img
http://dl.dropbox.com/u/13702693/vmlinuz-linux
http://dl.dropbox.com/u/13702693/vmlinuz-linux-ck

Offline

#20 2012-03-26 20:01:01

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

libudev.so is missing from your images, which explains the explosions on boot. Not sure why it's missing, but I suspect that reinstalling udev and regenerating the images will magically fix it.

Last edited by falconindy (2012-03-26 20:01:25)

Offline

#21 2012-03-26 20:50:16

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

There is no errors about udev anymore, but it still complains about /bin/systemd or /sbin/init. I guess one problem is gone at least!

Offline

#22 2012-03-26 20:51:21

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

kaptenen wrote:

There is no errors about udev anymore, but it still complains about /bin/systemd or /sbin/init. I guess one problem is gone at least!

Sure, you're getting that because you're mounting the wrong disk.

Offline

#23 2012-03-26 22:54:34

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: [Solved] Cant find /bin/systemd or /sbin/init (for starters)

Thanks for all the help falconindy. I think that I never leaved chroot in the right way, and that I reinstalled udev and such with the wrong architecture for some time. But now it all worked and I can sleep happy.

Offline

Board footer

Powered by FluxBB