In my case this specifically messes up Plymouth... See Bug But, based on the results of attempting to figure that out, it's just any, non-static binary.
Unpacking the initramfs into a chroot and poking around gets exactly the same errors.
I did note that there's kind of a conflict between what genkernel sets up as the initial filesystem without /bin and /usr/bin (&c) being symlinked and what plymouth specifically creates in the overlay that genkernel tries to tack on later. So I figure something's being overwritten somewhere...
So I attempted to update genkernel to handle merged-usr layouts.
Code: Select all
--- genkernel-4.3.17/gen_initramfs.sh 2025-06-10 09:14:40.000000000 -0700
+++ /tmp/gen_initramfs.sh 2025-12-04 11:28:34.642865787 -0800
@@ -282,10 +282,14 @@
mkdir "${TDIR}" || gen_die "Failed to create '${TDIR}'!"
cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!"
-
+ print_info 5 "$(get_indent 2) Beginning construction of base_layout"
local mydir=
for mydir in \
.initrd \
+ usr \
+ usr/bin \
+ usr/lib \
+ usr/sbin \
bin \
dev \
etc \
@@ -298,15 +302,25 @@
sbin \
sys \
tmp \
- usr \
- usr/bin \
- usr/lib \
- usr/sbin \
var/empty \
var/log \
var/run/lock \
; do
- mkdir -p "${TDIR}"/${mydir} || gen_die "Failed to create '${TDIR}/${mydir}'!"
+ if [ -L "/${mydir}" ]
+ then
+ print_info 5 "$(get_indent 2) Detected symlinked folder ${mydir},"
+ print_info 5 "$(get_indent 2) pointing at $(readlink /${mydir}),"
+ print_info 5 "$(get_indent 2) cloning to ${TDIR}/${mydir}."
+ cp -a "/${mydir}" "${TDIR}/${mydir}" || gen_die "Failed to clone link '${TDIR}/${mydir}'!"
+ else
+ if [ ! -e "${TDIR}/${mydir}" ]
+ then
+ print_info 5 "$(get_indent 2) Creating folder ${TDIR}/${mydir}"
+ mkdir -p "${TDIR}"/${mydir} || gen_die "Failed to create '${TDIR}/${mydir}'!"
+ else
+ print_info 5 "$(get_indent 2) ${TDIR}/${mydir} Already exists $([ -L "${TDIR}/${mydir}" ] && echo as symlink)"
+ fi
+ fi
done
chmod 1777 "${TDIR}"/tmp || gen_die "Failed to chmod of '${TDIR}/tmp' to 1777!"
@@ -1364,6 +1380,8 @@
# can probably get rid of this; depends if plymouth was built with static libs
# rm -f "${TDIR}"/lib*/{ld*,libc*,libz*} \
# || gen_die "Failed to clean up plymouth cpio archive!"
+ #just the opposite really, I think. Plymouth is hard to build static. Take no chances.
+ touch "${TEMP}/.binaries_copied"
ln -sf "${PLYMOUTH_THEME}/${PLYMOUTH_THEME}.plymouth" "${TDIR}/usr/share/plymouth/themes/default.plymouth" \
|| gen_die "Failed to set the default plymouth theme!"
With these changes, I can unpack the generated initramfs into a chroot, and all the dynamically linked executables seem to actually run.
But... now when I try to boot with the initramfs, I get nothing but a black screen for thirty seconds or so, and then the system reboots.
If I turn off "quiet" in the linux cmdline options, I get one message from the kernel about it finding the initrd in memory, and then nothing until it reboots itself.
Debugging this is, obviously, rather a challenge. Especially where it seems like it should work based on stuff working in a chroot... And especially where it was working previously with nothing but the stuff genkernel is statically compiling, which definitely seems to all still be there. So I'm kind of working completely blind.
So I'm looking for a bit of help from somebody who has a bit more experience with initramfs stuff. I can probably even pay a reasonable fee if there's somebody who wants to just "make it work" and deal with getting it into an official release.
And because I know a bunch of people are going to jump in and just tell me to use something else, to do so I require the following:
1) Plymouth support or similar, animated splash screen that loads early and works regardless of display resolution.
2) The ability to use the same initramfs to boot either from read-only recovery media like a DVD, or from the installed system.
3) An easy way to patch in an equivalent to my custom boot method that loads the contents of a tarball into a zram for recovery purposes rather than relying on squashfs. (No, I'm not including this in my testing builds, and it doesn't get that far anyway.)
Dracut fails #2 last time I tried it. Probably fails #3.
ugrd fails #1. Probably fails #2.
If you've got a suggestion that might be less work than just fixing genkernel, I'd be happy to look at it. But please don't clutter things up with pointless warnings about genkernel not being well-maintained. I already know that.



