I'm trying to build a small, bloat-free system for network bridging purposes using just Busybox and wpa_supplicant in an initramfs. However, I'm greeted with a kernel panic in the very moment when Busybox should do business.
What have I done so far?
As the target machine conveniently is x86-64, I prepared a freshly downloaded Stage 3 in a chroot on my main workstation, especially setting FEATURES="buildpkg" and running emerge -e @system. Then I emerged gentoo-sources, busybox and wpa_supplicant; wpa_supplicant having all USE flags disabled and busybox having just the ipv6 and - most importantly - static USE flags set. I checked that busybox is indeed static:
Code: Select all
(chroot) r7 / # ldd /bin/busybox
not a dynamic executable
(chroot) r7 / #I prepared the initramfs in /usr/src/initramfs/ by emerging a baselayout to it, followed by ROOT=/usr/src/initramfs emerge -atv --usepkgonly wpa_supplicant. Then I copied /bin/busybox to /usr/src/initramfs/bin/.
Lastly, I created a minimal /usr/src/initramfs/init file which (for first testing) looks like this:
Code: Select all
(chroot) r7 / # cat /usr/src/initramfs/init
#!/bin/busybox sh
echo "Boot complete. Have fun!"
exec sh
(chroot) r7 / #Code: Select all
Run /init as init process
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
CPU: 1 PID: 1 Comm: sh Not tainted 5.4.80-gentoo-r1 #17
I'm at a loss.
What's wrong here? Where have I missed something?


