On 26 October 2022 03:02:47 CEST, Jeff Pohlmeyer <yetanotherg...@gmail.com> wrote: >On Tue, Oct 25, 2022 at 3:57 PM samuel ammonius <sfammon...@gmail.com> wrote: >> >> I have a simple ISO filesystem set up with busybox and grub. >> These are the commands I use in GRUB2 to start the system: >> >> grub> set root=(cd) >> grub> linux /boot/bzImage root=/dev/sda1 >> grub> initrd /boot/initrd >> grub> boot >> > >If you are booting from an ISO filesystem, chances are your root= is >probably not /dev/sda1. Also, you don't mention how you generated the >initrd. > >> the final error is "kernel panic: attempted to kill init! error code: >> 0x00007f00". >> I tried building a static "Hello, world!" program as the FAQ said, and it >> worked. >> What could be causing the error? > >You could try appending init=/bin/sh to the kernel command line and >see if you can at least get a shell prompt.
And make sure that your image contains all required libs. Check ldd of the BusyBox binary. Or check readelf. You should be able to chroot to the loop mounted initramfs ( or whatever your image is, loop mounted iso) and check that libs are present, i.e. if your dynamically linked BusyBox fully resolves, and that the individual steps of your inittab work as written. Using an emulator like qemu -cdrom ../my.iso -m 512m or the qemu-system-i386 variant that you target is of great use, also to capture output otherwise hard to capture if you don't have a serial line at hand, or some modern equivalent. That should help pinpoint eventual problems. Bonus points if you provide a recording of what you did, what went wrong and how you solved it for folks to learn from, of course |-) HTH and cheers, _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox