13

I face this message:

Failed to execute /initKernel panic - not syncing: no init found. Try passing init=option to kernel. 

I am using this command line:

qemu-system-x86_64 -hda disk.img -kernel /home/marssonubuntu/linux_qemu/linux-3.3.3/arch/x86/boot/bzImage -initrd my-initramfs.cpio -append "root=/dev/sda rdinit=/sbin/init" 

on qemu, the full message is:

Failed to execute /sbin/init Kernel panic - not syncing: No init found. Try passing init= option to kernel. see Linux Documentation/init.txt for guidance. Pid: 1, comm: swapper Not tainted 3.3.3 #1 Call Trace: [<ffffffff811d78b4>] ? panic+0xa9/0x197 [<ffffffff811d6927>] ? init_post+0xb2/0xb2 [<ffffffff812aad96>] ? kernel_init+0xff/0xff [<ffffffff811dcd44>] ? kernel_thread_helper+0x4/0x10 [<ffffffff812aac97>] ? do_one_initcall+0x121/0x121 [<ffffffff811dcd40>] ? gs_change+0xb/0xb 
7
  • I created new kernel image and running it on QEMU..but showing this error msg: "Kernel panic" I used this command: ["/linux_qemu$ qemu-system-x86_64 -hda disk.img -kernel bzImage -initrd my-initramfs.cpio"] Please help. Thanks Commented Feb 26, 2014 at 13:09
  • @Ash please edit your question to add any information that could lead to solving your issue, the message you send us can be caused by thousand of things, we are not going to enumerate so you can check one after one. Commented Feb 26, 2014 at 13:16
  • I edited my question with the required details, please have a look. thanks. Commented Feb 28, 2014 at 2:53
  • Your kernel is built with initramfs support, right? Commented Feb 28, 2014 at 17:13
  • Kernel is supporting initramfs..... Commented Mar 3, 2014 at 12:37

4 Answers 4

13

I used:

qemu-system-x86_64 --enable-kvm -m 1024 -machine smm=off -cdrom mint.iso -boot order=d mint_hdd.img 

Specifying RAM size i.e.

-m 1024 

fixed this issue and booted into mint successfully.

1
  • Thank you, increasing RAM fixed this error with custom debian-live. Commented Jan 14, 2017 at 17:35
5

I had this issue, and increasing the guest's RAM fixed it. Try passing -m 1024.

1
  • Thank you, increasing RAM fixed this error with custom debian-live. Commented Jan 14, 2017 at 17:35
0

Ok, here is my Qemu command line:

KERNEL=vmlinuz-2.6.32-5-686 INITRD=initrd.img-2.6.32-5-686 APPEND="root=/dev/sda2 ro " IMG=qemu.img qemu -kernel $KERNEL -initrd $INITRD -append "$APPEND" -hda $IMG $ file $IMG $INITRD $KERNEL qemu.img: DOS/MBR boot sector initrd.img-2.6.32-5-686: gzip compressed data vmlinuz-2.6.32-5-686: Linux kernel x86 boot executable bzImage 
1
  • Thanks for sharing the command line. well, I am still having the same problem. I a using this command line: [qemu-system-x86_64 -hda disk.img -kernel /home/marssonubuntu/linux_qemu/linux-3.3.3/arch/x86/boot/bzImage -initrd my-initramfs.cpio -append "root=/dev/sda rdinit=/sbin/init"]. The message shows like this.... Failed to execute /sbin/init Kernel panic - not syncing: No init found. Try passing init= option to kernel. see Linux Documentation/init.txt for guidance. Pid: 1, comm: swapper Not tainted 3.3.3 #1 Call Trace: [<ffffffff811d78b4>] ? panic+0xa9/0x197 Commented Feb 28, 2014 at 1:42
-1

I had the same problam and I managed to build mini Linux following the steps below.

Boot Mini Linux Test with Qemu

Steps in Building Base Mini Linux Distro

  1. Compile the kernel and see the result in terms of size of the compilation
  2. Create rootfs image (format as ext2 mke2fs for example) that will contain the root system and some basic programs (used busybox)
  3. Mount rootfs and create basic directories and files
  4. Compile busybox and install it inside the rootfs
  5. Check the kernel size (with or without modules enabled) and Ciar image (with mkdosfs applied to the image linux.img example) that contain linux.img grub or syslinux setting the boot process of the system
  6. After rootfs created and linux, copy for syslinux.cfg linux.img , bzImage, into the linux.img
  7. Applies the command sync syslinux to finish the linux.img image ;
  8. After all settings and installations test it with qemu, for example, the following command qemu linux.img
  9. If everything's OK, the system will boot to the basic shell.

But the current attempts can not enter the terminal ( shell )

I leave these steps here in case they can help someone or someone can help me.

3
  • 1
    It is incredibly difficult to figure out what you are trying to say. Are you asking for further help on this issue? If so, you should not be posting this as an answer, but as a new question and referencing the old one. If you are trying to provide an answer, you should try to make your procedure make sense and be readable. Commented Jul 10, 2014 at 0:26
  • 1
    For those who prefer code to prose, there is Minimal Linux Live :-) Commented May 20, 2015 at 11:43
  • This is really unclear to me. There is just so much information missing. Commented Mar 23, 2017 at 6:51

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.