minimal icon indicating copy to clipboard operation
minimal copied to clipboard

All builds end up with Kernel panic - not syncing: No working init found

Open kincsescsaba opened this issue 1 year ago • 3 comments
trafficstars

Hi,

I tried many kernel versions and all of my builds produce a Kernel panic - not syncing: No working init found when I run the qemu test. How can I debug this kind of error? What are the possible causes?

The iso is generated, I can see an init file under minimal_rootfs.

kincsescsaba avatar Feb 20 '24 23:02 kincsescsaba

Meanwhile, I added further tests, and what I see is that it runs binaries compiled from C, I even tested shebang expansion. The latter passed the /init filename as an argument, so I assume that works fine. Is it possible that busybox is broken, and there is no error message about that?

kincsescsaba avatar Feb 21 '24 07:02 kincsescsaba

Successful building of an entire operating system entirely from scratch depends very much on your local setup. I have provided detailed instructions in the main readme file in this repo what the setup is. I recommend that you start with Minimal Linux Script, analyze everything that happens there, and then continue with MLL.

One common cause for the No working init found error message is not enough RAM. You can increase the RAM for the VM and check again. Another approach is to run the build scripts one by one, and cartefully analyze the result for any errors. In the end the root cause of the issue is always something in the local setup of the host OS machine. Unfortunately, I can't debug this for you, since this is your machine, and you are responsible for the local setup. The scripts are proven to work perfectly fine, assuming all host OS build dependencies are met.

Please, add a message here when you figure this out! Good luck!

ivandavidov avatar Feb 21 '24 08:02 ivandavidov

I still do not understand what went wrong, but I solved the issue by changing the host OS. It would be nice to have a relatively lightweight build environment, that's why I initially tried with Docker-Alpine. My only idea to know more about the reason for the error is to compare logs with a diff tool.

Also, I tried to boot the iso at my cloud provider but /init hanged with no messages, I'm about to check if this is a cloud provider issue or something is wrong with iso. It shouldn't be, as it works with qemu.

Do you have any ideas on what I should look for in the logs that could cause similar errors?

UPDATE: Dockerized build was fixed, all errors were due to the reason that make does not throw an error when required software is missing for the build. After I found all, it worked in qemu. Now I'll need to fix the cloud provider issue.

kincsescsaba avatar Feb 21 '24 13:02 kincsescsaba

I closed this as the main issue is solved and was there because of dependencies make needed. I'll put the other issue in another ticker.

kincsescsaba avatar Feb 25 '24 14:02 kincsescsaba