Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I try to boot up my custom linux from scratch it mounts the root filesystem then I get this message: Kernel panic-not syncing: no init found. I have the init compiled from source and I have the necessary libraries to run init. What did I do wrong?

share|improve this question
1  
Where do you have init, how do you boot your system? What is the kernel commandline, what are defaults you changed in the kernel? Are you using a normal root or using some initrd thing to mount a temporary root before mounting the real one? As the kernel quite simply says, no init found. No need to complicate, it cannot find init. Is that the only error message or is that preceded by more errors? –  njsg Jan 26 '13 at 7:31
1  
Are you sure it mounted the root filesystem? Try passing init=/bin/sh or similar on the kernel command line. See if that works (should land you with a shell). –  derobert Jan 26 '13 at 10:43
1  
Are you sure that the root filesystem is mounted? Are you sure that your init works on that kernel? There's far too little information in your question to help you. What is your processor architecture? How did you configure your kernel? Where and what is your root filesystem? What's your init program and how did you compile and install it? –  Gilles Jan 26 '13 at 22:20

1 Answer 1

As the error message says, you have no init program. Your initramfs should have an /sbin/init that starts all userland processes.

share|improve this answer
    
actually I have an init file ready –  gabemai Jan 26 '13 at 2:12
    
@gabemai, do you use an initramfs? If so, how is it populated? You can check its contents with zcat /boot/initramfs-3.8.0-rc4.img | cpio -itv –  vonbrand Jan 26 '13 at 6:13
1  
@Dennis, you are assuming the OP is using an initramfs? Why? Is this an issue that is specific to initramfs'es? I don't think so, I'd say whatever gets mounted as the root filesystem (possibly the real root unless someone actually does use initramfses) does not have /bin/init. –  njsg Jan 26 '13 at 7:29
    
Hmm, I didn't think running without initramfs was possible these days as you'd need a minimal /dev and /sbin/init. Guess I was wrong :) –  Dennis Kaarsemaker Jan 26 '13 at 11:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.