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

Bug 504034

Summary: sys-kernel/genkernel-next-54 cannot boot lvm on luks on mdadm
Product: Gentoo Linux Reporter: Craig Andrews <candrews>
Component: [OLD] Core systemAssignee: Fabio Erculiani (RETIRED) <lxnay>
Status: RESOLVED NEEDINFO    
Severity: normal CC: candrews, fabio.coatti
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Craig Andrews gentoo-dev 2014-03-10 00:01:46 UTC
I have a layered setup, with root being an lvm logical volume (/dev/mapper/data-root) that is on luks encrypted partition (/dev/md/irrational:3) that's on mdadm raid 1 (mirroring). (ext4->lvm->luks->mdadm).

I have this configuration working well for the past few years on genkernel (currently using sys-kernel/genkernel-3.3.48). Here's the kernel command line:
# cat /proc/cmdline 
BOOT_IMAGE=/kernel-genkernel-x86_64-3.13.0-gentoo-r1 root=/dev/mapper/data-root ro crypt_root=/dev/md/irrational:3 lvmraid=/dev/md126,/dev/md/irrational:3 real_root=/dev/mapper/data-root domdadm dolvm splash=silent,theme:default quiet CONSOLE=/dev/tty1 i915.semaphores=1 zswap.enabled=1 zcache

If I switch to genkernel-next, the system won't boot, with this error message:
---
Booting the kernel.
mdadm: /dev/md/irrational:3 has been started with 2 drives.
mdadm: /dev/md/126_0 has been started with 2 drives.
2 volume groups found.
Device /dev/md/irrational:3 doesn't exist or access denied.
/dev/md/irrational:3 does not contain a LUKS header.
Please file a bug report with this message
---
Note that it never asked me for the luks password. This is very weird, as the output up to the "doesn't exist" line is the same as genkernel, which works fine. It seems to find the luks partition in mdadm.

Under both genkernel and genkernel-next, I use the same command to build the kernel and initrd:
CLEAR_CACHE_DIR="yes" genkernel --mdadm --lvm --luks --kernel-cc=/usr/lib/ccache/bin/gcc --splash=default --menuconfig --install all

with the /etc/genkernel.conf file in it's unmodified state as distributed by genkernel or genkernel-next.

Here's some additional info, taken from the running system (booted using genkernel):
# cat /proc/mdstat 
Personalities : [raid1] [raid6] [raid5] [raid4] 
md126 : active raid1 sda2[0] sdb2[1]
      104320 blocks [2/2] [UU]
      
md127 : active raid1 sda4[3] sdb4[2]
      975686520 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>
# ls -la /dev/md* -R
brw-rw---- 1 root disk 9, 126 Mar  9 19:20 /dev/md126
brw-rw---- 1 root disk 9, 127 Mar  9 19:20 /dev/md127
-rw-r--r-- 1 root root      4 Mar  9 19:20 /dev/mdev.seq

/dev/md:
total 0
drwx------  2 root root   80 Mar  9 19:20 .
drwxr-xr-x 19 root root 7320 Mar  9 19:21 ..
lrwxrwxrwx  1 root root    8 Mar  9 19:20 126_0 -> ../md126
lrwxrwxrwx  1 root root    8 Mar  9 19:20 irrational:3 -> ../md127

So, /dev/md/irrational:3 == /dev/md127. /dev/md126 is not used for booting; it's just another mdadm raid setup that holds unrelated mount points (it's not /usr or anything like that).

Reproducible: Always




# emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.18-r1, 3.13.0-gentoo-r1 x86_64)
=================================================================
System uname: Linux-3.13.0-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.2
KiB Mem:     3979852 total,    134140 free
KiB Swap:    2047984 total,   2045896 free
Timestamp of tree: Sun, 09 Mar 2014 19:45:01 +0000
ld GNU ld (GNU Binutils) 2.24
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.4, 3.4.0_rc1
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo sunrise steam-overlay mv x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Intel-SDP"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -flto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.1/conf /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -flto"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=4.5"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -flto"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/steam /var/lib/layman/mv /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aacs acl acpi aiglx alsa amd64 amr amrnb amrwb animation apache2 apng artworkextra asf aspnet2 asyncns authdaemond avahi avi bash-completion bcmath berkdb bitmap-fonts bluetooth bluray bmp bonjour bzip2 cairo caps ccache cdda cddb cdparanoia cdr chm clang cli consolekit cracklib crypt cryptsetup css cups curl cxx daap dbus device-mapper dga dhclient dirac divx4linux dlloader dovecot-sasl dpms dri dts dv dvb dvd dvdr dvdread egl enca encode exif faac fam fame fat fbcondecor fbsplash ffmpeg fftw firefox flac fontconfig foomaticdb fortran freetype ftp fuse gaim gd gdbm geoip gif gimpprint glamor gles glib glibc-omitfp glitz glut gphoto2 gsm gstreamer gstreamer10 gtk gtk2 gudev hardenedphp hbci howl howl-compat https hwdb iconv icu idn imagemagick imap imlib innodb ipv6 java java5 jbig joystick jpeg jpeg2k junit kdehiddenvisibility kvm lapack lcms libfame libkms libnotify libsamplerate libusb lirc live lm_sensors lzma lzo mad maildir mdnsresponder-compat mjpeg mmap mms mmx mmxext mng modules motif mozilla mozsvg mp3 mpeg mpeg2 mplayer multilib musepack mysql mythtv ncurses nemesi network networkmanager nls nptl nptlonly ntfs offensive ofx ogg oggvorbis openal openexr opengl openmp openvg opus pam pango pcre pdf pdflib perl phonon pic pie png pnp policykit postgres ppd ppds pulseaudio python qt qt3 qt3support qt4 quicktime quvi rar readline resolvconf rtc rtmp samba schroedinger screensaver sctp sdl session sftp sharedmem shout smp sna sni snmp sox speex spell sqlite sse sse2 sse3 ssh ssl ssse3 steamruntime suspend2 svg tcpd theora threads tiff tls transcode truetype truetype-fonts type-fonts udev udisks unicode unzip upnp ups usb uxa v4l2 vaapi vcd vdpau videos vorbis vpx wayland webdav webkit webp webservices wifi win32codecs wmf wv x264 xa xanim xattr xcb xcomposite xinerama xml xml2 xpm xprint xrandr xv xvfb xvid xvmc zeroconf zip zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="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 dav dav_fs dav_lock dconf 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 auth_digest proxy proxy_ajp proxy_connect proxy_http reqtimeout cgi" 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" CURL_SSL="nss" 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 ublox ubx" INPUT_DEVICES="evdev joystick keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" LIRC_DEVICES="userspace" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel ilo" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Pacho Ramos gentoo-dev 2015-05-23 09:24:49 UTC
is this still valid with version 63?