Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 578608

Summary: sys-kernel/genkernel-3.4.52.4-r1: Copies in random bits from host environment
Product: Gentoo Hosted Projects Reporter: Patrick Lauer <patrick>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Patrick Lauer gentoo-dev 2016-03-30 13:50:57 UTC
I've had some fun tracking down this issue - if I build an initramfs on a host directly I can't boot with it in a VM (and other machines), if I build it in the VM it works everywhere.

So the difference is mostly that the host has CFLAGS="-march=native", but even if I set CFLAGS to something very boring the resulting initramfs explodes.

After some cpio take-aparting I noticed:

ls lib/
keymaps  ld-linux-x86-64.so.2  libblkid.so.1  libc.so.6  libuuid.so.1  modules

hmm, is that ... glibc from the host? Infected with ungood CFLAGS?
Yes, that's exactly what copy_binaries() in /usr/share/genkernel/gen_initramfs.sh does.

Oh my, who would do such a cruel thing and make an unportable initramfs ...
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2019-07-15 10:16:57 UTC
Starting With genkernel-4.0.0-beta.1, we no longer copy random bits from host environment.