After I've investigated for several hours why my initramfs wouldn't work, I found out that the file /bin/busybox.static is not static at all. This is probably the result of fixing bug 190212, as the pam USE flag seems to be handled just like the static use flag in too many situations, including the creation of this symlink. There are several possible solutions. One would be to disable pam support when building a static version. Another would be to simply not create a static version at all, and to skip the creation of the symlink as well.
Created attachment 130807 [details, diff] Patch busybox-1.7.0.ebuild to skip static files for USE=pam This avoids installing /bin/bb and /bin/busybox.static if USE=pam is given and USE=static is not. I noticed that the current version would not install a /bin/busybox.static node for normal builds with neither static nor pam USE flag. This seems to be an error as well, as bb and busybox.static seem to be synonymous in all cases, at least that's the way the 1.6.1 ebuild handled things. I therefore duplicated the dosym command.
Reading in bug 95136 that /bin/bb is the default rescue shell makes it sound like we really would want that node to be present in all cases. The current ebuild does this, my patch won't. However the rescue shell should really be linked statically, so probably we should make an effort to get a static version compiled without pam in all cases. Enabling CONFIG_STATIC seems to work by simply putting that option on the command line of make. I don't know whether unconfiguring CONFIG_PAM could work similarly, or whether you would need to reconfigure the whole package.
i'll omit the /bin/busybox.static symlink, but not /bin/bb /bin/bb should always exist the ebuild already accounts for USE="static pam" by disabling pam support
(In reply to comment #3) > /bin/bb should always exist As a repair shell, reight? I agree there. > the ebuild already accounts for USE="static pam" by disabling pam support I know this, I was more concerned about scenarios with USE="-static pam" where the libc got damaged somehow. In these cases you'd be out of luck if you try to repair this using bb. Thats why I wrote about trying to get a static non-pam version in all cases, no matter the USE flags.
i chose not to build busybox twice because the build system does not [yet] properly account for minimal rebuilding based on changed configuration options, so if pam gets turned off in the .config, the tree needs to be cleaned completely and built from scratch
Please use /etc/portage/package.use where it fits the needs of the local box.