5

I'm building Linux from scratch. Currently I have the kernel, glibc and sysvinit. I've compiled everything myself following these instructions. Though my version of glibc is 2.19. Also, I use grub instead of lilo but I don't think that would have any effect.

Anyway, when I boot I get this at the end:

Starting init: /sbin/init exists but couldn't execute it (error -8)
Kernel panic - not syncing: No working init found. (and so on)

Error code 8 means it's a problem with the executeble format. I also tried making another executable that prints "asdf" but that didn't work either (same error).

So should I use an older version of glibc, another c library, another init program (like systemd) or are these instructions bad?

4
  • Those instructions are 14 years old! I'm certain you could find something more recent. Sep 8, 2014 at 15:38
  • Quick Googling showed incorrect architectures (running 64-bit on a 32-bit CPU). Could that be the issue?
    – Mark Lopez
    Sep 8, 2014 at 16:47
  • Probbably not. I have a 64-bit computer and I compiled the programs on a 32-bit OS. So I don't think that's the problem but thanks anyway.
    – Hullu2000
    Sep 9, 2014 at 5:56
  • Which version of the kernel and glibc? With or without initrd? Are the permissions for /sbin/init correct? Error -8 is ENOEXEC (Exec format error), look in fs/exec.c for possible reasons that caused it.
    – dirkt
    Oct 1, 2016 at 17:10

0

You must log in to answer this question.

Browse other questions tagged .