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

Bug 669792

Summary: sys-kernel/genkernel-next-68 with sys-fs/mdadm-4.1 fails to build initramfs because of missing /sbin/mdassemble
Product: Gentoo Linux Reporter: Paramonov Valeriy <asm64>
Component: Current packagesAssignee: Ettore Di Giacinto (RETIRED) <mudler>
Status: RESOLVED OBSOLETE    
Severity: normal CC: ahodgson, b.buschinski, base-system, haubi, ian, kroemmelbein, mike.desimone, samurai.no.dojo, spookyghost, stephendbell
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
Patch for gen_initramfs.sh

Description Paramonov Valeriy 2018-10-27 14:05:05 UTC
Hi there.
mdadm-4.1 has'nt contain /sbin/mdassemble, but 4.0 has.
Temporary solution mask 4.1 and use 4.0. It works fine.
Sorry. I'm not include any files, because wrote from tablet.

Reproducible: Always

Steps to Reproduce:
1. Emerge mdadm 4.1
2. Compile kernel with genkernel next with mdadm and initramfs
Comment 1 Paramonov Valeriy 2018-10-27 15:15:52 UTC
Created attachment 553360 [details]
emerge --info
Comment 2 Paramonov Valeriy 2018-10-27 15:22:23 UTC
I build kernel with next command:

genkernel --udev --mdadm --menuconfig --mountboot --busybox --makeopts="-j7" --clean --no-mrproper --color --compress-initramfs --compress-initramfs-type=gzip --no-splash --plymouth --plymouth-theme=breeze --firmware --bootloader=grub2 all
Comment 3 Juergen Rose 2018-10-27 16:50:24 UTC
Same here.
Comment 4 Juergen Rose 2018-10-27 16:53:42 UTC
root@impala:/usr/src/linux(26)# ll /sbin/md*
-rwxr-xr-x 1 root root 604616 Oct 27 18:47 /sbin/mdadm*
-rwxr-xr-x 1 root root 332800 Oct 27 18:47 /sbin/mdmon*
root@impala:/usr/src/linux(27)# qlist -v mdadm | grep mdassemble
root@impala:/usr/src/linux(28)# qlist -v mdadm | grep sbin
/sbin/mdmon
/sbin/mdadm
/usr/sbin/checkarray
root@impala:/usr/src/linux(29)# qlist -v mdadm | grep mdassemble
root@impala:/usr/src/linux(31)# qlist -Iv mdadm
sys-fs/mdadm-4.1


root@impala:/usr/src/linux(33)# emerge --info mdadm
Portage 2.3.51 (python 3.6.6-final-0, default/linux/amd64/17.0, gcc-8.2.0, glibc-2.27-r6, 4.18.14-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.18.14-gentoo-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.6
KiB Mem:     8153996 total,   1834868 free
KiB Swap:   50331640 total,  49264888 free
Timestamp of repository gentoo: Sat, 27 Oct 2018 11:00:01 +0000
Head commit of repository gentoo: 0692a32aab0f2d2dd2d8e013cca68226d7ca2679
sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p3) 2.31.1
distcc[16978] (dcc_trace_version) distcc 3.2rc1 x86_64-pc-linux-gnu; built Jan 17 2018 02:18:29 [disabled]
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15-r100::sage-on-gentoo, 3.6.6::gentoo, 3.7.0::gentoo
dev-util/cmake:           3.11.4-r1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r1::gentoo
sys-devel/gcc:            8.2.0-r3::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage_impala
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

g-cpan
    location: /var/lib/cpan
    masters: gentoo
    priority: 1

ago
    location: /var/lib/layman/ago
    masters: gentoo
    priority: 50

imaging
    location: /var/lib/layman/imaging
    masters: gentoo
    priority: 50

sage-on-gentoo
    location: /var/lib/layman/sage-on-gentoo
    masters: gentoo science
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

x11
    location: /var/lib/layman/x11
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL Intel-SDP dlj-1.1 skype-eula skype-4.0.0.7-copyright googleearth AdobeFlash-11.x cadsoft Oracle-BCLA-JavaSE MakeMKV-EULA NVIDIA-CUDA Nero-AAC-EULA GIMPS"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en fr ru"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="3dnow 3dnowext 64bit R X Xaw3d a52 aac accessibility acl acpi admin afs alsa amd64 amr ao apache2 apng applet archive armadillo arpack asf aspell assistant atlas audiofile aufs automap automount barcode bash-completion berkdb blas blast bluetooth bluray boost btrfs bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cg cgi chm cilk clang cli cmake collada contrib crypt css cups curl cxx daap db dbi dbm dbus declarative designer devhelp device-mapper dga dia digitalradio djvu doc dot dri ds2490 ds9097 ds9097u dts dv dvb dvd dvdr dvi dynamicplugin eds egl elf emacs emboss emf encode epiphany evdev evo examples excel exif expat extensions extra extras faac faad fam ffmpeg fftw firefox fits flac fltk fontconfig foomaticdb fortran fortran95 fpm fpx ftp fuse gcj gd gdal gdbm gedit geoip geolocation geos gfortran gif gimp git glade glamor glib glpk gml gmp gnome gnome-keyring gnuplot gnutls gold gphoto2 gpm grammar graphics graphtft graphviz grass gsl gsm gstreamer gtk gtk3 gudev guile hddtemp hdf hdf5 hdri html http httpd hvm hwdb iconv icq icu id3tag ide imagemagick imap inotify introspection ipod ipv6 ithreads jadetex java jbig jit john jpeg jpeg2k json kate kde kdepim kdrive kerberos keymap kpathsea kvm ladspa lame lapack latex lcms ldap lensfun libffi libgda libkms libnotify libsamplerate libtirpc lm_sensors lua lzma lzo mad mail maildir mapnik math matroska media-library mercurial mikmod mng mod mono motif mozilla mp3 mp4 mpeg mpi mpi-threads mplayer mtp multilib multimedia musepack musicbrainz mysql mysqli nautilus ncurses netcdf netpbm network networking nfs nls nntp nptl nsplugin ntfs ntp numpy obex objc ocaml ocr octave odbc ofa ogdi ogg opencv openexr opengl openmp openvg pam pango pcre pda pdf pdl2 perl plasma plotutils plugins png podcast policykit portaudio posix postgres postscript ppds ppp preview-latex proj projectm pstricks pulseaudio python q16 q32 qemu qhull qml qt5 quicktime raw readline reiserfs reports rle romio rpc rrdcgi rrdtool rtlsdr sage samba sasl schroedinger science sdk sdl seccomp secure-delete server session shout sip slang slp smart smbclient smp sms sndfile snmp soap sockets sound soup sox speex spell sql sqlite ssl stlport subtitles subversion sudo suexec svg svm swig systemd szip t1lib tbb tcl tcpd tex tex4ht theora thesaurus threads thunderbird tidy tiff tk tools truetype udev udisks unicode usb utempter v4l v4l2 vaapi vala valgrind vdpau video vim-syntax virt-network virtualbox visio vorbis vpx vtk wav wayland webdav webdav-serf webkit wmf wxwidgets x264 xa xattr xcb xen xetex xft xine xml xmlreader xmlrpc xpm xv xvid xvmc yaml youtube zlib zsh-completion zvbi" 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="actions alias auth_basic auth_digest authn_anon authn_dbd authn_core authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info lbmethod_byrequests log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif slotmem_shm so socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon plan sheets stage words" CAMERAS="canon fuji ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="emu efi-64 pc xen" INPUT_DEVICES="keyboard mouse evdev void" KERNEL="linux" L10N="de en fr ru" LCD_DEVICES="cfontz hd44780 mtxorb ncurses X lcd2usb lcdlinux png usblcd SureElec" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="devinput" LLVM_TARGETS="NVPTX X86" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="nouveau displaylink" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-fs/mdadm-4.1::gentoo was built with the following:
USE="-static" ABI_X86="(64)"

root@impala:/usr/src/linux(34)#
Comment 5 samurai.no.dojo 2018-11-07 20:15:04 UTC
I can confirm that...
Comment 6 Mike DeSimone 2018-11-11 15:14:59 UTC
Same bug here, can we mark this confirmed?

BTW, this may be a bug in the new EAPI 6 mdadm ebuild:

/usr/portage/sys-fs/mdadm # diff mdadm-4.{0,1}.ebuild 
[... omitted EAPI 5 -> 6 changes that look okay ...]
46c47
< 	mdadm_emake all mdassemble
---
> 	mdadm_emake all
57,59c58
< 	into /
< 	dosbin mdassemble
< 	dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV}
---
> 	dodoc ChangeLog INSTALL TODO README* ANNOUNCE-*
Comment 7 Mike DeSimone 2018-11-11 15:32:17 UTC
Further investigation reveals that mdassemble was removed from upstream mdadm 4.1.

The old man page for `mdassemble` says:

> Invoking mdassemble has the same effect as invoking mdadm --assemble --scan.

So maybe genkernel needs to pull in mdadm instead and use that command in place of mdassemble?
Comment 8 Joe Chen 2018-11-19 16:11:35 UTC
I have same problem, maybe sys-kernel/genkernel-next need update to match mdadm-4.1 change
Comment 9 Egor 2018-11-23 06:28:52 UTC
Same here
Comment 10 Jonathan Heaney 2018-11-23 11:36:19 UTC
Workaround -

In the file -

/usr/share/genkernel/defaults/gen_initramfs.sh

There is -

    copy_binaries "${TEMP}/initramfs-mdadm-temp" \
        /sbin/mdadm /sbin/mdmon /sbin/mdassemble

Delete  /sbin/mdassemble

Initramfs is generated and installs.

Genkernel is still throwing up a couple of errors, but they might have been there for ages and I haven't noticed them -

* Adding kernel to /boot/grub/grub.conf...
awk: fatal: cannot open file `/var/tmp/genkernel/19669.23261.31844.16419/grub.map' for reading (No such file or directory)
/usr/share/genkernel/gen_bootloader.sh: line 75: /dev/array/root - 1: syntax error: operand expected (error token is "/dev/array/root - 1")
Comment 11 Ian Pickworth 2018-11-23 15:07:41 UTC
Ref Jonathan Heaney comment,

I found the gen_initramfs.sh file here:
    /usr/share/genkernel/gen_initramfs.sh
Comment 12 Ian Pickworth 2018-11-24 09:48:17 UTC
Created attachment 556112 [details, diff]
Patch for gen_initramfs.sh

Removes /sbin/mdassemble
Comment 13 Ian Pickworth 2018-11-24 09:50:44 UTC
Confirm that removing  "/sbin/mdassemble" from 
 /usr/share/genkernel/gen_initramfs.sh works, in that the genkernel run works, and then the new kernel boots OK.

I've attached a patch file to make the change.
Comment 14 Jonathan Heaney 2018-11-24 16:43:14 UTC
(In reply to Ian Pickworth from comment #11)
> Ref Jonathan Heaney comment,
> 
> I found the gen_initramfs.sh file here:
>     /usr/share/genkernel/gen_initramfs.sh

Yeah I made a typo while copying and pasting, somehow.
Comment 15 Juan David Ibáñez Palomar 2018-11-25 15:35:19 UTC
This is fixed upgrading to genkernel-next 69
Comment 16 Amel Hodzic 2018-12-20 05:02:45 UTC
Based on this, it appears that genkernel-next-68 is no longer stable and genkernel-next-69 is stable.  The sys-fs/mdadm-4.1 version is marked as stable and it fails with genkernel-next-68.
Comment 17 Amel Hodzic 2018-12-21 00:39:49 UTC
Cross-referencing genkernel-next-69 stable request at https://bugs.gentoo.org/672772
Comment 18 Michael Haubenwallner (RETIRED) gentoo-dev 2019-02-14 07:46:55 UTC
Same here on stable amd64.

Maybe sys-fs/mdadm-4.0 should be restored for the moment,
and sys-kernel/genkernel-68 should depend on <sys-fs/mdadm-4.1 ?
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-08-20 12:51:01 UTC
Package removed.