sys-kernel/genkernel-next fails to boot from the thinly provisoined root due to missing libraries. While genkernel-next includes and compiles thin support (or copies an existing lvm with thin support) and copies the supporting binaries from sys-block/thin-provisioning-tools, it doesn't work, becasue the binaries in sys-block/thin-provisioning-tools are dynamically linked, but the shared libraries aren't copied into the initramfs. However, sys-block/thin-provisioning-tools neither a command line option in its ./configure to build static binaries (like LVM), nor does its ./configure respect any CFLAGS/LDFLAGS passed to it. Futhermore, even if it did, it also links expat, and static expat binaries are not created by default. But as udev-205+ systemd (and therefore udev) doesn't support building static libaries (libudev,a) anyway its probably just to copy the needed libraries into the initramfs as well, as LVM will start having the same problem. By comparison, sys-kernel/genkernel has no support whatsoever for thin volumes (sys-kernel/dracut does but only includes it in the initramfs if its generated on a host with a thin root)
The libraries should be copied as per copy_binaries(), which is the function used to do the magic. Please provide more info (boot logs, lddtree output, etc). Simply stating that something "does not work" is not really helpful :-(
Running thin_check from the initramfs return the following: /sbin/thin_check: error while loading shared libraries: libstdc++.so.6: Cannot open shared object file: No such file or directory I copied ldd into the initramfs, and it shows there 2 is missing libraries: libstdc++.so.6 and libgcc_s.so.1. Both are present in the initramfs, under the /usr/lib/gcc/x84_64-pc-linux-gnu/4.6.3/32 directory, but i think those are the 32-bit ones.
What version of genkernel-next did you use to build that initramfs?
version 23
Could you post the whole initramfs file somewhere so that I can download and inspect it?
Also, in the meantime, can you: - paste the output of ldd /sbin/thin_check - paste the output of emerge --info - paste the content of /etc/ld.so.conf and /etc/ld.so.conf.d/* There is something wrong with genkernel and your particular configuration. I am unable to reproduce the problem here.
This was done in a qemu/kvm, booted from a Fedora 19 Live CD (amd64), as the Gentoo live CD do not have thin-provisoing-tools. I'm using virtio-scsi drivers, however genkernel doesn't copy that one in the modulem so modified /usr/share/genkernel/arch/x86_64/modules_load to include it. Otherwsie jsut a stage3, with only 4 packagse in the world file: sys-boot/grub:2 ,sys-fs/lvm2, sys-kernel/genkernel-next, sys-kernel/gentoo-sources. From the initramfs: # /bin/sh /usr/bin/ldd /sbin/thin_check linux-vdso.so.1 (0x00007fff31ffe000) libstdc++.so.6 => not found libgcc_s.so.1 => not found libc.so.6 => /lib64/libc.so.6 (0x00007f0ca80ff000) /lib64/ld-linux-x86-64.so.2 (0x00007f0ca84a7000) from the build host: # ldd /sbin/thin_check linux-vdso.so.1 (0x00007fff919fe000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libstdc++.so.6 (0x00007f49773f1000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_s.so.1 (0x00007f49771db000) libc.so.6 => /lib64/libc.so.6 (0x00007f4976e33000) libm.so.6 => /lib64/libm.so.6 (0x00007f4976b3d000) /lib64/ld-linux-x86-64.so.2 (0x00007f49776f5000) /etc/ld.so.conf: # ld.so.conf autogenerated by env-update; make all changes to # contents of /etc/env.d directory /lib64 /usr/lib64 /usr/local/lib64 /lib32 /usr/lib32 /usr/local/lib32 /lib /usr/lib /usr/local/lib include ld.so.conf.d/*.conf /usr/x86_64-pc-linux-gnu/lib ls /etc/ld.so.conf.d/*: /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf: /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/32 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3 emerge --info: Portage 2.1.12.2 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.9.5-301.fc19.x86_64 x86_64) ================================================================= System uname: Linux-3.9.5-301.fc19.x86_64-x86_64-QEMU_Virtual_CPU_version_1.4.2-with-gentoo-2.2 KiB Mem: 1019684 total, 83244 free KiB Swap: 0 total, 0 free Timestamp of tree: Fri, 23 Aug 2013 01:00:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 app-shells/bash: 4.2_p45 dev-lang/python: 2.7.5, 3.2.5-r1 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.69 sys-devel/automake: 1.12.6 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl amd64 berkdb bindist bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pcre readline session sse sse2 ssl tcpd unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
is /etc/ld.so.cache available in the initramfs? Could you attach it here? (it's a binary file).
Created attachment 357440 [details] /etc/ld.so.cache from the initramfs
Sorry, I need the full initramfs archive in order to figure out what's going on. There's something wrong somewhere.
The initramfs is too large to post via bugzilla, so i've sent a link via e-mail to download it.
Thanks for the initramfs. I'm trying to figure out why some libraries haven't been copied to the initramfs by copy_binaries(). It might be due to lddtree. What version of pax-utils are you using?
The current stable - app-misc/pax-utils-0.4
Sorry if I keep asking you questions. Hopefully this is the last one. Can you paste the output of your genkernel call adding --loglevel=5 --logfile=/tmp/gk.log ? Then also attach the /tmp/gk.log file.
Created attachment 357520 [details] genkernel --loglevel=5 output
I said: "Can you *paste the output* of your genkernel ..."
Created attachment 357814 [details] genkernel --lvm --loglevel=5 | tee output Whoops. Here's the output of the command (via tee).
Thanks. It looks like copy_binaries() is doing something wrong there. What is the output of: # lddtree /sbin/lvm /sbin/dmsetup /sbin/thin_check /sbin/thin_restore /sbin/thin_dump > /tmp/lddtree.out.txt 2> /tmp/lddtree.err.txt (please attach both files, don't paste the output here) Then do this: # lddtree /sbin/lvm /sbin/dmsetup /sbin/thin_check /sbin/thin_restore /sbin/thin_dump | tr ')(' '\n' | awk '/=>/{ if($3 ~ /^\//){print $3}}' | sort | uniq > /tmp/lddtree.filtered.txt (please attach /tmp/lddtree.filtered.txt to this bug) Finally, try to upgrade to the latest unstable pax-utils and run: # lddtree -l /sbin/lvm /sbin/dmsetup /sbin/thin_check /sbin/thin_restore /sbin/thin_dump > /tmp/lddtree.unstable.txt (please attach /tmp/lddtree.unstable.txt to this bug). Thanks for your time.
Created attachment 358308 [details] lddtree output (stable) /tmp/lddtree.err.txt is an empty file so I didn't incliude it
Created attachment 358310 [details] filter lddtree output (stable)
Created attachment 358312 [details] lddtree output (unstable)
With app-misc/pax-utils-0.7 it boots noramlly (with the current stable, app-misc/pax-utils-0.4 it does not)
+ 09 Sep 2013; Fabio Erculiani <lxnay@gentoo.org> genkernel-next-24.ebuild: + bump the minimum dmraid and pax-utils version requirements, fix bugs #482504, + #472670 +